aclocal.m4 revision 74c14cd6
174c14cd6Smrg# generated automatically by aclocal 1.11.3 -*- Autoconf -*- 272b676d7Smrg 372b676d7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 474c14cd6Smrg# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 574c14cd6Smrg# Inc. 672b676d7Smrg# This file is free software; the Free Software Foundation 772b676d7Smrg# gives unlimited permission to copy and/or distribute it, 872b676d7Smrg# with or without modifications, as long as this notice is preserved. 972b676d7Smrg 1072b676d7Smrg# This program is distributed in the hope that it will be useful, 1172b676d7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1272b676d7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1372b676d7Smrg# PARTICULAR PURPOSE. 1472b676d7Smrg 151fd23544Smrgm4_ifndef([AC_AUTOCONF_VERSION], 161fd23544Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1774c14cd6Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 1874c14cd6Smrg[m4_warning([this file was generated for autoconf 2.68. 191fd23544SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 201fd23544SmrgIf you have problems, you may need to regenerate the build system entirely. 211fd23544SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 221fd23544Smrg 2372b676d7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24e35772b2Smrg# 25e35772b2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2674c14cd6Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 2774c14cd6Smrg# Foundation, Inc. 28e35772b2Smrg# Written by Gordon Matzigkeit, 1996 29e35772b2Smrg# 30e35772b2Smrg# This file is free software; the Free Software Foundation gives 31e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 32e35772b2Smrg# modifications, as long as this notice is preserved. 33e35772b2Smrg 34e35772b2Smrgm4_define([_LT_COPYING], [dnl 35e35772b2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 3674c14cd6Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 3774c14cd6Smrg# Foundation, Inc. 38e35772b2Smrg# Written by Gordon Matzigkeit, 1996 39e35772b2Smrg# 40e35772b2Smrg# This file is part of GNU Libtool. 41e35772b2Smrg# 42e35772b2Smrg# GNU Libtool is free software; you can redistribute it and/or 43e35772b2Smrg# modify it under the terms of the GNU General Public License as 44e35772b2Smrg# published by the Free Software Foundation; either version 2 of 45e35772b2Smrg# the License, or (at your option) any later version. 46e35772b2Smrg# 47e35772b2Smrg# As a special exception to the GNU General Public License, 48e35772b2Smrg# if you distribute this file as part of a program or library that 49e35772b2Smrg# is built using GNU Libtool, you may include this file under the 50e35772b2Smrg# same distribution terms that you use for the rest of that program. 51e35772b2Smrg# 52e35772b2Smrg# GNU Libtool is distributed in the hope that it will be useful, 53e35772b2Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 54e35772b2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55e35772b2Smrg# GNU General Public License for more details. 56e35772b2Smrg# 57e35772b2Smrg# You should have received a copy of the GNU General Public License 58e35772b2Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 59e35772b2Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 60e35772b2Smrg# obtained by writing to the Free Software Foundation, Inc., 61e35772b2Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62e35772b2Smrg]) 6372b676d7Smrg 6474c14cd6Smrg# serial 57 LT_INIT 6572b676d7Smrg 6672b676d7Smrg 67e35772b2Smrg# LT_PREREQ(VERSION) 68e35772b2Smrg# ------------------ 69e35772b2Smrg# Complain and exit if this libtool version is less that VERSION. 70e35772b2Smrgm4_defun([LT_PREREQ], 71e35772b2Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 72e35772b2Smrg [m4_default([$3], 73e35772b2Smrg [m4_fatal([Libtool version $1 or higher is required], 74e35772b2Smrg 63)])], 75e35772b2Smrg [$2])]) 7672b676d7Smrg 7772b676d7Smrg 78e35772b2Smrg# _LT_CHECK_BUILDDIR 79e35772b2Smrg# ------------------ 80e35772b2Smrg# Complain if the absolute build directory name contains unusual characters 81e35772b2Smrgm4_defun([_LT_CHECK_BUILDDIR], 82e35772b2Smrg[case `pwd` in 83e35772b2Smrg *\ * | *\ *) 84e35772b2Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 85e35772b2Smrgesac 86e35772b2Smrg]) 87e35772b2Smrg 88e35772b2Smrg 89e35772b2Smrg# LT_INIT([OPTIONS]) 90e35772b2Smrg# ------------------ 91e35772b2SmrgAC_DEFUN([LT_INIT], 92e35772b2Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 9374c14cd6SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 94e35772b2SmrgAC_BEFORE([$0], [LT_LANG])dnl 95e35772b2SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 96e35772b2SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 97e35772b2Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 98e35772b2Smrg 99e35772b2Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 100e35772b2Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 101e35772b2Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 102e35772b2Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 103e35772b2Smrgdnl unless we require an AC_DEFUNed macro: 104e35772b2SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 105e35772b2SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 106e35772b2SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 107e35772b2SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 108e35772b2Smrgm4_require([_LT_PROG_LTMAIN])dnl 109e35772b2Smrg 11074c14cd6Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 11174c14cd6Smrg 112e35772b2Smrgdnl Parse OPTIONS 113e35772b2Smrg_LT_SET_OPTIONS([$0], [$1]) 11472b676d7Smrg 11572b676d7Smrg# This can be used to rebuild libtool when needed 116e35772b2SmrgLIBTOOL_DEPS="$ltmain" 11772b676d7Smrg 11872b676d7Smrg# Always use our own libtool. 11972b676d7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 12072b676d7SmrgAC_SUBST(LIBTOOL)dnl 12172b676d7Smrg 122e35772b2Smrg_LT_SETUP 12372b676d7Smrg 124e35772b2Smrg# Only expand once: 125e35772b2Smrgm4_define([LT_INIT]) 126e35772b2Smrg])# LT_INIT 12772b676d7Smrg 128e35772b2Smrg# Old names: 129e35772b2SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 130e35772b2SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 131e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 132e35772b2Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 133e35772b2Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 134e35772b2Smrg 135e35772b2Smrg 136e35772b2Smrg# _LT_CC_BASENAME(CC) 137e35772b2Smrg# ------------------- 138e35772b2Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 139e35772b2Smrgm4_defun([_LT_CC_BASENAME], 140e35772b2Smrg[for cc_temp in $1""; do 141e35772b2Smrg case $cc_temp in 142e35772b2Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 143e35772b2Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 144e35772b2Smrg \-*) ;; 145e35772b2Smrg *) break;; 146e35772b2Smrg esac 147e35772b2Smrgdone 14874c14cd6Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 149e35772b2Smrg]) 150e35772b2Smrg 151e35772b2Smrg 152e35772b2Smrg# _LT_FILEUTILS_DEFAULTS 153e35772b2Smrg# ---------------------- 154e35772b2Smrg# It is okay to use these file commands and assume they have been set 155e35772b2Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 156e35772b2Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 157e35772b2Smrg[: ${CP="cp -f"} 158e35772b2Smrg: ${MV="mv -f"} 159e35772b2Smrg: ${RM="rm -f"} 160e35772b2Smrg])# _LT_FILEUTILS_DEFAULTS 161e35772b2Smrg 162e35772b2Smrg 163e35772b2Smrg# _LT_SETUP 164e35772b2Smrg# --------- 165e35772b2Smrgm4_defun([_LT_SETUP], 166e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16772b676d7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 16874c14cd6SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 16974c14cd6SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 17074c14cd6Smrg 17174c14cd6Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 17274c14cd6Smrgdnl 173e35772b2Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 174e35772b2Smrg_LT_DECL([], [host], [0])dnl 175e35772b2Smrg_LT_DECL([], [host_os], [0])dnl 176e35772b2Smrgdnl 177e35772b2Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 178e35772b2Smrg_LT_DECL([], [build], [0])dnl 179e35772b2Smrg_LT_DECL([], [build_os], [0])dnl 180e35772b2Smrgdnl 18172b676d7SmrgAC_REQUIRE([AC_PROG_CC])dnl 182e35772b2SmrgAC_REQUIRE([LT_PATH_LD])dnl 183e35772b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 184e35772b2Smrgdnl 18572b676d7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 186e35772b2Smrgtest -z "$LN_S" && LN_S="ln -s" 187e35772b2Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 18872b676d7Smrgdnl 189e35772b2SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 190e35772b2Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 191e35772b2Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 192e35772b2Smrgdnl 193e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 194e35772b2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 19574c14cd6Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 196e35772b2Smrgm4_require([_LT_CMD_RELOAD])dnl 197e35772b2Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 19874c14cd6Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 199e35772b2Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 200e35772b2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 20174c14cd6Smrgm4_require([_LT_WITH_SYSROOT])dnl 202e35772b2Smrg 203e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([ 204e35772b2Smrg# See if we are running on zsh, and set the options which allow our 205e35772b2Smrg# commands through without removal of \ escapes INIT. 206e35772b2Smrgif test -n "\${ZSH_VERSION+set}" ; then 207e35772b2Smrg setopt NO_GLOB_SUBST 208e35772b2Smrgfi 209e35772b2Smrg]) 210e35772b2Smrgif test -n "${ZSH_VERSION+set}" ; then 211e35772b2Smrg setopt NO_GLOB_SUBST 212e35772b2Smrgfi 21372b676d7Smrg 214e35772b2Smrg_LT_CHECK_OBJDIR 215e35772b2Smrg 216e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 21772b676d7Smrg 21872b676d7Smrgcase $host_os in 21972b676d7Smrgaix3*) 22072b676d7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 22172b676d7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 22272b676d7Smrg # vanish in a puff of smoke. 22372b676d7Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 22472b676d7Smrg COLLECT_NAMES= 22572b676d7Smrg export COLLECT_NAMES 22672b676d7Smrg fi 22772b676d7Smrg ;; 22872b676d7Smrgesac 22972b676d7Smrg 23072b676d7Smrg# Global variables: 231e35772b2Smrgofile=libtool 23272b676d7Smrgcan_build_shared=yes 23372b676d7Smrg 23472b676d7Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 23572b676d7Smrg# which needs '.lib'). 23672b676d7Smrglibext=a 23772b676d7Smrg 238e35772b2Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 23972b676d7Smrg 24072b676d7Smrgold_CC="$CC" 24172b676d7Smrgold_CFLAGS="$CFLAGS" 24272b676d7Smrg 24372b676d7Smrg# Set sane defaults for various variables 24472b676d7Smrgtest -z "$CC" && CC=cc 24572b676d7Smrgtest -z "$LTCC" && LTCC=$CC 24672b676d7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 24772b676d7Smrgtest -z "$LD" && LD=ld 24872b676d7Smrgtest -z "$ac_objext" && ac_objext=o 24972b676d7Smrg 25072b676d7Smrg_LT_CC_BASENAME([$compiler]) 25172b676d7Smrg 25272b676d7Smrg# Only perform the check for file, if the check method requires it 253e35772b2Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 25472b676d7Smrgcase $deplibs_check_method in 25572b676d7Smrgfile_magic*) 25672b676d7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 257e35772b2Smrg _LT_PATH_MAGIC 25872b676d7Smrg fi 25972b676d7Smrg ;; 26072b676d7Smrgesac 26172b676d7Smrg 262e35772b2Smrg# Use C for the default configuration in the libtool script 263e35772b2SmrgLT_SUPPORTED_TAG([CC]) 264e35772b2Smrg_LT_LANG_C_CONFIG 265e35772b2Smrg_LT_LANG_DEFAULT_CONFIG 266e35772b2Smrg_LT_CONFIG_COMMANDS 267e35772b2Smrg])# _LT_SETUP 2681fd23544Smrg 26972b676d7Smrg 27074c14cd6Smrg# _LT_PREPARE_SED_QUOTE_VARS 27174c14cd6Smrg# -------------------------- 27274c14cd6Smrg# Define a few sed substitution that help us do robust quoting. 27374c14cd6Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 27474c14cd6Smrg[# Backslashify metacharacters that are still active within 27574c14cd6Smrg# double-quoted strings. 27674c14cd6Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 27774c14cd6Smrg 27874c14cd6Smrg# Same as above, but do not quote variable references. 27974c14cd6Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 28074c14cd6Smrg 28174c14cd6Smrg# Sed substitution to delay expansion of an escaped shell variable in a 28274c14cd6Smrg# double_quote_subst'ed string. 28374c14cd6Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 28474c14cd6Smrg 28574c14cd6Smrg# Sed substitution to delay expansion of an escaped single quote. 28674c14cd6Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 28774c14cd6Smrg 28874c14cd6Smrg# Sed substitution to avoid accidental globbing in evaled expressions 28974c14cd6Smrgno_glob_subst='s/\*/\\\*/g' 29074c14cd6Smrg]) 29174c14cd6Smrg 292e35772b2Smrg# _LT_PROG_LTMAIN 293e35772b2Smrg# --------------- 294e35772b2Smrg# Note that this code is called both from `configure', and `config.status' 295e35772b2Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 296e35772b2Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 297e35772b2Smrg# so we pass a copy along to make sure it has a sensible value anyway. 298e35772b2Smrgm4_defun([_LT_PROG_LTMAIN], 299e35772b2Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 300e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 301e35772b2Smrgltmain="$ac_aux_dir/ltmain.sh" 302e35772b2Smrg])# _LT_PROG_LTMAIN 30372b676d7Smrg 30472b676d7Smrg 305e35772b2Smrg 306e35772b2Smrg# So that we can recreate a full libtool script including additional 307e35772b2Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 308e35772b2Smrg# in macros and then make a single call at the end using the `libtool' 309e35772b2Smrg# label. 310e35772b2Smrg 311e35772b2Smrg 312e35772b2Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 313e35772b2Smrg# ---------------------------------------- 314e35772b2Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 315e35772b2Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 316e35772b2Smrg[m4_ifval([$1], 317e35772b2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 318e35772b2Smrg [$1 319e35772b2Smrg])])]) 320e35772b2Smrg 321e35772b2Smrg# Initialize. 322e35772b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 323e35772b2Smrg 324e35772b2Smrg 325e35772b2Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 326e35772b2Smrg# ------------------------------ 327e35772b2Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 328e35772b2Smrgm4_define([_LT_CONFIG_LIBTOOL], 329e35772b2Smrg[m4_ifval([$1], 330e35772b2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 331e35772b2Smrg [$1 332e35772b2Smrg])])]) 333e35772b2Smrg 334e35772b2Smrg# Initialize. 335e35772b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 336e35772b2Smrg 337e35772b2Smrg 338e35772b2Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 339e35772b2Smrg# ----------------------------------------------------- 340e35772b2Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 341e35772b2Smrg[_LT_CONFIG_LIBTOOL([$1]) 342e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 343e35772b2Smrg]) 344e35772b2Smrg 345e35772b2Smrg 346e35772b2Smrg# _LT_FORMAT_COMMENT([COMMENT]) 347e35772b2Smrg# ----------------------------- 348e35772b2Smrg# Add leading comment marks to the start of each line, and a trailing 349e35772b2Smrg# full-stop to the whole comment if one is not present already. 350e35772b2Smrgm4_define([_LT_FORMAT_COMMENT], 351e35772b2Smrg[m4_ifval([$1], [ 352e35772b2Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 353e35772b2Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 354e35772b2Smrg)]) 355e35772b2Smrg 356e35772b2Smrg 357e35772b2Smrg 358e35772b2Smrg 359e35772b2Smrg 360e35772b2Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 361e35772b2Smrg# ------------------------------------------------------------------- 362e35772b2Smrg# CONFIGNAME is the name given to the value in the libtool script. 363e35772b2Smrg# VARNAME is the (base) name used in the configure script. 364e35772b2Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 365e35772b2Smrg# VARNAME. Any other value will be used directly. 366e35772b2Smrgm4_define([_LT_DECL], 367e35772b2Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 368e35772b2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 369e35772b2Smrg [m4_ifval([$1], [$1], [$2])]) 370e35772b2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 371e35772b2Smrg m4_ifval([$4], 372e35772b2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 373e35772b2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 374e35772b2Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 375e35772b2Smrg]) 376e35772b2Smrg 377e35772b2Smrg 378e35772b2Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 379e35772b2Smrg# -------------------------------------------------------- 380e35772b2Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 381e35772b2Smrg 382e35772b2Smrg 383e35772b2Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 384e35772b2Smrg# ------------------------------------------------ 385e35772b2Smrgm4_define([lt_decl_tag_varnames], 386e35772b2Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 387e35772b2Smrg 388e35772b2Smrg 389e35772b2Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 390e35772b2Smrg# --------------------------------------------------------- 391e35772b2Smrgm4_define([_lt_decl_filter], 392e35772b2Smrg[m4_case([$#], 393e35772b2Smrg [0], [m4_fatal([$0: too few arguments: $#])], 394e35772b2Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 395e35772b2Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 396e35772b2Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 397e35772b2Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 398e35772b2Smrg]) 399e35772b2Smrg 400e35772b2Smrg 401e35772b2Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 402e35772b2Smrg# -------------------------------------------------- 403e35772b2Smrgm4_define([lt_decl_quote_varnames], 404e35772b2Smrg[_lt_decl_filter([value], [1], $@)]) 405e35772b2Smrg 406e35772b2Smrg 407e35772b2Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 408e35772b2Smrg# --------------------------------------------------- 409e35772b2Smrgm4_define([lt_decl_dquote_varnames], 410e35772b2Smrg[_lt_decl_filter([value], [2], $@)]) 411e35772b2Smrg 412e35772b2Smrg 413e35772b2Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 414e35772b2Smrg# --------------------------------------------------- 415e35772b2Smrgm4_define([lt_decl_varnames_tagged], 416e35772b2Smrg[m4_assert([$# <= 2])dnl 417e35772b2Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 418e35772b2Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 419e35772b2Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 420e35772b2Smrgm4_define([_lt_decl_varnames_tagged], 421e35772b2Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 422e35772b2Smrg 423e35772b2Smrg 424e35772b2Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 425e35772b2Smrg# ------------------------------------------------ 426e35772b2Smrgm4_define([lt_decl_all_varnames], 427e35772b2Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 428e35772b2Smrg m4_if([$2], [], 429e35772b2Smrg m4_quote(lt_decl_varnames), 430e35772b2Smrg m4_quote(m4_shift($@))))[]dnl 431e35772b2Smrg]) 432e35772b2Smrgm4_define([_lt_decl_all_varnames], 433e35772b2Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 434e35772b2Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 435e35772b2Smrg]) 436e35772b2Smrg 437e35772b2Smrg 438e35772b2Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 439e35772b2Smrg# ------------------------------------ 440e35772b2Smrg# Quote a variable value, and forward it to `config.status' so that its 441e35772b2Smrg# declaration there will have the same value as in `configure'. VARNAME 442e35772b2Smrg# must have a single quote delimited value for this to work. 443e35772b2Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 44474c14cd6Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 445e35772b2Smrg 446e35772b2Smrg 447e35772b2Smrg# _LT_CONFIG_STATUS_DECLARATIONS 448e35772b2Smrg# ------------------------------ 449e35772b2Smrg# We delimit libtool config variables with single quotes, so when 450e35772b2Smrg# we write them to config.status, we have to be sure to quote all 451e35772b2Smrg# embedded single quotes properly. In configure, this macro expands 452e35772b2Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 453e35772b2Smrg# 45474c14cd6Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 455e35772b2Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 456e35772b2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 457e35772b2Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 458e35772b2Smrg 459e35772b2Smrg 460e35772b2Smrg# _LT_LIBTOOL_TAGS 461e35772b2Smrg# ---------------- 462e35772b2Smrg# Output comment and list of tags supported by the script 463e35772b2Smrgm4_defun([_LT_LIBTOOL_TAGS], 464e35772b2Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 465e35772b2Smrgavailable_tags="_LT_TAGS"dnl 466e35772b2Smrg]) 467e35772b2Smrg 468e35772b2Smrg 469e35772b2Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 470e35772b2Smrg# ----------------------------------- 471e35772b2Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 472e35772b2Smrg# expand to a commented shell variable setting: 473e35772b2Smrg# 474e35772b2Smrg# # Some comment about what VAR is for. 475e35772b2Smrg# visible_name=$lt_internal_name 476e35772b2Smrgm4_define([_LT_LIBTOOL_DECLARE], 477e35772b2Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 478e35772b2Smrg [description])))[]dnl 479e35772b2Smrgm4_pushdef([_libtool_name], 480e35772b2Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 481e35772b2Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 482e35772b2Smrg [0], [_libtool_name=[$]$1], 483e35772b2Smrg [1], [_libtool_name=$lt_[]$1], 484e35772b2Smrg [2], [_libtool_name=$lt_[]$1], 485e35772b2Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 486e35772b2Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 487e35772b2Smrg]) 488e35772b2Smrg 489e35772b2Smrg 490e35772b2Smrg# _LT_LIBTOOL_CONFIG_VARS 491e35772b2Smrg# ----------------------- 492e35772b2Smrg# Produce commented declarations of non-tagged libtool config variables 493e35772b2Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 494e35772b2Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 495e35772b2Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 496e35772b2Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 497e35772b2Smrg[m4_foreach([_lt_var], 498e35772b2Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 499e35772b2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 500e35772b2Smrg 501e35772b2Smrg 502e35772b2Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 503e35772b2Smrg# ------------------------- 504e35772b2Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 505e35772b2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 506e35772b2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 50772b676d7Smrg 50872b676d7Smrg 509e35772b2Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 510e35772b2Smrg# ------------------------------ 511e35772b2Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 512e35772b2Smrg 513e35772b2Smrg 514e35772b2Smrg# _LT_CONFIG_COMMANDS 51572b676d7Smrg# ------------------- 516e35772b2Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 517e35772b2Smrg# variables for single and double quote escaping we saved from calls 518e35772b2Smrg# to _LT_DECL, we can put quote escaped variables declarations 519e35772b2Smrg# into `config.status', and then the shell code to quote escape them in 520e35772b2Smrg# for loops in `config.status'. Finally, any additional code accumulated 521e35772b2Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 522e35772b2Smrgm4_defun([_LT_CONFIG_COMMANDS], 523e35772b2Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 524e35772b2Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 525e35772b2Smrg dnl instead of duplicating it all over again into config.status, 526e35772b2Smrg dnl then we will have config.status run $CONFIG_LT later, so it 527e35772b2Smrg dnl needs to know what name is stored there: 528e35772b2Smrg [AC_CONFIG_COMMANDS([libtool], 529e35772b2Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 530e35772b2Smrg dnl If the libtool generation code is destined for config.status, 531e35772b2Smrg dnl expand the accumulated commands and init code now: 532e35772b2Smrg [AC_CONFIG_COMMANDS([libtool], 533e35772b2Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 534e35772b2Smrg])#_LT_CONFIG_COMMANDS 535e35772b2Smrg 536e35772b2Smrg 537e35772b2Smrg# Initialize. 538e35772b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 539e35772b2Smrg[ 540e35772b2Smrg 541e35772b2Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 542e35772b2Smrg# if CDPATH is set. 543e35772b2Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 544e35772b2Smrg 545e35772b2Smrgsed_quote_subst='$sed_quote_subst' 546e35772b2Smrgdouble_quote_subst='$double_quote_subst' 547e35772b2Smrgdelay_variable_subst='$delay_variable_subst' 548e35772b2Smrg_LT_CONFIG_STATUS_DECLARATIONS 549e35772b2SmrgLTCC='$LTCC' 550e35772b2SmrgLTCFLAGS='$LTCFLAGS' 551e35772b2Smrgcompiler='$compiler_DEFAULT' 552e35772b2Smrg 55374c14cd6Smrg# A function that is used when there is no print builtin or printf. 55474c14cd6Smrgfunc_fallback_echo () 55574c14cd6Smrg{ 55674c14cd6Smrg eval 'cat <<_LTECHO_EOF 55774c14cd6Smrg\$[]1 55874c14cd6Smrg_LTECHO_EOF' 55974c14cd6Smrg} 56074c14cd6Smrg 561e35772b2Smrg# Quote evaled strings. 562e35772b2Smrgfor var in lt_decl_all_varnames([[ \ 563e35772b2Smrg]], lt_decl_quote_varnames); do 56474c14cd6Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 565e35772b2Smrg *[[\\\\\\\`\\"\\\$]]*) 56674c14cd6Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 567e35772b2Smrg ;; 568e35772b2Smrg *) 569e35772b2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 570e35772b2Smrg ;; 571e35772b2Smrg esac 572e35772b2Smrgdone 573e35772b2Smrg 574e35772b2Smrg# Double-quote double-evaled strings. 575e35772b2Smrgfor var in lt_decl_all_varnames([[ \ 576e35772b2Smrg]], lt_decl_dquote_varnames); do 57774c14cd6Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 578e35772b2Smrg *[[\\\\\\\`\\"\\\$]]*) 57974c14cd6Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 580e35772b2Smrg ;; 581e35772b2Smrg *) 582e35772b2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 583e35772b2Smrg ;; 584e35772b2Smrg esac 585e35772b2Smrgdone 586e35772b2Smrg 587e35772b2Smrg_LT_OUTPUT_LIBTOOL_INIT 588e35772b2Smrg]) 589e35772b2Smrg 59074c14cd6Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 59174c14cd6Smrg# ------------------------------------ 59274c14cd6Smrg# Generate a child script FILE with all initialization necessary to 59374c14cd6Smrg# reuse the environment learned by the parent script, and make the 59474c14cd6Smrg# file executable. If COMMENT is supplied, it is inserted after the 59574c14cd6Smrg# `#!' sequence but before initialization text begins. After this 59674c14cd6Smrg# macro, additional text can be appended to FILE to form the body of 59774c14cd6Smrg# the child script. The macro ends with non-zero status if the 59874c14cd6Smrg# file could not be fully written (such as if the disk is full). 59974c14cd6Smrgm4_ifdef([AS_INIT_GENERATED], 60074c14cd6Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 60174c14cd6Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 60274c14cd6Smrg[m4_require([AS_PREPARE])]dnl 60374c14cd6Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 60474c14cd6Smrg[lt_write_fail=0 60574c14cd6Smrgcat >$1 <<_ASEOF || lt_write_fail=1 60674c14cd6Smrg#! $SHELL 60774c14cd6Smrg# Generated by $as_me. 60874c14cd6Smrg$2 60974c14cd6SmrgSHELL=\${CONFIG_SHELL-$SHELL} 61074c14cd6Smrgexport SHELL 61174c14cd6Smrg_ASEOF 61274c14cd6Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 61374c14cd6SmrgAS_SHELL_SANITIZE 61474c14cd6Smrg_AS_PREPARE 61574c14cd6Smrgexec AS_MESSAGE_FD>&1 61674c14cd6Smrg_ASEOF 61774c14cd6Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 61874c14cd6Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 619e35772b2Smrg 620e35772b2Smrg# LT_OUTPUT 621e35772b2Smrg# --------- 622e35772b2Smrg# This macro allows early generation of the libtool script (before 623e35772b2Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 624e35772b2Smrg# tests. 625e35772b2SmrgAC_DEFUN([LT_OUTPUT], 626e35772b2Smrg[: ${CONFIG_LT=./config.lt} 627e35772b2SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 62874c14cd6Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 62974c14cd6Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 630e35772b2Smrg 631e35772b2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 63274c14cd6Smrglt_cl_silent=false 633e35772b2Smrgexec AS_MESSAGE_LOG_FD>>config.log 634e35772b2Smrg{ 635e35772b2Smrg echo 636e35772b2Smrg AS_BOX([Running $as_me.]) 637e35772b2Smrg} >&AS_MESSAGE_LOG_FD 638e35772b2Smrg 639e35772b2Smrglt_cl_help="\ 640e35772b2Smrg\`$as_me' creates a local libtool stub from the current configuration, 641e35772b2Smrgfor use in further configure time tests before the real libtool is 642e35772b2Smrggenerated. 643e35772b2Smrg 644e35772b2SmrgUsage: $[0] [[OPTIONS]] 645e35772b2Smrg 646e35772b2Smrg -h, --help print this help, then exit 647e35772b2Smrg -V, --version print version number, then exit 648e35772b2Smrg -q, --quiet do not print progress messages 649e35772b2Smrg -d, --debug don't remove temporary files 650e35772b2Smrg 651e35772b2SmrgReport bugs to <bug-libtool@gnu.org>." 652e35772b2Smrg 653e35772b2Smrglt_cl_version="\ 654e35772b2Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 655e35772b2Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 656e35772b2Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 657e35772b2Smrg 65874c14cd6SmrgCopyright (C) 2011 Free Software Foundation, Inc. 659e35772b2SmrgThis config.lt script is free software; the Free Software Foundation 660e35772b2Smrggives unlimited permision to copy, distribute and modify it." 661e35772b2Smrg 662e35772b2Smrgwhile test $[#] != 0 663e35772b2Smrgdo 664e35772b2Smrg case $[1] in 665e35772b2Smrg --version | --v* | -V ) 666e35772b2Smrg echo "$lt_cl_version"; exit 0 ;; 667e35772b2Smrg --help | --h* | -h ) 668e35772b2Smrg echo "$lt_cl_help"; exit 0 ;; 669e35772b2Smrg --debug | --d* | -d ) 670e35772b2Smrg debug=: ;; 671e35772b2Smrg --quiet | --q* | --silent | --s* | -q ) 672e35772b2Smrg lt_cl_silent=: ;; 673e35772b2Smrg 674e35772b2Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 675e35772b2SmrgTry \`$[0] --help' for more information.]) ;; 676e35772b2Smrg 677e35772b2Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 678e35772b2SmrgTry \`$[0] --help' for more information.]) ;; 679e35772b2Smrg esac 680e35772b2Smrg shift 681e35772b2Smrgdone 682e35772b2Smrg 683e35772b2Smrgif $lt_cl_silent; then 684e35772b2Smrg exec AS_MESSAGE_FD>/dev/null 685e35772b2Smrgfi 686e35772b2Smrg_LTEOF 687e35772b2Smrg 688e35772b2Smrgcat >>"$CONFIG_LT" <<_LTEOF 689e35772b2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 690e35772b2Smrg_LTEOF 691e35772b2Smrg 692e35772b2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 693e35772b2SmrgAC_MSG_NOTICE([creating $ofile]) 694e35772b2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 695e35772b2SmrgAS_EXIT(0) 696e35772b2Smrg_LTEOF 697e35772b2Smrgchmod +x "$CONFIG_LT" 698e35772b2Smrg 699e35772b2Smrg# configure is writing to config.log, but config.lt does its own redirection, 700e35772b2Smrg# appending to config.log, which fails on DOS, as config.log is still kept 701e35772b2Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 702e35772b2Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 70374c14cd6Smrglt_cl_success=: 70474c14cd6Smrgtest "$silent" = yes && 70574c14cd6Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 70674c14cd6Smrgexec AS_MESSAGE_LOG_FD>/dev/null 70774c14cd6Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 70874c14cd6Smrgexec AS_MESSAGE_LOG_FD>>config.log 70974c14cd6Smrg$lt_cl_success || AS_EXIT(1) 710e35772b2Smrg])# LT_OUTPUT 711e35772b2Smrg 712e35772b2Smrg 713e35772b2Smrg# _LT_CONFIG(TAG) 714e35772b2Smrg# --------------- 715e35772b2Smrg# If TAG is the built-in tag, create an initial libtool script with a 716e35772b2Smrg# default configuration from the untagged config vars. Otherwise add code 717e35772b2Smrg# to config.status for appending the configuration named by TAG from the 718e35772b2Smrg# matching tagged config vars. 719e35772b2Smrgm4_defun([_LT_CONFIG], 720e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 721e35772b2Smrg_LT_CONFIG_SAVE_COMMANDS([ 722e35772b2Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 723e35772b2Smrg m4_if(_LT_TAG, [C], [ 724e35772b2Smrg # See if we are running on zsh, and set the options which allow our 725e35772b2Smrg # commands through without removal of \ escapes. 726e35772b2Smrg if test -n "${ZSH_VERSION+set}" ; then 727e35772b2Smrg setopt NO_GLOB_SUBST 728e35772b2Smrg fi 729e35772b2Smrg 730e35772b2Smrg cfgfile="${ofile}T" 731e35772b2Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 732e35772b2Smrg $RM "$cfgfile" 733e35772b2Smrg 734e35772b2Smrg cat <<_LT_EOF >> "$cfgfile" 735e35772b2Smrg#! $SHELL 736e35772b2Smrg 737e35772b2Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 738e35772b2Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 739e35772b2Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 740e35772b2Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 741e35772b2Smrg# 742e35772b2Smrg_LT_COPYING 743e35772b2Smrg_LT_LIBTOOL_TAGS 744e35772b2Smrg 745e35772b2Smrg# ### BEGIN LIBTOOL CONFIG 746e35772b2Smrg_LT_LIBTOOL_CONFIG_VARS 747e35772b2Smrg_LT_LIBTOOL_TAG_VARS 748e35772b2Smrg# ### END LIBTOOL CONFIG 749e35772b2Smrg 750e35772b2Smrg_LT_EOF 751e35772b2Smrg 752e35772b2Smrg case $host_os in 753e35772b2Smrg aix3*) 754e35772b2Smrg cat <<\_LT_EOF >> "$cfgfile" 755e35772b2Smrg# AIX sometimes has problems with the GCC collect2 program. For some 756e35772b2Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 757e35772b2Smrg# vanish in a puff of smoke. 758e35772b2Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 759e35772b2Smrg COLLECT_NAMES= 760e35772b2Smrg export COLLECT_NAMES 761e35772b2Smrgfi 762e35772b2Smrg_LT_EOF 763e35772b2Smrg ;; 764e35772b2Smrg esac 765e35772b2Smrg 766e35772b2Smrg _LT_PROG_LTMAIN 767e35772b2Smrg 768e35772b2Smrg # We use sed instead of cat because bash on DJGPP gets confused if 769e35772b2Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 770e35772b2Smrg # text mode, it properly converts lines to CR/LF. This bash problem 771e35772b2Smrg # is reportedly fixed, but why not run on old versions too? 77274c14cd6Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 77374c14cd6Smrg || (rm -f "$cfgfile"; exit 1) 774e35772b2Smrg 77574c14cd6Smrg _LT_PROG_REPLACE_SHELLFNS 776e35772b2Smrg 77774c14cd6Smrg mv -f "$cfgfile" "$ofile" || 778e35772b2Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 779e35772b2Smrg chmod +x "$ofile" 780e35772b2Smrg], 781e35772b2Smrg[cat <<_LT_EOF >> "$ofile" 782e35772b2Smrg 783e35772b2Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 784e35772b2Smrgdnl in a comment (ie after a #). 785e35772b2Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 786e35772b2Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 787e35772b2Smrg# ### END LIBTOOL TAG CONFIG: $1 788e35772b2Smrg_LT_EOF 789e35772b2Smrg])dnl /m4_if 790e35772b2Smrg], 791e35772b2Smrg[m4_if([$1], [], [ 792e35772b2Smrg PACKAGE='$PACKAGE' 793e35772b2Smrg VERSION='$VERSION' 794e35772b2Smrg TIMESTAMP='$TIMESTAMP' 795e35772b2Smrg RM='$RM' 796e35772b2Smrg ofile='$ofile'], []) 797e35772b2Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 798e35772b2Smrg])# _LT_CONFIG 799e35772b2Smrg 800e35772b2Smrg 801e35772b2Smrg# LT_SUPPORTED_TAG(TAG) 802e35772b2Smrg# --------------------- 803e35772b2Smrg# Trace this macro to discover what tags are supported by the libtool 804e35772b2Smrg# --tag option, using: 805e35772b2Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 806e35772b2SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 807e35772b2Smrg 808e35772b2Smrg 809e35772b2Smrg# C support is built-in for now 810e35772b2Smrgm4_define([_LT_LANG_C_enabled], []) 811e35772b2Smrgm4_define([_LT_TAGS], []) 812e35772b2Smrg 813e35772b2Smrg 814e35772b2Smrg# LT_LANG(LANG) 815e35772b2Smrg# ------------- 816e35772b2Smrg# Enable libtool support for the given language if not already enabled. 817e35772b2SmrgAC_DEFUN([LT_LANG], 818e35772b2Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 819e35772b2Smrgm4_case([$1], 820e35772b2Smrg [C], [_LT_LANG(C)], 821e35772b2Smrg [C++], [_LT_LANG(CXX)], 82274c14cd6Smrg [Go], [_LT_LANG(GO)], 823e35772b2Smrg [Java], [_LT_LANG(GCJ)], 824e35772b2Smrg [Fortran 77], [_LT_LANG(F77)], 825e35772b2Smrg [Fortran], [_LT_LANG(FC)], 826e35772b2Smrg [Windows Resource], [_LT_LANG(RC)], 827e35772b2Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 828e35772b2Smrg [_LT_LANG($1)], 829e35772b2Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 830e35772b2Smrg])# LT_LANG 831e35772b2Smrg 832e35772b2Smrg 833e35772b2Smrg# _LT_LANG(LANGNAME) 834e35772b2Smrg# ------------------ 835e35772b2Smrgm4_defun([_LT_LANG], 836e35772b2Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 837e35772b2Smrg [LT_SUPPORTED_TAG([$1])dnl 838e35772b2Smrg m4_append([_LT_TAGS], [$1 ])dnl 839e35772b2Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 840e35772b2Smrg _LT_LANG_$1_CONFIG($1)])dnl 841e35772b2Smrg])# _LT_LANG 842e35772b2Smrg 843e35772b2Smrg 84474c14cd6Smrgm4_ifndef([AC_PROG_GO], [ 84574c14cd6Smrg# NOTE: This macro has been submitted for inclusion into # 84674c14cd6Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 84774c14cd6Smrg# a released version of Autoconf we should remove this # 84874c14cd6Smrg# macro and use it instead. # 84974c14cd6Smrgm4_defun([AC_PROG_GO], 85074c14cd6Smrg[AC_LANG_PUSH(Go)dnl 85174c14cd6SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 85274c14cd6SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 85374c14cd6Smrg_AC_ARG_VAR_LDFLAGS()dnl 85474c14cd6SmrgAC_CHECK_TOOL(GOC, gccgo) 85574c14cd6Smrgif test -z "$GOC"; then 85674c14cd6Smrg if test -n "$ac_tool_prefix"; then 85774c14cd6Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 85874c14cd6Smrg fi 85974c14cd6Smrgfi 86074c14cd6Smrgif test -z "$GOC"; then 86174c14cd6Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 86274c14cd6Smrgfi 86374c14cd6Smrg])#m4_defun 86474c14cd6Smrg])#m4_ifndef 86574c14cd6Smrg 86674c14cd6Smrg 867e35772b2Smrg# _LT_LANG_DEFAULT_CONFIG 868e35772b2Smrg# ----------------------- 869e35772b2Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 870e35772b2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 871e35772b2Smrg [LT_LANG(CXX)], 872e35772b2Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 873e35772b2Smrg 874e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 875e35772b2Smrg [LT_LANG(F77)], 876e35772b2Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 877e35772b2Smrg 878e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 879e35772b2Smrg [LT_LANG(FC)], 880e35772b2Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 881e35772b2Smrg 882e35772b2Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 883e35772b2Smrgdnl pulling things in needlessly. 884e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 885e35772b2Smrg [LT_LANG(GCJ)], 886e35772b2Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 887e35772b2Smrg [LT_LANG(GCJ)], 888e35772b2Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 889e35772b2Smrg [LT_LANG(GCJ)], 890e35772b2Smrg [m4_ifdef([AC_PROG_GCJ], 891e35772b2Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 892e35772b2Smrg m4_ifdef([A][M_PROG_GCJ], 893e35772b2Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 894e35772b2Smrg m4_ifdef([LT_PROG_GCJ], 895e35772b2Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 896e35772b2Smrg 89774c14cd6SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 89874c14cd6Smrg [LT_LANG(GO)], 89974c14cd6Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 90074c14cd6Smrg 901e35772b2SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 902e35772b2Smrg [LT_LANG(RC)], 903e35772b2Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 904e35772b2Smrg])# _LT_LANG_DEFAULT_CONFIG 905e35772b2Smrg 906e35772b2Smrg# Obsolete macros: 907e35772b2SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 908e35772b2SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 909e35772b2SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 910e35772b2SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 91174c14cd6SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 912e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 913e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 914e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 915e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 916e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 91774c14cd6Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 918e35772b2Smrg 919e35772b2Smrg 920e35772b2Smrg# _LT_TAG_COMPILER 921e35772b2Smrg# ---------------- 922e35772b2Smrgm4_defun([_LT_TAG_COMPILER], 92372b676d7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 92472b676d7Smrg 925e35772b2Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 926e35772b2Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 927e35772b2Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 928e35772b2Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 929e35772b2Smrg 93072b676d7Smrg# If no C compiler was specified, use CC. 93172b676d7SmrgLTCC=${LTCC-"$CC"} 93272b676d7Smrg 93372b676d7Smrg# If no C compiler flags were specified, use CFLAGS. 93472b676d7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 93572b676d7Smrg 93672b676d7Smrg# Allow CC to be a program name with arguments. 93772b676d7Smrgcompiler=$CC 938e35772b2Smrg])# _LT_TAG_COMPILER 93972b676d7Smrg 94072b676d7Smrg 94172b676d7Smrg# _LT_COMPILER_BOILERPLATE 94272b676d7Smrg# ------------------------ 94372b676d7Smrg# Check for compiler boilerplate output or warnings with 94472b676d7Smrg# the simple compiler test code. 945e35772b2Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 946e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 9471fd23544Smrgac_outfile=conftest.$ac_objext 9481fd23544Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 94972b676d7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 95072b676d7Smrg_lt_compiler_boilerplate=`cat conftest.err` 951e35772b2Smrg$RM conftest* 95272b676d7Smrg])# _LT_COMPILER_BOILERPLATE 95372b676d7Smrg 95472b676d7Smrg 95572b676d7Smrg# _LT_LINKER_BOILERPLATE 95672b676d7Smrg# ---------------------- 95772b676d7Smrg# Check for linker boilerplate output or warnings with 95872b676d7Smrg# the simple link test code. 959e35772b2Smrgm4_defun([_LT_LINKER_BOILERPLATE], 960e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 9611fd23544Smrgac_outfile=conftest.$ac_objext 9621fd23544Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 96372b676d7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 96472b676d7Smrg_lt_linker_boilerplate=`cat conftest.err` 965e35772b2Smrg$RM -r conftest* 96672b676d7Smrg])# _LT_LINKER_BOILERPLATE 96772b676d7Smrg 9681fd23544Smrg# _LT_REQUIRED_DARWIN_CHECKS 969e35772b2Smrg# ------------------------- 970e35772b2Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9711fd23544Smrg case $host_os in 9721fd23544Smrg rhapsody* | darwin*) 9731fd23544Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9741fd23544Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 975e35772b2Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 976e35772b2Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 977e35772b2Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 978e35772b2Smrg _LT_DECL([], [DSYMUTIL], [1], 979e35772b2Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 980e35772b2Smrg _LT_DECL([], [NMEDIT], [1], 981e35772b2Smrg [Tool to change global to local symbols on Mac OS X]) 982e35772b2Smrg _LT_DECL([], [LIPO], [1], 983e35772b2Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 984e35772b2Smrg _LT_DECL([], [OTOOL], [1], 985e35772b2Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 986e35772b2Smrg _LT_DECL([], [OTOOL64], [1], 987e35772b2Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9881fd23544Smrg 9891fd23544Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9901fd23544Smrg [lt_cv_apple_cc_single_mod=no 9911fd23544Smrg if test -z "${LT_MULTI_MODULE}"; then 992e35772b2Smrg # By default we will add the -single_module flag. You can override 993e35772b2Smrg # by either setting the environment variable LT_MULTI_MODULE 994e35772b2Smrg # non-empty at configure time, or by adding -multi_module to the 995e35772b2Smrg # link flags. 996e35772b2Smrg rm -rf libconftest.dylib* 997e35772b2Smrg echo "int foo(void){return 1;}" > conftest.c 998e35772b2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 999e35772b2Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1000e35772b2Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1001e35772b2Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1002e35772b2Smrg _lt_result=$? 100374c14cd6Smrg # If there is a non-empty error log, and "single_module" 100474c14cd6Smrg # appears in it, assume the flag caused a linker warning 100574c14cd6Smrg if test -s conftest.err && $GREP single_module conftest.err; then 100674c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 100774c14cd6Smrg # Otherwise, if the output was created with a 0 exit code from 100874c14cd6Smrg # the compiler, it worked. 100974c14cd6Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 1010e35772b2Smrg lt_cv_apple_cc_single_mod=yes 1011e35772b2Smrg else 1012e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1013e35772b2Smrg fi 1014e35772b2Smrg rm -rf libconftest.dylib* 1015e35772b2Smrg rm -f conftest.* 10161fd23544Smrg fi]) 101774c14cd6Smrg 10181fd23544Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10191fd23544Smrg [lt_cv_ld_exported_symbols_list], 10201fd23544Smrg [lt_cv_ld_exported_symbols_list=no 10211fd23544Smrg save_LDFLAGS=$LDFLAGS 10221fd23544Smrg echo "_main" > conftest.sym 10231fd23544Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10241fd23544Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1025e35772b2Smrg [lt_cv_ld_exported_symbols_list=yes], 1026e35772b2Smrg [lt_cv_ld_exported_symbols_list=no]) 1027e35772b2Smrg LDFLAGS="$save_LDFLAGS" 10281fd23544Smrg ]) 102974c14cd6Smrg 103074c14cd6Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 103174c14cd6Smrg [lt_cv_ld_force_load=no 103274c14cd6Smrg cat > conftest.c << _LT_EOF 103374c14cd6Smrgint forced_loaded() { return 2;} 103474c14cd6Smrg_LT_EOF 103574c14cd6Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 103674c14cd6Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 103774c14cd6Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 103874c14cd6Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 103974c14cd6Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 104074c14cd6Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 104174c14cd6Smrg cat > conftest.c << _LT_EOF 104274c14cd6Smrgint main() { return 0;} 104374c14cd6Smrg_LT_EOF 104474c14cd6Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 104574c14cd6Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 104674c14cd6Smrg _lt_result=$? 104774c14cd6Smrg if test -s conftest.err && $GREP force_load conftest.err; then 104874c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 104974c14cd6Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 105074c14cd6Smrg lt_cv_ld_force_load=yes 105174c14cd6Smrg else 105274c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 105374c14cd6Smrg fi 105474c14cd6Smrg rm -f conftest.err libconftest.a conftest conftest.c 105574c14cd6Smrg rm -rf conftest.dSYM 105674c14cd6Smrg ]) 10571fd23544Smrg case $host_os in 1058e35772b2Smrg rhapsody* | darwin1.[[012]]) 10591fd23544Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 10601fd23544Smrg darwin1.*) 1061e35772b2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1062e35772b2Smrg darwin*) # darwin 5.x on 10631fd23544Smrg # if running on 10.5 or later, the deployment target defaults 10641fd23544Smrg # to the OS version, if on x86, and 10.4, the deployment 10651fd23544Smrg # target defaults to 10.4. Don't you love it? 10661fd23544Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1067e35772b2Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1068e35772b2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1069e35772b2Smrg 10.[[012]]*) 1070e35772b2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1071e35772b2Smrg 10.*) 1072e35772b2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10731fd23544Smrg esac 10741fd23544Smrg ;; 10751fd23544Smrg esac 10761fd23544Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 10771fd23544Smrg _lt_dar_single_mod='$single_module' 10781fd23544Smrg fi 10791fd23544Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 10801fd23544Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 10811fd23544Smrg else 1082e35772b2Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 10831fd23544Smrg fi 108474c14cd6Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1085e35772b2Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10861fd23544Smrg else 10871fd23544Smrg _lt_dsymutil= 10881fd23544Smrg fi 10891fd23544Smrg ;; 10901fd23544Smrg esac 10911fd23544Smrg]) 109272b676d7Smrg 1093e35772b2Smrg 109474c14cd6Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 109574c14cd6Smrg# --------------------------------- 1096e35772b2Smrg# Checks for linker and compiler features on darwin 1097e35772b2Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1098e35772b2Smrg[ 1099e35772b2Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1100e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1101e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1102e35772b2Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1103e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 110474c14cd6Smrg if test "$lt_cv_ld_force_load" = "yes"; then 110574c14cd6Smrg _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\"`' 110674c14cd6Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 110774c14cd6Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 110874c14cd6Smrg else 110974c14cd6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 111074c14cd6Smrg fi 1111e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1112e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1113e35772b2Smrg case $cc_basename in 1114e35772b2Smrg ifort*) _lt_dar_can_shared=yes ;; 1115e35772b2Smrg *) _lt_dar_can_shared=$GCC ;; 1116e35772b2Smrg esac 1117e35772b2Smrg if test "$_lt_dar_can_shared" = "yes"; then 111874c14cd6Smrg output_verbose_link_cmd=func_echo_all 1119e35772b2Smrg _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}" 1120e35772b2Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1121e35772b2Smrg _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}" 1122e35772b2Smrg _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}" 1123e35772b2Smrg m4_if([$1], [CXX], 1124e35772b2Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1125e35772b2Smrg _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}" 1126e35772b2Smrg _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}" 1127e35772b2Smrg fi 1128e35772b2Smrg],[]) 1129e35772b2Smrg else 1130e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1131e35772b2Smrg fi 1132e35772b2Smrg]) 1133e35772b2Smrg 113474c14cd6Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 113574c14cd6Smrg# ---------------------------------- 113672b676d7Smrg# Links a minimal program and checks the executable 113772b676d7Smrg# for the system default hardcoded library path. In most cases, 113872b676d7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 113972b676d7Smrg# the location of the communication and MPI libs are included too. 114072b676d7Smrg# If we don't find anything, use the default library path according 114172b676d7Smrg# to the aix ld manual. 114274c14cd6Smrg# Store the results from the different compilers for each TAGNAME. 114374c14cd6Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1144e35772b2Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1145e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 114674c14cd6Smrgif test "${lt_cv_aix_libpath+set}" = set; then 114774c14cd6Smrg aix_libpath=$lt_cv_aix_libpath 114874c14cd6Smrgelse 114974c14cd6Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 115074c14cd6Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 115174c14cd6Smrg lt_aix_libpath_sed='[ 115274c14cd6Smrg /Import File Strings/,/^$/ { 115374c14cd6Smrg /^0/ { 115474c14cd6Smrg s/^0 *\([^ ]*\) *$/\1/ 115574c14cd6Smrg p 115674c14cd6Smrg } 115774c14cd6Smrg }]' 115874c14cd6Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 115974c14cd6Smrg # Check for a 64-bit object if we didn't find anything. 116074c14cd6Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 116174c14cd6Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 116274c14cd6Smrg fi],[]) 116374c14cd6Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 116474c14cd6Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 116574c14cd6Smrg fi 116674c14cd6Smrg ]) 116774c14cd6Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 116874c14cd6Smrgfi 1169e35772b2Smrg])# _LT_SYS_MODULE_PATH_AIX 117072b676d7Smrg 117172b676d7Smrg 1172e35772b2Smrg# _LT_SHELL_INIT(ARG) 1173e35772b2Smrg# ------------------- 1174e35772b2Smrgm4_define([_LT_SHELL_INIT], 117574c14cd6Smrg[m4_divert_text([M4SH-INIT], [$1 117674c14cd6Smrg])])# _LT_SHELL_INIT 117774c14cd6Smrg 117872b676d7Smrg 117972b676d7Smrg 1180e35772b2Smrg# _LT_PROG_ECHO_BACKSLASH 1181e35772b2Smrg# ----------------------- 118274c14cd6Smrg# Find how we can fake an echo command that does not interpret backslash. 118374c14cd6Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 118474c14cd6Smrg# of the generated configure script which will find a shell with a builtin 118574c14cd6Smrg# printf (which we can use as an echo command). 1186e35772b2Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 118774c14cd6Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 118874c14cd6SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 118974c14cd6SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 119074c14cd6Smrg 119174c14cd6SmrgAC_MSG_CHECKING([how to print strings]) 119274c14cd6Smrg# Test print first, because it will be a builtin if present. 119374c14cd6Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 119474c14cd6Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 119574c14cd6Smrg ECHO='print -r --' 119674c14cd6Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 119774c14cd6Smrg ECHO='printf %s\n' 119872b676d7Smrgelse 119974c14cd6Smrg # Use this function as a fallback that always works. 120074c14cd6Smrg func_fallback_echo () 120174c14cd6Smrg { 120274c14cd6Smrg eval 'cat <<_LTECHO_EOF 120374c14cd6Smrg$[]1 120474c14cd6Smrg_LTECHO_EOF' 120574c14cd6Smrg } 120674c14cd6Smrg ECHO='func_fallback_echo' 120772b676d7Smrgfi 120872b676d7Smrg 120974c14cd6Smrg# func_echo_all arg... 121074c14cd6Smrg# Invoke $ECHO with all args, space-separated. 121174c14cd6Smrgfunc_echo_all () 121274c14cd6Smrg{ 121374c14cd6Smrg $ECHO "$*" 121474c14cd6Smrg} 121572b676d7Smrg 121674c14cd6Smrgcase "$ECHO" in 121774c14cd6Smrg printf*) AC_MSG_RESULT([printf]) ;; 121874c14cd6Smrg print*) AC_MSG_RESULT([print -r]) ;; 121974c14cd6Smrg *) AC_MSG_RESULT([cat]) ;; 122074c14cd6Smrgesac 122172b676d7Smrg 122274c14cd6Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 122374c14cd6Smrg[_AS_DETECT_SUGGESTED([ 122474c14cd6Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 122574c14cd6Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 122674c14cd6Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 122774c14cd6Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 122874c14cd6Smrg PATH=/empty FPATH=/empty; export PATH FPATH 122974c14cd6Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 123074c14cd6Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 123172b676d7Smrg 1232e35772b2Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 123374c14cd6Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1234e35772b2Smrg])# _LT_PROG_ECHO_BACKSLASH 123572b676d7Smrg 123672b676d7Smrg 123774c14cd6Smrg# _LT_WITH_SYSROOT 123874c14cd6Smrg# ---------------- 123974c14cd6SmrgAC_DEFUN([_LT_WITH_SYSROOT], 124074c14cd6Smrg[AC_MSG_CHECKING([for sysroot]) 124174c14cd6SmrgAC_ARG_WITH([sysroot], 124274c14cd6Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 124374c14cd6Smrg (or the compiler's sysroot if not specified).], 124474c14cd6Smrg[], [with_sysroot=no]) 124574c14cd6Smrg 124674c14cd6Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 124774c14cd6Smrgdnl in case the user passed a directory name. 124874c14cd6Smrglt_sysroot= 124974c14cd6Smrgcase ${with_sysroot} in #( 125074c14cd6Smrg yes) 125174c14cd6Smrg if test "$GCC" = yes; then 125274c14cd6Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 125374c14cd6Smrg fi 125474c14cd6Smrg ;; #( 125574c14cd6Smrg /*) 125674c14cd6Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 125774c14cd6Smrg ;; #( 125874c14cd6Smrg no|'') 125974c14cd6Smrg ;; #( 126074c14cd6Smrg *) 126174c14cd6Smrg AC_MSG_RESULT([${with_sysroot}]) 126274c14cd6Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 126374c14cd6Smrg ;; 126474c14cd6Smrgesac 126574c14cd6Smrg 126674c14cd6Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 126774c14cd6Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 126874c14cd6Smrg[dependent libraries, and in which our libraries should be installed.])]) 126974c14cd6Smrg 1270e35772b2Smrg# _LT_ENABLE_LOCK 1271e35772b2Smrg# --------------- 1272e35772b2Smrgm4_defun([_LT_ENABLE_LOCK], 127372b676d7Smrg[AC_ARG_ENABLE([libtool-lock], 1274e35772b2Smrg [AS_HELP_STRING([--disable-libtool-lock], 1275e35772b2Smrg [avoid locking (might break parallel builds)])]) 127672b676d7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 127772b676d7Smrg 127872b676d7Smrg# Some flags need to be propagated to the compiler or linker for good 127972b676d7Smrg# libtool support. 128072b676d7Smrgcase $host in 128172b676d7Smrgia64-*-hpux*) 128272b676d7Smrg # Find out which ABI we are using. 128372b676d7Smrg echo 'int i;' > conftest.$ac_ext 128472b676d7Smrg if AC_TRY_EVAL(ac_compile); then 128572b676d7Smrg case `/usr/bin/file conftest.$ac_objext` in 1286e35772b2Smrg *ELF-32*) 1287e35772b2Smrg HPUX_IA64_MODE="32" 1288e35772b2Smrg ;; 1289e35772b2Smrg *ELF-64*) 1290e35772b2Smrg HPUX_IA64_MODE="64" 1291e35772b2Smrg ;; 129272b676d7Smrg esac 129372b676d7Smrg fi 129472b676d7Smrg rm -rf conftest* 129572b676d7Smrg ;; 129672b676d7Smrg*-*-irix6*) 129772b676d7Smrg # Find out which ABI we are using. 129874c14cd6Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 129972b676d7Smrg if AC_TRY_EVAL(ac_compile); then 1300e35772b2Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1301e35772b2Smrg case `/usr/bin/file conftest.$ac_objext` in 1302e35772b2Smrg *32-bit*) 1303e35772b2Smrg LD="${LD-ld} -melf32bsmip" 1304e35772b2Smrg ;; 1305e35772b2Smrg *N32*) 1306e35772b2Smrg LD="${LD-ld} -melf32bmipn32" 1307e35772b2Smrg ;; 1308e35772b2Smrg *64-bit*) 1309e35772b2Smrg LD="${LD-ld} -melf64bmip" 1310e35772b2Smrg ;; 1311e35772b2Smrg esac 1312e35772b2Smrg else 1313e35772b2Smrg case `/usr/bin/file conftest.$ac_objext` in 1314e35772b2Smrg *32-bit*) 1315e35772b2Smrg LD="${LD-ld} -32" 1316e35772b2Smrg ;; 1317e35772b2Smrg *N32*) 1318e35772b2Smrg LD="${LD-ld} -n32" 1319e35772b2Smrg ;; 1320e35772b2Smrg *64-bit*) 1321e35772b2Smrg LD="${LD-ld} -64" 1322e35772b2Smrg ;; 1323e35772b2Smrg esac 1324e35772b2Smrg fi 132572b676d7Smrg fi 132672b676d7Smrg rm -rf conftest* 132772b676d7Smrg ;; 132872b676d7Smrg 13291fd23544Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1330e35772b2Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 133172b676d7Smrg # Find out which ABI we are using. 133272b676d7Smrg echo 'int i;' > conftest.$ac_ext 133372b676d7Smrg if AC_TRY_EVAL(ac_compile); then 133472b676d7Smrg case `/usr/bin/file conftest.o` in 1335e35772b2Smrg *32-bit*) 1336e35772b2Smrg case $host in 1337e35772b2Smrg x86_64-*kfreebsd*-gnu) 1338e35772b2Smrg LD="${LD-ld} -m elf_i386_fbsd" 1339e35772b2Smrg ;; 1340e35772b2Smrg x86_64-*linux*) 1341e35772b2Smrg LD="${LD-ld} -m elf_i386" 1342e35772b2Smrg ;; 1343e35772b2Smrg ppc64-*linux*|powerpc64-*linux*) 1344e35772b2Smrg LD="${LD-ld} -m elf32ppclinux" 1345e35772b2Smrg ;; 1346e35772b2Smrg s390x-*linux*) 1347e35772b2Smrg LD="${LD-ld} -m elf_s390" 1348e35772b2Smrg ;; 1349e35772b2Smrg sparc64-*linux*) 1350e35772b2Smrg LD="${LD-ld} -m elf32_sparc" 1351e35772b2Smrg ;; 1352e35772b2Smrg esac 1353e35772b2Smrg ;; 1354e35772b2Smrg *64-bit*) 1355e35772b2Smrg case $host in 1356e35772b2Smrg x86_64-*kfreebsd*-gnu) 1357e35772b2Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1358e35772b2Smrg ;; 1359e35772b2Smrg x86_64-*linux*) 1360e35772b2Smrg LD="${LD-ld} -m elf_x86_64" 1361e35772b2Smrg ;; 1362e35772b2Smrg ppc*-*linux*|powerpc*-*linux*) 1363e35772b2Smrg LD="${LD-ld} -m elf64ppc" 1364e35772b2Smrg ;; 1365e35772b2Smrg s390*-*linux*|s390*-*tpf*) 1366e35772b2Smrg LD="${LD-ld} -m elf64_s390" 1367e35772b2Smrg ;; 1368e35772b2Smrg sparc*-*linux*) 1369e35772b2Smrg LD="${LD-ld} -m elf64_sparc" 1370e35772b2Smrg ;; 1371e35772b2Smrg esac 1372e35772b2Smrg ;; 137372b676d7Smrg esac 137472b676d7Smrg fi 137572b676d7Smrg rm -rf conftest* 137672b676d7Smrg ;; 137772b676d7Smrg 137872b676d7Smrg*-*-sco3.2v5*) 137972b676d7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 138072b676d7Smrg SAVE_CFLAGS="$CFLAGS" 138172b676d7Smrg CFLAGS="$CFLAGS -belf" 138272b676d7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 138372b676d7Smrg [AC_LANG_PUSH(C) 1384e35772b2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 138572b676d7Smrg AC_LANG_POP]) 138672b676d7Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 138772b676d7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 138872b676d7Smrg CFLAGS="$SAVE_CFLAGS" 138972b676d7Smrg fi 139072b676d7Smrg ;; 139174c14cd6Smrg*-*solaris*) 139272b676d7Smrg # Find out which ABI we are using. 139372b676d7Smrg echo 'int i;' > conftest.$ac_ext 139472b676d7Smrg if AC_TRY_EVAL(ac_compile); then 139572b676d7Smrg case `/usr/bin/file conftest.o` in 139672b676d7Smrg *64-bit*) 139772b676d7Smrg case $lt_cv_prog_gnu_ld in 139874c14cd6Smrg yes*) 139974c14cd6Smrg case $host in 140074c14cd6Smrg i?86-*-solaris*) 140174c14cd6Smrg LD="${LD-ld} -m elf_x86_64" 140274c14cd6Smrg ;; 140374c14cd6Smrg sparc*-*-solaris*) 140474c14cd6Smrg LD="${LD-ld} -m elf64_sparc" 140574c14cd6Smrg ;; 140674c14cd6Smrg esac 140774c14cd6Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 140874c14cd6Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 140974c14cd6Smrg LD="${LD-ld}_sol2" 141074c14cd6Smrg fi 141174c14cd6Smrg ;; 14121fd23544Smrg *) 1413e35772b2Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14141fd23544Smrg LD="${LD-ld} -64" 14151fd23544Smrg fi 14161fd23544Smrg ;; 141772b676d7Smrg esac 141872b676d7Smrg ;; 141972b676d7Smrg esac 142072b676d7Smrg fi 142172b676d7Smrg rm -rf conftest* 142272b676d7Smrg ;; 142372b676d7Smrgesac 142472b676d7Smrg 142572b676d7Smrgneed_locks="$enable_libtool_lock" 1426e35772b2Smrg])# _LT_ENABLE_LOCK 1427e35772b2Smrg 1428e35772b2Smrg 142974c14cd6Smrg# _LT_PROG_AR 143074c14cd6Smrg# ----------- 143174c14cd6Smrgm4_defun([_LT_PROG_AR], 143274c14cd6Smrg[AC_CHECK_TOOLS(AR, [ar], false) 143374c14cd6Smrg: ${AR=ar} 143474c14cd6Smrg: ${AR_FLAGS=cru} 143574c14cd6Smrg_LT_DECL([], [AR], [1], [The archiver]) 143674c14cd6Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 143774c14cd6Smrg 143874c14cd6SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 143974c14cd6Smrg [lt_cv_ar_at_file=no 144074c14cd6Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 144174c14cd6Smrg [echo conftest.$ac_objext > conftest.lst 144274c14cd6Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 144374c14cd6Smrg AC_TRY_EVAL([lt_ar_try]) 144474c14cd6Smrg if test "$ac_status" -eq 0; then 144574c14cd6Smrg # Ensure the archiver fails upon bogus file names. 144674c14cd6Smrg rm -f conftest.$ac_objext libconftest.a 144774c14cd6Smrg AC_TRY_EVAL([lt_ar_try]) 144874c14cd6Smrg if test "$ac_status" -ne 0; then 144974c14cd6Smrg lt_cv_ar_at_file=@ 145074c14cd6Smrg fi 145174c14cd6Smrg fi 145274c14cd6Smrg rm -f conftest.* libconftest.a 145374c14cd6Smrg ]) 145474c14cd6Smrg ]) 145574c14cd6Smrg 145674c14cd6Smrgif test "x$lt_cv_ar_at_file" = xno; then 145774c14cd6Smrg archiver_list_spec= 145874c14cd6Smrgelse 145974c14cd6Smrg archiver_list_spec=$lt_cv_ar_at_file 146074c14cd6Smrgfi 146174c14cd6Smrg_LT_DECL([], [archiver_list_spec], [1], 146274c14cd6Smrg [How to feed a file listing to the archiver]) 146374c14cd6Smrg])# _LT_PROG_AR 146474c14cd6Smrg 146574c14cd6Smrg 1466e35772b2Smrg# _LT_CMD_OLD_ARCHIVE 1467e35772b2Smrg# ------------------- 1468e35772b2Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 146974c14cd6Smrg[_LT_PROG_AR 1470e35772b2Smrg 1471e35772b2SmrgAC_CHECK_TOOL(STRIP, strip, :) 1472e35772b2Smrgtest -z "$STRIP" && STRIP=: 1473e35772b2Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1474e35772b2Smrg 1475e35772b2SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1476e35772b2Smrgtest -z "$RANLIB" && RANLIB=: 1477e35772b2Smrg_LT_DECL([], [RANLIB], [1], 1478e35772b2Smrg [Commands used to install an old-style archive]) 1479e35772b2Smrg 1480e35772b2Smrg# Determine commands to create old-style static archives. 1481e35772b2Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1482e35772b2Smrgold_postinstall_cmds='chmod 644 $oldlib' 1483e35772b2Smrgold_postuninstall_cmds= 148472b676d7Smrg 1485e35772b2Smrgif test -n "$RANLIB"; then 1486e35772b2Smrg case $host_os in 1487e35772b2Smrg openbsd*) 148874c14cd6Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1489e35772b2Smrg ;; 1490e35772b2Smrg *) 149174c14cd6Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1492e35772b2Smrg ;; 1493e35772b2Smrg esac 149474c14cd6Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1495e35772b2Smrgfi 149674c14cd6Smrg 149774c14cd6Smrgcase $host_os in 149874c14cd6Smrg darwin*) 149974c14cd6Smrg lock_old_archive_extraction=yes ;; 150074c14cd6Smrg *) 150174c14cd6Smrg lock_old_archive_extraction=no ;; 150274c14cd6Smrgesac 1503e35772b2Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1504e35772b2Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1505e35772b2Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1506e35772b2Smrg [Commands used to build an old-style archive]) 150774c14cd6Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 150874c14cd6Smrg [Whether to use a lock for old archive extraction]) 1509e35772b2Smrg])# _LT_CMD_OLD_ARCHIVE 151072b676d7Smrg 151172b676d7Smrg 1512e35772b2Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 151372b676d7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 151472b676d7Smrg# ---------------------------------------------------------------- 151572b676d7Smrg# Check whether the given compiler option works 1516e35772b2SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1517e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1518e35772b2Smrgm4_require([_LT_DECL_SED])dnl 151972b676d7SmrgAC_CACHE_CHECK([$1], [$2], 152072b676d7Smrg [$2=no 1521e35772b2Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15221fd23544Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 152372b676d7Smrg lt_compiler_flag="$3" 152472b676d7Smrg # Insert the option either (1) after the last *FLAGS variable, or 152572b676d7Smrg # (2) before a word containing "conftest.", or (3) at the end. 152672b676d7Smrg # Note that $ac_compile itself does not contain backslashes and begins 152772b676d7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 152872b676d7Smrg # The option is referenced via a variable to avoid confusing sed. 152972b676d7Smrg lt_compile=`echo "$ac_compile" | $SED \ 153072b676d7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 153172b676d7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 153272b676d7Smrg -e 's:$: $lt_compiler_flag:'` 153374c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 153472b676d7Smrg (eval "$lt_compile" 2>conftest.err) 153572b676d7Smrg ac_status=$? 153672b676d7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 153774c14cd6Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 153872b676d7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 153972b676d7Smrg # The compiler can only warn and ignore the option if not recognized 154072b676d7Smrg # So say no if there are warnings other than the usual output. 154174c14cd6Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 154272b676d7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 154372b676d7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 154472b676d7Smrg $2=yes 154572b676d7Smrg fi 154672b676d7Smrg fi 1547e35772b2Smrg $RM conftest* 154872b676d7Smrg]) 154972b676d7Smrg 155072b676d7Smrgif test x"[$]$2" = xyes; then 1551e35772b2Smrg m4_if([$5], , :, [$5]) 155272b676d7Smrgelse 1553e35772b2Smrg m4_if([$6], , :, [$6]) 155472b676d7Smrgfi 1555e35772b2Smrg])# _LT_COMPILER_OPTION 155672b676d7Smrg 1557e35772b2Smrg# Old name: 1558e35772b2SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1559e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1560e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 156172b676d7Smrg 1562e35772b2Smrg 1563e35772b2Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1564e35772b2Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1565e35772b2Smrg# ---------------------------------------------------- 1566e35772b2Smrg# Check whether the given linker option works 1567e35772b2SmrgAC_DEFUN([_LT_LINKER_OPTION], 1568e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1569e35772b2Smrgm4_require([_LT_DECL_SED])dnl 15701fd23544SmrgAC_CACHE_CHECK([$1], [$2], 157172b676d7Smrg [$2=no 157272b676d7Smrg save_LDFLAGS="$LDFLAGS" 157372b676d7Smrg LDFLAGS="$LDFLAGS $3" 15741fd23544Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 157572b676d7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 157672b676d7Smrg # The linker can only warn and ignore the option if not recognized 157772b676d7Smrg # So say no if there are warnings 157872b676d7Smrg if test -s conftest.err; then 157972b676d7Smrg # Append any errors to the config.log. 158072b676d7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 158174c14cd6Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 158272b676d7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 158372b676d7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 158472b676d7Smrg $2=yes 158572b676d7Smrg fi 158672b676d7Smrg else 158772b676d7Smrg $2=yes 158872b676d7Smrg fi 158972b676d7Smrg fi 1590e35772b2Smrg $RM -r conftest* 159172b676d7Smrg LDFLAGS="$save_LDFLAGS" 159272b676d7Smrg]) 159372b676d7Smrg 159472b676d7Smrgif test x"[$]$2" = xyes; then 1595e35772b2Smrg m4_if([$4], , :, [$4]) 159672b676d7Smrgelse 1597e35772b2Smrg m4_if([$5], , :, [$5]) 159872b676d7Smrgfi 1599e35772b2Smrg])# _LT_LINKER_OPTION 160072b676d7Smrg 1601e35772b2Smrg# Old name: 1602e35772b2SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1603e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1604e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 160572b676d7Smrg 1606e35772b2Smrg 1607e35772b2Smrg# LT_CMD_MAX_LEN 1608e35772b2Smrg#--------------- 1609e35772b2SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1610e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1611e35772b2Smrg# find the maximum length of command line arguments 161272b676d7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 161372b676d7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 161472b676d7Smrg i=0 161572b676d7Smrg teststring="ABCD" 161672b676d7Smrg 161772b676d7Smrg case $build_os in 161872b676d7Smrg msdosdjgpp*) 161972b676d7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 162072b676d7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 162172b676d7Smrg # during glob expansion). Even if it were fixed, the result of this 162272b676d7Smrg # check would be larger than it should be. 162372b676d7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 162472b676d7Smrg ;; 162572b676d7Smrg 162672b676d7Smrg gnu*) 162772b676d7Smrg # Under GNU Hurd, this test is not required because there is 162872b676d7Smrg # no limit to the length of command line arguments. 162972b676d7Smrg # Libtool will interpret -1 as no limit whatsoever 163072b676d7Smrg lt_cv_sys_max_cmd_len=-1; 163172b676d7Smrg ;; 163272b676d7Smrg 1633e35772b2Smrg cygwin* | mingw* | cegcc*) 163472b676d7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 163572b676d7Smrg # about 5 minutes as the teststring grows exponentially. 163672b676d7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 163772b676d7Smrg # you end up with a "frozen" computer, even though with patience 163872b676d7Smrg # the test eventually succeeds (with a max line length of 256k). 163972b676d7Smrg # Instead, let's just punt: use the minimum linelength reported by 164072b676d7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 164172b676d7Smrg lt_cv_sys_max_cmd_len=8192; 164272b676d7Smrg ;; 164372b676d7Smrg 164474c14cd6Smrg mint*) 164574c14cd6Smrg # On MiNT this can take a long time and run out of memory. 164674c14cd6Smrg lt_cv_sys_max_cmd_len=8192; 164774c14cd6Smrg ;; 164874c14cd6Smrg 164972b676d7Smrg amigaos*) 165072b676d7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 165172b676d7Smrg # So we just punt and use a minimum line length of 8192. 165272b676d7Smrg lt_cv_sys_max_cmd_len=8192; 165372b676d7Smrg ;; 165472b676d7Smrg 165572b676d7Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 165672b676d7Smrg # This has been around since 386BSD, at least. Likely further. 165772b676d7Smrg if test -x /sbin/sysctl; then 165872b676d7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 165972b676d7Smrg elif test -x /usr/sbin/sysctl; then 166072b676d7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 166172b676d7Smrg else 166272b676d7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 166372b676d7Smrg fi 166472b676d7Smrg # And add a safety zone 166572b676d7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 166672b676d7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 166772b676d7Smrg ;; 166872b676d7Smrg 166972b676d7Smrg interix*) 167072b676d7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 167172b676d7Smrg lt_cv_sys_max_cmd_len=196608 167272b676d7Smrg ;; 167372b676d7Smrg 167474c14cd6Smrg os2*) 167574c14cd6Smrg # The test takes a long time on OS/2. 167674c14cd6Smrg lt_cv_sys_max_cmd_len=8192 167774c14cd6Smrg ;; 167874c14cd6Smrg 167972b676d7Smrg osf*) 168072b676d7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 168172b676d7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 168272b676d7Smrg # nice to cause kernel panics so lets avoid the loop below. 168372b676d7Smrg # First set a reasonable default. 168472b676d7Smrg lt_cv_sys_max_cmd_len=16384 168572b676d7Smrg # 168672b676d7Smrg if test -x /sbin/sysconfig; then 168772b676d7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 168872b676d7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 168972b676d7Smrg esac 169072b676d7Smrg fi 169172b676d7Smrg ;; 169272b676d7Smrg sco3.2v5*) 169372b676d7Smrg lt_cv_sys_max_cmd_len=102400 169472b676d7Smrg ;; 169572b676d7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 169672b676d7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 169772b676d7Smrg if test -n "$kargmax"; then 1698e35772b2Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 169972b676d7Smrg else 170072b676d7Smrg lt_cv_sys_max_cmd_len=32768 170172b676d7Smrg fi 170272b676d7Smrg ;; 170372b676d7Smrg *) 17041fd23544Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17051fd23544Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 17061fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17071fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17081fd23544Smrg else 1709e35772b2Smrg # Make teststring a little bigger before we do anything with it. 1710e35772b2Smrg # a 1K string should be a reasonable start. 1711e35772b2Smrg for i in 1 2 3 4 5 6 7 8 ; do 1712e35772b2Smrg teststring=$teststring$teststring 1713e35772b2Smrg done 17141fd23544Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1715e35772b2Smrg # If test is not a shell built-in, we'll probably end up computing a 1716e35772b2Smrg # maximum length that is only half of the actual maximum length, but 1717e35772b2Smrg # we can't tell. 171874c14cd6Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 171974c14cd6Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17201fd23544Smrg test $i != 17 # 1/2 MB should be enough 17211fd23544Smrg do 17221fd23544Smrg i=`expr $i + 1` 17231fd23544Smrg teststring=$teststring$teststring 17241fd23544Smrg done 1725e35772b2Smrg # Only check the string length outside the loop. 1726e35772b2Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 17271fd23544Smrg teststring= 1728e35772b2Smrg # Add a significant safety factor because C++ compilers can tack on 1729e35772b2Smrg # massive amounts of additional arguments before passing them to the 1730e35772b2Smrg # linker. It appears as though 1/2 is a usable value. 17311fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 17321fd23544Smrg fi 173372b676d7Smrg ;; 173472b676d7Smrg esac 173572b676d7Smrg]) 173672b676d7Smrgif test -n $lt_cv_sys_max_cmd_len ; then 173772b676d7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 173872b676d7Smrgelse 173972b676d7Smrg AC_MSG_RESULT(none) 174072b676d7Smrgfi 1741e35772b2Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1742e35772b2Smrg_LT_DECL([], [max_cmd_len], [0], 1743e35772b2Smrg [What is the maximum length of a command?]) 1744e35772b2Smrg])# LT_CMD_MAX_LEN 174572b676d7Smrg 1746e35772b2Smrg# Old name: 1747e35772b2SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1748e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1749e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 175072b676d7Smrg 1751e35772b2Smrg 1752e35772b2Smrg# _LT_HEADER_DLFCN 1753e35772b2Smrg# ---------------- 1754e35772b2Smrgm4_defun([_LT_HEADER_DLFCN], 1755e35772b2Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1756e35772b2Smrg])# _LT_HEADER_DLFCN 175772b676d7Smrg 175872b676d7Smrg 1759e35772b2Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1760e35772b2Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1761e35772b2Smrg# ---------------------------------------------------------------- 1762e35772b2Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1763e35772b2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 176472b676d7Smrgif test "$cross_compiling" = yes; then : 176572b676d7Smrg [$4] 176672b676d7Smrgelse 176772b676d7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 176872b676d7Smrg lt_status=$lt_dlunknown 1769e35772b2Smrg cat > conftest.$ac_ext <<_LT_EOF 177074c14cd6Smrg[#line $LINENO "configure" 177172b676d7Smrg#include "confdefs.h" 177272b676d7Smrg 177372b676d7Smrg#if HAVE_DLFCN_H 177472b676d7Smrg#include <dlfcn.h> 177572b676d7Smrg#endif 177672b676d7Smrg 177772b676d7Smrg#include <stdio.h> 177872b676d7Smrg 177972b676d7Smrg#ifdef RTLD_GLOBAL 178072b676d7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 178172b676d7Smrg#else 178272b676d7Smrg# ifdef DL_GLOBAL 178372b676d7Smrg# define LT_DLGLOBAL DL_GLOBAL 178472b676d7Smrg# else 178572b676d7Smrg# define LT_DLGLOBAL 0 178672b676d7Smrg# endif 178772b676d7Smrg#endif 178872b676d7Smrg 178972b676d7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 179072b676d7Smrg find out it does not work in some platform. */ 179172b676d7Smrg#ifndef LT_DLLAZY_OR_NOW 179272b676d7Smrg# ifdef RTLD_LAZY 179372b676d7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 179472b676d7Smrg# else 179572b676d7Smrg# ifdef DL_LAZY 179672b676d7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 179772b676d7Smrg# else 179872b676d7Smrg# ifdef RTLD_NOW 179972b676d7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 180072b676d7Smrg# else 180172b676d7Smrg# ifdef DL_NOW 180272b676d7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 180372b676d7Smrg# else 180472b676d7Smrg# define LT_DLLAZY_OR_NOW 0 180572b676d7Smrg# endif 180672b676d7Smrg# endif 180772b676d7Smrg# endif 180872b676d7Smrg# endif 180972b676d7Smrg#endif 181072b676d7Smrg 181174c14cd6Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 181274c14cd6Smrg correspondingly for the symbols needed. */ 181374c14cd6Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 181474c14cd6Smrgint fnord () __attribute__((visibility("default"))); 181574c14cd6Smrg#endif 181674c14cd6Smrg 181774c14cd6Smrgint fnord () { return 42; } 181872b676d7Smrgint main () 181972b676d7Smrg{ 182072b676d7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 182172b676d7Smrg int status = $lt_dlunknown; 182272b676d7Smrg 182372b676d7Smrg if (self) 182472b676d7Smrg { 182572b676d7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 182674c14cd6Smrg else 182774c14cd6Smrg { 182874c14cd6Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 182974c14cd6Smrg else puts (dlerror ()); 183074c14cd6Smrg } 183172b676d7Smrg /* dlclose (self); */ 183272b676d7Smrg } 183372b676d7Smrg else 183472b676d7Smrg puts (dlerror ()); 183572b676d7Smrg 1836e35772b2Smrg return status; 183772b676d7Smrg}] 1838e35772b2Smrg_LT_EOF 183972b676d7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 184072b676d7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 184172b676d7Smrg lt_status=$? 184272b676d7Smrg case x$lt_status in 184372b676d7Smrg x$lt_dlno_uscore) $1 ;; 184472b676d7Smrg x$lt_dlneed_uscore) $2 ;; 184572b676d7Smrg x$lt_dlunknown|x*) $3 ;; 184672b676d7Smrg esac 184772b676d7Smrg else : 184872b676d7Smrg # compilation failed 184972b676d7Smrg $3 185072b676d7Smrg fi 185172b676d7Smrgfi 185272b676d7Smrgrm -fr conftest* 1853e35772b2Smrg])# _LT_TRY_DLOPEN_SELF 185472b676d7Smrg 185572b676d7Smrg 1856e35772b2Smrg# LT_SYS_DLOPEN_SELF 1857e35772b2Smrg# ------------------ 1858e35772b2SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1859e35772b2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 186072b676d7Smrgif test "x$enable_dlopen" != xyes; then 186172b676d7Smrg enable_dlopen=unknown 186272b676d7Smrg enable_dlopen_self=unknown 186372b676d7Smrg enable_dlopen_self_static=unknown 186472b676d7Smrgelse 186572b676d7Smrg lt_cv_dlopen=no 186672b676d7Smrg lt_cv_dlopen_libs= 186772b676d7Smrg 186872b676d7Smrg case $host_os in 186972b676d7Smrg beos*) 187072b676d7Smrg lt_cv_dlopen="load_add_on" 187172b676d7Smrg lt_cv_dlopen_libs= 187272b676d7Smrg lt_cv_dlopen_self=yes 187372b676d7Smrg ;; 187472b676d7Smrg 1875e35772b2Smrg mingw* | pw32* | cegcc*) 187672b676d7Smrg lt_cv_dlopen="LoadLibrary" 187772b676d7Smrg lt_cv_dlopen_libs= 1878e35772b2Smrg ;; 187972b676d7Smrg 188072b676d7Smrg cygwin*) 188172b676d7Smrg lt_cv_dlopen="dlopen" 188272b676d7Smrg lt_cv_dlopen_libs= 1883e35772b2Smrg ;; 188472b676d7Smrg 188572b676d7Smrg darwin*) 188672b676d7Smrg # if libdl is installed we need to link against it 188772b676d7Smrg AC_CHECK_LIB([dl], [dlopen], 188872b676d7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 188972b676d7Smrg lt_cv_dlopen="dyld" 189072b676d7Smrg lt_cv_dlopen_libs= 189172b676d7Smrg lt_cv_dlopen_self=yes 189272b676d7Smrg ]) 1893e35772b2Smrg ;; 189472b676d7Smrg 189572b676d7Smrg *) 189672b676d7Smrg AC_CHECK_FUNC([shl_load], 189772b676d7Smrg [lt_cv_dlopen="shl_load"], 189872b676d7Smrg [AC_CHECK_LIB([dld], [shl_load], 18991fd23544Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 190072b676d7Smrg [AC_CHECK_FUNC([dlopen], 190172b676d7Smrg [lt_cv_dlopen="dlopen"], 190272b676d7Smrg [AC_CHECK_LIB([dl], [dlopen], 190372b676d7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 190472b676d7Smrg [AC_CHECK_LIB([svld], [dlopen], 190572b676d7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 190672b676d7Smrg [AC_CHECK_LIB([dld], [dld_link], 19071fd23544Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 190872b676d7Smrg ]) 190972b676d7Smrg ]) 191072b676d7Smrg ]) 191172b676d7Smrg ]) 191272b676d7Smrg ]) 191372b676d7Smrg ;; 191472b676d7Smrg esac 191572b676d7Smrg 191672b676d7Smrg if test "x$lt_cv_dlopen" != xno; then 191772b676d7Smrg enable_dlopen=yes 191872b676d7Smrg else 191972b676d7Smrg enable_dlopen=no 192072b676d7Smrg fi 192172b676d7Smrg 192272b676d7Smrg case $lt_cv_dlopen in 192372b676d7Smrg dlopen) 192472b676d7Smrg save_CPPFLAGS="$CPPFLAGS" 192572b676d7Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 192672b676d7Smrg 192772b676d7Smrg save_LDFLAGS="$LDFLAGS" 192872b676d7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 192972b676d7Smrg 193072b676d7Smrg save_LIBS="$LIBS" 193172b676d7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 193272b676d7Smrg 193372b676d7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 193472b676d7Smrg lt_cv_dlopen_self, [dnl 1935e35772b2Smrg _LT_TRY_DLOPEN_SELF( 193672b676d7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 193772b676d7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 193872b676d7Smrg ]) 193972b676d7Smrg 194072b676d7Smrg if test "x$lt_cv_dlopen_self" = xyes; then 194172b676d7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 194272b676d7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1943e35772b2Smrg lt_cv_dlopen_self_static, [dnl 1944e35772b2Smrg _LT_TRY_DLOPEN_SELF( 194572b676d7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 194672b676d7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 194772b676d7Smrg ]) 194872b676d7Smrg fi 194972b676d7Smrg 195072b676d7Smrg CPPFLAGS="$save_CPPFLAGS" 195172b676d7Smrg LDFLAGS="$save_LDFLAGS" 195272b676d7Smrg LIBS="$save_LIBS" 195372b676d7Smrg ;; 195472b676d7Smrg esac 195572b676d7Smrg 195672b676d7Smrg case $lt_cv_dlopen_self in 195772b676d7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 195872b676d7Smrg *) enable_dlopen_self=unknown ;; 195972b676d7Smrg esac 196072b676d7Smrg 196172b676d7Smrg case $lt_cv_dlopen_self_static in 196272b676d7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 196372b676d7Smrg *) enable_dlopen_self_static=unknown ;; 196472b676d7Smrg esac 196572b676d7Smrgfi 1966e35772b2Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1967e35772b2Smrg [Whether dlopen is supported]) 1968e35772b2Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1969e35772b2Smrg [Whether dlopen of programs is supported]) 1970e35772b2Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1971e35772b2Smrg [Whether dlopen of statically linked programs is supported]) 1972e35772b2Smrg])# LT_SYS_DLOPEN_SELF 197372b676d7Smrg 1974e35772b2Smrg# Old name: 1975e35772b2SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1976e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1977e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 197872b676d7Smrg 1979e35772b2Smrg 1980e35772b2Smrg# _LT_COMPILER_C_O([TAGNAME]) 1981e35772b2Smrg# --------------------------- 1982e35772b2Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 1983e35772b2Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1984e35772b2Smrgm4_defun([_LT_COMPILER_C_O], 1985e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 1986e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1987e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 198872b676d7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1989e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1990e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1991e35772b2Smrg $RM -r conftest 2>/dev/null 199272b676d7Smrg mkdir conftest 199372b676d7Smrg cd conftest 199472b676d7Smrg mkdir out 19951fd23544Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 199672b676d7Smrg 199772b676d7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 199872b676d7Smrg # Insert the option either (1) after the last *FLAGS variable, or 199972b676d7Smrg # (2) before a word containing "conftest.", or (3) at the end. 200072b676d7Smrg # Note that $ac_compile itself does not contain backslashes and begins 200172b676d7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 200272b676d7Smrg lt_compile=`echo "$ac_compile" | $SED \ 200372b676d7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 200472b676d7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 200572b676d7Smrg -e 's:$: $lt_compiler_flag:'` 200674c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 200772b676d7Smrg (eval "$lt_compile" 2>out/conftest.err) 200872b676d7Smrg ac_status=$? 200972b676d7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 201074c14cd6Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 201172b676d7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 201272b676d7Smrg then 201372b676d7Smrg # The compiler can only warn and ignore the option if not recognized 201472b676d7Smrg # So say no if there are warnings 201574c14cd6Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 201672b676d7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 201772b676d7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2018e35772b2Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 201972b676d7Smrg fi 202072b676d7Smrg fi 202172b676d7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2022e35772b2Smrg $RM conftest* 202372b676d7Smrg # SGI C++ compiler will create directory out/ii_files/ for 202472b676d7Smrg # template instantiation 2025e35772b2Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2026e35772b2Smrg $RM out/* && rmdir out 202772b676d7Smrg cd .. 2028e35772b2Smrg $RM -r conftest 2029e35772b2Smrg $RM conftest* 203072b676d7Smrg]) 2031e35772b2Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2032e35772b2Smrg [Does compiler simultaneously support -c and -o options?]) 2033e35772b2Smrg])# _LT_COMPILER_C_O 203472b676d7Smrg 203572b676d7Smrg 2036e35772b2Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2037e35772b2Smrg# ---------------------------------- 203872b676d7Smrg# Check to see if we can do hard links to lock some files if needed 2039e35772b2Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2040e35772b2Smrg[m4_require([_LT_ENABLE_LOCK])dnl 2041e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2042e35772b2Smrg_LT_COMPILER_C_O([$1]) 204372b676d7Smrg 204472b676d7Smrghard_links="nottested" 2045e35772b2Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 204672b676d7Smrg # do not overwrite the value of need_locks provided by the user 204772b676d7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 204872b676d7Smrg hard_links=yes 2049e35772b2Smrg $RM conftest* 205072b676d7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 205172b676d7Smrg touch conftest.a 205272b676d7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 205372b676d7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 205472b676d7Smrg AC_MSG_RESULT([$hard_links]) 205572b676d7Smrg if test "$hard_links" = no; then 205672b676d7Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 205772b676d7Smrg need_locks=warn 205872b676d7Smrg fi 205972b676d7Smrgelse 206072b676d7Smrg need_locks=no 206172b676d7Smrgfi 2062e35772b2Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2063e35772b2Smrg])# _LT_COMPILER_FILE_LOCKS 206472b676d7Smrg 206572b676d7Smrg 2066e35772b2Smrg# _LT_CHECK_OBJDIR 2067e35772b2Smrg# ---------------- 2068e35772b2Smrgm4_defun([_LT_CHECK_OBJDIR], 206972b676d7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 207072b676d7Smrg[rm -f .libs 2>/dev/null 207172b676d7Smrgmkdir .libs 2>/dev/null 207272b676d7Smrgif test -d .libs; then 207372b676d7Smrg lt_cv_objdir=.libs 207472b676d7Smrgelse 207572b676d7Smrg # MS-DOS does not allow filenames that begin with a dot. 207672b676d7Smrg lt_cv_objdir=_libs 207772b676d7Smrgfi 207872b676d7Smrgrmdir .libs 2>/dev/null]) 207972b676d7Smrgobjdir=$lt_cv_objdir 2080e35772b2Smrg_LT_DECL([], [objdir], [0], 2081e35772b2Smrg [The name of the directory that contains temporary libtool files])dnl 2082e35772b2Smrgm4_pattern_allow([LT_OBJDIR])dnl 2083e35772b2SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2084e35772b2Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2085e35772b2Smrg])# _LT_CHECK_OBJDIR 208672b676d7Smrg 208772b676d7Smrg 2088e35772b2Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2089e35772b2Smrg# -------------------------------------- 209072b676d7Smrg# Check hardcoding attributes. 2091e35772b2Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 209272b676d7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2093e35772b2Smrg_LT_TAGVAR(hardcode_action, $1)= 2094e35772b2Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2095e35772b2Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2096e35772b2Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 209772b676d7Smrg 2098e35772b2Smrg # We can hardcode non-existent directories. 2099e35772b2Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 210072b676d7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 210172b676d7Smrg # have to relink, otherwise we might link with an installed library 210272b676d7Smrg # when we should be linking with a yet-to-be-installed one 2103e35772b2Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2104e35772b2Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 210572b676d7Smrg # Linking always hardcodes the temporary library directory. 2106e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=relink 210772b676d7Smrg else 210872b676d7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2109e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 211072b676d7Smrg fi 211172b676d7Smrgelse 211272b676d7Smrg # We cannot hardcode anything, or else we can only hardcode existing 211372b676d7Smrg # directories. 2114e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 211572b676d7Smrgfi 2116e35772b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 211772b676d7Smrg 2118e35772b2Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2119e35772b2Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 212072b676d7Smrg # Fast installation is not supported 212172b676d7Smrg enable_fast_install=no 212272b676d7Smrgelif test "$shlibpath_overrides_runpath" = yes || 212372b676d7Smrg test "$enable_shared" = no; then 212472b676d7Smrg # Fast installation is not necessary 212572b676d7Smrg enable_fast_install=needless 212672b676d7Smrgfi 2127e35772b2Smrg_LT_TAGDECL([], [hardcode_action], [0], 2128e35772b2Smrg [How to hardcode a shared library path into an executable]) 2129e35772b2Smrg])# _LT_LINKER_HARDCODE_LIBPATH 213072b676d7Smrg 213172b676d7Smrg 2132e35772b2Smrg# _LT_CMD_STRIPLIB 2133e35772b2Smrg# ---------------- 2134e35772b2Smrgm4_defun([_LT_CMD_STRIPLIB], 2135e35772b2Smrg[m4_require([_LT_DECL_EGREP]) 2136e35772b2Smrgstriplib= 213772b676d7Smrgold_striplib= 213872b676d7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2139e35772b2Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 214072b676d7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 214172b676d7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 214272b676d7Smrg AC_MSG_RESULT([yes]) 214372b676d7Smrgelse 214472b676d7Smrg# FIXME - insert some real tests, host_os isn't really good enough 214572b676d7Smrg case $host_os in 2146e35772b2Smrg darwin*) 2147e35772b2Smrg if test -n "$STRIP" ; then 2148e35772b2Smrg striplib="$STRIP -x" 2149e35772b2Smrg old_striplib="$STRIP -S" 2150e35772b2Smrg AC_MSG_RESULT([yes]) 2151e35772b2Smrg else 2152e35772b2Smrg AC_MSG_RESULT([no]) 2153e35772b2Smrg fi 2154e35772b2Smrg ;; 2155e35772b2Smrg *) 2156e35772b2Smrg AC_MSG_RESULT([no]) 215772b676d7Smrg ;; 215872b676d7Smrg esac 215972b676d7Smrgfi 2160e35772b2Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2161e35772b2Smrg_LT_DECL([], [striplib], [1]) 2162e35772b2Smrg])# _LT_CMD_STRIPLIB 216372b676d7Smrg 216472b676d7Smrg 2165e35772b2Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 216672b676d7Smrg# ----------------------------- 216772b676d7Smrg# PORTME Fill in your ld.so characteristics 2168e35772b2Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2169e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2170e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 2171e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2172e35772b2Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2173e35772b2Smrgm4_require([_LT_DECL_SED])dnl 217474c14cd6Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 21751fd23544SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2176e35772b2Smrgm4_if([$1], 2177e35772b2Smrg [], [ 217872b676d7Smrgif test "$GCC" = yes; then 21791fd23544Smrg case $host_os in 21801fd23544Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 21811fd23544Smrg *) lt_awk_arg="/^libraries:/" ;; 21821fd23544Smrg esac 218374c14cd6Smrg case $host_os in 218474c14cd6Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 218574c14cd6Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 218674c14cd6Smrg esac 218774c14cd6Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 218874c14cd6Smrg case $lt_search_path_spec in 218974c14cd6Smrg *\;*) 219072b676d7Smrg # if the path contains ";" then we assume it to be the separator 219172b676d7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 219272b676d7Smrg # assumed that no part of a normal pathname contains ";" but that should 219372b676d7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 219474c14cd6Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 219574c14cd6Smrg ;; 219674c14cd6Smrg *) 219774c14cd6Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 219874c14cd6Smrg ;; 219974c14cd6Smrg esac 22001fd23544Smrg # Ok, now we have the path, separated by spaces, we can step through it 22011fd23544Smrg # and add multilib dir if necessary. 22021fd23544Smrg lt_tmp_lt_search_path_spec= 22031fd23544Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 22041fd23544Smrg for lt_sys_path in $lt_search_path_spec; do 22051fd23544Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 22061fd23544Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 22071fd23544Smrg else 22081fd23544Smrg test -d "$lt_sys_path" && \ 22091fd23544Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 22101fd23544Smrg fi 22111fd23544Smrg done 221274c14cd6Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 22131fd23544SmrgBEGIN {RS=" "; FS="/|\n";} { 22141fd23544Smrg lt_foo=""; 22151fd23544Smrg lt_count=0; 22161fd23544Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 22171fd23544Smrg if ($lt_i != "" && $lt_i != ".") { 22181fd23544Smrg if ($lt_i == "..") { 22191fd23544Smrg lt_count++; 22201fd23544Smrg } else { 22211fd23544Smrg if (lt_count == 0) { 22221fd23544Smrg lt_foo="/" $lt_i lt_foo; 22231fd23544Smrg } else { 22241fd23544Smrg lt_count--; 22251fd23544Smrg } 22261fd23544Smrg } 22271fd23544Smrg } 22281fd23544Smrg } 22291fd23544Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 22301fd23544Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 22311fd23544Smrg}'` 223274c14cd6Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 223374c14cd6Smrg # for these hosts. 223474c14cd6Smrg case $host_os in 223574c14cd6Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 223674c14cd6Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 223774c14cd6Smrg esac 223874c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 223972b676d7Smrgelse 224072b676d7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 22411fd23544Smrgfi]) 2242e35772b2Smrglibrary_names_spec= 2243e35772b2Smrglibname_spec='lib$name' 2244e35772b2Smrgsoname_spec= 2245e35772b2Smrgshrext_cmds=".so" 2246e35772b2Smrgpostinstall_cmds= 2247e35772b2Smrgpostuninstall_cmds= 2248e35772b2Smrgfinish_cmds= 2249e35772b2Smrgfinish_eval= 2250e35772b2Smrgshlibpath_var= 2251e35772b2Smrgshlibpath_overrides_runpath=unknown 2252e35772b2Smrgversion_type=none 2253e35772b2Smrgdynamic_linker="$host_os ld.so" 2254e35772b2Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 225572b676d7Smrgneed_lib_prefix=unknown 225672b676d7Smrghardcode_into_libs=no 225772b676d7Smrg 225872b676d7Smrg# when you set need_version to no, make sure it does not cause -set_version 225972b676d7Smrg# flags to be left without arguments 226072b676d7Smrgneed_version=unknown 226172b676d7Smrg 226272b676d7Smrgcase $host_os in 226372b676d7Smrgaix3*) 226474c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 226572b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 226672b676d7Smrg shlibpath_var=LIBPATH 226772b676d7Smrg 226872b676d7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 226972b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 227072b676d7Smrg ;; 227172b676d7Smrg 22721fd23544Smrgaix[[4-9]]*) 227374c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 227472b676d7Smrg need_lib_prefix=no 227572b676d7Smrg need_version=no 227672b676d7Smrg hardcode_into_libs=yes 227772b676d7Smrg if test "$host_cpu" = ia64; then 227872b676d7Smrg # AIX 5 supports IA64 227972b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 228072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 228172b676d7Smrg else 228272b676d7Smrg # With GCC up to 2.95.x, collect2 would create an import file 228372b676d7Smrg # for dependence libraries. The import file would start with 228472b676d7Smrg # the line `#! .'. This would cause the generated library to 228572b676d7Smrg # depend on `.', always an invalid library. This was fixed in 228672b676d7Smrg # development snapshots of GCC prior to 3.0. 228772b676d7Smrg case $host_os in 228872b676d7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 228972b676d7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 229072b676d7Smrg echo ' yes ' 2291e35772b2Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 229272b676d7Smrg : 229372b676d7Smrg else 229472b676d7Smrg can_build_shared=no 229572b676d7Smrg fi 229672b676d7Smrg ;; 229772b676d7Smrg esac 229872b676d7Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 229972b676d7Smrg # soname into executable. Probably we can add versioning support to 230072b676d7Smrg # collect2, so additional links can be useful in future. 230172b676d7Smrg if test "$aix_use_runtimelinking" = yes; then 230272b676d7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 230372b676d7Smrg # instead of lib<name>.a to let people know that these are not 230472b676d7Smrg # typical AIX shared libraries. 230572b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 230672b676d7Smrg else 230772b676d7Smrg # We preserve .a as extension for shared libraries through AIX4.2 230872b676d7Smrg # and later when we are not doing run time linking. 230972b676d7Smrg library_names_spec='${libname}${release}.a $libname.a' 231072b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 231172b676d7Smrg fi 231272b676d7Smrg shlibpath_var=LIBPATH 231372b676d7Smrg fi 231472b676d7Smrg ;; 231572b676d7Smrg 231672b676d7Smrgamigaos*) 2317e35772b2Smrg case $host_cpu in 2318e35772b2Smrg powerpc) 2319e35772b2Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2320e35772b2Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2321e35772b2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2322e35772b2Smrg ;; 2323e35772b2Smrg m68k) 2324e35772b2Smrg library_names_spec='$libname.ixlibrary $libname.a' 2325e35772b2Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 232674c14cd6Smrg 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' 2327e35772b2Smrg ;; 2328e35772b2Smrg esac 232972b676d7Smrg ;; 233072b676d7Smrg 233172b676d7Smrgbeos*) 233272b676d7Smrg library_names_spec='${libname}${shared_ext}' 233372b676d7Smrg dynamic_linker="$host_os ld.so" 233472b676d7Smrg shlibpath_var=LIBRARY_PATH 233572b676d7Smrg ;; 233672b676d7Smrg 233772b676d7Smrgbsdi[[45]]*) 233874c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 233972b676d7Smrg need_version=no 234072b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 234172b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 234272b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 234372b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 234472b676d7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 234572b676d7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 234672b676d7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 234772b676d7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 234872b676d7Smrg # libtool to hard-code these into programs 234972b676d7Smrg ;; 235072b676d7Smrg 2351e35772b2Smrgcygwin* | mingw* | pw32* | cegcc*) 235272b676d7Smrg version_type=windows 235372b676d7Smrg shrext_cmds=".dll" 235472b676d7Smrg need_version=no 235572b676d7Smrg need_lib_prefix=no 235672b676d7Smrg 235774c14cd6Smrg case $GCC,$cc_basename in 235874c14cd6Smrg yes,*) 235974c14cd6Smrg # gcc 236072b676d7Smrg library_names_spec='$libname.dll.a' 236172b676d7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 236272b676d7Smrg postinstall_cmds='base_file=`basename \${file}`~ 2363e35772b2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 236472b676d7Smrg dldir=$destdir/`dirname \$dlpath`~ 236572b676d7Smrg test -d \$dldir || mkdir -p \$dldir~ 236672b676d7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2367e35772b2Smrg chmod a+x \$dldir/$dlname~ 2368e35772b2Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2369e35772b2Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2370e35772b2Smrg fi' 237172b676d7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 237272b676d7Smrg dlpath=$dir/\$dldll~ 2373e35772b2Smrg $RM \$dlpath' 237472b676d7Smrg shlibpath_overrides_runpath=yes 237572b676d7Smrg 237672b676d7Smrg case $host_os in 237772b676d7Smrg cygwin*) 237872b676d7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 237972b676d7Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 238074c14cd6Smrgm4_if([$1], [],[ 238174c14cd6Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 238272b676d7Smrg ;; 2383e35772b2Smrg mingw* | cegcc*) 238472b676d7Smrg # MinGW DLLs use traditional 'lib' prefix 238572b676d7Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 238672b676d7Smrg ;; 238772b676d7Smrg pw32*) 238872b676d7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 238972b676d7Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 239072b676d7Smrg ;; 239172b676d7Smrg esac 239274c14cd6Smrg dynamic_linker='Win32 ld.exe' 239374c14cd6Smrg ;; 239474c14cd6Smrg 239574c14cd6Smrg *,cl*) 239674c14cd6Smrg # Native MSVC 239774c14cd6Smrg libname_spec='$name' 239874c14cd6Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 239974c14cd6Smrg library_names_spec='${libname}.dll.lib' 240074c14cd6Smrg 240174c14cd6Smrg case $build_os in 240274c14cd6Smrg mingw*) 240374c14cd6Smrg sys_lib_search_path_spec= 240474c14cd6Smrg lt_save_ifs=$IFS 240574c14cd6Smrg IFS=';' 240674c14cd6Smrg for lt_path in $LIB 240774c14cd6Smrg do 240874c14cd6Smrg IFS=$lt_save_ifs 240974c14cd6Smrg # Let DOS variable expansion print the short 8.3 style file name. 241074c14cd6Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 241174c14cd6Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 241274c14cd6Smrg done 241374c14cd6Smrg IFS=$lt_save_ifs 241474c14cd6Smrg # Convert to MSYS style. 241574c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 241674c14cd6Smrg ;; 241774c14cd6Smrg cygwin*) 241874c14cd6Smrg # Convert to unix form, then to dos form, then back to unix form 241974c14cd6Smrg # but this time dos style (no spaces!) so that the unix form looks 242074c14cd6Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 242174c14cd6Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 242274c14cd6Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 242374c14cd6Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 242474c14cd6Smrg ;; 242574c14cd6Smrg *) 242674c14cd6Smrg sys_lib_search_path_spec="$LIB" 242774c14cd6Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 242874c14cd6Smrg # It is most probably a Windows format PATH. 242974c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 243074c14cd6Smrg else 243174c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 243274c14cd6Smrg fi 243374c14cd6Smrg # FIXME: find the short name or the path components, as spaces are 243474c14cd6Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 243574c14cd6Smrg ;; 243674c14cd6Smrg esac 243774c14cd6Smrg 243874c14cd6Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 243974c14cd6Smrg postinstall_cmds='base_file=`basename \${file}`~ 244074c14cd6Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 244174c14cd6Smrg dldir=$destdir/`dirname \$dlpath`~ 244274c14cd6Smrg test -d \$dldir || mkdir -p \$dldir~ 244374c14cd6Smrg $install_prog $dir/$dlname \$dldir/$dlname' 244474c14cd6Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 244574c14cd6Smrg dlpath=$dir/\$dldll~ 244674c14cd6Smrg $RM \$dlpath' 244774c14cd6Smrg shlibpath_overrides_runpath=yes 244874c14cd6Smrg dynamic_linker='Win32 link.exe' 244972b676d7Smrg ;; 245072b676d7Smrg 245172b676d7Smrg *) 245274c14cd6Smrg # Assume MSVC wrapper 245372b676d7Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 245474c14cd6Smrg dynamic_linker='Win32 ld.exe' 245572b676d7Smrg ;; 245672b676d7Smrg esac 245772b676d7Smrg # FIXME: first we should search . and the directory the executable is in 245872b676d7Smrg shlibpath_var=PATH 245972b676d7Smrg ;; 246072b676d7Smrg 246172b676d7Smrgdarwin* | rhapsody*) 246272b676d7Smrg dynamic_linker="$host_os dyld" 246372b676d7Smrg version_type=darwin 246472b676d7Smrg need_lib_prefix=no 246572b676d7Smrg need_version=no 2466e35772b2Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 246772b676d7Smrg soname_spec='${libname}${release}${major}$shared_ext' 246872b676d7Smrg shlibpath_overrides_runpath=yes 246972b676d7Smrg shlibpath_var=DYLD_LIBRARY_PATH 247072b676d7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2471e35772b2Smrgm4_if([$1], [],[ 2472e35772b2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 247372b676d7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 247472b676d7Smrg ;; 247572b676d7Smrg 247672b676d7Smrgdgux*) 247774c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 247872b676d7Smrg need_lib_prefix=no 247972b676d7Smrg need_version=no 248072b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 248172b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 248272b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 248372b676d7Smrg ;; 248472b676d7Smrg 248572b676d7Smrgfreebsd* | dragonfly*) 248672b676d7Smrg # DragonFly does not have aout. When/if they implement a new 248772b676d7Smrg # versioning mechanism, adjust this. 248872b676d7Smrg if test -x /usr/bin/objformat; then 248972b676d7Smrg objformat=`/usr/bin/objformat` 249072b676d7Smrg else 249172b676d7Smrg case $host_os in 249274c14cd6Smrg freebsd[[23]].*) objformat=aout ;; 249372b676d7Smrg *) objformat=elf ;; 249472b676d7Smrg esac 249572b676d7Smrg fi 249672b676d7Smrg version_type=freebsd-$objformat 249772b676d7Smrg case $version_type in 249872b676d7Smrg freebsd-elf*) 249972b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 250072b676d7Smrg need_version=no 250172b676d7Smrg need_lib_prefix=no 250272b676d7Smrg ;; 250372b676d7Smrg freebsd-*) 250472b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 250572b676d7Smrg need_version=yes 250672b676d7Smrg ;; 250772b676d7Smrg esac 250872b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 250972b676d7Smrg case $host_os in 251074c14cd6Smrg freebsd2.*) 251172b676d7Smrg shlibpath_overrides_runpath=yes 251272b676d7Smrg ;; 251372b676d7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 251472b676d7Smrg shlibpath_overrides_runpath=yes 251572b676d7Smrg hardcode_into_libs=yes 251672b676d7Smrg ;; 251772b676d7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 251872b676d7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 251972b676d7Smrg shlibpath_overrides_runpath=no 252072b676d7Smrg hardcode_into_libs=yes 252172b676d7Smrg ;; 25221fd23544Smrg *) # from 4.6 on, and DragonFly 252372b676d7Smrg shlibpath_overrides_runpath=yes 252472b676d7Smrg hardcode_into_libs=yes 252572b676d7Smrg ;; 252672b676d7Smrg esac 252772b676d7Smrg ;; 252872b676d7Smrg 252972b676d7Smrggnu*) 253074c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 253172b676d7Smrg need_lib_prefix=no 253272b676d7Smrg need_version=no 253372b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 253472b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 253572b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 253674c14cd6Smrg shlibpath_overrides_runpath=no 253774c14cd6Smrg hardcode_into_libs=yes 253874c14cd6Smrg ;; 253974c14cd6Smrg 254074c14cd6Smrghaiku*) 254174c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 254274c14cd6Smrg need_lib_prefix=no 254374c14cd6Smrg need_version=no 254474c14cd6Smrg dynamic_linker="$host_os runtime_loader" 254574c14cd6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 254674c14cd6Smrg soname_spec='${libname}${release}${shared_ext}$major' 254774c14cd6Smrg shlibpath_var=LIBRARY_PATH 254874c14cd6Smrg shlibpath_overrides_runpath=yes 254974c14cd6Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 255072b676d7Smrg hardcode_into_libs=yes 255172b676d7Smrg ;; 255272b676d7Smrg 255372b676d7Smrghpux9* | hpux10* | hpux11*) 255472b676d7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 255572b676d7Smrg # link against other versions. 255672b676d7Smrg version_type=sunos 255772b676d7Smrg need_lib_prefix=no 255872b676d7Smrg need_version=no 255972b676d7Smrg case $host_cpu in 256072b676d7Smrg ia64*) 256172b676d7Smrg shrext_cmds='.so' 256272b676d7Smrg hardcode_into_libs=yes 256372b676d7Smrg dynamic_linker="$host_os dld.so" 256472b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 256572b676d7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 256672b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 256772b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 256872b676d7Smrg if test "X$HPUX_IA64_MODE" = X32; then 256972b676d7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 257072b676d7Smrg else 257172b676d7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 257272b676d7Smrg fi 257372b676d7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 257472b676d7Smrg ;; 2575e35772b2Smrg hppa*64*) 2576e35772b2Smrg shrext_cmds='.sl' 2577e35772b2Smrg hardcode_into_libs=yes 2578e35772b2Smrg dynamic_linker="$host_os dld.sl" 2579e35772b2Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2580e35772b2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2581e35772b2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2582e35772b2Smrg soname_spec='${libname}${release}${shared_ext}$major' 2583e35772b2Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2584e35772b2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2585e35772b2Smrg ;; 2586e35772b2Smrg *) 258772b676d7Smrg shrext_cmds='.sl' 258872b676d7Smrg dynamic_linker="$host_os dld.sl" 258972b676d7Smrg shlibpath_var=SHLIB_PATH 259072b676d7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 259172b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 259272b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 259372b676d7Smrg ;; 259472b676d7Smrg esac 259574c14cd6Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 259672b676d7Smrg postinstall_cmds='chmod 555 $lib' 259774c14cd6Smrg # or fails outright, so override atomically: 259874c14cd6Smrg install_override_mode=555 259972b676d7Smrg ;; 260072b676d7Smrg 26011fd23544Smrginterix[[3-9]]*) 260274c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 260372b676d7Smrg need_lib_prefix=no 260472b676d7Smrg need_version=no 260572b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 260672b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 260772b676d7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 260872b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 260972b676d7Smrg shlibpath_overrides_runpath=no 261072b676d7Smrg hardcode_into_libs=yes 261172b676d7Smrg ;; 261272b676d7Smrg 261372b676d7Smrgirix5* | irix6* | nonstopux*) 261472b676d7Smrg case $host_os in 261572b676d7Smrg nonstopux*) version_type=nonstopux ;; 261672b676d7Smrg *) 261772b676d7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 261874c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 261972b676d7Smrg else 262072b676d7Smrg version_type=irix 262172b676d7Smrg fi ;; 262272b676d7Smrg esac 262372b676d7Smrg need_lib_prefix=no 262472b676d7Smrg need_version=no 262572b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 262672b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 262772b676d7Smrg case $host_os in 262872b676d7Smrg irix5* | nonstopux*) 262972b676d7Smrg libsuff= shlibsuff= 263072b676d7Smrg ;; 263172b676d7Smrg *) 263272b676d7Smrg case $LD in # libtool.m4 will add one of these switches to LD 263372b676d7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 263472b676d7Smrg libsuff= shlibsuff= libmagic=32-bit;; 263572b676d7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 263672b676d7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 263772b676d7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 263872b676d7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 263972b676d7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 264072b676d7Smrg esac 264172b676d7Smrg ;; 264272b676d7Smrg esac 264372b676d7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 264472b676d7Smrg shlibpath_overrides_runpath=no 264572b676d7Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 264672b676d7Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 264772b676d7Smrg hardcode_into_libs=yes 264872b676d7Smrg ;; 264972b676d7Smrg 265072b676d7Smrg# No shared lib support for Linux oldld, aout, or coff. 265172b676d7Smrglinux*oldld* | linux*aout* | linux*coff*) 265272b676d7Smrg dynamic_linker=no 265372b676d7Smrg ;; 265472b676d7Smrg 265574c14cd6Smrg# This must be glibc/ELF. 265674c14cd6Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 265774c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 265872b676d7Smrg need_lib_prefix=no 265972b676d7Smrg need_version=no 266072b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 266172b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 266272b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 266372b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 266472b676d7Smrg shlibpath_overrides_runpath=no 266574c14cd6Smrg 2666e35772b2Smrg # Some binutils ld are patched to set DT_RUNPATH 266774c14cd6Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 266874c14cd6Smrg [lt_cv_shlibpath_overrides_runpath=no 266974c14cd6Smrg save_LDFLAGS=$LDFLAGS 267074c14cd6Smrg save_libdir=$libdir 267174c14cd6Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 267274c14cd6Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 267374c14cd6Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 267474c14cd6Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 267574c14cd6Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 267674c14cd6Smrg LDFLAGS=$save_LDFLAGS 267774c14cd6Smrg libdir=$save_libdir 267874c14cd6Smrg ]) 267974c14cd6Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2680e35772b2Smrg 268172b676d7Smrg # This implies no fast_install, which is unacceptable. 268272b676d7Smrg # Some rework will be needed to allow for fast_install 268372b676d7Smrg # before this can be enabled. 268472b676d7Smrg hardcode_into_libs=yes 2685e35772b2Smrg 2686e35772b2Smrg # Add ABI-specific directories to the system library path. 2687e35772b2Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 268872b676d7Smrg 268972b676d7Smrg # Append ld.so.conf contents to the search path 269072b676d7Smrg if test -f /etc/ld.so.conf; then 269174c14cd6Smrg 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' ' '` 26921fd23544Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 269374c14cd6Smrg 269472b676d7Smrg fi 269572b676d7Smrg 269672b676d7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 269772b676d7Smrg # powerpc, because MkLinux only supported shared libraries with the 269872b676d7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 269972b676d7Smrg # most powerpc-linux boxes support dynamic linking these days and 270072b676d7Smrg # people can always --disable-shared, the test was removed, and we 270172b676d7Smrg # assume the GNU/Linux dynamic linker is in use. 270272b676d7Smrg dynamic_linker='GNU/Linux ld.so' 270372b676d7Smrg ;; 270472b676d7Smrg 270572b676d7Smrgnetbsd*) 270672b676d7Smrg version_type=sunos 270772b676d7Smrg need_lib_prefix=no 270872b676d7Smrg need_version=no 2709e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 271072b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 271172b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 271272b676d7Smrg dynamic_linker='NetBSD (a.out) ld.so' 271372b676d7Smrg else 271472b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 271572b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 271672b676d7Smrg dynamic_linker='NetBSD ld.elf_so' 271772b676d7Smrg fi 271872b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 271972b676d7Smrg shlibpath_overrides_runpath=yes 272072b676d7Smrg hardcode_into_libs=yes 272172b676d7Smrg ;; 272272b676d7Smrg 272372b676d7Smrgnewsos6) 272474c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 272572b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 272672b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 272772b676d7Smrg shlibpath_overrides_runpath=yes 272872b676d7Smrg ;; 272972b676d7Smrg 2730e35772b2Smrg*nto* | *qnx*) 2731e35772b2Smrg version_type=qnx 273272b676d7Smrg need_lib_prefix=no 273372b676d7Smrg need_version=no 273472b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 273572b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 273672b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 2737e35772b2Smrg shlibpath_overrides_runpath=no 2738e35772b2Smrg hardcode_into_libs=yes 2739e35772b2Smrg dynamic_linker='ldqnx.so' 274072b676d7Smrg ;; 274172b676d7Smrg 274272b676d7Smrgopenbsd*) 274372b676d7Smrg version_type=sunos 274472b676d7Smrg sys_lib_dlsearch_path_spec="/usr/lib" 274572b676d7Smrg need_lib_prefix=no 274672b676d7Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 274772b676d7Smrg case $host_os in 2748e35772b2Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2749e35772b2Smrg *) need_version=no ;; 275072b676d7Smrg esac 275172b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 275272b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 275372b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 2754e35772b2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 275572b676d7Smrg case $host_os in 275672b676d7Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 275772b676d7Smrg shlibpath_overrides_runpath=no 275872b676d7Smrg ;; 275972b676d7Smrg *) 276072b676d7Smrg shlibpath_overrides_runpath=yes 276172b676d7Smrg ;; 276272b676d7Smrg esac 276372b676d7Smrg else 276472b676d7Smrg shlibpath_overrides_runpath=yes 276572b676d7Smrg fi 276672b676d7Smrg ;; 276772b676d7Smrg 276872b676d7Smrgos2*) 276972b676d7Smrg libname_spec='$name' 277072b676d7Smrg shrext_cmds=".dll" 277172b676d7Smrg need_lib_prefix=no 277272b676d7Smrg library_names_spec='$libname${shared_ext} $libname.a' 277372b676d7Smrg dynamic_linker='OS/2 ld.exe' 277472b676d7Smrg shlibpath_var=LIBPATH 277572b676d7Smrg ;; 277672b676d7Smrg 277772b676d7Smrgosf3* | osf4* | osf5*) 277872b676d7Smrg version_type=osf 277972b676d7Smrg need_lib_prefix=no 278072b676d7Smrg need_version=no 278172b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 278272b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 278372b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 278472b676d7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 278572b676d7Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 278672b676d7Smrg ;; 278772b676d7Smrg 27881fd23544Smrgrdos*) 27891fd23544Smrg dynamic_linker=no 27901fd23544Smrg ;; 27911fd23544Smrg 279272b676d7Smrgsolaris*) 279374c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 279472b676d7Smrg need_lib_prefix=no 279572b676d7Smrg need_version=no 279672b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 279772b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 279872b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 279972b676d7Smrg shlibpath_overrides_runpath=yes 280072b676d7Smrg hardcode_into_libs=yes 280172b676d7Smrg # ldd complains unless libraries are executable 280272b676d7Smrg postinstall_cmds='chmod +x $lib' 280372b676d7Smrg ;; 280472b676d7Smrg 280572b676d7Smrgsunos4*) 280672b676d7Smrg version_type=sunos 280772b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 280872b676d7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 280972b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 281072b676d7Smrg shlibpath_overrides_runpath=yes 281172b676d7Smrg if test "$with_gnu_ld" = yes; then 281272b676d7Smrg need_lib_prefix=no 281372b676d7Smrg fi 281472b676d7Smrg need_version=yes 281572b676d7Smrg ;; 281672b676d7Smrg 281772b676d7Smrgsysv4 | sysv4.3*) 281874c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 281972b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 282072b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 282172b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 282272b676d7Smrg case $host_vendor in 282372b676d7Smrg sni) 282472b676d7Smrg shlibpath_overrides_runpath=no 282572b676d7Smrg need_lib_prefix=no 282672b676d7Smrg runpath_var=LD_RUN_PATH 282772b676d7Smrg ;; 282872b676d7Smrg siemens) 282972b676d7Smrg need_lib_prefix=no 283072b676d7Smrg ;; 283172b676d7Smrg motorola) 283272b676d7Smrg need_lib_prefix=no 283372b676d7Smrg need_version=no 283472b676d7Smrg shlibpath_overrides_runpath=no 283572b676d7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 283672b676d7Smrg ;; 283772b676d7Smrg esac 283872b676d7Smrg ;; 283972b676d7Smrg 284072b676d7Smrgsysv4*MP*) 284172b676d7Smrg if test -d /usr/nec ;then 284274c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 284372b676d7Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 284472b676d7Smrg soname_spec='$libname${shared_ext}.$major' 284572b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 284672b676d7Smrg fi 284772b676d7Smrg ;; 284872b676d7Smrg 284972b676d7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 285072b676d7Smrg version_type=freebsd-elf 285172b676d7Smrg need_lib_prefix=no 285272b676d7Smrg need_version=no 285372b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 285472b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 285572b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 2856e35772b2Smrg shlibpath_overrides_runpath=yes 285772b676d7Smrg hardcode_into_libs=yes 285872b676d7Smrg if test "$with_gnu_ld" = yes; then 285972b676d7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 286072b676d7Smrg else 286172b676d7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 286272b676d7Smrg case $host_os in 286372b676d7Smrg sco3.2v5*) 286472b676d7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 286572b676d7Smrg ;; 286672b676d7Smrg esac 286772b676d7Smrg fi 286872b676d7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 286972b676d7Smrg ;; 287072b676d7Smrg 2871e35772b2Smrgtpf*) 2872e35772b2Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 287374c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 2874e35772b2Smrg need_lib_prefix=no 2875e35772b2Smrg need_version=no 2876e35772b2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2877e35772b2Smrg shlibpath_var=LD_LIBRARY_PATH 2878e35772b2Smrg shlibpath_overrides_runpath=no 2879e35772b2Smrg hardcode_into_libs=yes 2880e35772b2Smrg ;; 2881e35772b2Smrg 288272b676d7Smrguts4*) 288374c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 288472b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 288572b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 288672b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 288772b676d7Smrg ;; 288872b676d7Smrg 288972b676d7Smrg*) 289072b676d7Smrg dynamic_linker=no 289172b676d7Smrg ;; 289272b676d7Smrgesac 289372b676d7SmrgAC_MSG_RESULT([$dynamic_linker]) 289472b676d7Smrgtest "$dynamic_linker" = no && can_build_shared=no 289572b676d7Smrg 289672b676d7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 289772b676d7Smrgif test "$GCC" = yes; then 289872b676d7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 289972b676d7Smrgfi 290072b676d7Smrg 2901e35772b2Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2902e35772b2Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2903e35772b2Smrgfi 2904e35772b2Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2905e35772b2Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2906e35772b2Smrgfi 290772b676d7Smrg 2908e35772b2Smrg_LT_DECL([], [variables_saved_for_relink], [1], 2909e35772b2Smrg [Variables whose values should be saved in libtool wrapper scripts and 2910e35772b2Smrg restored at link time]) 2911e35772b2Smrg_LT_DECL([], [need_lib_prefix], [0], 2912e35772b2Smrg [Do we need the "lib" prefix for modules?]) 2913e35772b2Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2914e35772b2Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2915e35772b2Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2916e35772b2Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2917e35772b2Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2918e35772b2Smrg [Is shlibpath searched before the hard-coded library search path?]) 2919e35772b2Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2920e35772b2Smrg_LT_DECL([], [library_names_spec], [1], 2921e35772b2Smrg [[List of archive names. First name is the real one, the rest are links. 2922e35772b2Smrg The last name is the one that the linker finds with -lNAME]]) 2923e35772b2Smrg_LT_DECL([], [soname_spec], [1], 2924e35772b2Smrg [[The coded name of the library, if different from the real name]]) 292574c14cd6Smrg_LT_DECL([], [install_override_mode], [1], 292674c14cd6Smrg [Permission mode override for installation of shared libraries]) 2927e35772b2Smrg_LT_DECL([], [postinstall_cmds], [2], 2928e35772b2Smrg [Command to use after installation of a shared archive]) 2929e35772b2Smrg_LT_DECL([], [postuninstall_cmds], [2], 2930e35772b2Smrg [Command to use after uninstallation of a shared archive]) 2931e35772b2Smrg_LT_DECL([], [finish_cmds], [2], 2932e35772b2Smrg [Commands used to finish a libtool library installation in a directory]) 2933e35772b2Smrg_LT_DECL([], [finish_eval], [1], 2934e35772b2Smrg [[As "finish_cmds", except a single script fragment to be evaled but 2935e35772b2Smrg not shown]]) 2936e35772b2Smrg_LT_DECL([], [hardcode_into_libs], [0], 2937e35772b2Smrg [Whether we should hardcode library paths into libraries]) 2938e35772b2Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2939e35772b2Smrg [Compile-time system search path for libraries]) 2940e35772b2Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2941e35772b2Smrg [Run-time system search path for libraries]) 2942e35772b2Smrg])# _LT_SYS_DYNAMIC_LINKER 2943e35772b2Smrg 2944e35772b2Smrg 2945e35772b2Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 294672b676d7Smrg# -------------------------- 29471fd23544Smrg# find a file program which can recognize shared library 2948e35772b2SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2949e35772b2Smrg[m4_require([_LT_DECL_EGREP])dnl 295072b676d7SmrgAC_MSG_CHECKING([for $1]) 295172b676d7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 295272b676d7Smrg[case $MAGIC_CMD in 295372b676d7Smrg[[\\/*] | ?:[\\/]*]) 295472b676d7Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 295572b676d7Smrg ;; 295672b676d7Smrg*) 295772b676d7Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 295872b676d7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 295972b676d7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 296072b676d7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 296172b676d7Smrgdnl not every word. This closes a longstanding sh security hole. 2962e35772b2Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 296372b676d7Smrg for ac_dir in $ac_dummy; do 296472b676d7Smrg IFS="$lt_save_ifs" 296572b676d7Smrg test -z "$ac_dir" && ac_dir=. 296672b676d7Smrg if test -f $ac_dir/$1; then 296772b676d7Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 296872b676d7Smrg if test -n "$file_magic_test_file"; then 296972b676d7Smrg case $deplibs_check_method in 297072b676d7Smrg "file_magic "*) 297172b676d7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 297272b676d7Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 297372b676d7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 297472b676d7Smrg $EGREP "$file_magic_regex" > /dev/null; then 297572b676d7Smrg : 297672b676d7Smrg else 2977e35772b2Smrg cat <<_LT_EOF 1>&2 297872b676d7Smrg 297972b676d7Smrg*** Warning: the command libtool uses to detect shared libraries, 298072b676d7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 298172b676d7Smrg*** The result is that libtool may fail to recognize shared libraries 298272b676d7Smrg*** as such. This will affect the creation of libtool libraries that 298372b676d7Smrg*** depend on shared libraries, but programs linked with such libtool 298472b676d7Smrg*** libraries will work regardless of this problem. Nevertheless, you 298572b676d7Smrg*** may want to report the problem to your system manager and/or to 298672b676d7Smrg*** bug-libtool@gnu.org 298772b676d7Smrg 2988e35772b2Smrg_LT_EOF 298972b676d7Smrg fi ;; 299072b676d7Smrg esac 299172b676d7Smrg fi 299272b676d7Smrg break 299372b676d7Smrg fi 299472b676d7Smrg done 299572b676d7Smrg IFS="$lt_save_ifs" 299672b676d7Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 299772b676d7Smrg ;; 299872b676d7Smrgesac]) 299972b676d7SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 300072b676d7Smrgif test -n "$MAGIC_CMD"; then 300172b676d7Smrg AC_MSG_RESULT($MAGIC_CMD) 300272b676d7Smrgelse 300372b676d7Smrg AC_MSG_RESULT(no) 300472b676d7Smrgfi 3005e35772b2Smrg_LT_DECL([], [MAGIC_CMD], [0], 3006e35772b2Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3007e35772b2Smrg])# _LT_PATH_TOOL_PREFIX 300872b676d7Smrg 3009e35772b2Smrg# Old name: 3010e35772b2SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3011e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3012e35772b2Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 301372b676d7Smrg 3014e35772b2Smrg 3015e35772b2Smrg# _LT_PATH_MAGIC 3016e35772b2Smrg# -------------- 30171fd23544Smrg# find a file program which can recognize a shared library 3018e35772b2Smrgm4_defun([_LT_PATH_MAGIC], 3019e35772b2Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 302072b676d7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 302172b676d7Smrg if test -n "$ac_tool_prefix"; then 3022e35772b2Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 302372b676d7Smrg else 302472b676d7Smrg MAGIC_CMD=: 302572b676d7Smrg fi 302672b676d7Smrgfi 3027e35772b2Smrg])# _LT_PATH_MAGIC 302872b676d7Smrg 302972b676d7Smrg 3030e35772b2Smrg# LT_PATH_LD 303172b676d7Smrg# ---------- 303272b676d7Smrg# find the pathname to the GNU or non-GNU linker 3033e35772b2SmrgAC_DEFUN([LT_PATH_LD], 3034e35772b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 303572b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 303672b676d7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3037e35772b2Smrgm4_require([_LT_DECL_SED])dnl 3038e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 303974c14cd6Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3040e35772b2Smrg 3041e35772b2SmrgAC_ARG_WITH([gnu-ld], 3042e35772b2Smrg [AS_HELP_STRING([--with-gnu-ld], 3043e35772b2Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3044e35772b2Smrg [test "$withval" = no || with_gnu_ld=yes], 3045e35772b2Smrg [with_gnu_ld=no])dnl 3046e35772b2Smrg 304772b676d7Smrgac_prog=ld 304872b676d7Smrgif test "$GCC" = yes; then 304972b676d7Smrg # Check if gcc -print-prog-name=ld gives a path. 305072b676d7Smrg AC_MSG_CHECKING([for ld used by $CC]) 305172b676d7Smrg case $host in 305272b676d7Smrg *-*-mingw*) 305372b676d7Smrg # gcc leaves a trailing carriage return which upsets mingw 305472b676d7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 305572b676d7Smrg *) 305672b676d7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 305772b676d7Smrg esac 305872b676d7Smrg case $ac_prog in 305972b676d7Smrg # Accept absolute paths. 306072b676d7Smrg [[\\/]]* | ?:[[\\/]]*) 306172b676d7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 306272b676d7Smrg # Canonicalize the pathname of ld 3063e35772b2Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3064e35772b2Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3065e35772b2Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 306672b676d7Smrg done 306772b676d7Smrg test -z "$LD" && LD="$ac_prog" 306872b676d7Smrg ;; 306972b676d7Smrg "") 307072b676d7Smrg # If it fails, then pretend we aren't using GCC. 307172b676d7Smrg ac_prog=ld 307272b676d7Smrg ;; 307372b676d7Smrg *) 307472b676d7Smrg # If it is relative, then search for the first ld in PATH. 307572b676d7Smrg with_gnu_ld=unknown 307672b676d7Smrg ;; 307772b676d7Smrg esac 307872b676d7Smrgelif test "$with_gnu_ld" = yes; then 307972b676d7Smrg AC_MSG_CHECKING([for GNU ld]) 308072b676d7Smrgelse 308172b676d7Smrg AC_MSG_CHECKING([for non-GNU ld]) 308272b676d7Smrgfi 308372b676d7SmrgAC_CACHE_VAL(lt_cv_path_LD, 308472b676d7Smrg[if test -z "$LD"; then 308572b676d7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 308672b676d7Smrg for ac_dir in $PATH; do 308772b676d7Smrg IFS="$lt_save_ifs" 308872b676d7Smrg test -z "$ac_dir" && ac_dir=. 308972b676d7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 309072b676d7Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 309172b676d7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 309272b676d7Smrg # but apparently some variants of GNU ld only accept -v. 309372b676d7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 309472b676d7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 309572b676d7Smrg *GNU* | *'with BFD'*) 309672b676d7Smrg test "$with_gnu_ld" != no && break 309772b676d7Smrg ;; 309872b676d7Smrg *) 309972b676d7Smrg test "$with_gnu_ld" != yes && break 310072b676d7Smrg ;; 310172b676d7Smrg esac 310272b676d7Smrg fi 310372b676d7Smrg done 310472b676d7Smrg IFS="$lt_save_ifs" 310572b676d7Smrgelse 310672b676d7Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 310772b676d7Smrgfi]) 310872b676d7SmrgLD="$lt_cv_path_LD" 310972b676d7Smrgif test -n "$LD"; then 311072b676d7Smrg AC_MSG_RESULT($LD) 311172b676d7Smrgelse 311272b676d7Smrg AC_MSG_RESULT(no) 311372b676d7Smrgfi 311472b676d7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3115e35772b2Smrg_LT_PATH_LD_GNU 3116e35772b2SmrgAC_SUBST([LD]) 311772b676d7Smrg 3118e35772b2Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3119e35772b2Smrg])# LT_PATH_LD 312072b676d7Smrg 3121e35772b2Smrg# Old names: 3122e35772b2SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3123e35772b2SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3124e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3125e35772b2Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3126e35772b2Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3127e35772b2Smrg 3128e35772b2Smrg 3129e35772b2Smrg# _LT_PATH_LD_GNU 3130e35772b2Smrg#- -------------- 3131e35772b2Smrgm4_defun([_LT_PATH_LD_GNU], 3132e35772b2Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 313372b676d7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 313472b676d7Smrgcase `$LD -v 2>&1 </dev/null` in 313572b676d7Smrg*GNU* | *'with BFD'*) 313672b676d7Smrg lt_cv_prog_gnu_ld=yes 313772b676d7Smrg ;; 313872b676d7Smrg*) 313972b676d7Smrg lt_cv_prog_gnu_ld=no 314072b676d7Smrg ;; 314172b676d7Smrgesac]) 314272b676d7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3143e35772b2Smrg])# _LT_PATH_LD_GNU 314472b676d7Smrg 314572b676d7Smrg 3146e35772b2Smrg# _LT_CMD_RELOAD 3147e35772b2Smrg# -------------- 314872b676d7Smrg# find reload flag for linker 314972b676d7Smrg# -- PORTME Some linkers may need a different reload flag. 3150e35772b2Smrgm4_defun([_LT_CMD_RELOAD], 315172b676d7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 315272b676d7Smrg lt_cv_ld_reload_flag, 315372b676d7Smrg [lt_cv_ld_reload_flag='-r']) 315472b676d7Smrgreload_flag=$lt_cv_ld_reload_flag 315572b676d7Smrgcase $reload_flag in 315672b676d7Smrg"" | " "*) ;; 315772b676d7Smrg*) reload_flag=" $reload_flag" ;; 315872b676d7Smrgesac 315972b676d7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 316072b676d7Smrgcase $host_os in 316174c14cd6Smrg cygwin* | mingw* | pw32* | cegcc*) 316274c14cd6Smrg if test "$GCC" != yes; then 316374c14cd6Smrg reload_cmds=false 316474c14cd6Smrg fi 316574c14cd6Smrg ;; 316672b676d7Smrg darwin*) 316772b676d7Smrg if test "$GCC" = yes; then 316872b676d7Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 316972b676d7Smrg else 317072b676d7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 317172b676d7Smrg fi 317272b676d7Smrg ;; 317372b676d7Smrgesac 317474c14cd6Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 317574c14cd6Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3176e35772b2Smrg])# _LT_CMD_RELOAD 317772b676d7Smrg 317872b676d7Smrg 3179e35772b2Smrg# _LT_CHECK_MAGIC_METHOD 3180e35772b2Smrg# ---------------------- 318172b676d7Smrg# how to check for library dependencies 318272b676d7Smrg# -- PORTME fill in with the dynamic library characteristics 3183e35772b2Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3184e35772b2Smrg[m4_require([_LT_DECL_EGREP]) 3185e35772b2Smrgm4_require([_LT_DECL_OBJDUMP]) 3186e35772b2SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 318772b676d7Smrglt_cv_deplibs_check_method, 318872b676d7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 318972b676d7Smrglt_cv_file_magic_test_file= 319072b676d7Smrglt_cv_deplibs_check_method='unknown' 319172b676d7Smrg# Need to set the preceding variable on all platforms that support 319272b676d7Smrg# interlibrary dependencies. 319372b676d7Smrg# 'none' -- dependencies not supported. 319472b676d7Smrg# `unknown' -- same as none, but documents that we really don't know. 319572b676d7Smrg# 'pass_all' -- all dependencies passed with no checks. 319672b676d7Smrg# 'test_compile' -- check by making test program. 319772b676d7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 319872b676d7Smrg# which responds to the $file_magic_cmd with a given extended regex. 319972b676d7Smrg# If you have `file' or equivalent on your system and you're not sure 320072b676d7Smrg# whether `pass_all' will *always* work, you probably want this one. 320172b676d7Smrg 320272b676d7Smrgcase $host_os in 32031fd23544Smrgaix[[4-9]]*) 320472b676d7Smrg lt_cv_deplibs_check_method=pass_all 320572b676d7Smrg ;; 320672b676d7Smrg 320772b676d7Smrgbeos*) 320872b676d7Smrg lt_cv_deplibs_check_method=pass_all 320972b676d7Smrg ;; 321072b676d7Smrg 321172b676d7Smrgbsdi[[45]]*) 321272b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 321372b676d7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 321472b676d7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 321572b676d7Smrg ;; 321672b676d7Smrg 321772b676d7Smrgcygwin*) 321872b676d7Smrg # func_win32_libid is a shell function defined in ltmain.sh 321972b676d7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 322072b676d7Smrg lt_cv_file_magic_cmd='func_win32_libid' 322172b676d7Smrg ;; 322272b676d7Smrg 322372b676d7Smrgmingw* | pw32*) 322472b676d7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 32251fd23544Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 32261fd23544Smrg # unless we find 'file', for example because we are cross-compiling. 322774c14cd6Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 322874c14cd6Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 32291fd23544Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32301fd23544Smrg lt_cv_file_magic_cmd='func_win32_libid' 32311fd23544Smrg else 323274c14cd6Smrg # Keep this pattern in sync with the one in func_win32_libid. 323374c14cd6Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 32341fd23544Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32351fd23544Smrg fi 323672b676d7Smrg ;; 323772b676d7Smrg 323874c14cd6Smrgcegcc*) 3239e35772b2Smrg # use the weaker test based on 'objdump'. See mingw*. 3240e35772b2Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3241e35772b2Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3242e35772b2Smrg ;; 3243e35772b2Smrg 324472b676d7Smrgdarwin* | rhapsody*) 324572b676d7Smrg lt_cv_deplibs_check_method=pass_all 324672b676d7Smrg ;; 324772b676d7Smrg 324872b676d7Smrgfreebsd* | dragonfly*) 3249e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 325072b676d7Smrg case $host_cpu in 325172b676d7Smrg i*86 ) 325272b676d7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 325372b676d7Smrg # Let's accept both of them until this is cleared up. 325472b676d7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 325572b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 325672b676d7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 325772b676d7Smrg ;; 325872b676d7Smrg esac 325972b676d7Smrg else 326072b676d7Smrg lt_cv_deplibs_check_method=pass_all 326172b676d7Smrg fi 326272b676d7Smrg ;; 326372b676d7Smrg 326472b676d7Smrggnu*) 326572b676d7Smrg lt_cv_deplibs_check_method=pass_all 326672b676d7Smrg ;; 326772b676d7Smrg 326874c14cd6Smrghaiku*) 326974c14cd6Smrg lt_cv_deplibs_check_method=pass_all 327074c14cd6Smrg ;; 327174c14cd6Smrg 327272b676d7Smrghpux10.20* | hpux11*) 327372b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 327472b676d7Smrg case $host_cpu in 327572b676d7Smrg ia64*) 327672b676d7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 327772b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 327872b676d7Smrg ;; 327972b676d7Smrg hppa*64*) 328074c14cd6Smrg [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]'] 328172b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 328272b676d7Smrg ;; 328372b676d7Smrg *) 328474c14cd6Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 328572b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 328672b676d7Smrg ;; 328772b676d7Smrg esac 328872b676d7Smrg ;; 328972b676d7Smrg 32901fd23544Smrginterix[[3-9]]*) 329172b676d7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 329272b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 329372b676d7Smrg ;; 329472b676d7Smrg 329572b676d7Smrgirix5* | irix6* | nonstopux*) 329672b676d7Smrg case $LD in 329772b676d7Smrg *-32|*"-32 ") libmagic=32-bit;; 329872b676d7Smrg *-n32|*"-n32 ") libmagic=N32;; 329972b676d7Smrg *-64|*"-64 ") libmagic=64-bit;; 330072b676d7Smrg *) libmagic=never-match;; 330172b676d7Smrg esac 330272b676d7Smrg lt_cv_deplibs_check_method=pass_all 330372b676d7Smrg ;; 330472b676d7Smrg 330574c14cd6Smrg# This must be glibc/ELF. 330674c14cd6Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 330772b676d7Smrg lt_cv_deplibs_check_method=pass_all 330872b676d7Smrg ;; 330972b676d7Smrg 33101fd23544Smrgnetbsd*) 3311e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 331272b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 331372b676d7Smrg else 331472b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 331572b676d7Smrg fi 331672b676d7Smrg ;; 331772b676d7Smrg 331872b676d7Smrgnewos6*) 331972b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 332072b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 332172b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 332272b676d7Smrg ;; 332372b676d7Smrg 3324e35772b2Smrg*nto* | *qnx*) 3325e35772b2Smrg lt_cv_deplibs_check_method=pass_all 332672b676d7Smrg ;; 332772b676d7Smrg 332872b676d7Smrgopenbsd*) 3329e35772b2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 333072b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 333172b676d7Smrg else 333272b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 333372b676d7Smrg fi 333472b676d7Smrg ;; 333572b676d7Smrg 333672b676d7Smrgosf3* | osf4* | osf5*) 333772b676d7Smrg lt_cv_deplibs_check_method=pass_all 333872b676d7Smrg ;; 333972b676d7Smrg 33401fd23544Smrgrdos*) 33411fd23544Smrg lt_cv_deplibs_check_method=pass_all 33421fd23544Smrg ;; 33431fd23544Smrg 334472b676d7Smrgsolaris*) 334572b676d7Smrg lt_cv_deplibs_check_method=pass_all 334672b676d7Smrg ;; 334772b676d7Smrg 3348e35772b2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3349e35772b2Smrg lt_cv_deplibs_check_method=pass_all 3350e35772b2Smrg ;; 3351e35772b2Smrg 335272b676d7Smrgsysv4 | sysv4.3*) 335372b676d7Smrg case $host_vendor in 335472b676d7Smrg motorola) 335572b676d7Smrg 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]]' 335672b676d7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 335772b676d7Smrg ;; 335872b676d7Smrg ncr) 335972b676d7Smrg lt_cv_deplibs_check_method=pass_all 336072b676d7Smrg ;; 336172b676d7Smrg sequent) 336272b676d7Smrg lt_cv_file_magic_cmd='/bin/file' 336372b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 336472b676d7Smrg ;; 336572b676d7Smrg sni) 336672b676d7Smrg lt_cv_file_magic_cmd='/bin/file' 336772b676d7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 336872b676d7Smrg lt_cv_file_magic_test_file=/lib/libc.so 336972b676d7Smrg ;; 337072b676d7Smrg siemens) 337172b676d7Smrg lt_cv_deplibs_check_method=pass_all 337272b676d7Smrg ;; 337372b676d7Smrg pc) 337472b676d7Smrg lt_cv_deplibs_check_method=pass_all 337572b676d7Smrg ;; 337672b676d7Smrg esac 337772b676d7Smrg ;; 337872b676d7Smrg 3379e35772b2Smrgtpf*) 338072b676d7Smrg lt_cv_deplibs_check_method=pass_all 338172b676d7Smrg ;; 338272b676d7Smrgesac 338372b676d7Smrg]) 338474c14cd6Smrg 338574c14cd6Smrgfile_magic_glob= 338674c14cd6Smrgwant_nocaseglob=no 338774c14cd6Smrgif test "$build" = "$host"; then 338874c14cd6Smrg case $host_os in 338974c14cd6Smrg mingw* | pw32*) 339074c14cd6Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 339174c14cd6Smrg want_nocaseglob=yes 339274c14cd6Smrg else 339374c14cd6Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 339474c14cd6Smrg fi 339574c14cd6Smrg ;; 339674c14cd6Smrg esac 339774c14cd6Smrgfi 339874c14cd6Smrg 339972b676d7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 340072b676d7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 340172b676d7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 340272b676d7Smrg 3403e35772b2Smrg_LT_DECL([], [deplibs_check_method], [1], 3404e35772b2Smrg [Method to check whether dependent libraries are shared objects]) 3405e35772b2Smrg_LT_DECL([], [file_magic_cmd], [1], 340674c14cd6Smrg [Command to use when deplibs_check_method = "file_magic"]) 340774c14cd6Smrg_LT_DECL([], [file_magic_glob], [1], 340874c14cd6Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 340974c14cd6Smrg_LT_DECL([], [want_nocaseglob], [1], 341074c14cd6Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3411e35772b2Smrg])# _LT_CHECK_MAGIC_METHOD 341272b676d7Smrg 3413e35772b2Smrg 3414e35772b2Smrg# LT_PATH_NM 341572b676d7Smrg# ---------- 3416e35772b2Smrg# find the pathname to a BSD- or MS-compatible name lister 3417e35772b2SmrgAC_DEFUN([LT_PATH_NM], 3418e35772b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3419e35772b2SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 342072b676d7Smrg[if test -n "$NM"; then 342172b676d7Smrg # Let the user override the test. 342272b676d7Smrg lt_cv_path_NM="$NM" 342372b676d7Smrgelse 342472b676d7Smrg lt_nm_to_check="${ac_tool_prefix}nm" 34251fd23544Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 342672b676d7Smrg lt_nm_to_check="$lt_nm_to_check nm" 342772b676d7Smrg fi 342872b676d7Smrg for lt_tmp_nm in $lt_nm_to_check; do 342972b676d7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 343072b676d7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 343172b676d7Smrg IFS="$lt_save_ifs" 343272b676d7Smrg test -z "$ac_dir" && ac_dir=. 343372b676d7Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 343472b676d7Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 343572b676d7Smrg # Check to see if the nm accepts a BSD-compat flag. 343672b676d7Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 343772b676d7Smrg # nm: unknown option "B" ignored 343872b676d7Smrg # Tru64's nm complains that /dev/null is an invalid object file 343972b676d7Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 344072b676d7Smrg */dev/null* | *'Invalid file or object type'*) 344172b676d7Smrg lt_cv_path_NM="$tmp_nm -B" 344272b676d7Smrg break 344372b676d7Smrg ;; 344472b676d7Smrg *) 344572b676d7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 344672b676d7Smrg */dev/null*) 344772b676d7Smrg lt_cv_path_NM="$tmp_nm -p" 344872b676d7Smrg break 344972b676d7Smrg ;; 345072b676d7Smrg *) 345172b676d7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 345272b676d7Smrg continue # so that we can try to find one that supports BSD flags 345372b676d7Smrg ;; 345472b676d7Smrg esac 345572b676d7Smrg ;; 345672b676d7Smrg esac 345772b676d7Smrg fi 345872b676d7Smrg done 345972b676d7Smrg IFS="$lt_save_ifs" 346072b676d7Smrg done 3461e35772b2Smrg : ${lt_cv_path_NM=no} 346272b676d7Smrgfi]) 3463e35772b2Smrgif test "$lt_cv_path_NM" != "no"; then 3464e35772b2Smrg NM="$lt_cv_path_NM" 3465e35772b2Smrgelse 3466e35772b2Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 346774c14cd6Smrg if test -n "$DUMPBIN"; then : 346874c14cd6Smrg # Let the user override the test. 346974c14cd6Smrg else 347074c14cd6Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 347174c14cd6Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 347274c14cd6Smrg *COFF*) 347374c14cd6Smrg DUMPBIN="$DUMPBIN -symbols" 347474c14cd6Smrg ;; 347574c14cd6Smrg *) 347674c14cd6Smrg DUMPBIN=: 347774c14cd6Smrg ;; 347874c14cd6Smrg esac 347974c14cd6Smrg fi 3480e35772b2Smrg AC_SUBST([DUMPBIN]) 3481e35772b2Smrg if test "$DUMPBIN" != ":"; then 3482e35772b2Smrg NM="$DUMPBIN" 3483e35772b2Smrg fi 3484e35772b2Smrgfi 3485e35772b2Smrgtest -z "$NM" && NM=nm 3486e35772b2SmrgAC_SUBST([NM]) 3487e35772b2Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3488e35772b2Smrg 3489e35772b2SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3490e35772b2Smrg [lt_cv_nm_interface="BSD nm" 3491e35772b2Smrg echo "int some_variable = 0;" > conftest.$ac_ext 349274c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3493e35772b2Smrg (eval "$ac_compile" 2>conftest.err) 3494e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 349574c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3496e35772b2Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3497e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 349874c14cd6Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3499e35772b2Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3500e35772b2Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3501e35772b2Smrg lt_cv_nm_interface="MS dumpbin" 3502e35772b2Smrg fi 3503e35772b2Smrg rm -f conftest*]) 3504e35772b2Smrg])# LT_PATH_NM 350572b676d7Smrg 3506e35772b2Smrg# Old names: 3507e35772b2SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3508e35772b2SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3509e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3510e35772b2Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3511e35772b2Smrgdnl AC_DEFUN([AC_PROG_NM], []) 351272b676d7Smrg 351374c14cd6Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 351474c14cd6Smrg# -------------------------------- 351574c14cd6Smrg# how to determine the name of the shared library 351674c14cd6Smrg# associated with a specific link library. 351774c14cd6Smrg# -- PORTME fill in with the dynamic library characteristics 351874c14cd6Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 351974c14cd6Smrg[m4_require([_LT_DECL_EGREP]) 352074c14cd6Smrgm4_require([_LT_DECL_OBJDUMP]) 352174c14cd6Smrgm4_require([_LT_DECL_DLLTOOL]) 352274c14cd6SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 352374c14cd6Smrglt_cv_sharedlib_from_linklib_cmd, 352474c14cd6Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 352574c14cd6Smrg 352674c14cd6Smrgcase $host_os in 352774c14cd6Smrgcygwin* | mingw* | pw32* | cegcc*) 352874c14cd6Smrg # two different shell functions defined in ltmain.sh 352974c14cd6Smrg # decide which to use based on capabilities of $DLLTOOL 353074c14cd6Smrg case `$DLLTOOL --help 2>&1` in 353174c14cd6Smrg *--identify-strict*) 353274c14cd6Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 353374c14cd6Smrg ;; 353474c14cd6Smrg *) 353574c14cd6Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 353674c14cd6Smrg ;; 353774c14cd6Smrg esac 353874c14cd6Smrg ;; 353974c14cd6Smrg*) 354074c14cd6Smrg # fallback: assume linklib IS sharedlib 354174c14cd6Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 354274c14cd6Smrg ;; 354374c14cd6Smrgesac 354474c14cd6Smrg]) 354574c14cd6Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 354674c14cd6Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 354774c14cd6Smrg 354874c14cd6Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 354974c14cd6Smrg [Command to associate shared and link libraries]) 355074c14cd6Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 355174c14cd6Smrg 355274c14cd6Smrg 355374c14cd6Smrg# _LT_PATH_MANIFEST_TOOL 355474c14cd6Smrg# ---------------------- 355574c14cd6Smrg# locate the manifest tool 355674c14cd6Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 355774c14cd6Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 355874c14cd6Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 355974c14cd6SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 356074c14cd6Smrg [lt_cv_path_mainfest_tool=no 356174c14cd6Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 356274c14cd6Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 356374c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 356474c14cd6Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 356574c14cd6Smrg lt_cv_path_mainfest_tool=yes 356674c14cd6Smrg fi 356774c14cd6Smrg rm -f conftest*]) 356874c14cd6Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 356974c14cd6Smrg MANIFEST_TOOL=: 357074c14cd6Smrgfi 357174c14cd6Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 357274c14cd6Smrg])# _LT_PATH_MANIFEST_TOOL 357374c14cd6Smrg 3574e35772b2Smrg 3575e35772b2Smrg# LT_LIB_M 3576e35772b2Smrg# -------- 357772b676d7Smrg# check for math library 3578e35772b2SmrgAC_DEFUN([LT_LIB_M], 357972b676d7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 358072b676d7SmrgLIBM= 358172b676d7Smrgcase $host in 358274c14cd6Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 358372b676d7Smrg # These system don't have libm, or don't need it 358472b676d7Smrg ;; 358572b676d7Smrg*-ncr-sysv4.3*) 358672b676d7Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 358772b676d7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 358872b676d7Smrg ;; 358972b676d7Smrg*) 359072b676d7Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 359172b676d7Smrg ;; 359272b676d7Smrgesac 3593e35772b2SmrgAC_SUBST([LIBM]) 3594e35772b2Smrg])# LT_LIB_M 359572b676d7Smrg 3596e35772b2Smrg# Old name: 3597e35772b2SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3598e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3599e35772b2Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 360072b676d7Smrg 360172b676d7Smrg 3602e35772b2Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3603e35772b2Smrg# ------------------------------- 3604e35772b2Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3605e35772b2Smrg[m4_require([_LT_TAG_COMPILER])dnl 360672b676d7Smrg 3607e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 360872b676d7Smrg 3609e35772b2Smrgif test "$GCC" = yes; then 361074c14cd6Smrg case $cc_basename in 361174c14cd6Smrg nvcc*) 361274c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 361374c14cd6Smrg *) 361474c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 361574c14cd6Smrg esac 361672b676d7Smrg 3617e35772b2Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3618e35772b2Smrg lt_cv_prog_compiler_rtti_exceptions, 3619e35772b2Smrg [-fno-rtti -fno-exceptions], [], 3620e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3621e35772b2Smrgfi 3622e35772b2Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3623e35772b2Smrg [Compiler flag to turn off builtin functions]) 3624e35772b2Smrg])# _LT_COMPILER_NO_RTTI 362572b676d7Smrg 362672b676d7Smrg 3627e35772b2Smrg# _LT_CMD_GLOBAL_SYMBOLS 3628e35772b2Smrg# ---------------------- 3629e35772b2Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3630e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3631e35772b2SmrgAC_REQUIRE([AC_PROG_CC])dnl 363274c14cd6SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3633e35772b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 3634e35772b2SmrgAC_REQUIRE([LT_PATH_LD])dnl 3635e35772b2Smrgm4_require([_LT_DECL_SED])dnl 3636e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 3637e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 363872b676d7Smrg 3639e35772b2Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3640e35772b2SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3641e35772b2SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 364272b676d7Smrg[ 3643e35772b2Smrg# These are sane defaults that work on at least a few old systems. 3644e35772b2Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 364572b676d7Smrg 3646e35772b2Smrg# Character class describing NM global symbol codes. 3647e35772b2Smrgsymcode='[[BCDEGRST]]' 364872b676d7Smrg 3649e35772b2Smrg# Regexp to match symbols that can be accessed directly from C. 3650e35772b2Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 365172b676d7Smrg 3652e35772b2Smrg# Define system-specific variables. 3653e35772b2Smrgcase $host_os in 3654e35772b2Smrgaix*) 3655e35772b2Smrg symcode='[[BCDT]]' 3656e35772b2Smrg ;; 3657e35772b2Smrgcygwin* | mingw* | pw32* | cegcc*) 3658e35772b2Smrg symcode='[[ABCDGISTW]]' 3659e35772b2Smrg ;; 3660e35772b2Smrghpux*) 3661e35772b2Smrg if test "$host_cpu" = ia64; then 3662e35772b2Smrg symcode='[[ABCDEGRST]]' 3663e35772b2Smrg fi 3664e35772b2Smrg ;; 3665e35772b2Smrgirix* | nonstopux*) 3666e35772b2Smrg symcode='[[BCDEGRST]]' 3667e35772b2Smrg ;; 3668e35772b2Smrgosf*) 3669e35772b2Smrg symcode='[[BCDEGQRST]]' 3670e35772b2Smrg ;; 3671e35772b2Smrgsolaris*) 3672e35772b2Smrg symcode='[[BDRT]]' 3673e35772b2Smrg ;; 3674e35772b2Smrgsco3.2v5*) 3675e35772b2Smrg symcode='[[DT]]' 3676e35772b2Smrg ;; 3677e35772b2Smrgsysv4.2uw2*) 3678e35772b2Smrg symcode='[[DT]]' 3679e35772b2Smrg ;; 3680e35772b2Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3681e35772b2Smrg symcode='[[ABDT]]' 3682e35772b2Smrg ;; 3683e35772b2Smrgsysv4) 3684e35772b2Smrg symcode='[[DFNSTU]]' 3685e35772b2Smrg ;; 3686e35772b2Smrgesac 368772b676d7Smrg 3688e35772b2Smrg# If we're using GNU nm, then use its standard symbol codes. 3689e35772b2Smrgcase `$NM -V 2>&1` in 3690e35772b2Smrg*GNU* | *'with BFD'*) 3691e35772b2Smrg symcode='[[ABCDGIRSTW]]' ;; 3692e35772b2Smrgesac 369372b676d7Smrg 3694e35772b2Smrg# Transform an extracted symbol line into a proper C declaration. 3695e35772b2Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3696e35772b2Smrg# so use this general approach. 3697e35772b2Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 369872b676d7Smrg 3699e35772b2Smrg# Transform an extracted symbol line into symbol name and symbol address 370074c14cd6Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 370174c14cd6Smrglt_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'" 370272b676d7Smrg 3703e35772b2Smrg# Handle CRLF in mingw tool chain 3704e35772b2Smrgopt_cr= 3705e35772b2Smrgcase $build_os in 3706e35772b2Smrgmingw*) 3707e35772b2Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3708e35772b2Smrg ;; 3709e35772b2Smrgesac 371072b676d7Smrg 3711e35772b2Smrg# Try without a prefix underscore, then with it. 3712e35772b2Smrgfor ac_symprfx in "" "_"; do 371372b676d7Smrg 3714e35772b2Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3715e35772b2Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 371672b676d7Smrg 3717e35772b2Smrg # Write the raw and C identifiers. 3718e35772b2Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3719e35772b2Smrg # Fake it for dumpbin and say T for any non-static function 3720e35772b2Smrg # and D for any global variable. 3721e35772b2Smrg # Also find C++ and __fastcall symbols from MSVC++, 3722e35772b2Smrg # which start with @ or ?. 3723e35772b2Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3724e35772b2Smrg" {last_section=section; section=\$ 3};"\ 372574c14cd6Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3726e35772b2Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3727e35772b2Smrg" \$ 0!~/External *\|/{next};"\ 3728e35772b2Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3729e35772b2Smrg" {if(hide[section]) next};"\ 3730e35772b2Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3731e35772b2Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3732e35772b2Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3733e35772b2Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3734e35772b2Smrg" ' prfx=^$ac_symprfx]" 3735e35772b2Smrg else 3736e35772b2Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 373772b676d7Smrg fi 373874c14cd6Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 373972b676d7Smrg 3740e35772b2Smrg # Check to see that the pipe works correctly. 3741e35772b2Smrg pipe_works=no 374272b676d7Smrg 3743e35772b2Smrg rm -f conftest* 3744e35772b2Smrg cat > conftest.$ac_ext <<_LT_EOF 3745e35772b2Smrg#ifdef __cplusplus 3746e35772b2Smrgextern "C" { 3747e35772b2Smrg#endif 3748e35772b2Smrgchar nm_test_var; 3749e35772b2Smrgvoid nm_test_func(void); 3750e35772b2Smrgvoid nm_test_func(void){} 3751e35772b2Smrg#ifdef __cplusplus 3752e35772b2Smrg} 3753e35772b2Smrg#endif 3754e35772b2Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3755e35772b2Smrg_LT_EOF 375672b676d7Smrg 3757e35772b2Smrg if AC_TRY_EVAL(ac_compile); then 3758e35772b2Smrg # Now try to grab the symbols. 3759e35772b2Smrg nlist=conftest.nm 376074c14cd6Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3761e35772b2Smrg # Try sorting and uniquifying the output. 3762e35772b2Smrg if sort "$nlist" | uniq > "$nlist"T; then 3763e35772b2Smrg mv -f "$nlist"T "$nlist" 3764e35772b2Smrg else 3765e35772b2Smrg rm -f "$nlist"T 3766e35772b2Smrg fi 376772b676d7Smrg 3768e35772b2Smrg # Make sure that we snagged all the symbols we need. 3769e35772b2Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3770e35772b2Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3771e35772b2Smrg cat <<_LT_EOF > conftest.$ac_ext 377274c14cd6Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 377374c14cd6Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 377474c14cd6Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 377574c14cd6Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 377674c14cd6Smrg# define LT@&t@_DLSYM_CONST 377774c14cd6Smrg#elif defined(__osf__) 377874c14cd6Smrg/* This system does not cope well with relocations in const data. */ 377974c14cd6Smrg# define LT@&t@_DLSYM_CONST 378074c14cd6Smrg#else 378174c14cd6Smrg# define LT@&t@_DLSYM_CONST const 378274c14cd6Smrg#endif 378374c14cd6Smrg 3784e35772b2Smrg#ifdef __cplusplus 3785e35772b2Smrgextern "C" { 3786e35772b2Smrg#endif 378772b676d7Smrg 3788e35772b2Smrg_LT_EOF 3789e35772b2Smrg # Now generate the symbol file. 3790e35772b2Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 379172b676d7Smrg 3792e35772b2Smrg cat <<_LT_EOF >> conftest.$ac_ext 379372b676d7Smrg 3794e35772b2Smrg/* The mapping between symbol names and symbols. */ 379574c14cd6SmrgLT@&t@_DLSYM_CONST struct { 3796e35772b2Smrg const char *name; 3797e35772b2Smrg void *address; 3798e35772b2Smrg} 3799e35772b2Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3800e35772b2Smrg{ 3801e35772b2Smrg { "@PROGRAM@", (void *) 0 }, 3802e35772b2Smrg_LT_EOF 3803e35772b2Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3804e35772b2Smrg cat <<\_LT_EOF >> conftest.$ac_ext 3805e35772b2Smrg {0, (void *) 0} 3806e35772b2Smrg}; 380772b676d7Smrg 3808e35772b2Smrg/* This works around a problem in FreeBSD linker */ 3809e35772b2Smrg#ifdef FREEBSD_WORKAROUND 3810e35772b2Smrgstatic const void *lt_preloaded_setup() { 3811e35772b2Smrg return lt__PROGRAM__LTX_preloaded_symbols; 3812e35772b2Smrg} 3813e35772b2Smrg#endif 381472b676d7Smrg 3815e35772b2Smrg#ifdef __cplusplus 3816e35772b2Smrg} 3817e35772b2Smrg#endif 3818e35772b2Smrg_LT_EOF 3819e35772b2Smrg # Now try linking the two files. 3820e35772b2Smrg mv conftest.$ac_objext conftstm.$ac_objext 382174c14cd6Smrg lt_globsym_save_LIBS=$LIBS 382274c14cd6Smrg lt_globsym_save_CFLAGS=$CFLAGS 3823e35772b2Smrg LIBS="conftstm.$ac_objext" 3824e35772b2Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3825e35772b2Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3826e35772b2Smrg pipe_works=yes 3827e35772b2Smrg fi 382874c14cd6Smrg LIBS=$lt_globsym_save_LIBS 382974c14cd6Smrg CFLAGS=$lt_globsym_save_CFLAGS 3830e35772b2Smrg else 3831e35772b2Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3832e35772b2Smrg fi 3833e35772b2Smrg else 3834e35772b2Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3835e35772b2Smrg fi 383672b676d7Smrg else 3837e35772b2Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 383872b676d7Smrg fi 383972b676d7Smrg else 3840e35772b2Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3841e35772b2Smrg cat conftest.$ac_ext >&5 384272b676d7Smrg fi 3843e35772b2Smrg rm -rf conftest* conftst* 384472b676d7Smrg 3845e35772b2Smrg # Do not use the global_symbol_pipe unless it works. 3846e35772b2Smrg if test "$pipe_works" = yes; then 3847e35772b2Smrg break 3848e35772b2Smrg else 3849e35772b2Smrg lt_cv_sys_global_symbol_pipe= 3850e35772b2Smrg fi 3851e35772b2Smrgdone 3852e35772b2Smrg]) 3853e35772b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3854e35772b2Smrg lt_cv_sys_global_symbol_to_cdecl= 3855e35772b2Smrgfi 3856e35772b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3857e35772b2Smrg AC_MSG_RESULT(failed) 385872b676d7Smrgelse 3859e35772b2Smrg AC_MSG_RESULT(ok) 386072b676d7Smrgfi 386172b676d7Smrg 386274c14cd6Smrg# Response file support. 386374c14cd6Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 386474c14cd6Smrg nm_file_list_spec='@' 386574c14cd6Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 386674c14cd6Smrg nm_file_list_spec='@' 386774c14cd6Smrgfi 386874c14cd6Smrg 3869e35772b2Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3870e35772b2Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 3871e35772b2Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3872e35772b2Smrg [Transform the output of nm in a proper C declaration]) 3873e35772b2Smrg_LT_DECL([global_symbol_to_c_name_address], 3874e35772b2Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3875e35772b2Smrg [Transform the output of nm in a C name address pair]) 3876e35772b2Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3877e35772b2Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3878e35772b2Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 387974c14cd6Smrg_LT_DECL([], [nm_file_list_spec], [1], 388074c14cd6Smrg [Specify filename containing input files for $NM]) 3881e35772b2Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 388272b676d7Smrg 388372b676d7Smrg 3884e35772b2Smrg# _LT_COMPILER_PIC([TAGNAME]) 3885e35772b2Smrg# --------------------------- 3886e35772b2Smrgm4_defun([_LT_COMPILER_PIC], 3887e35772b2Smrg[m4_require([_LT_TAG_COMPILER])dnl 3888e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3889e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3890e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 389172b676d7Smrg 3892e35772b2Smrgm4_if([$1], [CXX], [ 3893e35772b2Smrg # C++ specific cases for pic, static, wl, etc. 3894e35772b2Smrg if test "$GXX" = yes; then 3895e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3896e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 389772b676d7Smrg 3898e35772b2Smrg case $host_os in 3899e35772b2Smrg aix*) 3900e35772b2Smrg # All AIX code is PIC. 390172b676d7Smrg if test "$host_cpu" = ia64; then 3902e35772b2Smrg # AIX 5 now supports IA64 processor 3903e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 390472b676d7Smrg fi 390572b676d7Smrg ;; 390672b676d7Smrg 3907e35772b2Smrg amigaos*) 390872b676d7Smrg case $host_cpu in 3909e35772b2Smrg powerpc) 3910e35772b2Smrg # see comment about AmigaOS4 .so support 3911e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3912e35772b2Smrg ;; 3913e35772b2Smrg m68k) 3914e35772b2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3915e35772b2Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3916e35772b2Smrg # like `-m68040'. 3917e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 391872b676d7Smrg ;; 391972b676d7Smrg esac 392072b676d7Smrg ;; 392172b676d7Smrg 3922e35772b2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3923e35772b2Smrg # PIC is the default for these OSes. 3924e35772b2Smrg ;; 3925e35772b2Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3926e35772b2Smrg # This hack is so that the source file can tell whether it is being 3927e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 3928e35772b2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3929e35772b2Smrg # (--disable-auto-import) libraries 3930e35772b2Smrg m4_if([$1], [GCJ], [], 3931e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3932e35772b2Smrg ;; 3933e35772b2Smrg darwin* | rhapsody*) 3934e35772b2Smrg # PIC is the default on this platform 3935e35772b2Smrg # Common symbols not allowed in MH_DYLIB files 3936e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3937e35772b2Smrg ;; 3938e35772b2Smrg *djgpp*) 3939e35772b2Smrg # DJGPP does not support shared libraries at all 3940e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3941e35772b2Smrg ;; 394274c14cd6Smrg haiku*) 394374c14cd6Smrg # PIC is the default for Haiku. 394474c14cd6Smrg # The "-static" flag exists, but is broken. 394574c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 394674c14cd6Smrg ;; 3947e35772b2Smrg interix[[3-9]]*) 3948e35772b2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3949e35772b2Smrg # Instead, we relocate shared libraries at runtime. 3950e35772b2Smrg ;; 3951e35772b2Smrg sysv4*MP*) 3952e35772b2Smrg if test -d /usr/nec; then 3953e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3954e35772b2Smrg fi 3955e35772b2Smrg ;; 3956e35772b2Smrg hpux*) 3957e35772b2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3958e35772b2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3959e35772b2Smrg # sets the default TLS model and affects inlining. 3960e35772b2Smrg case $host_cpu in 3961e35772b2Smrg hppa*64*) 396272b676d7Smrg ;; 396372b676d7Smrg *) 3964e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 396572b676d7Smrg ;; 3966e35772b2Smrg esac 3967e35772b2Smrg ;; 3968e35772b2Smrg *qnx* | *nto*) 3969e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3970e35772b2Smrg # it will coredump. 3971e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3972e35772b2Smrg ;; 3973e35772b2Smrg *) 3974e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3975e35772b2Smrg ;; 397672b676d7Smrg esac 3977e35772b2Smrg else 3978e35772b2Smrg case $host_os in 3979e35772b2Smrg aix[[4-9]]*) 3980e35772b2Smrg # All AIX code is PIC. 3981e35772b2Smrg if test "$host_cpu" = ia64; then 3982e35772b2Smrg # AIX 5 now supports IA64 processor 3983e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3984e35772b2Smrg else 3985e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 398672b676d7Smrg fi 398772b676d7Smrg ;; 3988e35772b2Smrg chorus*) 3989e35772b2Smrg case $cc_basename in 3990e35772b2Smrg cxch68*) 3991e35772b2Smrg # Green Hills C++ Compiler 3992e35772b2Smrg # _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" 399372b676d7Smrg ;; 399472b676d7Smrg esac 399572b676d7Smrg ;; 399674c14cd6Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 399774c14cd6Smrg # This hack is so that the source file can tell whether it is being 399874c14cd6Smrg # built for inclusion in a dll (and should export symbols for example). 399974c14cd6Smrg m4_if([$1], [GCJ], [], 400074c14cd6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 400174c14cd6Smrg ;; 4002e35772b2Smrg dgux*) 4003e35772b2Smrg case $cc_basename in 4004e35772b2Smrg ec++*) 4005e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4006e35772b2Smrg ;; 4007e35772b2Smrg ghcx*) 4008e35772b2Smrg # Green Hills C++ Compiler 4009e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4010e35772b2Smrg ;; 4011e35772b2Smrg *) 4012e35772b2Smrg ;; 40131fd23544Smrg esac 40141fd23544Smrg ;; 4015e35772b2Smrg freebsd* | dragonfly*) 4016e35772b2Smrg # FreeBSD uses GNU C++ 401772b676d7Smrg ;; 4018e35772b2Smrg hpux9* | hpux10* | hpux11*) 4019e35772b2Smrg case $cc_basename in 4020e35772b2Smrg CC*) 4021e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4022e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4023e35772b2Smrg if test "$host_cpu" != ia64; then 4024e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4025e35772b2Smrg fi 4026e35772b2Smrg ;; 4027e35772b2Smrg aCC*) 4028e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4029e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4030e35772b2Smrg case $host_cpu in 4031e35772b2Smrg hppa*64*|ia64*) 4032e35772b2Smrg # +Z the default 4033e35772b2Smrg ;; 4034e35772b2Smrg *) 4035e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4036e35772b2Smrg ;; 4037e35772b2Smrg esac 4038e35772b2Smrg ;; 4039e35772b2Smrg *) 4040e35772b2Smrg ;; 4041e35772b2Smrg esac 404272b676d7Smrg ;; 4043e35772b2Smrg interix*) 4044e35772b2Smrg # This is c89, which is MS Visual C++ (no shared libs) 4045e35772b2Smrg # Anyone wants to do a port? 404672b676d7Smrg ;; 4047e35772b2Smrg irix5* | irix6* | nonstopux*) 4048e35772b2Smrg case $cc_basename in 4049e35772b2Smrg CC*) 4050e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4051e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4052e35772b2Smrg # CC pic flag -KPIC is the default. 4053e35772b2Smrg ;; 4054e35772b2Smrg *) 4055e35772b2Smrg ;; 4056e35772b2Smrg esac 405772b676d7Smrg ;; 405874c14cd6Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4059e35772b2Smrg case $cc_basename in 4060e35772b2Smrg KCC*) 4061e35772b2Smrg # KAI C++ Compiler 4062e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4063e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4064e35772b2Smrg ;; 4065e35772b2Smrg ecpc* ) 4066e35772b2Smrg # old Intel C++ for x86_64 which still supported -KPIC. 4067e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4068e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4069e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4070e35772b2Smrg ;; 4071e35772b2Smrg icpc* ) 4072e35772b2Smrg # Intel C++, used to be incompatible with GCC. 4073e35772b2Smrg # ICC 10 doesn't accept -KPIC any more. 4074e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4075e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4076e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4077e35772b2Smrg ;; 4078e35772b2Smrg pgCC* | pgcpp*) 4079e35772b2Smrg # Portland Group C++ compiler 4080e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4081e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4082e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4083e35772b2Smrg ;; 4084e35772b2Smrg cxx*) 4085e35772b2Smrg # Compaq C++ 4086e35772b2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4087e35772b2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4088e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4089e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4090e35772b2Smrg ;; 409174c14cd6Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 409274c14cd6Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4093e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4094e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4095e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4096e35772b2Smrg ;; 4097e35772b2Smrg *) 4098e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 4099e35772b2Smrg *Sun\ C*) 4100e35772b2Smrg # Sun C++ 5.9 4101e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4102e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4103e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4104e35772b2Smrg ;; 4105e35772b2Smrg esac 4106e35772b2Smrg ;; 4107e35772b2Smrg esac 410872b676d7Smrg ;; 4109e35772b2Smrg lynxos*) 411072b676d7Smrg ;; 4111e35772b2Smrg m88k*) 411272b676d7Smrg ;; 4113e35772b2Smrg mvs*) 4114e35772b2Smrg case $cc_basename in 4115e35772b2Smrg cxx*) 4116e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4117e35772b2Smrg ;; 4118e35772b2Smrg *) 4119e35772b2Smrg ;; 4120e35772b2Smrg esac 412172b676d7Smrg ;; 4122e35772b2Smrg netbsd*) 412372b676d7Smrg ;; 4124e35772b2Smrg *qnx* | *nto*) 4125e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4126e35772b2Smrg # it will coredump. 4127e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4128e35772b2Smrg ;; 4129e35772b2Smrg osf3* | osf4* | osf5*) 4130e35772b2Smrg case $cc_basename in 4131e35772b2Smrg KCC*) 4132e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4133e35772b2Smrg ;; 4134e35772b2Smrg RCC*) 4135e35772b2Smrg # Rational C++ 2.4.1 4136e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4137e35772b2Smrg ;; 4138e35772b2Smrg cxx*) 4139e35772b2Smrg # Digital/Compaq C++ 4140e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4141e35772b2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4142e35772b2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4143e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4144e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4145e35772b2Smrg ;; 4146e35772b2Smrg *) 4147e35772b2Smrg ;; 4148e35772b2Smrg esac 414972b676d7Smrg ;; 4150e35772b2Smrg psos*) 415172b676d7Smrg ;; 4152e35772b2Smrg solaris*) 4153e35772b2Smrg case $cc_basename in 415474c14cd6Smrg CC* | sunCC*) 4155e35772b2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4156e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4157e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4158e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4159e35772b2Smrg ;; 4160e35772b2Smrg gcx*) 4161e35772b2Smrg # Green Hills C++ Compiler 4162e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4163e35772b2Smrg ;; 4164e35772b2Smrg *) 4165e35772b2Smrg ;; 4166e35772b2Smrg esac 416772b676d7Smrg ;; 4168e35772b2Smrg sunos4*) 4169e35772b2Smrg case $cc_basename in 4170e35772b2Smrg CC*) 4171e35772b2Smrg # Sun C++ 4.x 4172e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4173e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4174e35772b2Smrg ;; 4175e35772b2Smrg lcc*) 4176e35772b2Smrg # Lucid 4177e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4178e35772b2Smrg ;; 417972b676d7Smrg *) 418072b676d7Smrg ;; 418172b676d7Smrg esac 418272b676d7Smrg ;; 4183e35772b2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4184e35772b2Smrg case $cc_basename in 4185e35772b2Smrg CC*) 4186e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4187e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4188e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4189e35772b2Smrg ;; 4190e35772b2Smrg esac 419172b676d7Smrg ;; 4192e35772b2Smrg tandem*) 4193e35772b2Smrg case $cc_basename in 4194e35772b2Smrg NCC*) 4195e35772b2Smrg # NonStop-UX NCC 3.20 4196e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4197e35772b2Smrg ;; 41981fd23544Smrg *) 41991fd23544Smrg ;; 4200e35772b2Smrg esac 420172b676d7Smrg ;; 4202e35772b2Smrg vxworks*) 420372b676d7Smrg ;; 420472b676d7Smrg *) 4205e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 420672b676d7Smrg ;; 420772b676d7Smrg esac 4208e35772b2Smrg fi 4209e35772b2Smrg], 4210e35772b2Smrg[ 4211e35772b2Smrg if test "$GCC" = yes; then 4212e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4213e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4214e35772b2Smrg 4215e35772b2Smrg case $host_os in 4216e35772b2Smrg aix*) 4217e35772b2Smrg # All AIX code is PIC. 4218e35772b2Smrg if test "$host_cpu" = ia64; then 4219e35772b2Smrg # AIX 5 now supports IA64 processor 4220e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4221e35772b2Smrg fi 4222e35772b2Smrg ;; 4223e35772b2Smrg 4224e35772b2Smrg amigaos*) 4225e35772b2Smrg case $host_cpu in 4226e35772b2Smrg powerpc) 4227e35772b2Smrg # see comment about AmigaOS4 .so support 4228e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4229e35772b2Smrg ;; 4230e35772b2Smrg m68k) 4231e35772b2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4232e35772b2Smrg # adding the `-m68020' flag to GCC prevents building anything better, 4233e35772b2Smrg # like `-m68040'. 4234e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4235e35772b2Smrg ;; 4236e35772b2Smrg esac 4237e35772b2Smrg ;; 4238e35772b2Smrg 4239e35772b2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4240e35772b2Smrg # PIC is the default for these OSes. 4241e35772b2Smrg ;; 4242e35772b2Smrg 4243e35772b2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4244e35772b2Smrg # This hack is so that the source file can tell whether it is being 4245e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 4246e35772b2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4247e35772b2Smrg # (--disable-auto-import) libraries 4248e35772b2Smrg m4_if([$1], [GCJ], [], 4249e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4250e35772b2Smrg ;; 4251e35772b2Smrg 4252e35772b2Smrg darwin* | rhapsody*) 4253e35772b2Smrg # PIC is the default on this platform 4254e35772b2Smrg # Common symbols not allowed in MH_DYLIB files 4255e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4256e35772b2Smrg ;; 4257e35772b2Smrg 425874c14cd6Smrg haiku*) 425974c14cd6Smrg # PIC is the default for Haiku. 426074c14cd6Smrg # The "-static" flag exists, but is broken. 426174c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 426274c14cd6Smrg ;; 426374c14cd6Smrg 4264e35772b2Smrg hpux*) 4265e35772b2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4266e35772b2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4267e35772b2Smrg # sets the default TLS model and affects inlining. 4268e35772b2Smrg case $host_cpu in 4269e35772b2Smrg hppa*64*) 4270e35772b2Smrg # +Z the default 427172b676d7Smrg ;; 427272b676d7Smrg *) 4273e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 427472b676d7Smrg ;; 4275e35772b2Smrg esac 4276e35772b2Smrg ;; 4277e35772b2Smrg 4278e35772b2Smrg interix[[3-9]]*) 4279e35772b2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4280e35772b2Smrg # Instead, we relocate shared libraries at runtime. 4281e35772b2Smrg ;; 4282e35772b2Smrg 4283e35772b2Smrg msdosdjgpp*) 4284e35772b2Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4285e35772b2Smrg # on systems that don't support them. 4286e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4287e35772b2Smrg enable_shared=no 4288e35772b2Smrg ;; 4289e35772b2Smrg 4290e35772b2Smrg *nto* | *qnx*) 4291e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4292e35772b2Smrg # it will coredump. 4293e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4294e35772b2Smrg ;; 4295e35772b2Smrg 4296e35772b2Smrg sysv4*MP*) 4297e35772b2Smrg if test -d /usr/nec; then 4298e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4299e35772b2Smrg fi 4300e35772b2Smrg ;; 4301e35772b2Smrg 4302e35772b2Smrg *) 4303e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4304e35772b2Smrg ;; 430572b676d7Smrg esac 430674c14cd6Smrg 430774c14cd6Smrg case $cc_basename in 430874c14cd6Smrg nvcc*) # Cuda Compiler Driver 2.2 430974c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 431074c14cd6Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 431174c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 431274c14cd6Smrg fi 431374c14cd6Smrg ;; 431474c14cd6Smrg esac 4315e35772b2Smrg else 4316e35772b2Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4317e35772b2Smrg case $host_os in 4318e35772b2Smrg aix*) 4319e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4320e35772b2Smrg if test "$host_cpu" = ia64; then 4321e35772b2Smrg # AIX 5 now supports IA64 processor 4322e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4323e35772b2Smrg else 4324e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4325e35772b2Smrg fi 4326e35772b2Smrg ;; 4327e35772b2Smrg 4328e35772b2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4329e35772b2Smrg # This hack is so that the source file can tell whether it is being 4330e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 4331e35772b2Smrg m4_if([$1], [GCJ], [], 4332e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4333e35772b2Smrg ;; 4334e35772b2Smrg 4335e35772b2Smrg hpux9* | hpux10* | hpux11*) 4336e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4337e35772b2Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4338e35772b2Smrg # not for PA HP-UX. 4339e35772b2Smrg case $host_cpu in 4340e35772b2Smrg hppa*64*|ia64*) 4341e35772b2Smrg # +Z the default 434272b676d7Smrg ;; 434372b676d7Smrg *) 4344e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 434572b676d7Smrg ;; 4346e35772b2Smrg esac 4347e35772b2Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4348e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4349e35772b2Smrg ;; 435072b676d7Smrg 4351e35772b2Smrg irix5* | irix6* | nonstopux*) 4352e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4353e35772b2Smrg # PIC (with -KPIC) is the default. 4354e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4355e35772b2Smrg ;; 435672b676d7Smrg 435774c14cd6Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4358e35772b2Smrg case $cc_basename in 4359e35772b2Smrg # old Intel for x86_64 which still supported -KPIC. 4360e35772b2Smrg ecc*) 4361e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4362e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4363e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4364e35772b2Smrg ;; 4365e35772b2Smrg # icc used to be incompatible with GCC. 4366e35772b2Smrg # ICC 10 doesn't accept -KPIC any more. 4367e35772b2Smrg icc* | ifort*) 4368e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4369e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4370e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4371e35772b2Smrg ;; 4372e35772b2Smrg # Lahey Fortran 8.1. 4373e35772b2Smrg lf95*) 4374e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4375e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4376e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4377e35772b2Smrg ;; 437874c14cd6Smrg nagfor*) 437974c14cd6Smrg # NAG Fortran compiler 438074c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 438174c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 438274c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 438374c14cd6Smrg ;; 438474c14cd6Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4385e35772b2Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4386e35772b2Smrg # which looks to be a dead project) 4387e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4388e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4389e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4390e35772b2Smrg ;; 4391e35772b2Smrg ccc*) 4392e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4393e35772b2Smrg # All Alpha code is PIC. 4394e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4395e35772b2Smrg ;; 439674c14cd6Smrg xl* | bgxl* | bgf* | mpixl*) 439774c14cd6Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4398e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4400e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4401e35772b2Smrg ;; 4402e35772b2Smrg *) 4403e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 440474c14cd6Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 440574c14cd6Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 440674c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 440774c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 440874c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 440974c14cd6Smrg ;; 441074c14cd6Smrg *Sun\ F* | *Sun*Fortran*) 441174c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 441274c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 441374c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 441474c14cd6Smrg ;; 4415e35772b2Smrg *Sun\ C*) 4416e35772b2Smrg # Sun C 5.9 4417e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4418e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4419e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4420e35772b2Smrg ;; 442174c14cd6Smrg *Intel*\ [[CF]]*Compiler*) 442274c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442374c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 442474c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 442574c14cd6Smrg ;; 442674c14cd6Smrg *Portland\ Group*) 442774c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442874c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4429e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4430e35772b2Smrg ;; 4431e35772b2Smrg esac 4432e35772b2Smrg ;; 4433e35772b2Smrg esac 4434e35772b2Smrg ;; 443572b676d7Smrg 4436e35772b2Smrg newsos6) 4437e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4438e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4439e35772b2Smrg ;; 444072b676d7Smrg 4441e35772b2Smrg *nto* | *qnx*) 4442e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4443e35772b2Smrg # it will coredump. 4444e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4445e35772b2Smrg ;; 444672b676d7Smrg 4447e35772b2Smrg osf3* | osf4* | osf5*) 4448e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4449e35772b2Smrg # All OSF/1 code is PIC. 4450e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4451e35772b2Smrg ;; 445272b676d7Smrg 4453e35772b2Smrg rdos*) 4454e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4455e35772b2Smrg ;; 445672b676d7Smrg 4457e35772b2Smrg solaris*) 4458e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4459e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4460e35772b2Smrg case $cc_basename in 446174c14cd6Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4462e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4463e35772b2Smrg *) 4464e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4465e35772b2Smrg esac 4466e35772b2Smrg ;; 446772b676d7Smrg 4468e35772b2Smrg sunos4*) 4469e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4470e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4471e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4472e35772b2Smrg ;; 447372b676d7Smrg 4474e35772b2Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4475e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4476e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4477e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4478e35772b2Smrg ;; 447972b676d7Smrg 4480e35772b2Smrg sysv4*MP*) 4481e35772b2Smrg if test -d /usr/nec ;then 4482e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4483e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4484e35772b2Smrg fi 4485e35772b2Smrg ;; 448672b676d7Smrg 4487e35772b2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4488e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4489e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4490e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4491e35772b2Smrg ;; 449272b676d7Smrg 4493e35772b2Smrg unicos*) 4494e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4495e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4496e35772b2Smrg ;; 449772b676d7Smrg 4498e35772b2Smrg uts4*) 4499e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4500e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4501e35772b2Smrg ;; 450272b676d7Smrg 4503e35772b2Smrg *) 4504e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4505e35772b2Smrg ;; 4506e35772b2Smrg esac 4507e35772b2Smrg fi 4508e35772b2Smrg]) 4509e35772b2Smrgcase $host_os in 4510e35772b2Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4511e35772b2Smrg *djgpp*) 4512e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4513e35772b2Smrg ;; 4514e35772b2Smrg *) 4515e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4516e35772b2Smrg ;; 4517e35772b2Smrgesac 451874c14cd6Smrg 451974c14cd6SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 452074c14cd6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 452174c14cd6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 452274c14cd6Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 452372b676d7Smrg 4524e35772b2Smrg# 4525e35772b2Smrg# Check to make sure the PIC flag actually works. 4526e35772b2Smrg# 4527e35772b2Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4528e35772b2Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4529e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4530e35772b2Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4531e35772b2Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4532e35772b2Smrg "" | " "*) ;; 4533e35772b2Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4534e35772b2Smrg esac], 4535e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4536e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 45371fd23544Smrgfi 4538e35772b2Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4539e35772b2Smrg [Additional compiler flags for building library objects]) 45401fd23544Smrg 454174c14cd6Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 454274c14cd6Smrg [How to pass a linker flag through the compiler]) 4543e35772b2Smrg# 4544e35772b2Smrg# Check to make sure the static flag actually works. 4545e35772b2Smrg# 4546e35772b2Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4547e35772b2Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4548e35772b2Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4549e35772b2Smrg $lt_tmp_static_flag, 4550e35772b2Smrg [], 4551e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4552e35772b2Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4553e35772b2Smrg [Compiler flag to prevent dynamic linking]) 4554e35772b2Smrg])# _LT_COMPILER_PIC 455572b676d7Smrg 4556e35772b2Smrg 4557e35772b2Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4558e35772b2Smrg# ---------------------------- 4559e35772b2Smrg# See if the linker supports building shared libraries. 4560e35772b2Smrgm4_defun([_LT_LINKER_SHLIBS], 4561e35772b2Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4562e35772b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 456374c14cd6Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4564e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4565e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 4566e35772b2Smrgm4_require([_LT_DECL_SED])dnl 4567e35772b2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4568e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 4569e35772b2SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4570e35772b2Smrgm4_if([$1], [CXX], [ 4571e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 457274c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4573e35772b2Smrg case $host_os in 4574e35772b2Smrg aix[[4-9]]*) 4575e35772b2Smrg # If we're using GNU nm, then we don't want the "-C" option. 4576e35772b2Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 457774c14cd6Smrg # Also, AIX nm treats weak defined symbols like other global defined 457874c14cd6Smrg # symbols, whereas GNU nm marks them as "W". 4579e35772b2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 458074c14cd6Smrg _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' 4581e35772b2Smrg else 4582e35772b2Smrg _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' 45831fd23544Smrg fi 45841fd23544Smrg ;; 4585e35772b2Smrg pw32*) 4586e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 458774c14cd6Smrg ;; 4588e35772b2Smrg cygwin* | mingw* | cegcc*) 458974c14cd6Smrg case $cc_basename in 459074c14cd6Smrg cl*) 459174c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 459274c14cd6Smrg ;; 459374c14cd6Smrg *) 459474c14cd6Smrg _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' 459574c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 459674c14cd6Smrg ;; 459774c14cd6Smrg esac 459874c14cd6Smrg ;; 4599e35772b2Smrg *) 4600e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 460174c14cd6Smrg ;; 4602e35772b2Smrg esac 4603e35772b2Smrg], [ 4604e35772b2Smrg runpath_var= 4605e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4606e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4607e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)= 4608e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4609e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4610e35772b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4611e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4612e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4613e35772b2Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4614e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4615e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4616e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4617e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4618e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4619e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4620e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4621e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4622e35772b2Smrg _LT_TAGVAR(module_cmds, $1)= 4623e35772b2Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4624e35772b2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4625e35772b2Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4626e35772b2Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4627e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4628e35772b2Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4629e35772b2Smrg # included in the symbol list 4630e35772b2Smrg _LT_TAGVAR(include_expsyms, $1)= 4631e35772b2Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4632e35772b2Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4633e35772b2Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4634e35772b2Smrg # as well as any symbol that contains `d'. 4635e35772b2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4636e35772b2Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4637e35772b2Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4638e35772b2Smrg # the symbol is explicitly referenced. Since portable code cannot 4639e35772b2Smrg # rely on this symbol name, it's probably fine to never include it in 4640e35772b2Smrg # preloaded symbol tables. 4641e35772b2Smrg # Exclude shared library initialization/finalization symbols. 4642e35772b2Smrgdnl Note also adjust exclude_expsyms for C++ above. 4643e35772b2Smrg extract_expsyms_cmds= 46441fd23544Smrg 4645e35772b2Smrg case $host_os in 4646e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 4647e35772b2Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4648e35772b2Smrg # When not using gcc, we currently assume that we are using 4649e35772b2Smrg # Microsoft Visual C++. 4650e35772b2Smrg if test "$GCC" != yes; then 4651e35772b2Smrg with_gnu_ld=no 46521fd23544Smrg fi 465372b676d7Smrg ;; 4654e35772b2Smrg interix*) 4655e35772b2Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4656e35772b2Smrg with_gnu_ld=yes 4657e35772b2Smrg ;; 4658e35772b2Smrg openbsd*) 4659e35772b2Smrg with_gnu_ld=no 4660e35772b2Smrg ;; 466172b676d7Smrg esac 466272b676d7Smrg 4663e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 466474c14cd6Smrg 466574c14cd6Smrg # On some targets, GNU ld is compatible enough with the native linker 466674c14cd6Smrg # that we're better off using the native interface for both. 466774c14cd6Smrg lt_use_gnu_ld_interface=no 4668e35772b2Smrg if test "$with_gnu_ld" = yes; then 466974c14cd6Smrg case $host_os in 467074c14cd6Smrg aix*) 467174c14cd6Smrg # The AIX port of GNU ld has always aspired to compatibility 467274c14cd6Smrg # with the native linker. However, as the warning in the GNU ld 467374c14cd6Smrg # block says, versions before 2.19.5* couldn't really create working 467474c14cd6Smrg # shared libraries, regardless of the interface used. 467574c14cd6Smrg case `$LD -v 2>&1` in 467674c14cd6Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 467774c14cd6Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 467874c14cd6Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 467974c14cd6Smrg *) 468074c14cd6Smrg lt_use_gnu_ld_interface=yes 468174c14cd6Smrg ;; 468274c14cd6Smrg esac 468374c14cd6Smrg ;; 468474c14cd6Smrg *) 468574c14cd6Smrg lt_use_gnu_ld_interface=yes 468674c14cd6Smrg ;; 468774c14cd6Smrg esac 468874c14cd6Smrg fi 468974c14cd6Smrg 469074c14cd6Smrg if test "$lt_use_gnu_ld_interface" = yes; then 4691e35772b2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4692e35772b2Smrg wlarc='${wl}' 469372b676d7Smrg 4694e35772b2Smrg # Set some defaults for GNU ld with shared library support. These 4695e35772b2Smrg # are reset later if shared libraries are not supported. Putting them 4696e35772b2Smrg # here allows them to be overridden if necessary. 4697e35772b2Smrg runpath_var=LD_RUN_PATH 4698e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4699e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4700e35772b2Smrg # ancient GNU ld didn't support --whole-archive et. al. 4701e35772b2Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4702e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4703e35772b2Smrg else 4704e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4705e35772b2Smrg fi 4706e35772b2Smrg supports_anon_versioning=no 4707e35772b2Smrg case `$LD -v 2>&1` in 470874c14cd6Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 4709e35772b2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4710e35772b2Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4711e35772b2Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4712e35772b2Smrg *\ 2.11.*) ;; # other 2.11 versions 4713e35772b2Smrg *) supports_anon_versioning=yes ;; 4714e35772b2Smrg esac 471572b676d7Smrg 4716e35772b2Smrg # See if GNU ld supports shared libraries. 4717e35772b2Smrg case $host_os in 4718e35772b2Smrg aix[[3-9]]*) 4719e35772b2Smrg # On AIX/PPC, the GNU linker is very broken 4720e35772b2Smrg if test "$host_cpu" != ia64; then 4721e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4722e35772b2Smrg cat <<_LT_EOF 1>&2 472372b676d7Smrg 472474c14cd6Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 4725e35772b2Smrg*** to be unable to reliably create shared libraries on AIX. 4726e35772b2Smrg*** Therefore, libtool is disabling shared libraries support. If you 472774c14cd6Smrg*** really care for shared libraries, you may want to install binutils 472874c14cd6Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 472974c14cd6Smrg*** You will then need to restart the configuration process. 473072b676d7Smrg 4731e35772b2Smrg_LT_EOF 4732e35772b2Smrg fi 4733e35772b2Smrg ;; 473472b676d7Smrg 4735e35772b2Smrg amigaos*) 4736e35772b2Smrg case $host_cpu in 4737e35772b2Smrg powerpc) 4738e35772b2Smrg # see comment about AmigaOS4 .so support 4739e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4740e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4741e35772b2Smrg ;; 4742e35772b2Smrg m68k) 4743e35772b2Smrg _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)' 4744e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4745e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4746e35772b2Smrg ;; 4747e35772b2Smrg esac 4748e35772b2Smrg ;; 474972b676d7Smrg 4750e35772b2Smrg beos*) 4751e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4752e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4753e35772b2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4754e35772b2Smrg # support --undefined. This deserves some investigation. FIXME 4755e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4756e35772b2Smrg else 4757e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4758e35772b2Smrg fi 4759e35772b2Smrg ;; 476072b676d7Smrg 4761e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 4762e35772b2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4763e35772b2Smrg # as there is no search path for DLLs. 4764e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 476574c14cd6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4766e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4767e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4768e35772b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 476974c14cd6Smrg _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' 477074c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4771e35772b2Smrg 4772e35772b2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4773e35772b2Smrg _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' 4774e35772b2Smrg # If the export-symbols file already is a .def file (1st line 4775e35772b2Smrg # is EXPORTS), use it as is; otherwise, prepend... 4776e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4777e35772b2Smrg cp $export_symbols $output_objdir/$soname.def; 4778e35772b2Smrg else 4779e35772b2Smrg echo EXPORTS > $output_objdir/$soname.def; 4780e35772b2Smrg cat $export_symbols >> $output_objdir/$soname.def; 4781e35772b2Smrg fi~ 4782e35772b2Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4783e35772b2Smrg else 4784e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4785e35772b2Smrg fi 4786e35772b2Smrg ;; 478772b676d7Smrg 478874c14cd6Smrg haiku*) 478974c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 479074c14cd6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 479174c14cd6Smrg ;; 479274c14cd6Smrg 4793e35772b2Smrg interix[[3-9]]*) 4794e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4795e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4796e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4797e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4798e35772b2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4799e35772b2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4800e35772b2Smrg # default) and relocated if they conflict, which is a slow very memory 4801e35772b2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 4802e35772b2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4803e35772b2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4804e35772b2Smrg _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' 4805e35772b2Smrg _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' 4806e35772b2Smrg ;; 480772b676d7Smrg 480874c14cd6Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4809e35772b2Smrg tmp_diet=no 4810e35772b2Smrg if test "$host_os" = linux-dietlibc; then 4811e35772b2Smrg case $cc_basename in 4812e35772b2Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4813e35772b2Smrg esac 4814e35772b2Smrg fi 4815e35772b2Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4816e35772b2Smrg && test "$tmp_diet" = no 4817e35772b2Smrg then 481874c14cd6Smrg tmp_addflag=' $pic_flag' 4819e35772b2Smrg tmp_sharedflag='-shared' 4820e35772b2Smrg case $cc_basename,$host_cpu in 4821e35772b2Smrg pgcc*) # Portland Group C compiler 482274c14cd6Smrg _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' 4823e35772b2Smrg tmp_addflag=' $pic_flag' 4824e35772b2Smrg ;; 482574c14cd6Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 482674c14cd6Smrg # Portland Group f77 and f90 compilers 482774c14cd6Smrg _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' 4828e35772b2Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 4829e35772b2Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4830e35772b2Smrg tmp_addflag=' -i_dynamic' ;; 4831e35772b2Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4832e35772b2Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4833e35772b2Smrg ifc* | ifort*) # Intel Fortran compiler 4834e35772b2Smrg tmp_addflag=' -nofor_main' ;; 4835e35772b2Smrg lf95*) # Lahey Fortran 8.1 4836e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4837e35772b2Smrg tmp_sharedflag='--shared' ;; 483874c14cd6Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4839e35772b2Smrg tmp_sharedflag='-qmkshrobj' 4840e35772b2Smrg tmp_addflag= ;; 484174c14cd6Smrg nvcc*) # Cuda Compiler Driver 2.2 484274c14cd6Smrg _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' 484374c14cd6Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 484474c14cd6Smrg ;; 4845e35772b2Smrg esac 4846e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 4847e35772b2Smrg *Sun\ C*) # Sun C 5.9 484874c14cd6Smrg _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' 4849e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4850e35772b2Smrg tmp_sharedflag='-G' ;; 4851e35772b2Smrg *Sun\ F*) # Sun Fortran 8.3 4852e35772b2Smrg tmp_sharedflag='-G' ;; 4853e35772b2Smrg esac 4854e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 485572b676d7Smrg 4856e35772b2Smrg if test "x$supports_anon_versioning" = xyes; then 4857e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4858e35772b2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4859e35772b2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4860e35772b2Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4861e35772b2Smrg fi 486272b676d7Smrg 4863e35772b2Smrg case $cc_basename in 486474c14cd6Smrg xlf* | bgf* | bgxlf* | mpixlf*) 4865e35772b2Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4866e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 486774c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 486874c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4869e35772b2Smrg if test "x$supports_anon_versioning" = xyes; then 4870e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4871e35772b2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4872e35772b2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 487374c14cd6Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4874e35772b2Smrg fi 4875e35772b2Smrg ;; 4876e35772b2Smrg esac 4877e35772b2Smrg else 4878e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4879e35772b2Smrg fi 4880e35772b2Smrg ;; 488172b676d7Smrg 4882e35772b2Smrg netbsd*) 4883e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4884e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4885e35772b2Smrg wlarc= 4886e35772b2Smrg else 488774c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 488874c14cd6Smrg _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' 4889e35772b2Smrg fi 4890e35772b2Smrg ;; 489172b676d7Smrg 4892e35772b2Smrg solaris*) 4893e35772b2Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4894e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4895e35772b2Smrg cat <<_LT_EOF 1>&2 489672b676d7Smrg 4897e35772b2Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4898e35772b2Smrg*** create shared libraries on Solaris systems. Therefore, libtool 4899e35772b2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4900e35772b2Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 4901e35772b2Smrg*** your PATH or compiler configuration so that the native linker is 4902e35772b2Smrg*** used, and then restart. 490372b676d7Smrg 4904e35772b2Smrg_LT_EOF 4905e35772b2Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 490674c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 490774c14cd6Smrg _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' 4908e35772b2Smrg else 4909e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4910e35772b2Smrg fi 4911e35772b2Smrg ;; 491272b676d7Smrg 4913e35772b2Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4914e35772b2Smrg case `$LD -v 2>&1` in 4915e35772b2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4916e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4917e35772b2Smrg cat <<_LT_EOF 1>&2 491872b676d7Smrg 4919e35772b2Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4920e35772b2Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4921e35772b2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4922e35772b2Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4923e35772b2Smrg*** your PATH or compiler configuration so that the native linker is 4924e35772b2Smrg*** used, and then restart. 492572b676d7Smrg 4926e35772b2Smrg_LT_EOF 4927e35772b2Smrg ;; 4928e35772b2Smrg *) 4929e35772b2Smrg # For security reasons, it is highly recommended that you always 4930e35772b2Smrg # use absolute paths for naming shared libraries, and exclude the 4931e35772b2Smrg # DT_RUNPATH tag from executables and libraries. But doing so 4932e35772b2Smrg # requires that you compile everything twice, which is a pain. 4933e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4934e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4935e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4936e35772b2Smrg _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' 4937e35772b2Smrg else 4938e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4939e35772b2Smrg fi 4940e35772b2Smrg ;; 4941e35772b2Smrg esac 4942e35772b2Smrg ;; 494372b676d7Smrg 4944e35772b2Smrg sunos4*) 4945e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4946e35772b2Smrg wlarc= 4947e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4948e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4949e35772b2Smrg ;; 495072b676d7Smrg 4951e35772b2Smrg *) 4952e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 495374c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 495474c14cd6Smrg _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' 4955e35772b2Smrg else 4956e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4957e35772b2Smrg fi 4958e35772b2Smrg ;; 4959e35772b2Smrg esac 496072b676d7Smrg 4961e35772b2Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4962e35772b2Smrg runpath_var= 4963e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4964e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4965e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4966e35772b2Smrg fi 4967e35772b2Smrg else 4968e35772b2Smrg # PORTME fill in a description of your system's linker (not GNU ld) 4969e35772b2Smrg case $host_os in 4970e35772b2Smrg aix3*) 4971e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4972e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4973e35772b2Smrg _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' 4974e35772b2Smrg # Note: this linker hardcodes the directories in LIBPATH if there 4975e35772b2Smrg # are no directories specified by -L. 4976e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4977e35772b2Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4978e35772b2Smrg # Neither direct hardcoding nor static linking is supported with a 4979e35772b2Smrg # broken collect2. 4980e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4981e35772b2Smrg fi 4982e35772b2Smrg ;; 498372b676d7Smrg 4984e35772b2Smrg aix[[4-9]]*) 4985e35772b2Smrg if test "$host_cpu" = ia64; then 4986e35772b2Smrg # On IA64, the linker does run time linking by default, so we don't 4987e35772b2Smrg # have to do anything special. 4988e35772b2Smrg aix_use_runtimelinking=no 4989e35772b2Smrg exp_sym_flag='-Bexport' 4990e35772b2Smrg no_entry_flag="" 4991e35772b2Smrg else 4992e35772b2Smrg # If we're using GNU nm, then we don't want the "-C" option. 4993e35772b2Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 499474c14cd6Smrg # Also, AIX nm treats weak defined symbols like other global 499574c14cd6Smrg # defined symbols, whereas GNU nm marks them as "W". 4996e35772b2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 499774c14cd6Smrg _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' 4998e35772b2Smrg else 4999e35772b2Smrg _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' 5000e35772b2Smrg fi 5001e35772b2Smrg aix_use_runtimelinking=no 500272b676d7Smrg 5003e35772b2Smrg # Test if we are trying to use run time linking or normal 5004e35772b2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5005e35772b2Smrg # need to do runtime linking. 5006e35772b2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5007e35772b2Smrg for ld_flag in $LDFLAGS; do 5008e35772b2Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5009e35772b2Smrg aix_use_runtimelinking=yes 5010e35772b2Smrg break 5011e35772b2Smrg fi 5012e35772b2Smrg done 5013e35772b2Smrg ;; 5014e35772b2Smrg esac 501572b676d7Smrg 5016e35772b2Smrg exp_sym_flag='-bexport' 5017e35772b2Smrg no_entry_flag='-bnoentry' 5018e35772b2Smrg fi 501972b676d7Smrg 5020e35772b2Smrg # When large executables or shared objects are built, AIX ld can 5021e35772b2Smrg # have problems creating the table of contents. If linking a library 5022e35772b2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5023e35772b2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5024e35772b2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 502572b676d7Smrg 5026e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='' 5027e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5028e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5029e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5030e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5031e35772b2Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 503272b676d7Smrg 5033e35772b2Smrg if test "$GCC" = yes; then 5034e35772b2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5035e35772b2Smrg # We only want to do this on AIX 4.2 and lower, the check 5036e35772b2Smrg # below for broken collect2 doesn't work under 4.3+ 5037e35772b2Smrg collect2name=`${CC} -print-prog-name=collect2` 5038e35772b2Smrg if test -f "$collect2name" && 5039e35772b2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5040e35772b2Smrg then 5041e35772b2Smrg # We have reworked collect2 5042e35772b2Smrg : 5043e35772b2Smrg else 5044e35772b2Smrg # We have old collect2 5045e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5046e35772b2Smrg # It fails to find uninstalled libraries when the uninstalled 5047e35772b2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5048e35772b2Smrg # to unsupported forces relinking 5049e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5050e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5051e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5052e35772b2Smrg fi 5053e35772b2Smrg ;; 5054e35772b2Smrg esac 5055e35772b2Smrg shared_flag='-shared' 5056e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 5057e35772b2Smrg shared_flag="$shared_flag "'${wl}-G' 5058e35772b2Smrg fi 5059e35772b2Smrg else 5060e35772b2Smrg # not using gcc 5061e35772b2Smrg if test "$host_cpu" = ia64; then 5062e35772b2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5063e35772b2Smrg # chokes on -Wl,-G. The following line is correct: 5064e35772b2Smrg shared_flag='-G' 5065e35772b2Smrg else 5066e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 5067e35772b2Smrg shared_flag='${wl}-G' 5068e35772b2Smrg else 5069e35772b2Smrg shared_flag='${wl}-bM:SRE' 5070e35772b2Smrg fi 5071e35772b2Smrg fi 5072e35772b2Smrg fi 507372b676d7Smrg 5074e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5075e35772b2Smrg # It seems that -bexpall does not export symbols beginning with 5076e35772b2Smrg # underscore (_), so it is better to generate a list of symbols to export. 5077e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5078e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 5079e35772b2Smrg # Warning - without using the other runtime loading flags (-brtl), 5080e35772b2Smrg # -berok will link without error, but may produce a broken library. 5081e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5082e35772b2Smrg # Determine the default libpath from the value encoded in an 5083e35772b2Smrg # empty executable. 508474c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5085e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 508674c14cd6Smrg _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" 5087e35772b2Smrg else 5088e35772b2Smrg if test "$host_cpu" = ia64; then 5089e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5090e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5091e35772b2Smrg _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" 5092e35772b2Smrg else 5093e35772b2Smrg # Determine the default libpath from the value encoded in an 5094e35772b2Smrg # empty executable. 509574c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5096e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5097e35772b2Smrg # Warning - without using the other run time loading flags, 5098e35772b2Smrg # -berok will link without error, but may produce a broken library. 5099e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5100e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 510174c14cd6Smrg if test "$with_gnu_ld" = yes; then 510274c14cd6Smrg # We only use this code for GNU lds that support --whole-archive. 510374c14cd6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 510474c14cd6Smrg else 510574c14cd6Smrg # Exported symbols can be pulled into shared objects from archives 510674c14cd6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 510774c14cd6Smrg fi 5108e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5109e35772b2Smrg # This is similar to how AIX traditionally builds its shared libraries. 5110e35772b2Smrg _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' 5111e35772b2Smrg fi 5112e35772b2Smrg fi 5113e35772b2Smrg ;; 511472b676d7Smrg 5115e35772b2Smrg amigaos*) 5116e35772b2Smrg case $host_cpu in 5117e35772b2Smrg powerpc) 5118e35772b2Smrg # see comment about AmigaOS4 .so support 5119e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5120e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5121e35772b2Smrg ;; 5122e35772b2Smrg m68k) 5123e35772b2Smrg _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)' 5124e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5125e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5126e35772b2Smrg ;; 5127e35772b2Smrg esac 5128e35772b2Smrg ;; 512972b676d7Smrg 5130e35772b2Smrg bsdi[[45]]*) 5131e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5132e35772b2Smrg ;; 513372b676d7Smrg 5134e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 5135e35772b2Smrg # When not using gcc, we currently assume that we are using 5136e35772b2Smrg # Microsoft Visual C++. 5137e35772b2Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5138e35772b2Smrg # no search path for DLLs. 513974c14cd6Smrg case $cc_basename in 514074c14cd6Smrg cl*) 514174c14cd6Smrg # Native MSVC 514274c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 514374c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 514474c14cd6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 514574c14cd6Smrg _LT_TAGVAR(file_list_spec, $1)='@' 514674c14cd6Smrg # Tell ltmain to make .lib files, not .a files. 514774c14cd6Smrg libext=lib 514874c14cd6Smrg # Tell ltmain to make .dll files, not .so files. 514974c14cd6Smrg shrext_cmds=".dll" 515074c14cd6Smrg # FIXME: Setting linknames here is a bad hack. 515174c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 515274c14cd6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 515374c14cd6Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 515474c14cd6Smrg else 515574c14cd6Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 515674c14cd6Smrg fi~ 515774c14cd6Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 515874c14cd6Smrg linknames=' 515974c14cd6Smrg # The linker will not automatically build a static lib if we build a DLL. 516074c14cd6Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 516174c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 516274c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 516374c14cd6Smrg _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' 516474c14cd6Smrg # Don't use ranlib 516574c14cd6Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 516674c14cd6Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 516774c14cd6Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 516874c14cd6Smrg case $lt_outputfile in 516974c14cd6Smrg *.exe|*.EXE) ;; 517074c14cd6Smrg *) 517174c14cd6Smrg lt_outputfile="$lt_outputfile.exe" 517274c14cd6Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 517374c14cd6Smrg ;; 517474c14cd6Smrg esac~ 517574c14cd6Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 517674c14cd6Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 517774c14cd6Smrg $RM "$lt_outputfile.manifest"; 517874c14cd6Smrg fi' 517974c14cd6Smrg ;; 518074c14cd6Smrg *) 518174c14cd6Smrg # Assume MSVC wrapper 518274c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 518374c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 518474c14cd6Smrg # Tell ltmain to make .lib files, not .a files. 518574c14cd6Smrg libext=lib 518674c14cd6Smrg # Tell ltmain to make .dll files, not .so files. 518774c14cd6Smrg shrext_cmds=".dll" 518874c14cd6Smrg # FIXME: Setting linknames here is a bad hack. 518974c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 519074c14cd6Smrg # The linker will automatically build a .lib file if we build a DLL. 519174c14cd6Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 519274c14cd6Smrg # FIXME: Should let the user specify the lib program. 519374c14cd6Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 519474c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 519574c14cd6Smrg ;; 519674c14cd6Smrg esac 5197e35772b2Smrg ;; 519872b676d7Smrg 5199e35772b2Smrg darwin* | rhapsody*) 5200e35772b2Smrg _LT_DARWIN_LINKER_FEATURES($1) 5201e35772b2Smrg ;; 520272b676d7Smrg 5203e35772b2Smrg dgux*) 5204e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5205e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5206e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5207e35772b2Smrg ;; 520872b676d7Smrg 5209e35772b2Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5210e35772b2Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5211e35772b2Smrg # does not break anything, and helps significantly (at the cost of a little 5212e35772b2Smrg # extra space). 5213e35772b2Smrg freebsd2.2*) 5214e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5215e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5216e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5217e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5218e35772b2Smrg ;; 521972b676d7Smrg 5220e35772b2Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 522174c14cd6Smrg freebsd2.*) 5222e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5223e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5224e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5225e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5226e35772b2Smrg ;; 522772b676d7Smrg 5228e35772b2Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5229e35772b2Smrg freebsd* | dragonfly*) 523074c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5231e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5232e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5233e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5234e35772b2Smrg ;; 523572b676d7Smrg 5236e35772b2Smrg hpux9*) 5237e35772b2Smrg if test "$GCC" = yes; then 523874c14cd6Smrg _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' 5239e35772b2Smrg else 5240e35772b2Smrg _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' 5241e35772b2Smrg fi 5242e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5243e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5244e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 524572b676d7Smrg 5246e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 5247e35772b2Smrg # but as the default location of the library. 5248e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5249e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5250e35772b2Smrg ;; 525172b676d7Smrg 5252e35772b2Smrg hpux10*) 525374c14cd6Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 525474c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5255e35772b2Smrg else 5256e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5257e35772b2Smrg fi 5258e35772b2Smrg if test "$with_gnu_ld" = no; then 5259e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5260e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5261e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5262e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5263e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5264e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 5265e35772b2Smrg # but as the default location of the library. 5266e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5267e35772b2Smrg fi 526872b676d7Smrg ;; 5269e35772b2Smrg 5270e35772b2Smrg hpux11*) 527174c14cd6Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5272e35772b2Smrg case $host_cpu in 5273e35772b2Smrg hppa*64*) 5274e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5275e35772b2Smrg ;; 5276e35772b2Smrg ia64*) 527774c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5278e35772b2Smrg ;; 5279e35772b2Smrg *) 528074c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5281e35772b2Smrg ;; 5282e35772b2Smrg esac 5283e35772b2Smrg else 5284e35772b2Smrg case $host_cpu in 5285e35772b2Smrg hppa*64*) 5286e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5287e35772b2Smrg ;; 5288e35772b2Smrg ia64*) 5289e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5290e35772b2Smrg ;; 5291e35772b2Smrg *) 529274c14cd6Smrg m4_if($1, [], [ 529374c14cd6Smrg # Older versions of the 11.00 compiler do not understand -b yet 529474c14cd6Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 529574c14cd6Smrg _LT_LINKER_OPTION([if $CC understands -b], 529674c14cd6Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 529774c14cd6Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 529874c14cd6Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 529974c14cd6Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5300e35772b2Smrg ;; 5301e35772b2Smrg esac 5302e35772b2Smrg fi 5303e35772b2Smrg if test "$with_gnu_ld" = no; then 5304e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5305e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5306e35772b2Smrg 5307e35772b2Smrg case $host_cpu in 5308e35772b2Smrg hppa*64*|ia64*) 5309e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5310e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5311e35772b2Smrg ;; 5312e35772b2Smrg *) 5313e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5314e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5315e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5316e35772b2Smrg 5317e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 5318e35772b2Smrg # but as the default location of the library. 5319e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5320e35772b2Smrg ;; 5321e35772b2Smrg esac 5322e35772b2Smrg fi 532372b676d7Smrg ;; 532472b676d7Smrg 5325e35772b2Smrg irix5* | irix6* | nonstopux*) 5326e35772b2Smrg if test "$GCC" = yes; then 532774c14cd6Smrg _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' 5328e35772b2Smrg # Try to use the -exported_symbol ld option, if it does not 5329e35772b2Smrg # work, assume that -exports_file does not work either and 5330e35772b2Smrg # implicitly export all symbols. 533174c14cd6Smrg # This should be the same for all languages, so no per-tag cache variable. 533274c14cd6Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 533374c14cd6Smrg [lt_cv_irix_exported_symbol], 533474c14cd6Smrg [save_LDFLAGS="$LDFLAGS" 533574c14cd6Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 533674c14cd6Smrg AC_LINK_IFELSE( 533774c14cd6Smrg [AC_LANG_SOURCE( 533874c14cd6Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 533974c14cd6Smrg [C++], [[int foo (void) { return 0; }]], 534074c14cd6Smrg [Fortran 77], [[ 534174c14cd6Smrg subroutine foo 534274c14cd6Smrg end]], 534374c14cd6Smrg [Fortran], [[ 534474c14cd6Smrg subroutine foo 534574c14cd6Smrg end]])])], 534674c14cd6Smrg [lt_cv_irix_exported_symbol=yes], 534774c14cd6Smrg [lt_cv_irix_exported_symbol=no]) 534874c14cd6Smrg LDFLAGS="$save_LDFLAGS"]) 534974c14cd6Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 535074c14cd6Smrg _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' 535174c14cd6Smrg fi 5352e35772b2Smrg else 535374c14cd6Smrg _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' 535474c14cd6Smrg _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' 5355e35772b2Smrg fi 5356e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5357e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5358e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5359e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5360e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5361e35772b2Smrg ;; 536272b676d7Smrg 5363e35772b2Smrg netbsd*) 5364e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5365e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5366e35772b2Smrg else 5367e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5368e35772b2Smrg fi 5369e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5370e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5371e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5372e35772b2Smrg ;; 537372b676d7Smrg 5374e35772b2Smrg newsos6) 5375e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5376e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5377e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5378e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5379e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5380e35772b2Smrg ;; 538172b676d7Smrg 5382e35772b2Smrg *nto* | *qnx*) 5383e35772b2Smrg ;; 538472b676d7Smrg 5385e35772b2Smrg openbsd*) 5386e35772b2Smrg if test -f /usr/libexec/ld.so; then 5387e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5388e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5389e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5390e35772b2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5391e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5392e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5393e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5394e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5395e35772b2Smrg else 5396e35772b2Smrg case $host_os in 5397e35772b2Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5398e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5399e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5400e35772b2Smrg ;; 5401e35772b2Smrg *) 5402e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5403e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5404e35772b2Smrg ;; 5405e35772b2Smrg esac 5406e35772b2Smrg fi 5407e35772b2Smrg else 5408e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5409e35772b2Smrg fi 5410e35772b2Smrg ;; 541172b676d7Smrg 5412e35772b2Smrg os2*) 5413e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5414e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5415e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 541674c14cd6Smrg _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' 5417e35772b2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5418e35772b2Smrg ;; 541972b676d7Smrg 5420e35772b2Smrg osf3*) 5421e35772b2Smrg if test "$GCC" = yes; then 5422e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 542374c14cd6Smrg _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' 5424e35772b2Smrg else 5425e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 542674c14cd6Smrg _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' 5427e35772b2Smrg fi 5428e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5429e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5430e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5431e35772b2Smrg ;; 543272b676d7Smrg 5433e35772b2Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5434e35772b2Smrg if test "$GCC" = yes; then 5435e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 543674c14cd6Smrg _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' 5437e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5438e35772b2Smrg else 5439e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 544074c14cd6Smrg _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' 5441e35772b2Smrg _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~ 544274c14cd6Smrg $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' 544372b676d7Smrg 5444e35772b2Smrg # Both c and cxx compiler support -rpath directly 5445e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5446e35772b2Smrg fi 5447e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5448e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5449e35772b2Smrg ;; 545072b676d7Smrg 5451e35772b2Smrg solaris*) 5452e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5453e35772b2Smrg if test "$GCC" = yes; then 5454e35772b2Smrg wlarc='${wl}' 545574c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5456e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 545774c14cd6Smrg $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' 5458e35772b2Smrg else 5459e35772b2Smrg case `$CC -V 2>&1` in 5460e35772b2Smrg *"Compilers 5.0"*) 5461e35772b2Smrg wlarc='' 5462e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5463e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5464e35772b2Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5465e35772b2Smrg ;; 5466e35772b2Smrg *) 5467e35772b2Smrg wlarc='${wl}' 5468e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5469e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5470e35772b2Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5471e35772b2Smrg ;; 5472e35772b2Smrg esac 5473e35772b2Smrg fi 5474e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5475e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5476e35772b2Smrg case $host_os in 5477e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5478e35772b2Smrg *) 5479e35772b2Smrg # The compiler driver will combine and reorder linker options, 5480e35772b2Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5481e35772b2Smrg # but is careful enough not to reorder. 5482e35772b2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5483e35772b2Smrg if test "$GCC" = yes; then 5484e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5485e35772b2Smrg else 5486e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5487e35772b2Smrg fi 5488e35772b2Smrg ;; 5489e35772b2Smrg esac 5490e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5491e35772b2Smrg ;; 549272b676d7Smrg 5493e35772b2Smrg sunos4*) 5494e35772b2Smrg if test "x$host_vendor" = xsequent; then 5495e35772b2Smrg # Use $CC to link under sequent, because it throws in some extra .o 5496e35772b2Smrg # files that make .init and .fini sections work. 5497e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5498e35772b2Smrg else 5499e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5500e35772b2Smrg fi 5501e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5502e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5503e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5504e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5505e35772b2Smrg ;; 550672b676d7Smrg 5507e35772b2Smrg sysv4) 5508e35772b2Smrg case $host_vendor in 5509e35772b2Smrg sni) 5510e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5511e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5512e35772b2Smrg ;; 5513e35772b2Smrg siemens) 5514e35772b2Smrg ## LD is ld it makes a PLAMLIB 5515e35772b2Smrg ## CC just makes a GrossModule. 5516e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5517e35772b2Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5518e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5519e35772b2Smrg ;; 5520e35772b2Smrg motorola) 5521e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5522e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5523e35772b2Smrg ;; 5524e35772b2Smrg esac 5525e35772b2Smrg runpath_var='LD_RUN_PATH' 5526e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5527e35772b2Smrg ;; 552872b676d7Smrg 5529e35772b2Smrg sysv4.3*) 5530e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5531e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5532e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5533e35772b2Smrg ;; 553472b676d7Smrg 5535e35772b2Smrg sysv4*MP*) 5536e35772b2Smrg if test -d /usr/nec; then 5537e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5538e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5539e35772b2Smrg runpath_var=LD_RUN_PATH 5540e35772b2Smrg hardcode_runpath_var=yes 5541e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5542e35772b2Smrg fi 5543e35772b2Smrg ;; 554472b676d7Smrg 5545e35772b2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5546e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5547e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5548e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5549e35772b2Smrg runpath_var='LD_RUN_PATH' 555072b676d7Smrg 5551e35772b2Smrg if test "$GCC" = yes; then 5552e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5553e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5554e35772b2Smrg else 5555e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5556e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5557e35772b2Smrg fi 5558e35772b2Smrg ;; 555972b676d7Smrg 5560e35772b2Smrg sysv5* | sco3.2v5* | sco5v6*) 5561e35772b2Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5562e35772b2Smrg # link with -lc, and that would cause any symbols used from libc to 5563e35772b2Smrg # always be unresolved, which means just about no library would 5564e35772b2Smrg # ever link correctly. If we're not using GNU ld we use -z text 5565e35772b2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5566e35772b2Smrg # as -z defs. 5567e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5568e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5569e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5570e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5571e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5572e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5573e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5574e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5575e35772b2Smrg runpath_var='LD_RUN_PATH' 557672b676d7Smrg 5577e35772b2Smrg if test "$GCC" = yes; then 5578e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5579e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5580e35772b2Smrg else 5581e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5582e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5583e35772b2Smrg fi 5584e35772b2Smrg ;; 558572b676d7Smrg 5586e35772b2Smrg uts4*) 5587e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5588e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5589e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5590e35772b2Smrg ;; 559172b676d7Smrg 5592e35772b2Smrg *) 5593e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5594e35772b2Smrg ;; 5595e35772b2Smrg esac 559672b676d7Smrg 5597e35772b2Smrg if test x$host_vendor = xsni; then 5598e35772b2Smrg case $host in 5599e35772b2Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5600e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5601e35772b2Smrg ;; 5602e35772b2Smrg esac 5603e35772b2Smrg fi 5604e35772b2Smrg fi 5605e35772b2Smrg]) 5606e35772b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5607e35772b2Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 560872b676d7Smrg 5609e35772b2Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 561072b676d7Smrg 5611e35772b2Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5612e35772b2Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5613e35772b2Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 5614e35772b2Smrg [The commands to extract the exported symbol list from a shared archive]) 561572b676d7Smrg 5616e35772b2Smrg# 5617e35772b2Smrg# Do we need to explicitly link libc? 5618e35772b2Smrg# 5619e35772b2Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5620e35772b2Smrgx|xyes) 5621e35772b2Smrg # Assume -lc should be added 5622e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 562372b676d7Smrg 5624e35772b2Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5625e35772b2Smrg case $_LT_TAGVAR(archive_cmds, $1) in 5626e35772b2Smrg *'~'*) 5627e35772b2Smrg # FIXME: we may have to deal with multi-command sequences. 5628e35772b2Smrg ;; 5629e35772b2Smrg '$CC '*) 5630e35772b2Smrg # Test whether the compiler implicitly links with -lc since on some 5631e35772b2Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5632e35772b2Smrg # to ld, don't add -lc before -lgcc. 563374c14cd6Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 563474c14cd6Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 563574c14cd6Smrg [$RM conftest* 563674c14cd6Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 563774c14cd6Smrg 563874c14cd6Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 563974c14cd6Smrg soname=conftest 564074c14cd6Smrg lib=conftest 564174c14cd6Smrg libobjs=conftest.$ac_objext 564274c14cd6Smrg deplibs= 564374c14cd6Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 564474c14cd6Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 564574c14cd6Smrg compiler_flags=-v 564674c14cd6Smrg linker_flags=-v 564774c14cd6Smrg verstring= 564874c14cd6Smrg output_objdir=. 564974c14cd6Smrg libname=conftest 565074c14cd6Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 565174c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 565274c14cd6Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 565374c14cd6Smrg then 565474c14cd6Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 565574c14cd6Smrg else 565674c14cd6Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 565774c14cd6Smrg fi 565874c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 565974c14cd6Smrg else 566074c14cd6Smrg cat conftest.err 1>&5 566174c14cd6Smrg fi 566274c14cd6Smrg $RM conftest* 566374c14cd6Smrg ]) 566474c14cd6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5665e35772b2Smrg ;; 5666e35772b2Smrg esac 5667e35772b2Smrg fi 5668e35772b2Smrg ;; 5669e35772b2Smrgesac 567072b676d7Smrg 5671e35772b2Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5672e35772b2Smrg [Whether or not to add -lc for building shared libraries]) 5673e35772b2Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5674e35772b2Smrg [enable_shared_with_static_runtimes], [0], 5675e35772b2Smrg [Whether or not to disallow shared libs when runtime libs are static]) 5676e35772b2Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5677e35772b2Smrg [Compiler flag to allow reflexive dlopens]) 5678e35772b2Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5679e35772b2Smrg [Compiler flag to generate shared objects directly from archives]) 5680e35772b2Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 5681e35772b2Smrg [Whether the compiler copes with passing no objects directly]) 5682e35772b2Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5683e35772b2Smrg [Create an old-style archive from a shared archive]) 5684e35772b2Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5685e35772b2Smrg [Create a temporary old-style archive to link instead of a shared archive]) 5686e35772b2Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5687e35772b2Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5688e35772b2Smrg_LT_TAGDECL([], [module_cmds], [2], 5689e35772b2Smrg [Commands used to build a loadable module if different from building 5690e35772b2Smrg a shared archive.]) 5691e35772b2Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5692e35772b2Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 5693e35772b2Smrg [Whether we are building with GNU ld or not]) 5694e35772b2Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5695e35772b2Smrg [Flag that allows shared libraries with undefined symbols to be built]) 5696e35772b2Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 5697e35772b2Smrg [Flag that enforces no undefined symbols]) 5698e35772b2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5699e35772b2Smrg [Flag to hardcode $libdir into a binary during linking. 5700e35772b2Smrg This must work even if $libdir does not exist]) 5701e35772b2Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5702e35772b2Smrg [Whether we need a single "-rpath" flag with a separated argument]) 5703e35772b2Smrg_LT_TAGDECL([], [hardcode_direct], [0], 5704e35772b2Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5705e35772b2Smrg DIR into the resulting binary]) 5706e35772b2Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5707e35772b2Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5708e35772b2Smrg DIR into the resulting binary and the resulting library dependency is 5709e35772b2Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5710e35772b2Smrg library is relocated]) 5711e35772b2Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5712e35772b2Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5713e35772b2Smrg into the resulting binary]) 5714e35772b2Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5715e35772b2Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5716e35772b2Smrg into the resulting binary]) 5717e35772b2Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 5718e35772b2Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 5719e35772b2Smrg into the library and all subsequent libraries and executables linked 5720e35772b2Smrg against it]) 5721e35772b2Smrg_LT_TAGDECL([], [inherit_rpath], [0], 5722e35772b2Smrg [Set to yes if linker adds runtime paths of dependent libraries 5723e35772b2Smrg to runtime path list]) 5724e35772b2Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 5725e35772b2Smrg [Whether libtool must link a program against all its dependency libraries]) 5726e35772b2Smrg_LT_TAGDECL([], [always_export_symbols], [0], 5727e35772b2Smrg [Set to "yes" if exported symbols are required]) 5728e35772b2Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5729e35772b2Smrg [The commands to list exported symbols]) 5730e35772b2Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 5731e35772b2Smrg [Symbols that should not be listed in the preloaded symbols]) 5732e35772b2Smrg_LT_TAGDECL([], [include_expsyms], [1], 5733e35772b2Smrg [Symbols that must always be exported]) 5734e35772b2Smrg_LT_TAGDECL([], [prelink_cmds], [2], 5735e35772b2Smrg [Commands necessary for linking programs (against libraries) with templates]) 573674c14cd6Smrg_LT_TAGDECL([], [postlink_cmds], [2], 573774c14cd6Smrg [Commands necessary for finishing linking programs]) 5738e35772b2Smrg_LT_TAGDECL([], [file_list_spec], [1], 5739e35772b2Smrg [Specify filename containing input files]) 5740e35772b2Smrgdnl FIXME: Not yet implemented 5741e35772b2Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5742e35772b2Smrgdnl [Compiler flag to generate thread safe objects]) 5743e35772b2Smrg])# _LT_LINKER_SHLIBS 5744e35772b2Smrg 5745e35772b2Smrg 5746e35772b2Smrg# _LT_LANG_C_CONFIG([TAG]) 5747e35772b2Smrg# ------------------------ 5748e35772b2Smrg# Ensure that the configuration variables for a C compiler are suitably 5749e35772b2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5750e35772b2Smrg# the compiler configuration to `libtool'. 5751e35772b2Smrgm4_defun([_LT_LANG_C_CONFIG], 5752e35772b2Smrg[m4_require([_LT_DECL_EGREP])dnl 5753e35772b2Smrglt_save_CC="$CC" 5754e35772b2SmrgAC_LANG_PUSH(C) 575572b676d7Smrg 5756e35772b2Smrg# Source file extension for C test sources. 5757e35772b2Smrgac_ext=c 575872b676d7Smrg 5759e35772b2Smrg# Object file extension for compiled C test sources. 5760e35772b2Smrgobjext=o 5761e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 576272b676d7Smrg 5763e35772b2Smrg# Code to be used in simple compile tests 5764e35772b2Smrglt_simple_compile_test_code="int some_variable = 0;" 576572b676d7Smrg 5766e35772b2Smrg# Code to be used in simple link tests 5767e35772b2Smrglt_simple_link_test_code='int main(){return(0);}' 576872b676d7Smrg 5769e35772b2Smrg_LT_TAG_COMPILER 5770e35772b2Smrg# Save the default compiler, since it gets overwritten when the other 5771e35772b2Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5772e35772b2Smrgcompiler_DEFAULT=$CC 577372b676d7Smrg 5774e35772b2Smrg# save warnings/boilerplate of simple test code 5775e35772b2Smrg_LT_COMPILER_BOILERPLATE 5776e35772b2Smrg_LT_LINKER_BOILERPLATE 577772b676d7Smrg 5778e35772b2Smrgif test -n "$compiler"; then 5779e35772b2Smrg _LT_COMPILER_NO_RTTI($1) 5780e35772b2Smrg _LT_COMPILER_PIC($1) 5781e35772b2Smrg _LT_COMPILER_C_O($1) 5782e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 5783e35772b2Smrg _LT_LINKER_SHLIBS($1) 5784e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 5785e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 5786e35772b2Smrg LT_SYS_DLOPEN_SELF 5787e35772b2Smrg _LT_CMD_STRIPLIB 5788e35772b2Smrg 5789e35772b2Smrg # Report which library types will actually be built 5790e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5791e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 5792e35772b2Smrg 5793e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 5794e35772b2Smrg test "$can_build_shared" = "no" && enable_shared=no 5795e35772b2Smrg 5796e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 5797e35772b2Smrg # are all built from PIC. 5798e35772b2Smrg case $host_os in 5799e35772b2Smrg aix3*) 5800e35772b2Smrg test "$enable_shared" = yes && enable_static=no 5801e35772b2Smrg if test -n "$RANLIB"; then 5802e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5803e35772b2Smrg postinstall_cmds='$RANLIB $lib' 5804e35772b2Smrg fi 5805e35772b2Smrg ;; 580672b676d7Smrg 5807e35772b2Smrg aix[[4-9]]*) 5808e35772b2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5809e35772b2Smrg test "$enable_shared" = yes && enable_static=no 5810e35772b2Smrg fi 5811e35772b2Smrg ;; 5812e35772b2Smrg esac 5813e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 581472b676d7Smrg 5815e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 5816e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 5817e35772b2Smrg test "$enable_shared" = yes || enable_static=yes 5818e35772b2Smrg AC_MSG_RESULT([$enable_static]) 581972b676d7Smrg 5820e35772b2Smrg _LT_CONFIG($1) 5821e35772b2Smrgfi 5822e35772b2SmrgAC_LANG_POP 5823e35772b2SmrgCC="$lt_save_CC" 5824e35772b2Smrg])# _LT_LANG_C_CONFIG 582572b676d7Smrg 582672b676d7Smrg 5827e35772b2Smrg# _LT_LANG_CXX_CONFIG([TAG]) 5828e35772b2Smrg# -------------------------- 5829e35772b2Smrg# Ensure that the configuration variables for a C++ compiler are suitably 5830e35772b2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5831e35772b2Smrg# the compiler configuration to `libtool'. 5832e35772b2Smrgm4_defun([_LT_LANG_CXX_CONFIG], 583374c14cd6Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5834e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 583574c14cd6Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 583674c14cd6Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 583774c14cd6Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 583874c14cd6Smrg (test "X$CXX" != "Xg++"))) ; then 583974c14cd6Smrg AC_PROG_CXXCPP 584074c14cd6Smrgelse 584174c14cd6Smrg _lt_caught_CXX_error=yes 584274c14cd6Smrgfi 5843e35772b2Smrg 5844e35772b2SmrgAC_LANG_PUSH(C++) 5845e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5846e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5847e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5848e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5849e35772b2Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5850e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5851e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5852e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5853e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5854e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5855e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5856e35772b2Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5857e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5858e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5859e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 5860e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5861e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5862e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 586374c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 586474c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5865e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5866e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5867e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 586872b676d7Smrg 5869e35772b2Smrg# Source file extension for C++ test sources. 5870e35772b2Smrgac_ext=cpp 587172b676d7Smrg 5872e35772b2Smrg# Object file extension for compiled C++ test sources. 5873e35772b2Smrgobjext=o 5874e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 5875e35772b2Smrg 5876e35772b2Smrg# No sense in running all these tests if we already determined that 5877e35772b2Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5878e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 5879e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 5880e35772b2Smrgif test "$_lt_caught_CXX_error" != yes; then 5881e35772b2Smrg # Code to be used in simple compile tests 5882e35772b2Smrg lt_simple_compile_test_code="int some_variable = 0;" 5883e35772b2Smrg 5884e35772b2Smrg # Code to be used in simple link tests 5885e35772b2Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5886e35772b2Smrg 5887e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5888e35772b2Smrg _LT_TAG_COMPILER 5889e35772b2Smrg 5890e35772b2Smrg # save warnings/boilerplate of simple test code 5891e35772b2Smrg _LT_COMPILER_BOILERPLATE 5892e35772b2Smrg _LT_LINKER_BOILERPLATE 5893e35772b2Smrg 5894e35772b2Smrg # Allow CC to be a program name with arguments. 5895e35772b2Smrg lt_save_CC=$CC 589674c14cd6Smrg lt_save_CFLAGS=$CFLAGS 5897e35772b2Smrg lt_save_LD=$LD 5898e35772b2Smrg lt_save_GCC=$GCC 5899e35772b2Smrg GCC=$GXX 5900e35772b2Smrg lt_save_with_gnu_ld=$with_gnu_ld 5901e35772b2Smrg lt_save_path_LD=$lt_cv_path_LD 5902e35772b2Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5903e35772b2Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5904e35772b2Smrg else 5905e35772b2Smrg $as_unset lt_cv_prog_gnu_ld 5906e35772b2Smrg fi 5907e35772b2Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 5908e35772b2Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 5909e35772b2Smrg else 5910e35772b2Smrg $as_unset lt_cv_path_LD 5911e35772b2Smrg fi 5912e35772b2Smrg test -z "${LDCXX+set}" || LD=$LDCXX 5913e35772b2Smrg CC=${CXX-"c++"} 591474c14cd6Smrg CFLAGS=$CXXFLAGS 5915e35772b2Smrg compiler=$CC 5916e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 5917e35772b2Smrg _LT_CC_BASENAME([$compiler]) 591872b676d7Smrg 5919e35772b2Smrg if test -n "$compiler"; then 5920e35772b2Smrg # We don't want -fno-exception when compiling C++ code, so set the 5921e35772b2Smrg # no_builtin_flag separately 5922e35772b2Smrg if test "$GXX" = yes; then 5923e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5924e35772b2Smrg else 5925e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5926e35772b2Smrg fi 592772b676d7Smrg 5928e35772b2Smrg if test "$GXX" = yes; then 5929e35772b2Smrg # Set up default GNU C++ configuration 593072b676d7Smrg 5931e35772b2Smrg LT_PATH_LD 593272b676d7Smrg 5933e35772b2Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5934e35772b2Smrg # archiving commands below assume that GNU ld is being used. 5935e35772b2Smrg if test "$with_gnu_ld" = yes; then 593674c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 593774c14cd6Smrg _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' 593872b676d7Smrg 5939e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5940e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 594172b676d7Smrg 5942e35772b2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5943e35772b2Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5944e35772b2Smrg # investigate it a little bit more. (MM) 5945e35772b2Smrg wlarc='${wl}' 594672b676d7Smrg 5947e35772b2Smrg # ancient GNU ld didn't support --whole-archive et. al. 5948e35772b2Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5949e35772b2Smrg $GREP 'no-whole-archive' > /dev/null; then 5950e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5951e35772b2Smrg else 5952e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5953e35772b2Smrg fi 5954e35772b2Smrg else 5955e35772b2Smrg with_gnu_ld=no 5956e35772b2Smrg wlarc= 5957e35772b2Smrg 5958e35772b2Smrg # A generic and very simple default shared library creation 5959e35772b2Smrg # command for GNU C++ for the case where it uses the native 5960e35772b2Smrg # linker, instead of GNU ld. If possible, this setting should 5961e35772b2Smrg # overridden to take advantage of the native linker features on 5962e35772b2Smrg # the platform it is being used on. 5963e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5964e35772b2Smrg fi 596572b676d7Smrg 5966e35772b2Smrg # Commands to make compiler produce verbose output that lists 5967e35772b2Smrg # what "hidden" libraries, object files and flags are used when 5968e35772b2Smrg # linking a shared library. 596974c14cd6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 597072b676d7Smrg 5971e35772b2Smrg else 5972e35772b2Smrg GXX=no 5973e35772b2Smrg with_gnu_ld=no 5974e35772b2Smrg wlarc= 5975e35772b2Smrg fi 597672b676d7Smrg 5977e35772b2Smrg # PORTME: fill in a description of your system's C++ link characteristics 5978e35772b2Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5979e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5980e35772b2Smrg case $host_os in 5981e35772b2Smrg aix3*) 5982e35772b2Smrg # FIXME: insert proper C++ library support 5983e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5984e35772b2Smrg ;; 5985e35772b2Smrg aix[[4-9]]*) 5986e35772b2Smrg if test "$host_cpu" = ia64; then 5987e35772b2Smrg # On IA64, the linker does run time linking by default, so we don't 5988e35772b2Smrg # have to do anything special. 5989e35772b2Smrg aix_use_runtimelinking=no 5990e35772b2Smrg exp_sym_flag='-Bexport' 5991e35772b2Smrg no_entry_flag="" 5992e35772b2Smrg else 5993e35772b2Smrg aix_use_runtimelinking=no 5994e35772b2Smrg 5995e35772b2Smrg # Test if we are trying to use run time linking or normal 5996e35772b2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5997e35772b2Smrg # need to do runtime linking. 5998e35772b2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5999e35772b2Smrg for ld_flag in $LDFLAGS; do 6000e35772b2Smrg case $ld_flag in 6001e35772b2Smrg *-brtl*) 6002e35772b2Smrg aix_use_runtimelinking=yes 6003e35772b2Smrg break 6004e35772b2Smrg ;; 6005e35772b2Smrg esac 6006e35772b2Smrg done 6007e35772b2Smrg ;; 6008e35772b2Smrg esac 600972b676d7Smrg 6010e35772b2Smrg exp_sym_flag='-bexport' 6011e35772b2Smrg no_entry_flag='-bnoentry' 6012e35772b2Smrg fi 601372b676d7Smrg 6014e35772b2Smrg # When large executables or shared objects are built, AIX ld can 6015e35772b2Smrg # have problems creating the table of contents. If linking a library 6016e35772b2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6017e35772b2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6018e35772b2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6019e35772b2Smrg 6020e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='' 6021e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6022e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6023e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6024e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6025e35772b2Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6026e35772b2Smrg 6027e35772b2Smrg if test "$GXX" = yes; then 6028e35772b2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6029e35772b2Smrg # We only want to do this on AIX 4.2 and lower, the check 6030e35772b2Smrg # below for broken collect2 doesn't work under 4.3+ 6031e35772b2Smrg collect2name=`${CC} -print-prog-name=collect2` 6032e35772b2Smrg if test -f "$collect2name" && 6033e35772b2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6034e35772b2Smrg then 6035e35772b2Smrg # We have reworked collect2 6036e35772b2Smrg : 6037e35772b2Smrg else 6038e35772b2Smrg # We have old collect2 6039e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6040e35772b2Smrg # It fails to find uninstalled libraries when the uninstalled 6041e35772b2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6042e35772b2Smrg # to unsupported forces relinking 6043e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6044e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6045e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6046e35772b2Smrg fi 6047e35772b2Smrg esac 6048e35772b2Smrg shared_flag='-shared' 6049e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 6050e35772b2Smrg shared_flag="$shared_flag "'${wl}-G' 6051e35772b2Smrg fi 6052e35772b2Smrg else 6053e35772b2Smrg # not using gcc 6054e35772b2Smrg if test "$host_cpu" = ia64; then 6055e35772b2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6056e35772b2Smrg # chokes on -Wl,-G. The following line is correct: 6057e35772b2Smrg shared_flag='-G' 6058e35772b2Smrg else 6059e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 6060e35772b2Smrg shared_flag='${wl}-G' 6061e35772b2Smrg else 6062e35772b2Smrg shared_flag='${wl}-bM:SRE' 6063e35772b2Smrg fi 6064e35772b2Smrg fi 6065e35772b2Smrg fi 606672b676d7Smrg 6067e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6068e35772b2Smrg # It seems that -bexpall does not export symbols beginning with 6069e35772b2Smrg # underscore (_), so it is better to generate a list of symbols to 6070e35772b2Smrg # export. 6071e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6072e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 6073e35772b2Smrg # Warning - without using the other runtime loading flags (-brtl), 6074e35772b2Smrg # -berok will link without error, but may produce a broken library. 6075e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6076e35772b2Smrg # Determine the default libpath from the value encoded in an empty 6077e35772b2Smrg # executable. 607874c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6079e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6080e35772b2Smrg 608174c14cd6Smrg _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" 6082e35772b2Smrg else 6083e35772b2Smrg if test "$host_cpu" = ia64; then 6084e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6085e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6086e35772b2Smrg _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" 6087e35772b2Smrg else 6088e35772b2Smrg # Determine the default libpath from the value encoded in an 6089e35772b2Smrg # empty executable. 609074c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6091e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6092e35772b2Smrg # Warning - without using the other run time loading flags, 6093e35772b2Smrg # -berok will link without error, but may produce a broken library. 6094e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6095e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 609674c14cd6Smrg if test "$with_gnu_ld" = yes; then 609774c14cd6Smrg # We only use this code for GNU lds that support --whole-archive. 609874c14cd6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 609974c14cd6Smrg else 610074c14cd6Smrg # Exported symbols can be pulled into shared objects from archives 610174c14cd6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 610274c14cd6Smrg fi 6103e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6104e35772b2Smrg # This is similar to how AIX traditionally builds its shared 6105e35772b2Smrg # libraries. 6106e35772b2Smrg _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' 6107e35772b2Smrg fi 6108e35772b2Smrg fi 6109e35772b2Smrg ;; 611072b676d7Smrg 6111e35772b2Smrg beos*) 6112e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6113e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6114e35772b2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6115e35772b2Smrg # support --undefined. This deserves some investigation. FIXME 6116e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6117e35772b2Smrg else 6118e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6119e35772b2Smrg fi 6120e35772b2Smrg ;; 612172b676d7Smrg 6122e35772b2Smrg chorus*) 6123e35772b2Smrg case $cc_basename in 6124e35772b2Smrg *) 6125e35772b2Smrg # FIXME: insert proper C++ library support 6126e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6127e35772b2Smrg ;; 6128e35772b2Smrg esac 6129e35772b2Smrg ;; 613072b676d7Smrg 6131e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 613274c14cd6Smrg case $GXX,$cc_basename in 613374c14cd6Smrg ,cl* | no,cl*) 613474c14cd6Smrg # Native MSVC 613574c14cd6Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 613674c14cd6Smrg # no search path for DLLs. 613774c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 613874c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 613974c14cd6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 614074c14cd6Smrg _LT_TAGVAR(file_list_spec, $1)='@' 614174c14cd6Smrg # Tell ltmain to make .lib files, not .a files. 614274c14cd6Smrg libext=lib 614374c14cd6Smrg # Tell ltmain to make .dll files, not .so files. 614474c14cd6Smrg shrext_cmds=".dll" 614574c14cd6Smrg # FIXME: Setting linknames here is a bad hack. 614674c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 614774c14cd6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 614874c14cd6Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 614974c14cd6Smrg else 615074c14cd6Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 615174c14cd6Smrg fi~ 615274c14cd6Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 615374c14cd6Smrg linknames=' 615474c14cd6Smrg # The linker will not automatically build a static lib if we build a DLL. 615574c14cd6Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 615674c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 615774c14cd6Smrg # Don't use ranlib 615874c14cd6Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 615974c14cd6Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 616074c14cd6Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 616174c14cd6Smrg case $lt_outputfile in 616274c14cd6Smrg *.exe|*.EXE) ;; 616374c14cd6Smrg *) 616474c14cd6Smrg lt_outputfile="$lt_outputfile.exe" 616574c14cd6Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 616674c14cd6Smrg ;; 616774c14cd6Smrg esac~ 616874c14cd6Smrg func_to_tool_file "$lt_outputfile"~ 616974c14cd6Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 617074c14cd6Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 617174c14cd6Smrg $RM "$lt_outputfile.manifest"; 617274c14cd6Smrg fi' 617374c14cd6Smrg ;; 617474c14cd6Smrg *) 617574c14cd6Smrg # g++ 617674c14cd6Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 617774c14cd6Smrg # as there is no search path for DLLs. 617874c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 617974c14cd6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 618074c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 618174c14cd6Smrg _LT_TAGVAR(always_export_symbols, $1)=no 618274c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 618374c14cd6Smrg 618474c14cd6Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 618574c14cd6Smrg _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' 618674c14cd6Smrg # If the export-symbols file already is a .def file (1st line 618774c14cd6Smrg # is EXPORTS), use it as is; otherwise, prepend... 618874c14cd6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 618974c14cd6Smrg cp $export_symbols $output_objdir/$soname.def; 619074c14cd6Smrg else 619174c14cd6Smrg echo EXPORTS > $output_objdir/$soname.def; 619274c14cd6Smrg cat $export_symbols >> $output_objdir/$soname.def; 619374c14cd6Smrg fi~ 619474c14cd6Smrg $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' 619574c14cd6Smrg else 619674c14cd6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 619774c14cd6Smrg fi 619874c14cd6Smrg ;; 619974c14cd6Smrg esac 620074c14cd6Smrg ;; 6201e35772b2Smrg darwin* | rhapsody*) 6202e35772b2Smrg _LT_DARWIN_LINKER_FEATURES($1) 6203e35772b2Smrg ;; 620472b676d7Smrg 6205e35772b2Smrg dgux*) 6206e35772b2Smrg case $cc_basename in 6207e35772b2Smrg ec++*) 6208e35772b2Smrg # FIXME: insert proper C++ library support 6209e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6210e35772b2Smrg ;; 6211e35772b2Smrg ghcx*) 6212e35772b2Smrg # Green Hills C++ Compiler 6213e35772b2Smrg # FIXME: insert proper C++ library support 6214e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6215e35772b2Smrg ;; 6216e35772b2Smrg *) 6217e35772b2Smrg # FIXME: insert proper C++ library support 6218e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6219e35772b2Smrg ;; 6220e35772b2Smrg esac 6221e35772b2Smrg ;; 622272b676d7Smrg 622374c14cd6Smrg freebsd2.*) 6224e35772b2Smrg # C++ shared libraries reported to be fairly broken before 6225e35772b2Smrg # switch to ELF 6226e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6227e35772b2Smrg ;; 622872b676d7Smrg 6229e35772b2Smrg freebsd-elf*) 6230e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6231e35772b2Smrg ;; 623272b676d7Smrg 6233e35772b2Smrg freebsd* | dragonfly*) 6234e35772b2Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6235e35772b2Smrg # conventions 6236e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6237e35772b2Smrg ;; 623872b676d7Smrg 6239e35772b2Smrg gnu*) 6240e35772b2Smrg ;; 624172b676d7Smrg 624274c14cd6Smrg haiku*) 624374c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 624474c14cd6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 624574c14cd6Smrg ;; 624674c14cd6Smrg 6247e35772b2Smrg hpux9*) 6248e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6249e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6250e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6251e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6252e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6253e35772b2Smrg # but as the default 6254e35772b2Smrg # location of the library. 6255e35772b2Smrg 6256e35772b2Smrg case $cc_basename in 6257e35772b2Smrg CC*) 6258e35772b2Smrg # FIXME: insert proper C++ library support 6259e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6260e35772b2Smrg ;; 6261e35772b2Smrg aCC*) 6262e35772b2Smrg _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' 6263e35772b2Smrg # Commands to make compiler produce verbose output that lists 6264e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6265e35772b2Smrg # linking a shared library. 6266e35772b2Smrg # 6267e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6268e35772b2Smrg # explicitly linking system object files so we need to strip them 6269e35772b2Smrg # from the output so that they don't get included in the library 6270e35772b2Smrg # dependencies. 627174c14cd6Smrg 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"' 6272e35772b2Smrg ;; 6273e35772b2Smrg *) 6274e35772b2Smrg if test "$GXX" = yes; then 627574c14cd6Smrg _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' 6276e35772b2Smrg else 6277e35772b2Smrg # FIXME: insert proper C++ library support 6278e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6279e35772b2Smrg fi 6280e35772b2Smrg ;; 6281e35772b2Smrg esac 6282e35772b2Smrg ;; 628372b676d7Smrg 6284e35772b2Smrg hpux10*|hpux11*) 6285e35772b2Smrg if test $with_gnu_ld = no; then 6286e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6287e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6288e35772b2Smrg 6289e35772b2Smrg case $host_cpu in 6290e35772b2Smrg hppa*64*|ia64*) 6291e35772b2Smrg ;; 6292e35772b2Smrg *) 6293e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6294e35772b2Smrg ;; 6295e35772b2Smrg esac 6296e35772b2Smrg fi 6297e35772b2Smrg case $host_cpu in 6298e35772b2Smrg hppa*64*|ia64*) 6299e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6300e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6301e35772b2Smrg ;; 6302e35772b2Smrg *) 6303e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6304e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6305e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6306e35772b2Smrg # but as the default 6307e35772b2Smrg # location of the library. 6308e35772b2Smrg ;; 6309e35772b2Smrg esac 6310e35772b2Smrg 6311e35772b2Smrg case $cc_basename in 6312e35772b2Smrg CC*) 6313e35772b2Smrg # FIXME: insert proper C++ library support 6314e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6315e35772b2Smrg ;; 6316e35772b2Smrg aCC*) 6317e35772b2Smrg case $host_cpu in 6318e35772b2Smrg hppa*64*) 6319e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6320e35772b2Smrg ;; 6321e35772b2Smrg ia64*) 6322e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6323e35772b2Smrg ;; 6324e35772b2Smrg *) 6325e35772b2Smrg _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' 6326e35772b2Smrg ;; 6327e35772b2Smrg esac 6328e35772b2Smrg # Commands to make compiler produce verbose output that lists 6329e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6330e35772b2Smrg # linking a shared library. 6331e35772b2Smrg # 6332e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6333e35772b2Smrg # explicitly linking system object files so we need to strip them 6334e35772b2Smrg # from the output so that they don't get included in the library 6335e35772b2Smrg # dependencies. 633674c14cd6Smrg 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"' 6337e35772b2Smrg ;; 6338e35772b2Smrg *) 6339e35772b2Smrg if test "$GXX" = yes; then 6340e35772b2Smrg if test $with_gnu_ld = no; then 6341e35772b2Smrg case $host_cpu in 6342e35772b2Smrg hppa*64*) 6343e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6344e35772b2Smrg ;; 6345e35772b2Smrg ia64*) 634674c14cd6Smrg _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' 6347e35772b2Smrg ;; 6348e35772b2Smrg *) 634974c14cd6Smrg _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' 6350e35772b2Smrg ;; 6351e35772b2Smrg esac 6352e35772b2Smrg fi 6353e35772b2Smrg else 6354e35772b2Smrg # FIXME: insert proper C++ library support 6355e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6356e35772b2Smrg fi 6357e35772b2Smrg ;; 6358e35772b2Smrg esac 6359e35772b2Smrg ;; 636072b676d7Smrg 6361e35772b2Smrg interix[[3-9]]*) 6362e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6363e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6364e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6365e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6366e35772b2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6367e35772b2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6368e35772b2Smrg # default) and relocated if they conflict, which is a slow very memory 6369e35772b2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6370e35772b2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6371e35772b2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6372e35772b2Smrg _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' 6373e35772b2Smrg _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' 6374e35772b2Smrg ;; 6375e35772b2Smrg irix5* | irix6*) 6376e35772b2Smrg case $cc_basename in 6377e35772b2Smrg CC*) 6378e35772b2Smrg # SGI C++ 637974c14cd6Smrg _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' 6380e35772b2Smrg 6381e35772b2Smrg # Archives containing C++ object files must be created using 6382e35772b2Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6383e35772b2Smrg # necessary to make sure instantiated templates are included 6384e35772b2Smrg # in the archive. 6385e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6386e35772b2Smrg ;; 6387e35772b2Smrg *) 6388e35772b2Smrg if test "$GXX" = yes; then 6389e35772b2Smrg if test "$with_gnu_ld" = no; then 639074c14cd6Smrg _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' 6391e35772b2Smrg else 639274c14cd6Smrg _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' 6393e35772b2Smrg fi 6394e35772b2Smrg fi 6395e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6396e35772b2Smrg ;; 6397e35772b2Smrg esac 6398e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6399e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6400e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6401e35772b2Smrg ;; 64021fd23544Smrg 640374c14cd6Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6404e35772b2Smrg case $cc_basename in 6405e35772b2Smrg KCC*) 6406e35772b2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6407e35772b2Smrg 6408e35772b2Smrg # KCC will only create a shared library if the output file 6409e35772b2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6410e35772b2Smrg # to its proper name (with version) after linking. 6411e35772b2Smrg _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' 6412e35772b2Smrg _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' 6413e35772b2Smrg # Commands to make compiler produce verbose output that lists 6414e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6415e35772b2Smrg # linking a shared library. 6416e35772b2Smrg # 6417e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6418e35772b2Smrg # explicitly linking system object files so we need to strip them 6419e35772b2Smrg # from the output so that they don't get included in the library 6420e35772b2Smrg # dependencies. 642174c14cd6Smrg 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"' 6422e35772b2Smrg 6423e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6424e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6425e35772b2Smrg 6426e35772b2Smrg # Archives containing C++ object files must be created using 6427e35772b2Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6428e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6429e35772b2Smrg ;; 6430e35772b2Smrg icpc* | ecpc* ) 6431e35772b2Smrg # Intel C++ 6432e35772b2Smrg with_gnu_ld=yes 6433e35772b2Smrg # version 8.0 and above of icpc choke on multiply defined symbols 6434e35772b2Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6435e35772b2Smrg # earlier do not add the objects themselves. 6436e35772b2Smrg case `$CC -V 2>&1` in 6437e35772b2Smrg *"Version 7."*) 6438e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6439e35772b2Smrg _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' 6440e35772b2Smrg ;; 6441e35772b2Smrg *) # Version 8.0 or newer 6442e35772b2Smrg tmp_idyn= 6443e35772b2Smrg case $host_cpu in 6444e35772b2Smrg ia64*) tmp_idyn=' -i_dynamic';; 6445e35772b2Smrg esac 6446e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6447e35772b2Smrg _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' 6448e35772b2Smrg ;; 6449e35772b2Smrg esac 6450e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6451e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6452e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6453e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6454e35772b2Smrg ;; 6455e35772b2Smrg pgCC* | pgcpp*) 6456e35772b2Smrg # Portland Group C++ compiler 6457e35772b2Smrg case `$CC -V` in 645874c14cd6Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6459e35772b2Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6460e35772b2Smrg rm -rf $tpldir~ 6461e35772b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 646274c14cd6Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6463e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6464e35772b2Smrg rm -rf $tpldir~ 6465e35772b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 646674c14cd6Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6467e35772b2Smrg $RANLIB $oldlib' 6468e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6469e35772b2Smrg rm -rf $tpldir~ 6470e35772b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 647174c14cd6Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6472e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6473e35772b2Smrg rm -rf $tpldir~ 6474e35772b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 647574c14cd6Smrg $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' 6476e35772b2Smrg ;; 647774c14cd6Smrg *) # Version 6 and above use weak symbols 6478e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6479e35772b2Smrg _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' 6480e35772b2Smrg ;; 6481e35772b2Smrg esac 648272b676d7Smrg 6483e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6484e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 648574c14cd6Smrg _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' 6486e35772b2Smrg ;; 6487e35772b2Smrg cxx*) 6488e35772b2Smrg # Compaq C++ 6489e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6490e35772b2Smrg _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' 649172b676d7Smrg 6492e35772b2Smrg runpath_var=LD_RUN_PATH 6493e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6494e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 649572b676d7Smrg 6496e35772b2Smrg # Commands to make compiler produce verbose output that lists 6497e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6498e35772b2Smrg # linking a shared library. 6499e35772b2Smrg # 6500e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6501e35772b2Smrg # explicitly linking system object files so we need to strip them 6502e35772b2Smrg # from the output so that they don't get included in the library 6503e35772b2Smrg # dependencies. 650474c14cd6Smrg 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' 6505e35772b2Smrg ;; 650674c14cd6Smrg xl* | mpixl* | bgxl*) 6507e35772b2Smrg # IBM XL 8.0 on PPC, with GNU ld 6508e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6509e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6510e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6511e35772b2Smrg if test "x$supports_anon_versioning" = xyes; then 6512e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6513e35772b2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6514e35772b2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6515e35772b2Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6516e35772b2Smrg fi 6517e35772b2Smrg ;; 6518e35772b2Smrg *) 6519e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 6520e35772b2Smrg *Sun\ C*) 6521e35772b2Smrg # Sun C++ 5.9 6522e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6523e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6524e35772b2Smrg _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' 6525e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 652674c14cd6Smrg _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' 6527e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6528e35772b2Smrg 6529e35772b2Smrg # Not sure whether something based on 6530e35772b2Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6531e35772b2Smrg # would be better. 653274c14cd6Smrg output_verbose_link_cmd='func_echo_all' 6533e35772b2Smrg 6534e35772b2Smrg # Archives containing C++ object files must be created using 6535e35772b2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6536e35772b2Smrg # necessary to make sure instantiated templates are included 6537e35772b2Smrg # in the archive. 6538e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6539e35772b2Smrg ;; 6540e35772b2Smrg esac 6541e35772b2Smrg ;; 6542e35772b2Smrg esac 6543e35772b2Smrg ;; 654472b676d7Smrg 6545e35772b2Smrg lynxos*) 6546e35772b2Smrg # FIXME: insert proper C++ library support 6547e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6548e35772b2Smrg ;; 654972b676d7Smrg 6550e35772b2Smrg m88k*) 6551e35772b2Smrg # FIXME: insert proper C++ library support 6552e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6553e35772b2Smrg ;; 655472b676d7Smrg 6555e35772b2Smrg mvs*) 6556e35772b2Smrg case $cc_basename in 6557e35772b2Smrg cxx*) 6558e35772b2Smrg # FIXME: insert proper C++ library support 6559e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6560e35772b2Smrg ;; 6561e35772b2Smrg *) 6562e35772b2Smrg # FIXME: insert proper C++ library support 6563e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6564e35772b2Smrg ;; 6565e35772b2Smrg esac 6566e35772b2Smrg ;; 656772b676d7Smrg 6568e35772b2Smrg netbsd*) 6569e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6570e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6571e35772b2Smrg wlarc= 6572e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6573e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6574e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6575e35772b2Smrg fi 6576e35772b2Smrg # Workaround some broken pre-1.5 toolchains 6577e35772b2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6578e35772b2Smrg ;; 657972b676d7Smrg 6580e35772b2Smrg *nto* | *qnx*) 6581e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6582e35772b2Smrg ;; 658372b676d7Smrg 6584e35772b2Smrg openbsd2*) 6585e35772b2Smrg # C++ shared libraries are fairly broken 6586e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6587e35772b2Smrg ;; 658872b676d7Smrg 6589e35772b2Smrg openbsd*) 6590e35772b2Smrg if test -f /usr/libexec/ld.so; then 6591e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6592e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6593e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6594e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6595e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6596e35772b2Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6597e35772b2Smrg _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' 6598e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6599e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6600e35772b2Smrg fi 660174c14cd6Smrg output_verbose_link_cmd=func_echo_all 6602e35772b2Smrg else 6603e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6604e35772b2Smrg fi 6605e35772b2Smrg ;; 660672b676d7Smrg 6607e35772b2Smrg osf3* | osf4* | osf5*) 6608e35772b2Smrg case $cc_basename in 6609e35772b2Smrg KCC*) 6610e35772b2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6611e35772b2Smrg 6612e35772b2Smrg # KCC will only create a shared library if the output file 6613e35772b2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6614e35772b2Smrg # to its proper name (with version) after linking. 6615e35772b2Smrg _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' 6616e35772b2Smrg 6617e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6618e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6619e35772b2Smrg 6620e35772b2Smrg # Archives containing C++ object files must be created using 6621e35772b2Smrg # the KAI C++ compiler. 6622e35772b2Smrg case $host in 6623e35772b2Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6624e35772b2Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6625e35772b2Smrg esac 6626e35772b2Smrg ;; 6627e35772b2Smrg RCC*) 6628e35772b2Smrg # Rational C++ 2.4.1 6629e35772b2Smrg # FIXME: insert proper C++ library support 6630e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6631e35772b2Smrg ;; 6632e35772b2Smrg cxx*) 6633e35772b2Smrg case $host in 6634e35772b2Smrg osf3*) 6635e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 663674c14cd6Smrg _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' 6637e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6638e35772b2Smrg ;; 6639e35772b2Smrg *) 6640e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 664174c14cd6Smrg _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' 6642e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6643e35772b2Smrg echo "-hidden">> $lib.exp~ 664474c14cd6Smrg $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~ 6645e35772b2Smrg $RM $lib.exp' 6646e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6647e35772b2Smrg ;; 6648e35772b2Smrg esac 664972b676d7Smrg 6650e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 665172b676d7Smrg 6652e35772b2Smrg # Commands to make compiler produce verbose output that lists 6653e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6654e35772b2Smrg # linking a shared library. 6655e35772b2Smrg # 6656e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6657e35772b2Smrg # explicitly linking system object files so we need to strip them 6658e35772b2Smrg # from the output so that they don't get included in the library 6659e35772b2Smrg # dependencies. 666074c14cd6Smrg 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"' 6661e35772b2Smrg ;; 6662e35772b2Smrg *) 6663e35772b2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6664e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6665e35772b2Smrg case $host in 6666e35772b2Smrg osf3*) 666774c14cd6Smrg _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' 6668e35772b2Smrg ;; 6669e35772b2Smrg *) 667074c14cd6Smrg _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' 6671e35772b2Smrg ;; 6672e35772b2Smrg esac 6673e35772b2Smrg 6674e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6675e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6676e35772b2Smrg 6677e35772b2Smrg # Commands to make compiler produce verbose output that lists 6678e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6679e35772b2Smrg # linking a shared library. 668074c14cd6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6681e35772b2Smrg 6682e35772b2Smrg else 6683e35772b2Smrg # FIXME: insert proper C++ library support 6684e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6685e35772b2Smrg fi 6686e35772b2Smrg ;; 6687e35772b2Smrg esac 6688e35772b2Smrg ;; 668972b676d7Smrg 6690e35772b2Smrg psos*) 6691e35772b2Smrg # FIXME: insert proper C++ library support 6692e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6693e35772b2Smrg ;; 669472b676d7Smrg 6695e35772b2Smrg sunos4*) 6696e35772b2Smrg case $cc_basename in 6697e35772b2Smrg CC*) 6698e35772b2Smrg # Sun C++ 4.x 6699e35772b2Smrg # FIXME: insert proper C++ library support 6700e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6701e35772b2Smrg ;; 6702e35772b2Smrg lcc*) 6703e35772b2Smrg # Lucid 6704e35772b2Smrg # FIXME: insert proper C++ library support 6705e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6706e35772b2Smrg ;; 6707e35772b2Smrg *) 6708e35772b2Smrg # FIXME: insert proper C++ library support 6709e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6710e35772b2Smrg ;; 6711e35772b2Smrg esac 6712e35772b2Smrg ;; 671372b676d7Smrg 6714e35772b2Smrg solaris*) 6715e35772b2Smrg case $cc_basename in 671674c14cd6Smrg CC* | sunCC*) 6717e35772b2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6718e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6719e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6720e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6721e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6722e35772b2Smrg $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' 6723e35772b2Smrg 6724e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6725e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6726e35772b2Smrg case $host_os in 6727e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6728e35772b2Smrg *) 6729e35772b2Smrg # The compiler driver will combine and reorder linker options, 6730e35772b2Smrg # but understands `-z linker_flag'. 6731e35772b2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6732e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6733e35772b2Smrg ;; 6734e35772b2Smrg esac 6735e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 673672b676d7Smrg 673774c14cd6Smrg output_verbose_link_cmd='func_echo_all' 673872b676d7Smrg 6739e35772b2Smrg # Archives containing C++ object files must be created using 6740e35772b2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6741e35772b2Smrg # necessary to make sure instantiated templates are included 6742e35772b2Smrg # in the archive. 6743e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6744e35772b2Smrg ;; 6745e35772b2Smrg gcx*) 6746e35772b2Smrg # Green Hills C++ Compiler 6747e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 674872b676d7Smrg 6749e35772b2Smrg # The C++ compiler must be used to create the archive. 6750e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6751e35772b2Smrg ;; 6752e35772b2Smrg *) 6753e35772b2Smrg # GNU C++ compiler with Solaris linker 6754e35772b2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6755e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6756e35772b2Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 675774c14cd6Smrg _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' 6758e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 675974c14cd6Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6760e35772b2Smrg 6761e35772b2Smrg # Commands to make compiler produce verbose output that lists 6762e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6763e35772b2Smrg # linking a shared library. 676474c14cd6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6765e35772b2Smrg else 6766e35772b2Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6767e35772b2Smrg # platform. 6768e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6769e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6770e35772b2Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6771e35772b2Smrg 6772e35772b2Smrg # Commands to make compiler produce verbose output that lists 6773e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6774e35772b2Smrg # linking a shared library. 677574c14cd6Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6776e35772b2Smrg fi 6777e35772b2Smrg 6778e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6779e35772b2Smrg case $host_os in 6780e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6781e35772b2Smrg *) 6782e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6783e35772b2Smrg ;; 6784e35772b2Smrg esac 6785e35772b2Smrg fi 6786e35772b2Smrg ;; 6787e35772b2Smrg esac 6788e35772b2Smrg ;; 678972b676d7Smrg 6790e35772b2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6791e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6792e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6793e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6794e35772b2Smrg runpath_var='LD_RUN_PATH' 679572b676d7Smrg 6796e35772b2Smrg case $cc_basename in 6797e35772b2Smrg CC*) 6798e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6799e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6800e35772b2Smrg ;; 6801e35772b2Smrg *) 6802e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6803e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6804e35772b2Smrg ;; 6805e35772b2Smrg esac 6806e35772b2Smrg ;; 680772b676d7Smrg 6808e35772b2Smrg sysv5* | sco3.2v5* | sco5v6*) 6809e35772b2Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6810e35772b2Smrg # link with -lc, and that would cause any symbols used from libc to 6811e35772b2Smrg # always be unresolved, which means just about no library would 6812e35772b2Smrg # ever link correctly. If we're not using GNU ld we use -z text 6813e35772b2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6814e35772b2Smrg # as -z defs. 6815e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6816e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6817e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6818e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6819e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6820e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6821e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6822e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6823e35772b2Smrg runpath_var='LD_RUN_PATH' 682472b676d7Smrg 6825e35772b2Smrg case $cc_basename in 6826e35772b2Smrg CC*) 6827e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6828e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 682974c14cd6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 683074c14cd6Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 683174c14cd6Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 683274c14cd6Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 6833e35772b2Smrg ;; 6834e35772b2Smrg *) 6835e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6836e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6837e35772b2Smrg ;; 6838e35772b2Smrg esac 6839e35772b2Smrg ;; 684072b676d7Smrg 6841e35772b2Smrg tandem*) 6842e35772b2Smrg case $cc_basename in 6843e35772b2Smrg NCC*) 6844e35772b2Smrg # NonStop-UX NCC 3.20 6845e35772b2Smrg # FIXME: insert proper C++ library support 6846e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6847e35772b2Smrg ;; 6848e35772b2Smrg *) 6849e35772b2Smrg # FIXME: insert proper C++ library support 6850e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6851e35772b2Smrg ;; 6852e35772b2Smrg esac 6853e35772b2Smrg ;; 685472b676d7Smrg 6855e35772b2Smrg vxworks*) 6856e35772b2Smrg # FIXME: insert proper C++ library support 6857e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6858e35772b2Smrg ;; 685972b676d7Smrg 6860e35772b2Smrg *) 6861e35772b2Smrg # FIXME: insert proper C++ library support 6862e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6863e35772b2Smrg ;; 6864e35772b2Smrg esac 686572b676d7Smrg 6866e35772b2Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6867e35772b2Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6868e35772b2Smrg 6869e35772b2Smrg _LT_TAGVAR(GCC, $1)="$GXX" 6870e35772b2Smrg _LT_TAGVAR(LD, $1)="$LD" 6871e35772b2Smrg 6872e35772b2Smrg ## CAVEAT EMPTOR: 6873e35772b2Smrg ## There is no encapsulation within the following macros, do not change 6874e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 6875e35772b2Smrg ## what you are doing... 6876e35772b2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6877e35772b2Smrg _LT_COMPILER_PIC($1) 6878e35772b2Smrg _LT_COMPILER_C_O($1) 6879e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 6880e35772b2Smrg _LT_LINKER_SHLIBS($1) 6881e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 6882e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6883e35772b2Smrg 6884e35772b2Smrg _LT_CONFIG($1) 6885e35772b2Smrg fi # test -n "$compiler" 6886e35772b2Smrg 6887e35772b2Smrg CC=$lt_save_CC 688874c14cd6Smrg CFLAGS=$lt_save_CFLAGS 6889e35772b2Smrg LDCXX=$LD 6890e35772b2Smrg LD=$lt_save_LD 6891e35772b2Smrg GCC=$lt_save_GCC 6892e35772b2Smrg with_gnu_ld=$lt_save_with_gnu_ld 6893e35772b2Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 6894e35772b2Smrg lt_cv_path_LD=$lt_save_path_LD 6895e35772b2Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6896e35772b2Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6897e35772b2Smrgfi # test "$_lt_caught_CXX_error" != yes 689872b676d7Smrg 6899e35772b2SmrgAC_LANG_POP 6900e35772b2Smrg])# _LT_LANG_CXX_CONFIG 690172b676d7Smrg 690272b676d7Smrg 690374c14cd6Smrg# _LT_FUNC_STRIPNAME_CNF 690474c14cd6Smrg# ---------------------- 690574c14cd6Smrg# func_stripname_cnf prefix suffix name 690674c14cd6Smrg# strip PREFIX and SUFFIX off of NAME. 690774c14cd6Smrg# PREFIX and SUFFIX must not contain globbing or regex special 690874c14cd6Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 690974c14cd6Smrg# dot (in which case that matches only a dot). 691074c14cd6Smrg# 691174c14cd6Smrg# This function is identical to the (non-XSI) version of func_stripname, 691274c14cd6Smrg# except this one can be used by m4 code that may be executed by configure, 691374c14cd6Smrg# rather than the libtool script. 691474c14cd6Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 691574c14cd6SmrgAC_REQUIRE([_LT_DECL_SED]) 691674c14cd6SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 691774c14cd6Smrgfunc_stripname_cnf () 691874c14cd6Smrg{ 691974c14cd6Smrg case ${2} in 692074c14cd6Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 692174c14cd6Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 692274c14cd6Smrg esac 692374c14cd6Smrg} # func_stripname_cnf 692474c14cd6Smrg])# _LT_FUNC_STRIPNAME_CNF 692574c14cd6Smrg 6926e35772b2Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6927e35772b2Smrg# --------------------------------- 6928e35772b2Smrg# Figure out "hidden" library dependencies from verbose 6929e35772b2Smrg# compiler output when linking a shared library. 6930e35772b2Smrg# Parse the compiler output and extract the necessary 6931e35772b2Smrg# objects, libraries and library flags. 6932e35772b2Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6933e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 693474c14cd6SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6935e35772b2Smrg# Dependencies to place before and after the object being linked: 6936e35772b2Smrg_LT_TAGVAR(predep_objects, $1)= 6937e35772b2Smrg_LT_TAGVAR(postdep_objects, $1)= 6938e35772b2Smrg_LT_TAGVAR(predeps, $1)= 6939e35772b2Smrg_LT_TAGVAR(postdeps, $1)= 6940e35772b2Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 694172b676d7Smrg 6942e35772b2Smrgdnl we can't use the lt_simple_compile_test_code here, 6943e35772b2Smrgdnl because it contains code intended for an executable, 6944e35772b2Smrgdnl not a library. It's possible we should let each 6945e35772b2Smrgdnl tag define a new lt_????_link_test_code variable, 6946e35772b2Smrgdnl but it's only used here... 6947e35772b2Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6948e35772b2Smrgint a; 6949e35772b2Smrgvoid foo (void) { a = 0; } 6950e35772b2Smrg_LT_EOF 6951e35772b2Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6952e35772b2Smrgclass Foo 6953e35772b2Smrg{ 6954e35772b2Smrgpublic: 6955e35772b2Smrg Foo (void) { a = 0; } 6956e35772b2Smrgprivate: 6957e35772b2Smrg int a; 6958e35772b2Smrg}; 6959e35772b2Smrg_LT_EOF 6960e35772b2Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6961e35772b2Smrg subroutine foo 6962e35772b2Smrg implicit none 6963e35772b2Smrg integer*4 a 6964e35772b2Smrg a=0 6965e35772b2Smrg return 6966e35772b2Smrg end 6967e35772b2Smrg_LT_EOF 6968e35772b2Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6969e35772b2Smrg subroutine foo 6970e35772b2Smrg implicit none 6971e35772b2Smrg integer a 6972e35772b2Smrg a=0 6973e35772b2Smrg return 6974e35772b2Smrg end 6975e35772b2Smrg_LT_EOF 6976e35772b2Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6977e35772b2Smrgpublic class foo { 6978e35772b2Smrg private int a; 6979e35772b2Smrg public void bar (void) { 6980e35772b2Smrg a = 0; 6981e35772b2Smrg } 6982e35772b2Smrg}; 6983e35772b2Smrg_LT_EOF 698474c14cd6Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 698574c14cd6Smrgpackage foo 698674c14cd6Smrgfunc foo() { 698774c14cd6Smrg} 698874c14cd6Smrg_LT_EOF 6989e35772b2Smrg]) 699074c14cd6Smrg 699174c14cd6Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 699274c14cd6Smrgcase "$CC $CFLAGS " in #( 699374c14cd6Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 699474c14cd6Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 699574c14cd6Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 699674c14cd6Smrgesac 699774c14cd6Smrg 6998e35772b2Smrgdnl Parse the compiler output and extract the necessary 6999e35772b2Smrgdnl objects, libraries and library flags. 7000e35772b2Smrgif AC_TRY_EVAL(ac_compile); then 7001e35772b2Smrg # Parse the compiler output and extract the necessary 7002e35772b2Smrg # objects, libraries and library flags. 700372b676d7Smrg 7004e35772b2Smrg # Sentinel used to keep track of whether or not we are before 7005e35772b2Smrg # the conftest object file. 7006e35772b2Smrg pre_test_object_deps_done=no 700772b676d7Smrg 7008e35772b2Smrg for p in `eval "$output_verbose_link_cmd"`; do 700974c14cd6Smrg case ${prev}${p} in 701072b676d7Smrg 7011e35772b2Smrg -L* | -R* | -l*) 7012e35772b2Smrg # Some compilers place space between "-{L,R}" and the path. 7013e35772b2Smrg # Remove the space. 7014e35772b2Smrg if test $p = "-L" || 7015e35772b2Smrg test $p = "-R"; then 7016e35772b2Smrg prev=$p 7017e35772b2Smrg continue 7018e35772b2Smrg fi 701972b676d7Smrg 702074c14cd6Smrg # Expand the sysroot to ease extracting the directories later. 702174c14cd6Smrg if test -z "$prev"; then 702274c14cd6Smrg case $p in 702374c14cd6Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 702474c14cd6Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 702574c14cd6Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 702674c14cd6Smrg esac 702774c14cd6Smrg fi 702874c14cd6Smrg case $p in 702974c14cd6Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 703074c14cd6Smrg esac 7031e35772b2Smrg if test "$pre_test_object_deps_done" = no; then 703274c14cd6Smrg case ${prev} in 703374c14cd6Smrg -L | -R) 7034e35772b2Smrg # Internal compiler library paths should come after those 7035e35772b2Smrg # provided the user. The postdeps already come after the 7036e35772b2Smrg # user supplied libs so there is no need to process them. 7037e35772b2Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7038e35772b2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 7039e35772b2Smrg else 7040e35772b2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 7041e35772b2Smrg fi 7042e35772b2Smrg ;; 7043e35772b2Smrg # The "-l" case would never come before the object being 7044e35772b2Smrg # linked, so don't bother handling this case. 7045e35772b2Smrg esac 7046e35772b2Smrg else 7047e35772b2Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7048e35772b2Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 7049e35772b2Smrg else 7050e35772b2Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 7051e35772b2Smrg fi 7052e35772b2Smrg fi 705374c14cd6Smrg prev= 7054e35772b2Smrg ;; 705572b676d7Smrg 705674c14cd6Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 7057e35772b2Smrg *.$objext) 7058e35772b2Smrg # This assumes that the test object file only shows up 7059e35772b2Smrg # once in the compiler output. 7060e35772b2Smrg if test "$p" = "conftest.$objext"; then 7061e35772b2Smrg pre_test_object_deps_done=yes 7062e35772b2Smrg continue 7063e35772b2Smrg fi 706472b676d7Smrg 7065e35772b2Smrg if test "$pre_test_object_deps_done" = no; then 7066e35772b2Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7067e35772b2Smrg _LT_TAGVAR(predep_objects, $1)="$p" 7068e35772b2Smrg else 7069e35772b2Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7070e35772b2Smrg fi 7071e35772b2Smrg else 7072e35772b2Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7073e35772b2Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 7074e35772b2Smrg else 7075e35772b2Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7076e35772b2Smrg fi 7077e35772b2Smrg fi 7078e35772b2Smrg ;; 707972b676d7Smrg 7080e35772b2Smrg *) ;; # Ignore the rest. 708172b676d7Smrg 7082e35772b2Smrg esac 7083e35772b2Smrg done 708472b676d7Smrg 7085e35772b2Smrg # Clean up. 7086e35772b2Smrg rm -f a.out a.exe 7087e35772b2Smrgelse 7088e35772b2Smrg echo "libtool.m4: error: problem compiling $1 test program" 708972b676d7Smrgfi 709072b676d7Smrg 7091e35772b2Smrg$RM -f confest.$objext 709274c14cd6SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 709372b676d7Smrg 7094e35772b2Smrg# PORTME: override above test on systems where it is broken 7095e35772b2Smrgm4_if([$1], [CXX], 7096e35772b2Smrg[case $host_os in 7097e35772b2Smrginterix[[3-9]]*) 7098e35772b2Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7099e35772b2Smrg # hack all around it, let's just trust "g++" to DTRT. 7100e35772b2Smrg _LT_TAGVAR(predep_objects,$1)= 7101e35772b2Smrg _LT_TAGVAR(postdep_objects,$1)= 7102e35772b2Smrg _LT_TAGVAR(postdeps,$1)= 7103e35772b2Smrg ;; 710472b676d7Smrg 7105e35772b2Smrglinux*) 7106e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 7107e35772b2Smrg *Sun\ C*) 7108e35772b2Smrg # Sun C++ 5.9 710972b676d7Smrg 7110e35772b2Smrg # The more standards-conforming stlport4 library is 7111e35772b2Smrg # incompatible with the Cstd library. Avoid specifying 7112e35772b2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7113e35772b2Smrg # -library=stlport4 depends on it. 7114e35772b2Smrg case " $CXX $CXXFLAGS " in 7115e35772b2Smrg *" -library=stlport4 "*) 7116e35772b2Smrg solaris_use_stlport4=yes 7117e35772b2Smrg ;; 7118e35772b2Smrg esac 711972b676d7Smrg 7120e35772b2Smrg if test "$solaris_use_stlport4" != yes; then 7121e35772b2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7122e35772b2Smrg fi 7123e35772b2Smrg ;; 7124e35772b2Smrg esac 712572b676d7Smrg ;; 7126e35772b2Smrg 712772b676d7Smrgsolaris*) 7128e35772b2Smrg case $cc_basename in 712974c14cd6Smrg CC* | sunCC*) 7130e35772b2Smrg # The more standards-conforming stlport4 library is 7131e35772b2Smrg # incompatible with the Cstd library. Avoid specifying 7132e35772b2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7133e35772b2Smrg # -library=stlport4 depends on it. 7134e35772b2Smrg case " $CXX $CXXFLAGS " in 7135e35772b2Smrg *" -library=stlport4 "*) 7136e35772b2Smrg solaris_use_stlport4=yes 7137e35772b2Smrg ;; 7138e35772b2Smrg esac 713972b676d7Smrg 7140e35772b2Smrg # Adding this requires a known-good setup of shared libraries for 7141e35772b2Smrg # Sun compiler versions before 5.6, else PIC objects from an old 7142e35772b2Smrg # archive will be linked into the output, leading to subtle bugs. 7143e35772b2Smrg if test "$solaris_use_stlport4" != yes; then 7144e35772b2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7145e35772b2Smrg fi 7146e35772b2Smrg ;; 7147e35772b2Smrg esac 714872b676d7Smrg ;; 714972b676d7Smrgesac 7150e35772b2Smrg]) 715172b676d7Smrg 7152e35772b2Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7153e35772b2Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 715472b676d7Smrgesac 7155e35772b2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7156e35772b2Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7157e35772b2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7158e35772b2Smrgfi 7159e35772b2Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7160e35772b2Smrg [The directories searched by this compiler when creating a shared library]) 7161e35772b2Smrg_LT_TAGDECL([], [predep_objects], [1], 7162e35772b2Smrg [Dependencies to place before and after the objects being linked to 7163e35772b2Smrg create a shared library]) 7164e35772b2Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7165e35772b2Smrg_LT_TAGDECL([], [predeps], [1]) 7166e35772b2Smrg_LT_TAGDECL([], [postdeps], [1]) 7167e35772b2Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7168e35772b2Smrg [The library search path used internally by the compiler when linking 7169e35772b2Smrg a shared library]) 7170e35772b2Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7171e35772b2Smrg 7172e35772b2Smrg 7173e35772b2Smrg# _LT_LANG_F77_CONFIG([TAG]) 7174e35772b2Smrg# -------------------------- 7175e35772b2Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7176e35772b2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7177e35772b2Smrg# to write the compiler configuration to `libtool'. 7178e35772b2Smrgm4_defun([_LT_LANG_F77_CONFIG], 717974c14cd6Smrg[AC_LANG_PUSH(Fortran 77) 718074c14cd6Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 718174c14cd6Smrg _lt_disable_F77=yes 718274c14cd6Smrgfi 718372b676d7Smrg 7184e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7185e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7186e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7187e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7188e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7189e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7190e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7191e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7192e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7193e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7194e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7195e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7196e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 7197e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7198e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7199e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 720074c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 720174c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7202e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7203e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7204e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 720572b676d7Smrg 7206e35772b2Smrg# Source file extension for f77 test sources. 7207e35772b2Smrgac_ext=f 720872b676d7Smrg 7209e35772b2Smrg# Object file extension for compiled f77 test sources. 7210e35772b2Smrgobjext=o 7211e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 7212e35772b2Smrg 7213e35772b2Smrg# No sense in running all these tests if we already determined that 7214e35772b2Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7215e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 7216e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 7217e35772b2Smrgif test "$_lt_disable_F77" != yes; then 7218e35772b2Smrg # Code to be used in simple compile tests 7219e35772b2Smrg lt_simple_compile_test_code="\ 7220e35772b2Smrg subroutine t 7221e35772b2Smrg return 7222e35772b2Smrg end 7223e35772b2Smrg" 722472b676d7Smrg 7225e35772b2Smrg # Code to be used in simple link tests 7226e35772b2Smrg lt_simple_link_test_code="\ 7227e35772b2Smrg program t 7228e35772b2Smrg end 7229e35772b2Smrg" 723072b676d7Smrg 7231e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7232e35772b2Smrg _LT_TAG_COMPILER 723372b676d7Smrg 7234e35772b2Smrg # save warnings/boilerplate of simple test code 7235e35772b2Smrg _LT_COMPILER_BOILERPLATE 7236e35772b2Smrg _LT_LINKER_BOILERPLATE 723772b676d7Smrg 7238e35772b2Smrg # Allow CC to be a program name with arguments. 7239e35772b2Smrg lt_save_CC="$CC" 7240e35772b2Smrg lt_save_GCC=$GCC 724174c14cd6Smrg lt_save_CFLAGS=$CFLAGS 7242e35772b2Smrg CC=${F77-"f77"} 724374c14cd6Smrg CFLAGS=$FFLAGS 7244e35772b2Smrg compiler=$CC 7245e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 7246e35772b2Smrg _LT_CC_BASENAME([$compiler]) 7247e35772b2Smrg GCC=$G77 7248e35772b2Smrg if test -n "$compiler"; then 7249e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7250e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 725172b676d7Smrg 7252e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7253e35772b2Smrg test "$can_build_shared" = "no" && enable_shared=no 7254e35772b2Smrg 7255e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7256e35772b2Smrg # are all built from PIC. 7257e35772b2Smrg case $host_os in 7258e35772b2Smrg aix3*) 7259e35772b2Smrg test "$enable_shared" = yes && enable_static=no 7260e35772b2Smrg if test -n "$RANLIB"; then 7261e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7262e35772b2Smrg postinstall_cmds='$RANLIB $lib' 7263e35772b2Smrg fi 7264e35772b2Smrg ;; 7265e35772b2Smrg aix[[4-9]]*) 7266e35772b2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7267e35772b2Smrg test "$enable_shared" = yes && enable_static=no 726872b676d7Smrg fi 7269e35772b2Smrg ;; 7270e35772b2Smrg esac 7271e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 7272e35772b2Smrg 7273e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 7274e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 7275e35772b2Smrg test "$enable_shared" = yes || enable_static=yes 7276e35772b2Smrg AC_MSG_RESULT([$enable_static]) 7277e35772b2Smrg 7278e35772b2Smrg _LT_TAGVAR(GCC, $1)="$G77" 7279e35772b2Smrg _LT_TAGVAR(LD, $1)="$LD" 7280e35772b2Smrg 7281e35772b2Smrg ## CAVEAT EMPTOR: 7282e35772b2Smrg ## There is no encapsulation within the following macros, do not change 7283e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 7284e35772b2Smrg ## what you are doing... 7285e35772b2Smrg _LT_COMPILER_PIC($1) 7286e35772b2Smrg _LT_COMPILER_C_O($1) 7287e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 7288e35772b2Smrg _LT_LINKER_SHLIBS($1) 7289e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 7290e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7291e35772b2Smrg 7292e35772b2Smrg _LT_CONFIG($1) 7293e35772b2Smrg fi # test -n "$compiler" 7294e35772b2Smrg 7295e35772b2Smrg GCC=$lt_save_GCC 7296e35772b2Smrg CC="$lt_save_CC" 729774c14cd6Smrg CFLAGS="$lt_save_CFLAGS" 7298e35772b2Smrgfi # test "$_lt_disable_F77" != yes 729972b676d7Smrg 7300e35772b2SmrgAC_LANG_POP 7301e35772b2Smrg])# _LT_LANG_F77_CONFIG 7302e35772b2Smrg 7303e35772b2Smrg 7304e35772b2Smrg# _LT_LANG_FC_CONFIG([TAG]) 7305e35772b2Smrg# ------------------------- 7306e35772b2Smrg# Ensure that the configuration variables for a Fortran compiler are 7307e35772b2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7308e35772b2Smrg# to write the compiler configuration to `libtool'. 7309e35772b2Smrgm4_defun([_LT_LANG_FC_CONFIG], 731074c14cd6Smrg[AC_LANG_PUSH(Fortran) 731174c14cd6Smrg 731274c14cd6Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 731374c14cd6Smrg _lt_disable_FC=yes 731474c14cd6Smrgfi 7315e35772b2Smrg 7316e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7317e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7318e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7319e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7320e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7321e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7322e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7323e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7324e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7325e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7326e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7327e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7328e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 7329e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7330e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7331e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 733274c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 733374c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7334e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7335e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7336e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7337e35772b2Smrg 7338e35772b2Smrg# Source file extension for fc test sources. 7339e35772b2Smrgac_ext=${ac_fc_srcext-f} 7340e35772b2Smrg 7341e35772b2Smrg# Object file extension for compiled fc test sources. 7342e35772b2Smrgobjext=o 7343e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 7344e35772b2Smrg 7345e35772b2Smrg# No sense in running all these tests if we already determined that 7346e35772b2Smrg# the FC compiler isn't working. Some variables (like enable_shared) 7347e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 7348e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 7349e35772b2Smrgif test "$_lt_disable_FC" != yes; then 7350e35772b2Smrg # Code to be used in simple compile tests 7351e35772b2Smrg lt_simple_compile_test_code="\ 7352e35772b2Smrg subroutine t 7353e35772b2Smrg return 7354e35772b2Smrg end 7355e35772b2Smrg" 7356e35772b2Smrg 7357e35772b2Smrg # Code to be used in simple link tests 7358e35772b2Smrg lt_simple_link_test_code="\ 7359e35772b2Smrg program t 7360e35772b2Smrg end 7361e35772b2Smrg" 7362e35772b2Smrg 7363e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7364e35772b2Smrg _LT_TAG_COMPILER 736572b676d7Smrg 7366e35772b2Smrg # save warnings/boilerplate of simple test code 7367e35772b2Smrg _LT_COMPILER_BOILERPLATE 7368e35772b2Smrg _LT_LINKER_BOILERPLATE 7369e35772b2Smrg 7370e35772b2Smrg # Allow CC to be a program name with arguments. 7371e35772b2Smrg lt_save_CC="$CC" 7372e35772b2Smrg lt_save_GCC=$GCC 737374c14cd6Smrg lt_save_CFLAGS=$CFLAGS 7374e35772b2Smrg CC=${FC-"f95"} 737574c14cd6Smrg CFLAGS=$FCFLAGS 7376e35772b2Smrg compiler=$CC 7377e35772b2Smrg GCC=$ac_cv_fc_compiler_gnu 7378e35772b2Smrg 7379e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 7380e35772b2Smrg _LT_CC_BASENAME([$compiler]) 7381e35772b2Smrg 7382e35772b2Smrg if test -n "$compiler"; then 7383e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7384e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 7385e35772b2Smrg 7386e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7387e35772b2Smrg test "$can_build_shared" = "no" && enable_shared=no 7388e35772b2Smrg 7389e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7390e35772b2Smrg # are all built from PIC. 739172b676d7Smrg case $host_os in 7392e35772b2Smrg aix3*) 7393e35772b2Smrg test "$enable_shared" = yes && enable_static=no 7394e35772b2Smrg if test -n "$RANLIB"; then 7395e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7396e35772b2Smrg postinstall_cmds='$RANLIB $lib' 7397e35772b2Smrg fi 7398e35772b2Smrg ;; 73991fd23544Smrg aix[[4-9]]*) 7400e35772b2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7401e35772b2Smrg test "$enable_shared" = yes && enable_static=no 740272b676d7Smrg fi 7403e35772b2Smrg ;; 740472b676d7Smrg esac 7405e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 7406e35772b2Smrg 7407e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 7408e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 7409e35772b2Smrg test "$enable_shared" = yes || enable_static=yes 7410e35772b2Smrg AC_MSG_RESULT([$enable_static]) 7411e35772b2Smrg 7412e35772b2Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7413e35772b2Smrg _LT_TAGVAR(LD, $1)="$LD" 7414e35772b2Smrg 7415e35772b2Smrg ## CAVEAT EMPTOR: 7416e35772b2Smrg ## There is no encapsulation within the following macros, do not change 7417e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 7418e35772b2Smrg ## what you are doing... 7419e35772b2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7420e35772b2Smrg _LT_COMPILER_PIC($1) 7421e35772b2Smrg _LT_COMPILER_C_O($1) 7422e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 7423e35772b2Smrg _LT_LINKER_SHLIBS($1) 7424e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 7425e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7426e35772b2Smrg 7427e35772b2Smrg _LT_CONFIG($1) 7428e35772b2Smrg fi # test -n "$compiler" 7429e35772b2Smrg 7430e35772b2Smrg GCC=$lt_save_GCC 743174c14cd6Smrg CC=$lt_save_CC 743274c14cd6Smrg CFLAGS=$lt_save_CFLAGS 7433e35772b2Smrgfi # test "$_lt_disable_FC" != yes 743472b676d7Smrg 7435e35772b2SmrgAC_LANG_POP 7436e35772b2Smrg])# _LT_LANG_FC_CONFIG 743772b676d7Smrg 743872b676d7Smrg 7439e35772b2Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7440e35772b2Smrg# -------------------------- 7441e35772b2Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7442e35772b2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7443e35772b2Smrg# to write the compiler configuration to `libtool'. 7444e35772b2Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7445e35772b2Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7446e35772b2SmrgAC_LANG_SAVE 744772b676d7Smrg 7448e35772b2Smrg# Source file extension for Java test sources. 7449e35772b2Smrgac_ext=java 745072b676d7Smrg 7451e35772b2Smrg# Object file extension for compiled Java test sources. 7452e35772b2Smrgobjext=o 7453e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 745472b676d7Smrg 7455e35772b2Smrg# Code to be used in simple compile tests 7456e35772b2Smrglt_simple_compile_test_code="class foo {}" 745772b676d7Smrg 7458e35772b2Smrg# Code to be used in simple link tests 7459e35772b2Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 746072b676d7Smrg 7461e35772b2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7462e35772b2Smrg_LT_TAG_COMPILER 746372b676d7Smrg 7464e35772b2Smrg# save warnings/boilerplate of simple test code 7465e35772b2Smrg_LT_COMPILER_BOILERPLATE 7466e35772b2Smrg_LT_LINKER_BOILERPLATE 746772b676d7Smrg 7468e35772b2Smrg# Allow CC to be a program name with arguments. 746974c14cd6Smrglt_save_CC=$CC 747074c14cd6Smrglt_save_CFLAGS=$CFLAGS 7471e35772b2Smrglt_save_GCC=$GCC 7472e35772b2SmrgGCC=yes 7473e35772b2SmrgCC=${GCJ-"gcj"} 747474c14cd6SmrgCFLAGS=$GCJFLAGS 7475e35772b2Smrgcompiler=$CC 7476e35772b2Smrg_LT_TAGVAR(compiler, $1)=$CC 7477e35772b2Smrg_LT_TAGVAR(LD, $1)="$LD" 7478e35772b2Smrg_LT_CC_BASENAME([$compiler]) 747972b676d7Smrg 7480e35772b2Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7481e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 748272b676d7Smrg 7483e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 748474c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 748574c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 748672b676d7Smrg 7487e35772b2Smrgif test -n "$compiler"; then 7488e35772b2Smrg _LT_COMPILER_NO_RTTI($1) 7489e35772b2Smrg _LT_COMPILER_PIC($1) 7490e35772b2Smrg _LT_COMPILER_C_O($1) 7491e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 7492e35772b2Smrg _LT_LINKER_SHLIBS($1) 7493e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 749472b676d7Smrg 7495e35772b2Smrg _LT_CONFIG($1) 7496e35772b2Smrgfi 749772b676d7Smrg 7498e35772b2SmrgAC_LANG_RESTORE 749972b676d7Smrg 7500e35772b2SmrgGCC=$lt_save_GCC 750174c14cd6SmrgCC=$lt_save_CC 750274c14cd6SmrgCFLAGS=$lt_save_CFLAGS 7503e35772b2Smrg])# _LT_LANG_GCJ_CONFIG 750472b676d7Smrg 75051fd23544Smrg 750674c14cd6Smrg# _LT_LANG_GO_CONFIG([TAG]) 750774c14cd6Smrg# -------------------------- 750874c14cd6Smrg# Ensure that the configuration variables for the GNU Go compiler 7509e35772b2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7510e35772b2Smrg# to write the compiler configuration to `libtool'. 751174c14cd6Smrgm4_defun([_LT_LANG_GO_CONFIG], 751274c14cd6Smrg[AC_REQUIRE([LT_PROG_GO])dnl 7513e35772b2SmrgAC_LANG_SAVE 7514e35772b2Smrg 751574c14cd6Smrg# Source file extension for Go test sources. 751674c14cd6Smrgac_ext=go 7517e35772b2Smrg 751874c14cd6Smrg# Object file extension for compiled Go test sources. 7519e35772b2Smrgobjext=o 7520e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 7521e35772b2Smrg 7522e35772b2Smrg# Code to be used in simple compile tests 752374c14cd6Smrglt_simple_compile_test_code="package main; func main() { }" 7524e35772b2Smrg 7525e35772b2Smrg# Code to be used in simple link tests 752674c14cd6Smrglt_simple_link_test_code='package main; func main() { }' 7527e35772b2Smrg 7528e35772b2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7529e35772b2Smrg_LT_TAG_COMPILER 7530e35772b2Smrg 7531e35772b2Smrg# save warnings/boilerplate of simple test code 7532e35772b2Smrg_LT_COMPILER_BOILERPLATE 7533e35772b2Smrg_LT_LINKER_BOILERPLATE 7534e35772b2Smrg 7535e35772b2Smrg# Allow CC to be a program name with arguments. 753674c14cd6Smrglt_save_CC=$CC 753774c14cd6Smrglt_save_CFLAGS=$CFLAGS 7538e35772b2Smrglt_save_GCC=$GCC 753974c14cd6SmrgGCC=yes 754074c14cd6SmrgCC=${GOC-"gccgo"} 754174c14cd6SmrgCFLAGS=$GOFLAGS 7542e35772b2Smrgcompiler=$CC 7543e35772b2Smrg_LT_TAGVAR(compiler, $1)=$CC 754474c14cd6Smrg_LT_TAGVAR(LD, $1)="$LD" 7545e35772b2Smrg_LT_CC_BASENAME([$compiler]) 754674c14cd6Smrg 754774c14cd6Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 754874c14cd6Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 754974c14cd6Smrg 755074c14cd6Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 755174c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 755274c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7553e35772b2Smrg 7554e35772b2Smrgif test -n "$compiler"; then 755574c14cd6Smrg _LT_COMPILER_NO_RTTI($1) 755674c14cd6Smrg _LT_COMPILER_PIC($1) 755774c14cd6Smrg _LT_COMPILER_C_O($1) 755874c14cd6Smrg _LT_COMPILER_FILE_LOCKS($1) 755974c14cd6Smrg _LT_LINKER_SHLIBS($1) 756074c14cd6Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 756174c14cd6Smrg 7562e35772b2Smrg _LT_CONFIG($1) 7563e35772b2Smrgfi 7564e35772b2Smrg 7565e35772b2SmrgAC_LANG_RESTORE 7566e35772b2Smrg 756774c14cd6SmrgGCC=$lt_save_GCC 756874c14cd6SmrgCC=$lt_save_CC 756974c14cd6SmrgCFLAGS=$lt_save_CFLAGS 757074c14cd6Smrg])# _LT_LANG_GO_CONFIG 7571e35772b2Smrg 757274c14cd6Smrg 757374c14cd6Smrg# _LT_LANG_RC_CONFIG([TAG]) 757474c14cd6Smrg# ------------------------- 757574c14cd6Smrg# Ensure that the configuration variables for the Windows resource compiler 757674c14cd6Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 757774c14cd6Smrg# to write the compiler configuration to `libtool'. 757874c14cd6Smrgm4_defun([_LT_LANG_RC_CONFIG], 757974c14cd6Smrg[AC_REQUIRE([LT_PROG_RC])dnl 758074c14cd6SmrgAC_LANG_SAVE 758174c14cd6Smrg 758274c14cd6Smrg# Source file extension for RC test sources. 758374c14cd6Smrgac_ext=rc 758474c14cd6Smrg 758574c14cd6Smrg# Object file extension for compiled RC test sources. 758674c14cd6Smrgobjext=o 758774c14cd6Smrg_LT_TAGVAR(objext, $1)=$objext 758874c14cd6Smrg 758974c14cd6Smrg# Code to be used in simple compile tests 759074c14cd6Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 759174c14cd6Smrg 759274c14cd6Smrg# Code to be used in simple link tests 759374c14cd6Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 759474c14cd6Smrg 759574c14cd6Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 759674c14cd6Smrg_LT_TAG_COMPILER 759774c14cd6Smrg 759874c14cd6Smrg# save warnings/boilerplate of simple test code 759974c14cd6Smrg_LT_COMPILER_BOILERPLATE 760074c14cd6Smrg_LT_LINKER_BOILERPLATE 760174c14cd6Smrg 760274c14cd6Smrg# Allow CC to be a program name with arguments. 760374c14cd6Smrglt_save_CC="$CC" 760474c14cd6Smrglt_save_CFLAGS=$CFLAGS 760574c14cd6Smrglt_save_GCC=$GCC 760674c14cd6SmrgGCC= 760774c14cd6SmrgCC=${RC-"windres"} 760874c14cd6SmrgCFLAGS= 760974c14cd6Smrgcompiler=$CC 761074c14cd6Smrg_LT_TAGVAR(compiler, $1)=$CC 761174c14cd6Smrg_LT_CC_BASENAME([$compiler]) 761274c14cd6Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 761374c14cd6Smrg 761474c14cd6Smrgif test -n "$compiler"; then 761574c14cd6Smrg : 761674c14cd6Smrg _LT_CONFIG($1) 761774c14cd6Smrgfi 761874c14cd6Smrg 761974c14cd6SmrgGCC=$lt_save_GCC 762074c14cd6SmrgAC_LANG_RESTORE 762174c14cd6SmrgCC=$lt_save_CC 762274c14cd6SmrgCFLAGS=$lt_save_CFLAGS 762374c14cd6Smrg])# _LT_LANG_RC_CONFIG 762474c14cd6Smrg 762574c14cd6Smrg 762674c14cd6Smrg# LT_PROG_GCJ 762774c14cd6Smrg# ----------- 762874c14cd6SmrgAC_DEFUN([LT_PROG_GCJ], 762974c14cd6Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7630e35772b2Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7631e35772b2Smrg [AC_CHECK_TOOL(GCJ, gcj,) 7632e35772b2Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7633e35772b2Smrg AC_SUBST(GCJFLAGS)])])[]dnl 7634e35772b2Smrg]) 7635e35772b2Smrg 7636e35772b2Smrg# Old name: 7637e35772b2SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7638e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 7639e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7640e35772b2Smrg 7641e35772b2Smrg 764274c14cd6Smrg# LT_PROG_GO 764374c14cd6Smrg# ---------- 764474c14cd6SmrgAC_DEFUN([LT_PROG_GO], 764574c14cd6Smrg[AC_CHECK_TOOL(GOC, gccgo,) 764674c14cd6Smrg]) 764774c14cd6Smrg 764874c14cd6Smrg 7649e35772b2Smrg# LT_PROG_RC 7650e35772b2Smrg# ---------- 7651e35772b2SmrgAC_DEFUN([LT_PROG_RC], 7652e35772b2Smrg[AC_CHECK_TOOL(RC, windres,) 7653e35772b2Smrg]) 7654e35772b2Smrg 7655e35772b2Smrg# Old name: 7656e35772b2SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7657e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 7658e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7659e35772b2Smrg 7660e35772b2Smrg 7661e35772b2Smrg# _LT_DECL_EGREP 7662e35772b2Smrg# -------------- 7663e35772b2Smrg# If we don't have a new enough Autoconf to choose the best grep 7664e35772b2Smrg# available, choose the one first in the user's PATH. 7665e35772b2Smrgm4_defun([_LT_DECL_EGREP], 7666e35772b2Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7667e35772b2SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7668e35772b2Smrgtest -z "$GREP" && GREP=grep 7669e35772b2Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7670e35772b2Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7671e35772b2Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7672e35772b2Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7673e35772b2SmrgAC_SUBST([GREP]) 7674e35772b2Smrg]) 7675e35772b2Smrg 7676e35772b2Smrg 7677e35772b2Smrg# _LT_DECL_OBJDUMP 7678e35772b2Smrg# -------------- 7679e35772b2Smrg# If we don't have a new enough Autoconf to choose the best objdump 7680e35772b2Smrg# available, choose the one first in the user's PATH. 7681e35772b2Smrgm4_defun([_LT_DECL_OBJDUMP], 7682e35772b2Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7683e35772b2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7684e35772b2Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7685e35772b2SmrgAC_SUBST([OBJDUMP]) 7686e35772b2Smrg]) 7687e35772b2Smrg 768874c14cd6Smrg# _LT_DECL_DLLTOOL 768974c14cd6Smrg# ---------------- 769074c14cd6Smrg# Ensure DLLTOOL variable is set. 769174c14cd6Smrgm4_defun([_LT_DECL_DLLTOOL], 769274c14cd6Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 769374c14cd6Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 769474c14cd6Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 769574c14cd6SmrgAC_SUBST([DLLTOOL]) 769674c14cd6Smrg]) 7697e35772b2Smrg 7698e35772b2Smrg# _LT_DECL_SED 7699e35772b2Smrg# ------------ 7700e35772b2Smrg# Check for a fully-functional sed program, that truncates 7701e35772b2Smrg# as few characters as possible. Prefer GNU sed if found. 7702e35772b2Smrgm4_defun([_LT_DECL_SED], 7703e35772b2Smrg[AC_PROG_SED 7704e35772b2Smrgtest -z "$SED" && SED=sed 7705e35772b2SmrgXsed="$SED -e 1s/^X//" 7706e35772b2Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7707e35772b2Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7708e35772b2Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7709e35772b2Smrg])# _LT_DECL_SED 7710e35772b2Smrg 7711e35772b2Smrgm4_ifndef([AC_PROG_SED], [ 7712e35772b2Smrg# NOTE: This macro has been submitted for inclusion into # 7713e35772b2Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7714e35772b2Smrg# a released version of Autoconf we should remove this # 7715e35772b2Smrg# macro and use it instead. # 7716e35772b2Smrg 7717e35772b2Smrgm4_defun([AC_PROG_SED], 7718e35772b2Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7719e35772b2SmrgAC_CACHE_VAL(lt_cv_path_SED, 7720e35772b2Smrg[# Loop through the user's path and test for sed and gsed. 7721e35772b2Smrg# Then use that list of sed's as ones to test for truncation. 7722e35772b2Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7723e35772b2Smrgfor as_dir in $PATH 7724e35772b2Smrgdo 7725e35772b2Smrg IFS=$as_save_IFS 7726e35772b2Smrg test -z "$as_dir" && as_dir=. 7727e35772b2Smrg for lt_ac_prog in sed gsed; do 7728e35772b2Smrg for ac_exec_ext in '' $ac_executable_extensions; do 7729e35772b2Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7730e35772b2Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7731e35772b2Smrg fi 7732e35772b2Smrg done 7733e35772b2Smrg done 7734e35772b2Smrgdone 7735e35772b2SmrgIFS=$as_save_IFS 7736e35772b2Smrglt_ac_max=0 7737e35772b2Smrglt_ac_count=0 7738e35772b2Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7739e35772b2Smrg# along with /bin/sed that truncates output. 7740e35772b2Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7741e35772b2Smrg test ! -f $lt_ac_sed && continue 7742e35772b2Smrg cat /dev/null > conftest.in 7743e35772b2Smrg lt_ac_count=0 7744e35772b2Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7745e35772b2Smrg # Check for GNU sed and select it if it is found. 7746e35772b2Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7747e35772b2Smrg lt_cv_path_SED=$lt_ac_sed 7748e35772b2Smrg break 7749e35772b2Smrg fi 7750e35772b2Smrg while true; do 7751e35772b2Smrg cat conftest.in conftest.in >conftest.tmp 7752e35772b2Smrg mv conftest.tmp conftest.in 7753e35772b2Smrg cp conftest.in conftest.nl 7754e35772b2Smrg echo >>conftest.nl 7755e35772b2Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7756e35772b2Smrg cmp -s conftest.out conftest.nl || break 7757e35772b2Smrg # 10000 chars as input seems more than enough 7758e35772b2Smrg test $lt_ac_count -gt 10 && break 7759e35772b2Smrg lt_ac_count=`expr $lt_ac_count + 1` 7760e35772b2Smrg if test $lt_ac_count -gt $lt_ac_max; then 7761e35772b2Smrg lt_ac_max=$lt_ac_count 7762e35772b2Smrg lt_cv_path_SED=$lt_ac_sed 7763e35772b2Smrg fi 7764e35772b2Smrg done 7765e35772b2Smrgdone 7766e35772b2Smrg]) 7767e35772b2SmrgSED=$lt_cv_path_SED 7768e35772b2SmrgAC_SUBST([SED]) 7769e35772b2SmrgAC_MSG_RESULT([$SED]) 7770e35772b2Smrg])#AC_PROG_SED 7771e35772b2Smrg])#m4_ifndef 7772e35772b2Smrg 7773e35772b2Smrg# Old name: 7774e35772b2SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7775e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 7776e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7777e35772b2Smrg 7778e35772b2Smrg 7779e35772b2Smrg# _LT_CHECK_SHELL_FEATURES 7780e35772b2Smrg# ------------------------ 7781e35772b2Smrg# Find out whether the shell is Bourne or XSI compatible, 7782e35772b2Smrg# or has some other useful features. 7783e35772b2Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7784e35772b2Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7785e35772b2Smrg# Try some XSI features 7786e35772b2Smrgxsi_shell=no 7787e35772b2Smrg( _lt_dummy="a/b/c" 778874c14cd6Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 778974c14cd6Smrg = c,a/b,b/c, \ 7790e35772b2Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7791e35772b2Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7792e35772b2Smrg && xsi_shell=yes 7793e35772b2SmrgAC_MSG_RESULT([$xsi_shell]) 7794e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7795e35772b2Smrg 7796e35772b2SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7797e35772b2Smrglt_shell_append=no 7798e35772b2Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7799e35772b2Smrg >/dev/null 2>&1 \ 7800e35772b2Smrg && lt_shell_append=yes 7801e35772b2SmrgAC_MSG_RESULT([$lt_shell_append]) 7802e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7803e35772b2Smrg 7804e35772b2Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7805e35772b2Smrg lt_unset=unset 7806e35772b2Smrgelse 7807e35772b2Smrg lt_unset=false 7808e35772b2Smrgfi 7809e35772b2Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7810e35772b2Smrg 7811e35772b2Smrg# test EBCDIC or ASCII 7812e35772b2Smrgcase `echo X|tr X '\101'` in 7813e35772b2Smrg A) # ASCII based system 7814e35772b2Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7815e35772b2Smrg lt_SP2NL='tr \040 \012' 7816e35772b2Smrg lt_NL2SP='tr \015\012 \040\040' 7817e35772b2Smrg ;; 7818e35772b2Smrg *) # EBCDIC based system 7819e35772b2Smrg lt_SP2NL='tr \100 \n' 7820e35772b2Smrg lt_NL2SP='tr \r\n \100\100' 7821e35772b2Smrg ;; 7822e35772b2Smrgesac 7823e35772b2Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7824e35772b2Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7825e35772b2Smrg])# _LT_CHECK_SHELL_FEATURES 7826e35772b2Smrg 7827e35772b2Smrg 782874c14cd6Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 782974c14cd6Smrg# ------------------------------------------------------ 783074c14cd6Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 783174c14cd6Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 783274c14cd6Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 783374c14cd6Smrg[dnl { 783474c14cd6Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 783574c14cd6Smrg$1 ()\ 783674c14cd6Smrg{\ 783774c14cd6Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 783874c14cd6Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 783974c14cd6Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 784074c14cd6Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 784174c14cd6Smrgtest 0 -eq $? || _lt_function_replace_fail=: 784274c14cd6Smrg]) 784372b676d7Smrg 784472b676d7Smrg 784574c14cd6Smrg# _LT_PROG_REPLACE_SHELLFNS 784674c14cd6Smrg# ------------------------- 784774c14cd6Smrg# Replace existing portable implementations of several shell functions with 784874c14cd6Smrg# equivalent extended shell implementations where those features are available.. 784974c14cd6Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 785074c14cd6Smrg[if test x"$xsi_shell" = xyes; then 785174c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 785274c14cd6Smrg case ${1} in 785374c14cd6Smrg */*) func_dirname_result="${1%/*}${2}" ;; 785474c14cd6Smrg * ) func_dirname_result="${3}" ;; 785574c14cd6Smrg esac]) 785674c14cd6Smrg 785774c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 785874c14cd6Smrg func_basename_result="${1##*/}"]) 785974c14cd6Smrg 786074c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 786174c14cd6Smrg case ${1} in 786274c14cd6Smrg */*) func_dirname_result="${1%/*}${2}" ;; 786374c14cd6Smrg * ) func_dirname_result="${3}" ;; 786474c14cd6Smrg esac 786574c14cd6Smrg func_basename_result="${1##*/}"]) 786672b676d7Smrg 786774c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 786874c14cd6Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 786974c14cd6Smrg # positional parameters, so assign one to ordinary parameter first. 787074c14cd6Smrg func_stripname_result=${3} 787174c14cd6Smrg func_stripname_result=${func_stripname_result#"${1}"} 787274c14cd6Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 787372b676d7Smrg 787474c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 787574c14cd6Smrg func_split_long_opt_name=${1%%=*} 787674c14cd6Smrg func_split_long_opt_arg=${1#*=}]) 7877e35772b2Smrg 787874c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 787974c14cd6Smrg func_split_short_opt_arg=${1#??} 788074c14cd6Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 788172b676d7Smrg 788274c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 788374c14cd6Smrg case ${1} in 788474c14cd6Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 788574c14cd6Smrg *) func_lo2o_result=${1} ;; 788674c14cd6Smrg esac]) 788772b676d7Smrg 788874c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 788972b676d7Smrg 789074c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 789172b676d7Smrg 789274c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 789374c14cd6Smrgfi 789472b676d7Smrg 789574c14cd6Smrgif test x"$lt_shell_append" = xyes; then 789674c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 789772b676d7Smrg 789874c14cd6Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 789974c14cd6Smrg func_quote_for_eval "${2}" 790074c14cd6Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 790174c14cd6Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 790272b676d7Smrg 790374c14cd6Smrg # Save a `func_append' function call where possible by direct use of '+=' 790474c14cd6Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 790574c14cd6Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 790674c14cd6Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 790774c14cd6Smrg test 0 -eq $? || _lt_function_replace_fail=: 790874c14cd6Smrgelse 790974c14cd6Smrg # Save a `func_append' function call even when '+=' is not available 791074c14cd6Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 791174c14cd6Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 791274c14cd6Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 791374c14cd6Smrg test 0 -eq $? || _lt_function_replace_fail=: 791474c14cd6Smrgfi 791572b676d7Smrg 791674c14cd6Smrgif test x"$_lt_function_replace_fail" = x":"; then 791774c14cd6Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 791874c14cd6Smrgfi 791974c14cd6Smrg]) 792072b676d7Smrg 792174c14cd6Smrg# _LT_PATH_CONVERSION_FUNCTIONS 792274c14cd6Smrg# ----------------------------- 792374c14cd6Smrg# Determine which file name conversion functions should be used by 792474c14cd6Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 792574c14cd6Smrg# for certain cross-compile configurations and native mingw. 792674c14cd6Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 792774c14cd6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 792874c14cd6SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 792974c14cd6SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 793074c14cd6SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 793174c14cd6Smrg[case $host in 793274c14cd6Smrg *-*-mingw* ) 793374c14cd6Smrg case $build in 793474c14cd6Smrg *-*-mingw* ) # actually msys 793574c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 793674c14cd6Smrg ;; 793774c14cd6Smrg *-*-cygwin* ) 793874c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 793974c14cd6Smrg ;; 794074c14cd6Smrg * ) # otherwise, assume *nix 794174c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 794274c14cd6Smrg ;; 794374c14cd6Smrg esac 7944e35772b2Smrg ;; 794574c14cd6Smrg *-*-cygwin* ) 794674c14cd6Smrg case $build in 794774c14cd6Smrg *-*-mingw* ) # actually msys 794874c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 794974c14cd6Smrg ;; 795074c14cd6Smrg *-*-cygwin* ) 795174c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 795274c14cd6Smrg ;; 795374c14cd6Smrg * ) # otherwise, assume *nix 795474c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 795574c14cd6Smrg ;; 795674c14cd6Smrg esac 7957e35772b2Smrg ;; 795874c14cd6Smrg * ) # unhandled hosts (and "normal" native builds) 795974c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 796074c14cd6Smrg ;; 796174c14cd6Smrgesac 7962e35772b2Smrg]) 796374c14cd6Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 796474c14cd6SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 796574c14cd6Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 796674c14cd6Smrg [0], [convert $build file names to $host format])dnl 796774c14cd6Smrg 796874c14cd6SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 796974c14cd6SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 797074c14cd6Smrg[#assume ordinary cross tools, or native build. 797174c14cd6Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 797274c14cd6Smrgcase $host in 797374c14cd6Smrg *-*-mingw* ) 797474c14cd6Smrg case $build in 797574c14cd6Smrg *-*-mingw* ) # actually msys 797674c14cd6Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 797774c14cd6Smrg ;; 797874c14cd6Smrg esac 797974c14cd6Smrg ;; 798074c14cd6Smrgesac 798174c14cd6Smrg]) 798274c14cd6Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 798374c14cd6SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 798474c14cd6Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 798574c14cd6Smrg [0], [convert $build files to toolchain format])dnl 798674c14cd6Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 798772b676d7Smrg 7988e35772b2Smrg# Helper functions for option handling. -*- Autoconf -*- 7989e35772b2Smrg# 799074c14cd6Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 799174c14cd6Smrg# Inc. 7992e35772b2Smrg# Written by Gary V. Vaughan, 2004 7993e35772b2Smrg# 7994e35772b2Smrg# This file is free software; the Free Software Foundation gives 7995e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 7996e35772b2Smrg# modifications, as long as this notice is preserved. 799772b676d7Smrg 799874c14cd6Smrg# serial 7 ltoptions.m4 799972b676d7Smrg 8000e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8001e35772b2SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 800272b676d7Smrg 800372b676d7Smrg 8004e35772b2Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8005e35772b2Smrg# ------------------------------------------ 8006e35772b2Smrgm4_define([_LT_MANGLE_OPTION], 8007e35772b2Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 800872b676d7Smrg 800972b676d7Smrg 8010e35772b2Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8011e35772b2Smrg# --------------------------------------- 8012e35772b2Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8013e35772b2Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8014e35772b2Smrg# saved as a flag. 8015e35772b2Smrgm4_define([_LT_SET_OPTION], 8016e35772b2Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8017e35772b2Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8018e35772b2Smrg _LT_MANGLE_DEFUN([$1], [$2]), 8019e35772b2Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 8020e35772b2Smrg]) 8021e35772b2Smrg 8022e35772b2Smrg 8023e35772b2Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8024e35772b2Smrg# ------------------------------------------------------------ 8025e35772b2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8026e35772b2Smrgm4_define([_LT_IF_OPTION], 8027e35772b2Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8028e35772b2Smrg 8029e35772b2Smrg 8030e35772b2Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8031e35772b2Smrg# ------------------------------------------------------- 8032e35772b2Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8033e35772b2Smrg# are set. 8034e35772b2Smrgm4_define([_LT_UNLESS_OPTIONS], 8035e35772b2Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8036e35772b2Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8037e35772b2Smrg [m4_define([$0_found])])])[]dnl 8038e35772b2Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8039e35772b2Smrg])[]dnl 8040e35772b2Smrg]) 8041e35772b2Smrg 804272b676d7Smrg 8043e35772b2Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8044e35772b2Smrg# ---------------------------------------- 8045e35772b2Smrg# OPTION-LIST is a space-separated list of Libtool options associated 8046e35772b2Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8047e35772b2Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8048e35772b2Smrg# the unknown option and exit. 8049e35772b2Smrgm4_defun([_LT_SET_OPTIONS], 8050e35772b2Smrg[# Set options 8051e35772b2Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8052e35772b2Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 8053e35772b2Smrg 8054e35772b2Smrgm4_if([$1],[LT_INIT],[ 8055e35772b2Smrg dnl 8056e35772b2Smrg dnl Simply set some default values (i.e off) if boolean options were not 8057e35772b2Smrg dnl specified: 8058e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8059e35772b2Smrg ]) 8060e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8061e35772b2Smrg ]) 8062e35772b2Smrg dnl 8063e35772b2Smrg dnl If no reference was made to various pairs of opposing options, then 8064e35772b2Smrg dnl we run the default mode handler for the pair. For example, if neither 8065e35772b2Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 8066e35772b2Smrg dnl archives by default: 8067e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8068e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8069e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8070e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8071e35772b2Smrg [_LT_ENABLE_FAST_INSTALL]) 8072e35772b2Smrg ]) 8073e35772b2Smrg])# _LT_SET_OPTIONS 807472b676d7Smrg 807572b676d7Smrg 807672b676d7Smrg 8077e35772b2Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8078e35772b2Smrg# ----------------------------------------- 8079e35772b2Smrgm4_define([_LT_MANGLE_DEFUN], 8080e35772b2Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 808172b676d7Smrg 808272b676d7Smrg 8083e35772b2Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8084e35772b2Smrg# ----------------------------------------------- 8085e35772b2Smrgm4_define([LT_OPTION_DEFINE], 8086e35772b2Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8087e35772b2Smrg])# LT_OPTION_DEFINE 808872b676d7Smrg 808972b676d7Smrg 8090e35772b2Smrg# dlopen 8091e35772b2Smrg# ------ 8092e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8093e35772b2Smrg]) 809472b676d7Smrg 8095e35772b2SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8096e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8097e35772b2SmrgAC_DIAGNOSE([obsolete], 8098e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8099e35772b2Smrgput the `dlopen' option into LT_INIT's first parameter.]) 8100e35772b2Smrg]) 810172b676d7Smrg 8102e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8103e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 810472b676d7Smrg 810572b676d7Smrg 8106e35772b2Smrg# win32-dll 8107e35772b2Smrg# --------- 8108e35772b2Smrg# Declare package support for building win32 dll's. 8109e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8110e35772b2Smrg[enable_win32_dll=yes 811172b676d7Smrg 8112e35772b2Smrgcase $host in 811374c14cd6Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8114e35772b2Smrg AC_CHECK_TOOL(AS, as, false) 8115e35772b2Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8116e35772b2Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8117e35772b2Smrg ;; 8118e35772b2Smrgesac 811972b676d7Smrg 8120e35772b2Smrgtest -z "$AS" && AS=as 812174c14cd6Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 812272b676d7Smrg 8123e35772b2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 812474c14cd6Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 812572b676d7Smrg 8126e35772b2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 812774c14cd6Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8128e35772b2Smrg])# win32-dll 812972b676d7Smrg 8130e35772b2SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8131e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8132e35772b2Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8133e35772b2SmrgAC_DIAGNOSE([obsolete], 8134e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8135e35772b2Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 8136e35772b2Smrg]) 813772b676d7Smrg 8138e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8139e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 814072b676d7Smrg 8141e35772b2Smrg 8142e35772b2Smrg# _LT_ENABLE_SHARED([DEFAULT]) 8143e35772b2Smrg# ---------------------------- 8144e35772b2Smrg# implement the --enable-shared flag, and supports the `shared' and 8145e35772b2Smrg# `disable-shared' LT_INIT options. 8146e35772b2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8147e35772b2Smrgm4_define([_LT_ENABLE_SHARED], 8148e35772b2Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8149e35772b2SmrgAC_ARG_ENABLE([shared], 8150e35772b2Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8151e35772b2Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8152e35772b2Smrg [p=${PACKAGE-default} 8153e35772b2Smrg case $enableval in 8154e35772b2Smrg yes) enable_shared=yes ;; 8155e35772b2Smrg no) enable_shared=no ;; 8156e35772b2Smrg *) 8157e35772b2Smrg enable_shared=no 8158e35772b2Smrg # Look at the argument we got. We use all the common list separators. 8159e35772b2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8160e35772b2Smrg for pkg in $enableval; do 8161e35772b2Smrg IFS="$lt_save_ifs" 8162e35772b2Smrg if test "X$pkg" = "X$p"; then 8163e35772b2Smrg enable_shared=yes 8164e35772b2Smrg fi 8165e35772b2Smrg done 8166e35772b2Smrg IFS="$lt_save_ifs" 816772b676d7Smrg ;; 8168e35772b2Smrg esac], 8169e35772b2Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 817072b676d7Smrg 8171e35772b2Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8172e35772b2Smrg [Whether or not to build shared libraries]) 8173e35772b2Smrg])# _LT_ENABLE_SHARED 817472b676d7Smrg 8175e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8176e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 817772b676d7Smrg 8178e35772b2Smrg# Old names: 8179e35772b2SmrgAC_DEFUN([AC_ENABLE_SHARED], 8180e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8181e35772b2Smrg]) 8182e35772b2Smrg 8183e35772b2SmrgAC_DEFUN([AC_DISABLE_SHARED], 8184e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8185e35772b2Smrg]) 818672b676d7Smrg 8187e35772b2SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8188e35772b2SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 818972b676d7Smrg 8190e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8191e35772b2Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8192e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 819372b676d7Smrg 819472b676d7Smrg 819572b676d7Smrg 8196e35772b2Smrg# _LT_ENABLE_STATIC([DEFAULT]) 8197e35772b2Smrg# ---------------------------- 8198e35772b2Smrg# implement the --enable-static flag, and support the `static' and 8199e35772b2Smrg# `disable-static' LT_INIT options. 8200e35772b2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8201e35772b2Smrgm4_define([_LT_ENABLE_STATIC], 8202e35772b2Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8203e35772b2SmrgAC_ARG_ENABLE([static], 8204e35772b2Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8205e35772b2Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8206e35772b2Smrg [p=${PACKAGE-default} 8207e35772b2Smrg case $enableval in 8208e35772b2Smrg yes) enable_static=yes ;; 8209e35772b2Smrg no) enable_static=no ;; 8210e35772b2Smrg *) 8211e35772b2Smrg enable_static=no 8212e35772b2Smrg # Look at the argument we got. We use all the common list separators. 8213e35772b2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8214e35772b2Smrg for pkg in $enableval; do 8215e35772b2Smrg IFS="$lt_save_ifs" 8216e35772b2Smrg if test "X$pkg" = "X$p"; then 8217e35772b2Smrg enable_static=yes 8218e35772b2Smrg fi 8219e35772b2Smrg done 8220e35772b2Smrg IFS="$lt_save_ifs" 822172b676d7Smrg ;; 8222e35772b2Smrg esac], 8223e35772b2Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 822472b676d7Smrg 8225e35772b2Smrg _LT_DECL([build_old_libs], [enable_static], [0], 8226e35772b2Smrg [Whether or not to build static libraries]) 8227e35772b2Smrg])# _LT_ENABLE_STATIC 822872b676d7Smrg 8229e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8230e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 823172b676d7Smrg 8232e35772b2Smrg# Old names: 8233e35772b2SmrgAC_DEFUN([AC_ENABLE_STATIC], 8234e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8235e35772b2Smrg]) 823672b676d7Smrg 8237e35772b2SmrgAC_DEFUN([AC_DISABLE_STATIC], 8238e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8239e35772b2Smrg]) 824072b676d7Smrg 8241e35772b2SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8242e35772b2SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 824372b676d7Smrg 8244e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8245e35772b2Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8246e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 824772b676d7Smrg 824872b676d7Smrg 824972b676d7Smrg 8250e35772b2Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8251e35772b2Smrg# ---------------------------------- 8252e35772b2Smrg# implement the --enable-fast-install flag, and support the `fast-install' 8253e35772b2Smrg# and `disable-fast-install' LT_INIT options. 8254e35772b2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8255e35772b2Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 8256e35772b2Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8257e35772b2SmrgAC_ARG_ENABLE([fast-install], 8258e35772b2Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8259e35772b2Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8260e35772b2Smrg [p=${PACKAGE-default} 8261e35772b2Smrg case $enableval in 8262e35772b2Smrg yes) enable_fast_install=yes ;; 8263e35772b2Smrg no) enable_fast_install=no ;; 8264e35772b2Smrg *) 8265e35772b2Smrg enable_fast_install=no 8266e35772b2Smrg # Look at the argument we got. We use all the common list separators. 8267e35772b2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8268e35772b2Smrg for pkg in $enableval; do 8269e35772b2Smrg IFS="$lt_save_ifs" 8270e35772b2Smrg if test "X$pkg" = "X$p"; then 8271e35772b2Smrg enable_fast_install=yes 82721fd23544Smrg fi 8273e35772b2Smrg done 8274e35772b2Smrg IFS="$lt_save_ifs" 827572b676d7Smrg ;; 8276e35772b2Smrg esac], 8277e35772b2Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 827872b676d7Smrg 8279e35772b2Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 8280e35772b2Smrg [Whether or not to optimize for fast installation])dnl 8281e35772b2Smrg])# _LT_ENABLE_FAST_INSTALL 828272b676d7Smrg 8283e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8284e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 828572b676d7Smrg 8286e35772b2Smrg# Old names: 8287e35772b2SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8288e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8289e35772b2SmrgAC_DIAGNOSE([obsolete], 8290e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8291e35772b2Smrgthe `fast-install' option into LT_INIT's first parameter.]) 8292e35772b2Smrg]) 829372b676d7Smrg 8294e35772b2SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8295e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8296e35772b2SmrgAC_DIAGNOSE([obsolete], 8297e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8298e35772b2Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8299e35772b2Smrg]) 830072b676d7Smrg 8301e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8302e35772b2Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8303e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 830472b676d7Smrg 830572b676d7Smrg 8306e35772b2Smrg# _LT_WITH_PIC([MODE]) 8307e35772b2Smrg# -------------------- 8308e35772b2Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8309e35772b2Smrg# LT_INIT options. 8310e35772b2Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8311e35772b2Smrgm4_define([_LT_WITH_PIC], 8312e35772b2Smrg[AC_ARG_WITH([pic], 831374c14cd6Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8314e35772b2Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 831574c14cd6Smrg [lt_p=${PACKAGE-default} 831674c14cd6Smrg case $withval in 831774c14cd6Smrg yes|no) pic_mode=$withval ;; 831874c14cd6Smrg *) 831974c14cd6Smrg pic_mode=default 832074c14cd6Smrg # Look at the argument we got. We use all the common list separators. 832174c14cd6Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 832274c14cd6Smrg for lt_pkg in $withval; do 832374c14cd6Smrg IFS="$lt_save_ifs" 832474c14cd6Smrg if test "X$lt_pkg" = "X$lt_p"; then 832574c14cd6Smrg pic_mode=yes 832674c14cd6Smrg fi 832774c14cd6Smrg done 832874c14cd6Smrg IFS="$lt_save_ifs" 832974c14cd6Smrg ;; 833074c14cd6Smrg esac], 8331e35772b2Smrg [pic_mode=default]) 833272b676d7Smrg 8333e35772b2Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 833472b676d7Smrg 8335e35772b2Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8336e35772b2Smrg])# _LT_WITH_PIC 833772b676d7Smrg 8338e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8339e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8340e35772b2Smrg 8341e35772b2Smrg# Old name: 8342e35772b2SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8343e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8344e35772b2SmrgAC_DIAGNOSE([obsolete], 8345e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8346e35772b2Smrgput the `pic-only' option into LT_INIT's first parameter.]) 834772b676d7Smrg]) 834872b676d7Smrg 8349e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8350e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8351e35772b2Smrg 8352e35772b2Smrg 8353e35772b2Smrgm4_define([_LTDL_MODE], []) 8354e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8355e35772b2Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8356e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8357e35772b2Smrg [m4_define([_LTDL_MODE], [recursive])]) 8358e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8359e35772b2Smrg [m4_define([_LTDL_MODE], [subproject])]) 8360e35772b2Smrg 8361e35772b2Smrgm4_define([_LTDL_TYPE], []) 8362e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8363e35772b2Smrg [m4_define([_LTDL_TYPE], [installable])]) 8364e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8365e35772b2Smrg [m4_define([_LTDL_TYPE], [convenience])]) 8366e35772b2Smrg 8367e35772b2Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 836872b676d7Smrg# 8369e35772b2Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8370e35772b2Smrg# Written by Gary V. Vaughan, 2004 837172b676d7Smrg# 8372e35772b2Smrg# This file is free software; the Free Software Foundation gives 8373e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 8374e35772b2Smrg# modifications, as long as this notice is preserved. 837572b676d7Smrg 8376e35772b2Smrg# serial 6 ltsugar.m4 837772b676d7Smrg 8378e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8379e35772b2SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 838072b676d7Smrg 838172b676d7Smrg 8382e35772b2Smrg# lt_join(SEP, ARG1, [ARG2...]) 8383e35772b2Smrg# ----------------------------- 8384e35772b2Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8385e35772b2Smrg# associated separator. 8386e35772b2Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8387e35772b2Smrg# versions in m4sugar had bugs. 8388e35772b2Smrgm4_define([lt_join], 8389e35772b2Smrg[m4_if([$#], [1], [], 8390e35772b2Smrg [$#], [2], [[$2]], 8391e35772b2Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8392e35772b2Smrgm4_define([_lt_join], 8393e35772b2Smrg[m4_if([$#$2], [2], [], 8394e35772b2Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8395e35772b2Smrg 8396e35772b2Smrg 8397e35772b2Smrg# lt_car(LIST) 8398e35772b2Smrg# lt_cdr(LIST) 8399e35772b2Smrg# ------------ 8400e35772b2Smrg# Manipulate m4 lists. 8401e35772b2Smrg# These macros are necessary as long as will still need to support 8402e35772b2Smrg# Autoconf-2.59 which quotes differently. 8403e35772b2Smrgm4_define([lt_car], [[$1]]) 8404e35772b2Smrgm4_define([lt_cdr], 8405e35772b2Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8406e35772b2Smrg [$#], 1, [], 8407e35772b2Smrg [m4_dquote(m4_shift($@))])]) 8408e35772b2Smrgm4_define([lt_unquote], $1) 8409e35772b2Smrg 8410e35772b2Smrg 8411e35772b2Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8412e35772b2Smrg# ------------------------------------------ 8413e35772b2Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8414e35772b2Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8415e35772b2Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8416e35772b2Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8417e35772b2Smrg# than defined and empty). 8418e35772b2Smrg# 8419e35772b2Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8420e35772b2Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8421e35772b2Smrgm4_define([lt_append], 8422e35772b2Smrg[m4_define([$1], 8423e35772b2Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8424e35772b2Smrg 8425e35772b2Smrg 8426e35772b2Smrg 8427e35772b2Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8428e35772b2Smrg# ---------------------------------------------------------- 8429e35772b2Smrg# Produce a SEP delimited list of all paired combinations of elements of 8430e35772b2Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8431e35772b2Smrg# has the form PREFIXmINFIXSUFFIXn. 8432e35772b2Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8433e35772b2Smrgm4_define([lt_combine], 8434e35772b2Smrg[m4_if(m4_eval([$# > 3]), [1], 8435e35772b2Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8436e35772b2Smrg[[m4_foreach([_Lt_prefix], [$2], 8437e35772b2Smrg [m4_foreach([_Lt_suffix], 8438e35772b2Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8439e35772b2Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8440e35772b2Smrg 8441e35772b2Smrg 8442e35772b2Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8443e35772b2Smrg# ----------------------------------------------------------------------- 8444e35772b2Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8445e35772b2Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8446e35772b2Smrgm4_define([lt_if_append_uniq], 8447e35772b2Smrg[m4_ifdef([$1], 8448e35772b2Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8449e35772b2Smrg [lt_append([$1], [$2], [$3])$4], 8450e35772b2Smrg [$5])], 8451e35772b2Smrg [lt_append([$1], [$2], [$3])$4])]) 8452e35772b2Smrg 8453e35772b2Smrg 8454e35772b2Smrg# lt_dict_add(DICT, KEY, VALUE) 8455e35772b2Smrg# ----------------------------- 8456e35772b2Smrgm4_define([lt_dict_add], 8457e35772b2Smrg[m4_define([$1($2)], [$3])]) 845872b676d7Smrg 845972b676d7Smrg 8460e35772b2Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8461e35772b2Smrg# -------------------------------------------- 8462e35772b2Smrgm4_define([lt_dict_add_subkey], 8463e35772b2Smrg[m4_define([$1($2:$3)], [$4])]) 846472b676d7Smrg 846572b676d7Smrg 8466e35772b2Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8467e35772b2Smrg# ---------------------------------- 8468e35772b2Smrgm4_define([lt_dict_fetch], 8469e35772b2Smrg[m4_ifval([$3], 8470e35772b2Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8471e35772b2Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8472e35772b2Smrg 847372b676d7Smrg 8474e35772b2Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8475e35772b2Smrg# ----------------------------------------------------------------- 8476e35772b2Smrgm4_define([lt_if_dict_fetch], 8477e35772b2Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8478e35772b2Smrg [$5], 8479e35772b2Smrg [$6])]) 8480e35772b2Smrg 8481e35772b2Smrg 8482e35772b2Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8483e35772b2Smrg# -------------------------------------------------------------- 8484e35772b2Smrgm4_define([lt_dict_filter], 8485e35772b2Smrg[m4_if([$5], [], [], 8486e35772b2Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8487e35772b2Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8488e35772b2Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 848972b676d7Smrg]) 849072b676d7Smrg 8491e35772b2Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8492e35772b2Smrg# 8493e35772b2Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 8494e35772b2Smrg# Written by Scott James Remnant, 2004 8495e35772b2Smrg# 8496e35772b2Smrg# This file is free software; the Free Software Foundation gives 8497e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 8498e35772b2Smrg# modifications, as long as this notice is preserved. 84991fd23544Smrg 850074c14cd6Smrg# @configure_input@ 85011fd23544Smrg 850274c14cd6Smrg# serial 3337 ltversion.m4 8503e35772b2Smrg# This file is part of GNU Libtool 85041fd23544Smrg 850574c14cd6Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 850674c14cd6Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 85071fd23544Smrg 8508e35772b2SmrgAC_DEFUN([LTVERSION_VERSION], 850974c14cd6Smrg[macro_version='2.4.2' 851074c14cd6Smrgmacro_revision='1.3337' 8511e35772b2Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8512e35772b2Smrg_LT_DECL(, macro_revision, 0) 851372b676d7Smrg]) 851472b676d7Smrg 8515e35772b2Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8516e35772b2Smrg# 851774c14cd6Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8518e35772b2Smrg# Written by Scott James Remnant, 2004. 8519e35772b2Smrg# 8520e35772b2Smrg# This file is free software; the Free Software Foundation gives 8521e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 8522e35772b2Smrg# modifications, as long as this notice is preserved. 8523e35772b2Smrg 852474c14cd6Smrg# serial 5 lt~obsolete.m4 8525e35772b2Smrg 8526e35772b2Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8527e35772b2Smrg# 8528e35772b2Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8529e35772b2Smrg# which have later been changed to m4_define as they aren't part of the 8530e35772b2Smrg# exported API, or moved to Autoconf or Automake where they belong. 8531e35772b2Smrg# 8532e35772b2Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8533e35772b2Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8534e35772b2Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 8535e35772b2Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8536e35772b2Smrg# and doesn't know about Autoconf macros at all.) 8537e35772b2Smrg# 8538e35772b2Smrg# So we provide this file, which has a silly filename so it's always 8539e35772b2Smrg# included after everything else. This provides aclocal with the 8540e35772b2Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8541e35772b2Smrg# because those macros already exist, or will be overwritten later. 8542e35772b2Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8543e35772b2Smrg# 8544e35772b2Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8545e35772b2Smrg# Yes, that means every name once taken will need to remain here until 8546e35772b2Smrg# we give up compatibility with versions before 1.7, at which point 8547e35772b2Smrg# we need to keep only those names which we still refer to. 8548e35772b2Smrg 8549e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8550e35772b2SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8551e35772b2Smrg 8552e35772b2Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8553e35772b2Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8554e35772b2Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8555e35772b2Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8556e35772b2Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8557e35772b2Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8558e35772b2Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8559e35772b2Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8560e35772b2Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8561e35772b2Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8562e35772b2Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8563e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8564e35772b2Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8565e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8566e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8567e35772b2Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8568e35772b2Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8569e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8570e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8571e35772b2Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8572e35772b2Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8573e35772b2Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8574e35772b2Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8575e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8576e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8577e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8578e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8579e35772b2Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8580e35772b2Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8581e35772b2Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8582e35772b2Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8583e35772b2Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8584e35772b2Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8585e35772b2Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8586e35772b2Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8587e35772b2Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8588e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8589e35772b2Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8590e35772b2Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8591e35772b2Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8592e35772b2Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8593e35772b2Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8594e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8595e35772b2Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8596e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8597e35772b2Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8598e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8599e35772b2Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8600e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8601e35772b2Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8602e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8603e35772b2Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8604e35772b2Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8605e35772b2Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 860674c14cd6Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 860774c14cd6Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 860874c14cd6Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 860974c14cd6Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 861074c14cd6Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 861174c14cd6Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 861274c14cd6Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8613e35772b2Smrg 861472b676d7Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 861574c14cd6Smrg# serial 1 (pkg-config-0.24) 861672b676d7Smrg# 861772b676d7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 861872b676d7Smrg# 861972b676d7Smrg# This program is free software; you can redistribute it and/or modify 862072b676d7Smrg# it under the terms of the GNU General Public License as published by 862172b676d7Smrg# the Free Software Foundation; either version 2 of the License, or 862272b676d7Smrg# (at your option) any later version. 862372b676d7Smrg# 862472b676d7Smrg# This program is distributed in the hope that it will be useful, but 862572b676d7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 862672b676d7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 862772b676d7Smrg# General Public License for more details. 862872b676d7Smrg# 862972b676d7Smrg# You should have received a copy of the GNU General Public License 863072b676d7Smrg# along with this program; if not, write to the Free Software 863172b676d7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 863272b676d7Smrg# 863372b676d7Smrg# As a special exception to the GNU General Public License, if you 863472b676d7Smrg# distribute this file as part of a program that contains a 863572b676d7Smrg# configuration script generated by Autoconf, you may include it under 863672b676d7Smrg# the same distribution terms that you use for the rest of that program. 863772b676d7Smrg 863872b676d7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 863972b676d7Smrg# ---------------------------------- 864072b676d7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 864172b676d7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 864272b676d7Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 864374c14cd6SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 864474c14cd6SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 864574c14cd6SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 864674c14cd6Smrg 864772b676d7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 864872b676d7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 864972b676d7Smrgfi 865072b676d7Smrgif test -n "$PKG_CONFIG"; then 865172b676d7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 865272b676d7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 865372b676d7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 865472b676d7Smrg AC_MSG_RESULT([yes]) 865572b676d7Smrg else 865672b676d7Smrg AC_MSG_RESULT([no]) 865772b676d7Smrg PKG_CONFIG="" 865872b676d7Smrg fi 865972b676d7Smrgfi[]dnl 866072b676d7Smrg])# PKG_PROG_PKG_CONFIG 866172b676d7Smrg 866272b676d7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 866372b676d7Smrg# 866472b676d7Smrg# Check to see whether a particular set of modules exists. Similar 866572b676d7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 866672b676d7Smrg# 866774c14cd6Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 866874c14cd6Smrg# only at the first occurence in configure.ac, so if the first place 866974c14cd6Smrg# it's called might be skipped (such as if it is within an "if", you 867074c14cd6Smrg# have to call PKG_CHECK_EXISTS manually 867172b676d7Smrg# -------------------------------------------------------------- 867272b676d7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 867372b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 867472b676d7Smrgif test -n "$PKG_CONFIG" && \ 867572b676d7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 867674c14cd6Smrg m4_default([$2], [:]) 867772b676d7Smrgm4_ifvaln([$3], [else 867872b676d7Smrg $3])dnl 867972b676d7Smrgfi]) 868072b676d7Smrg 868172b676d7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 868272b676d7Smrg# --------------------------------------------- 868372b676d7Smrgm4_define([_PKG_CONFIG], 86841fd23544Smrg[if test -n "$$1"; then 86851fd23544Smrg pkg_cv_[]$1="$$1" 86861fd23544Smrg elif test -n "$PKG_CONFIG"; then 86871fd23544Smrg PKG_CHECK_EXISTS([$3], 86881fd23544Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 86891fd23544Smrg [pkg_failed=yes]) 86901fd23544Smrg else 86911fd23544Smrg pkg_failed=untried 869272b676d7Smrgfi[]dnl 869372b676d7Smrg])# _PKG_CONFIG 869472b676d7Smrg 869572b676d7Smrg# _PKG_SHORT_ERRORS_SUPPORTED 869672b676d7Smrg# ----------------------------- 869772b676d7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 869872b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 869972b676d7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 870072b676d7Smrg _pkg_short_errors_supported=yes 870172b676d7Smrgelse 870272b676d7Smrg _pkg_short_errors_supported=no 870372b676d7Smrgfi[]dnl 870472b676d7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 870572b676d7Smrg 870672b676d7Smrg 870772b676d7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 870872b676d7Smrg# [ACTION-IF-NOT-FOUND]) 870972b676d7Smrg# 871072b676d7Smrg# 871172b676d7Smrg# Note that if there is a possibility the first call to 871272b676d7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 871372b676d7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 871472b676d7Smrg# 871572b676d7Smrg# 871672b676d7Smrg# -------------------------------------------------------------- 871772b676d7SmrgAC_DEFUN([PKG_CHECK_MODULES], 871872b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 871972b676d7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 872072b676d7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 872172b676d7Smrg 872272b676d7Smrgpkg_failed=no 872372b676d7SmrgAC_MSG_CHECKING([for $1]) 872472b676d7Smrg 872572b676d7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 872672b676d7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 872772b676d7Smrg 872872b676d7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 872972b676d7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 873072b676d7SmrgSee the pkg-config man page for more details.]) 873172b676d7Smrg 873272b676d7Smrgif test $pkg_failed = yes; then 873374c14cd6Smrg AC_MSG_RESULT([no]) 873472b676d7Smrg _PKG_SHORT_ERRORS_SUPPORTED 873572b676d7Smrg if test $_pkg_short_errors_supported = yes; then 87361fd23544Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 873772b676d7Smrg else 87381fd23544Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 873972b676d7Smrg fi 874072b676d7Smrg # Put the nasty error message in config.log where it belongs 874172b676d7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 874272b676d7Smrg 874374c14cd6Smrg m4_default([$4], [AC_MSG_ERROR( 874472b676d7Smrg[Package requirements ($2) were not met: 874572b676d7Smrg 874672b676d7Smrg$$1_PKG_ERRORS 874772b676d7Smrg 874872b676d7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 874972b676d7Smrginstalled software in a non-standard prefix. 875072b676d7Smrg 875174c14cd6Smrg_PKG_TEXT]) 875274c14cd6Smrg ]) 875372b676d7Smrgelif test $pkg_failed = untried; then 875474c14cd6Smrg AC_MSG_RESULT([no]) 875574c14cd6Smrg m4_default([$4], [AC_MSG_FAILURE( 875672b676d7Smrg[The pkg-config script could not be found or is too old. Make sure it 875772b676d7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 875872b676d7Smrgpath to pkg-config. 875972b676d7Smrg 876072b676d7Smrg_PKG_TEXT 876172b676d7Smrg 876274c14cd6SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 876374c14cd6Smrg ]) 876472b676d7Smrgelse 876572b676d7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 876672b676d7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 876772b676d7Smrg AC_MSG_RESULT([yes]) 876874c14cd6Smrg $3 876972b676d7Smrgfi[]dnl 877072b676d7Smrg])# PKG_CHECK_MODULES 877172b676d7Smrg 8772e47418d9Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 877372b676d7Smrgdnl 877474c14cd6Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 877572b676d7Smrgdnl 877672b676d7Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 8777e35772b2Smrgdnl copy of this software and associated documentation files (the "Software"), 8778e35772b2Smrgdnl to deal in the Software without restriction, including without limitation 8779e35772b2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 8780e35772b2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 8781e35772b2Smrgdnl Software is furnished to do so, subject to the following conditions: 878272b676d7Smrgdnl 8783e35772b2Smrgdnl The above copyright notice and this permission notice (including the next 8784e35772b2Smrgdnl paragraph) shall be included in all copies or substantial portions of the 8785e35772b2Smrgdnl Software. 878672b676d7Smrgdnl 8787e35772b2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 8788e35772b2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 8789e35772b2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 8790e35772b2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 8791e35772b2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 8792e35772b2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 8793e35772b2Smrgdnl DEALINGS IN THE SOFTWARE. 879472b676d7Smrg 879572b676d7Smrg# XORG_MACROS_VERSION(required-version) 879672b676d7Smrg# ------------------------------------- 879772b676d7Smrg# Minimum version: 1.1.0 879872b676d7Smrg# 879972b676d7Smrg# If you're using a macro added in Version 1.1 or newer, include this in 880072b676d7Smrg# your configure.ac with the minimum required version, such as: 880172b676d7Smrg# XORG_MACROS_VERSION(1.1) 880272b676d7Smrg# 8803e35772b2Smrg# To ensure that this macro is defined, also add: 8804e35772b2Smrg# m4_ifndef([XORG_MACROS_VERSION], 8805e35772b2Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 880672b676d7Smrg# 880772b676d7Smrg# 880872b676d7Smrg# See the "minimum version" comment for each macro you use to see what 880972b676d7Smrg# version you require. 8810e35772b2Smrgm4_defun([XORG_MACROS_VERSION],[ 881174c14cd6Smrgm4_define([vers_have], [1.17]) 8812e35772b2Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 8813e35772b2Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 8814e35772b2Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 8815e35772b2Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 8816e35772b2Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 8817e35772b2Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 8818e35772b2Smrgm4_undefine([vers_have]) 8819e35772b2Smrgm4_undefine([maj_have]) 8820e35772b2Smrgm4_undefine([maj_needed]) 882172b676d7Smrg]) # XORG_MACROS_VERSION 882272b676d7Smrg 882372b676d7Smrg# XORG_PROG_RAWCPP() 882472b676d7Smrg# ------------------ 882572b676d7Smrg# Minimum version: 1.0.0 882672b676d7Smrg# 882772b676d7Smrg# Find cpp program and necessary flags for use in pre-processing text files 882872b676d7Smrg# such as man pages and config files 882972b676d7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 883072b676d7SmrgAC_REQUIRE([AC_PROG_CPP]) 883172b676d7SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 883272b676d7Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 883372b676d7Smrg 883472b676d7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 883572b676d7Smrg# which is not the best choice for supporting other OS'es, but covers most 883672b676d7Smrg# of the ones we need for now. 883772b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 883874c14cd6SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 883972b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 884072b676d7Smrg AC_MSG_RESULT([no]) 884172b676d7Smrgelse 884272b676d7Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 884372b676d7Smrg RAWCPPFLAGS=-undef 884472b676d7Smrg AC_MSG_RESULT([yes]) 8845e47418d9Smrg # under Cygwin unix is still defined even with -undef 8846e47418d9Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8847e47418d9Smrg RAWCPPFLAGS="-undef -ansi" 8848e47418d9Smrg AC_MSG_RESULT([yes, with -ansi]) 884972b676d7Smrg else 885072b676d7Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 885172b676d7Smrg fi 885272b676d7Smrgfi 885372b676d7Smrgrm -f conftest.$ac_ext 885472b676d7Smrg 885572b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 885674c14cd6SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 885772b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 885872b676d7Smrg AC_MSG_RESULT([no]) 885972b676d7Smrgelse 886072b676d7Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 886172b676d7Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 886272b676d7Smrg AC_MSG_RESULT([yes]) 886372b676d7Smrg else 886472b676d7Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 886572b676d7Smrg fi 886672b676d7Smrgfi 886772b676d7Smrgrm -f conftest.$ac_ext 886872b676d7SmrgAC_SUBST(RAWCPPFLAGS) 886972b676d7Smrg]) # XORG_PROG_RAWCPP 887072b676d7Smrg 887172b676d7Smrg# XORG_MANPAGE_SECTIONS() 887272b676d7Smrg# ----------------------- 887372b676d7Smrg# Minimum version: 1.0.0 887472b676d7Smrg# 887572b676d7Smrg# Determine which sections man pages go in for the different man page types 887672b676d7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 887772b676d7Smrg# Not sure if there's any better way than just hardcoding by OS name. 887872b676d7Smrg# Override default settings by setting environment variables 8879e35772b2Smrg# Added MAN_SUBSTS in version 1.8 8880e35772b2Smrg# Added AC_PROG_SED in version 1.8 888172b676d7Smrg 888272b676d7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 888372b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 8884e35772b2SmrgAC_REQUIRE([AC_PROG_SED]) 888572b676d7Smrg 888672b676d7Smrgif test x$APP_MAN_SUFFIX = x ; then 888772b676d7Smrg APP_MAN_SUFFIX=1 888872b676d7Smrgfi 888972b676d7Smrgif test x$APP_MAN_DIR = x ; then 889072b676d7Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 889172b676d7Smrgfi 889272b676d7Smrg 889372b676d7Smrgif test x$LIB_MAN_SUFFIX = x ; then 889472b676d7Smrg LIB_MAN_SUFFIX=3 889572b676d7Smrgfi 889672b676d7Smrgif test x$LIB_MAN_DIR = x ; then 889772b676d7Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 889872b676d7Smrgfi 889972b676d7Smrg 890072b676d7Smrgif test x$FILE_MAN_SUFFIX = x ; then 890172b676d7Smrg case $host_os in 890272b676d7Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 890372b676d7Smrg *) FILE_MAN_SUFFIX=5 ;; 890472b676d7Smrg esac 890572b676d7Smrgfi 890672b676d7Smrgif test x$FILE_MAN_DIR = x ; then 890772b676d7Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 890872b676d7Smrgfi 890972b676d7Smrg 891072b676d7Smrgif test x$MISC_MAN_SUFFIX = x ; then 891172b676d7Smrg case $host_os in 891272b676d7Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 891372b676d7Smrg *) MISC_MAN_SUFFIX=7 ;; 891472b676d7Smrg esac 891572b676d7Smrgfi 891672b676d7Smrgif test x$MISC_MAN_DIR = x ; then 891772b676d7Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 891872b676d7Smrgfi 891972b676d7Smrg 892072b676d7Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 892172b676d7Smrg case $host_os in 892272b676d7Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 892372b676d7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 892472b676d7Smrg esac 892572b676d7Smrgfi 892672b676d7Smrgif test x$DRIVER_MAN_DIR = x ; then 892772b676d7Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 892872b676d7Smrgfi 892972b676d7Smrg 893072b676d7Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 893172b676d7Smrg case $host_os in 893272b676d7Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 893372b676d7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 893472b676d7Smrg esac 893572b676d7Smrgfi 893672b676d7Smrgif test x$ADMIN_MAN_DIR = x ; then 893772b676d7Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 893872b676d7Smrgfi 893972b676d7Smrg 894072b676d7Smrg 894172b676d7SmrgAC_SUBST([APP_MAN_SUFFIX]) 894272b676d7SmrgAC_SUBST([LIB_MAN_SUFFIX]) 894372b676d7SmrgAC_SUBST([FILE_MAN_SUFFIX]) 894472b676d7SmrgAC_SUBST([MISC_MAN_SUFFIX]) 894572b676d7SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 894672b676d7SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 894772b676d7SmrgAC_SUBST([APP_MAN_DIR]) 894872b676d7SmrgAC_SUBST([LIB_MAN_DIR]) 894972b676d7SmrgAC_SUBST([FILE_MAN_DIR]) 895072b676d7SmrgAC_SUBST([MISC_MAN_DIR]) 895172b676d7SmrgAC_SUBST([DRIVER_MAN_DIR]) 895272b676d7SmrgAC_SUBST([ADMIN_MAN_DIR]) 8953e35772b2Smrg 8954e35772b2SmrgXORG_MAN_PAGE="X Version 11" 8955e35772b2SmrgAC_SUBST([XORG_MAN_PAGE]) 8956e35772b2SmrgMAN_SUBSTS="\ 8957e35772b2Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8958e35772b2Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8959e35772b2Smrg -e 's|__xservername__|Xorg|g' \ 8960e35772b2Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 8961e35772b2Smrg -e 's|__projectroot__|\$(prefix)|g' \ 896274c14cd6Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 8963e35772b2Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 8964e35772b2Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 8965e35772b2Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 8966e35772b2Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 8967e35772b2Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 8968e35772b2Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 8969e35772b2SmrgAC_SUBST([MAN_SUBSTS]) 8970e35772b2Smrg 897172b676d7Smrg]) # XORG_MANPAGE_SECTIONS 897272b676d7Smrg 8973e35772b2Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 8974e35772b2Smrg# ------------------------ 8975e35772b2Smrg# Minimum version: 1.7.0 8976e35772b2Smrg# 8977e35772b2Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 8978e35772b2Smrg# provided by xorg-sgml-doctools, if installed. 8979e35772b2SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 8980e35772b2SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 8981e35772b2SmrgXORG_SGML_PATH= 8982e35772b2SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 8983e35772b2Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 8984e35772b2Smrg [m4_ifval([$1],[:], 8985e35772b2Smrg [if test x"$cross_compiling" != x"yes" ; then 8986e35772b2Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 8987e35772b2Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 8988e35772b2Smrg fi]) 8989e35772b2Smrg ]) 8990e35772b2Smrg 899174c14cd6Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 899274c14cd6Smrg# the path and the name of the doc stylesheet 8993e35772b2Smrgif test "x$XORG_SGML_PATH" != "x" ; then 8994e35772b2Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 899574c14cd6Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 899674c14cd6Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 8997e35772b2Smrgelse 8998e35772b2Smrg AC_MSG_RESULT([no]) 8999e35772b2Smrgfi 9000e35772b2Smrg 9001e35772b2SmrgAC_SUBST(XORG_SGML_PATH) 900274c14cd6SmrgAC_SUBST(STYLESHEET_SRCDIR) 900374c14cd6SmrgAC_SUBST(XSL_STYLESHEET) 900474c14cd6SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9005e35772b2Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9006e35772b2Smrg 900772b676d7Smrg# XORG_CHECK_LINUXDOC 900872b676d7Smrg# ------------------- 900972b676d7Smrg# Minimum version: 1.0.0 901072b676d7Smrg# 901172b676d7Smrg# Defines the variable MAKE_TEXT if the necessary tools and 901272b676d7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 901372b676d7Smrg# Whether or not the necessary tools and files are found can be checked 901472b676d7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 901572b676d7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9016e35772b2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9017e35772b2SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 901872b676d7Smrg 901972b676d7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 902072b676d7Smrg 9021e35772b2SmrgAC_MSG_CHECKING([whether to build documentation]) 902272b676d7Smrg 9023e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 902472b676d7Smrg BUILDDOC=yes 902572b676d7Smrgelse 902672b676d7Smrg BUILDDOC=no 902772b676d7Smrgfi 902872b676d7Smrg 902972b676d7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 903072b676d7Smrg 903172b676d7SmrgAC_MSG_RESULT([$BUILDDOC]) 903272b676d7Smrg 9033e35772b2SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 903472b676d7Smrg 9035e35772b2Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 903672b676d7Smrg BUILDPDFDOC=yes 903772b676d7Smrgelse 903872b676d7Smrg BUILDPDFDOC=no 903972b676d7Smrgfi 904072b676d7Smrg 904172b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 904272b676d7Smrg 904372b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 904472b676d7Smrg 9045e35772b2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 904672b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 904772b676d7SmrgMAKE_PDF="$PS2PDF" 904872b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 904972b676d7Smrg 905072b676d7SmrgAC_SUBST(MAKE_TEXT) 905172b676d7SmrgAC_SUBST(MAKE_PS) 905272b676d7SmrgAC_SUBST(MAKE_PDF) 905372b676d7SmrgAC_SUBST(MAKE_HTML) 905472b676d7Smrg]) # XORG_CHECK_LINUXDOC 905572b676d7Smrg 905672b676d7Smrg# XORG_CHECK_DOCBOOK 905772b676d7Smrg# ------------------- 905872b676d7Smrg# Minimum version: 1.0.0 905972b676d7Smrg# 906072b676d7Smrg# Checks for the ability to build output formats from SGML DocBook source. 906172b676d7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 906272b676d7Smrg# indicates whether the necessary tools and files are found and, if set, 906372b676d7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 906472b676d7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9065e35772b2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9066e35772b2Smrg 906772b676d7SmrgBUILDTXTDOC=no 906872b676d7SmrgBUILDPDFDOC=no 906972b676d7SmrgBUILDPSDOC=no 907072b676d7SmrgBUILDHTMLDOC=no 907172b676d7Smrg 907272b676d7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 907372b676d7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 907472b676d7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 907572b676d7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 907672b676d7Smrg 9077e35772b2SmrgAC_MSG_CHECKING([whether to build text documentation]) 9078e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 907972b676d7Smrg test x$BUILD_TXTDOC != xno; then 908072b676d7Smrg BUILDTXTDOC=yes 908172b676d7Smrgfi 908272b676d7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 908372b676d7SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 908472b676d7Smrg 9085e35772b2SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9086e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 908772b676d7Smrg test x$BUILD_PDFDOC != xno; then 908872b676d7Smrg BUILDPDFDOC=yes 908972b676d7Smrgfi 909072b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 909172b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 909272b676d7Smrg 9093e35772b2SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9094e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 909572b676d7Smrg test x$BUILD_PSDOC != xno; then 909672b676d7Smrg BUILDPSDOC=yes 909772b676d7Smrgfi 909872b676d7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 909972b676d7SmrgAC_MSG_RESULT([$BUILDPSDOC]) 910072b676d7Smrg 9101e35772b2SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9102e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 910372b676d7Smrg test x$BUILD_HTMLDOC != xno; then 910472b676d7Smrg BUILDHTMLDOC=yes 910572b676d7Smrgfi 910672b676d7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 910772b676d7SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 910872b676d7Smrg 910972b676d7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 911072b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 911172b676d7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 911272b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 911372b676d7Smrg 911472b676d7SmrgAC_SUBST(MAKE_TEXT) 911572b676d7SmrgAC_SUBST(MAKE_PS) 911672b676d7SmrgAC_SUBST(MAKE_PDF) 911772b676d7SmrgAC_SUBST(MAKE_HTML) 911872b676d7Smrg]) # XORG_CHECK_DOCBOOK 911972b676d7Smrg 912074c14cd6Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9121e35772b2Smrg# ---------------- 9122e35772b2Smrg# Minimum version: 1.5.0 912374c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9124e35772b2Smrg# 9125e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9126e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9127e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9128e35772b2Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 912974c14cd6Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 913074c14cd6Smrg# --with-xmlto assumes 'auto'. 9131e35772b2Smrg# 9132e35772b2Smrg# Interface to module: 9133e35772b2Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9134e35772b2Smrg# XMLTO: returns the path of the xmlto program found 9135e35772b2Smrg# returns the path set by the user in the environment 9136e35772b2Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9137e35772b2Smrg# 'no' user instructs the module not to use xmlto 9138e35772b2Smrg# 913974c14cd6Smrg# Added in version 1.10.0 914074c14cd6Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 914174c14cd6Smrg# xmlto for text output requires either lynx, links, or w3m browsers 914274c14cd6Smrg# 9143e35772b2Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9144e35772b2Smrg# 9145e35772b2SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9146e35772b2SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 914774c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9148e35772b2SmrgAC_ARG_WITH(xmlto, 9149e35772b2Smrg AS_HELP_STRING([--with-xmlto], 915074c14cd6Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 915174c14cd6Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 915274c14cd6Smrgm4_undefine([_defopt]) 9153e35772b2Smrg 9154e35772b2Smrgif test "x$use_xmlto" = x"auto"; then 9155e35772b2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9156e35772b2Smrg if test "x$XMLTO" = "x"; then 9157e35772b2Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9158e35772b2Smrg have_xmlto=no 9159e35772b2Smrg else 9160e35772b2Smrg have_xmlto=yes 9161e35772b2Smrg fi 9162e35772b2Smrgelif test "x$use_xmlto" = x"yes" ; then 9163e35772b2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9164e35772b2Smrg if test "x$XMLTO" = "x"; then 9165e35772b2Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9166e35772b2Smrg fi 9167e35772b2Smrg have_xmlto=yes 9168e35772b2Smrgelif test "x$use_xmlto" = x"no" ; then 9169e35772b2Smrg if test "x$XMLTO" != "x"; then 9170e35772b2Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9171e35772b2Smrg fi 9172e35772b2Smrg have_xmlto=no 9173e35772b2Smrgelse 9174e35772b2Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9175e35772b2Smrgfi 917674c14cd6Smrg 917774c14cd6Smrg# Test for a minimum version of xmlto, if provided. 9178e35772b2Smrgm4_ifval([$1], 9179e35772b2Smrg[if test "$have_xmlto" = yes; then 9180e35772b2Smrg # scrape the xmlto version 9181e35772b2Smrg AC_MSG_CHECKING([the xmlto version]) 9182e35772b2Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9183e35772b2Smrg AC_MSG_RESULT([$xmlto_version]) 9184e35772b2Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9185e35772b2Smrg [if test "x$use_xmlto" = xauto; then 9186e35772b2Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9187e35772b2Smrg have_xmlto=no 9188e35772b2Smrg else 9189e35772b2Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9190e35772b2Smrg fi]) 9191e35772b2Smrgfi]) 919274c14cd6Smrg 919374c14cd6Smrg# Test for the ability of xmlto to generate a text target 919474c14cd6Smrghave_xmlto_text=no 919574c14cd6Smrgcat > conftest.xml << "EOF" 919674c14cd6SmrgEOF 919774c14cd6SmrgAS_IF([test "$have_xmlto" = yes], 919874c14cd6Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 919974c14cd6Smrg [have_xmlto_text=yes], 920074c14cd6Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 920174c14cd6Smrgrm -f conftest.xml 920274c14cd6SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9203e35772b2SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9204e35772b2Smrg]) # XORG_WITH_XMLTO 9205e35772b2Smrg 920674c14cd6Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 920774c14cd6Smrg# -------------------------------------------- 920874c14cd6Smrg# Minimum version: 1.12.0 920974c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.12.0 921074c14cd6Smrg# 921174c14cd6Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 921274c14cd6Smrg# XML-based language used for the transformation of XML documents. 921374c14cd6Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 921474c14cd6Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 921574c14cd6Smrg# The XSLT processor is often used as a standalone tool for transformations. 921674c14cd6Smrg# It should not be assumed that this tool is used only to work with documnetation. 921774c14cd6Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 921874c14cd6Smrg# 921974c14cd6Smrg# Interface to module: 922074c14cd6Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 922174c14cd6Smrg# XSLTPROC: returns the path of the xsltproc program found 922274c14cd6Smrg# returns the path set by the user in the environment 922374c14cd6Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 922474c14cd6Smrg# 'no' user instructs the module not to use xsltproc 922574c14cd6Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 922674c14cd6Smrg# 922774c14cd6Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 922874c14cd6Smrg# 922974c14cd6SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 923074c14cd6SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 923174c14cd6Smrg# Preserves the interface, should it be implemented later 923274c14cd6Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 923374c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 923474c14cd6SmrgAC_ARG_WITH(xsltproc, 923574c14cd6Smrg AS_HELP_STRING([--with-xsltproc], 923674c14cd6Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 923774c14cd6Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 923874c14cd6Smrgm4_undefine([_defopt]) 923974c14cd6Smrg 924074c14cd6Smrgif test "x$use_xsltproc" = x"auto"; then 924174c14cd6Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 924274c14cd6Smrg if test "x$XSLTPROC" = "x"; then 924374c14cd6Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 924474c14cd6Smrg have_xsltproc=no 924574c14cd6Smrg else 924674c14cd6Smrg have_xsltproc=yes 924774c14cd6Smrg fi 924874c14cd6Smrgelif test "x$use_xsltproc" = x"yes" ; then 924974c14cd6Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 925074c14cd6Smrg if test "x$XSLTPROC" = "x"; then 925174c14cd6Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 925274c14cd6Smrg fi 925374c14cd6Smrg have_xsltproc=yes 925474c14cd6Smrgelif test "x$use_xsltproc" = x"no" ; then 925574c14cd6Smrg if test "x$XSLTPROC" != "x"; then 925674c14cd6Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 925774c14cd6Smrg fi 925874c14cd6Smrg have_xsltproc=no 925974c14cd6Smrgelse 926074c14cd6Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 926174c14cd6Smrgfi 926274c14cd6Smrg 926374c14cd6SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 926474c14cd6Smrg]) # XORG_WITH_XSLTPROC 926574c14cd6Smrg 926674c14cd6Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 926774c14cd6Smrg# ---------------------------------------- 926874c14cd6Smrg# Minimum version: 1.15.0 926974c14cd6Smrg# 927074c14cd6Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 927174c14cd6Smrg# scanning arbitrary text files, extracting information from those text files, 927274c14cd6Smrg# and printing reports based on that information. 927374c14cd6Smrg# 927474c14cd6Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 927574c14cd6Smrg# 927674c14cd6Smrg# Interface to module: 927774c14cd6Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 927874c14cd6Smrg# PERL: returns the path of the perl program found 927974c14cd6Smrg# returns the path set by the user in the environment 928074c14cd6Smrg# --with-perl: 'yes' user instructs the module to use perl 928174c14cd6Smrg# 'no' user instructs the module not to use perl 928274c14cd6Smrg# have_perl: returns yes if perl found in PATH or no 928374c14cd6Smrg# 928474c14cd6Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 928574c14cd6Smrg# 928674c14cd6SmrgAC_DEFUN([XORG_WITH_PERL],[ 928774c14cd6SmrgAC_ARG_VAR([PERL], [Path to perl command]) 928874c14cd6Smrg# Preserves the interface, should it be implemented later 928974c14cd6Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 929074c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 929174c14cd6SmrgAC_ARG_WITH(perl, 929274c14cd6Smrg AS_HELP_STRING([--with-perl], 929374c14cd6Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 929474c14cd6Smrg [use_perl=$withval], [use_perl=]_defopt) 929574c14cd6Smrgm4_undefine([_defopt]) 929674c14cd6Smrg 929774c14cd6Smrgif test "x$use_perl" = x"auto"; then 929874c14cd6Smrg AC_PATH_PROG([PERL], [perl]) 929974c14cd6Smrg if test "x$PERL" = "x"; then 930074c14cd6Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 930174c14cd6Smrg have_perl=no 930274c14cd6Smrg else 930374c14cd6Smrg have_perl=yes 930474c14cd6Smrg fi 930574c14cd6Smrgelif test "x$use_perl" = x"yes" ; then 930674c14cd6Smrg AC_PATH_PROG([PERL], [perl]) 930774c14cd6Smrg if test "x$PERL" = "x"; then 930874c14cd6Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 930974c14cd6Smrg fi 931074c14cd6Smrg have_perl=yes 931174c14cd6Smrgelif test "x$use_perl" = x"no" ; then 931274c14cd6Smrg if test "x$PERL" != "x"; then 931374c14cd6Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 931474c14cd6Smrg fi 931574c14cd6Smrg have_perl=no 931674c14cd6Smrgelse 931774c14cd6Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 931874c14cd6Smrgfi 931974c14cd6Smrg 932074c14cd6SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 932174c14cd6Smrg]) # XORG_WITH_PERL 932274c14cd6Smrg 932374c14cd6Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9324e35772b2Smrg# ---------------- 9325e35772b2Smrg# Minimum version: 1.5.0 932674c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9327e35772b2Smrg# 9328e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9329e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9330e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9331e35772b2Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 933274c14cd6Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 933374c14cd6Smrg# --with-asciidoc assumes 'auto'. 9334e35772b2Smrg# 9335e35772b2Smrg# Interface to module: 9336e35772b2Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9337e35772b2Smrg# ASCIIDOC: returns the path of the asciidoc program found 9338e35772b2Smrg# returns the path set by the user in the environment 9339e35772b2Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9340e35772b2Smrg# 'no' user instructs the module not to use asciidoc 9341e35772b2Smrg# 9342e35772b2Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9343e35772b2Smrg# 9344e35772b2SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9345e35772b2SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 934674c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9347e35772b2SmrgAC_ARG_WITH(asciidoc, 9348e35772b2Smrg AS_HELP_STRING([--with-asciidoc], 934974c14cd6Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 935074c14cd6Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 935174c14cd6Smrgm4_undefine([_defopt]) 9352e35772b2Smrg 9353e35772b2Smrgif test "x$use_asciidoc" = x"auto"; then 9354e35772b2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9355e35772b2Smrg if test "x$ASCIIDOC" = "x"; then 9356e35772b2Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9357e35772b2Smrg have_asciidoc=no 9358e35772b2Smrg else 9359e35772b2Smrg have_asciidoc=yes 9360e35772b2Smrg fi 9361e35772b2Smrgelif test "x$use_asciidoc" = x"yes" ; then 9362e35772b2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9363e35772b2Smrg if test "x$ASCIIDOC" = "x"; then 9364e35772b2Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9365e35772b2Smrg fi 9366e35772b2Smrg have_asciidoc=yes 9367e35772b2Smrgelif test "x$use_asciidoc" = x"no" ; then 9368e35772b2Smrg if test "x$ASCIIDOC" != "x"; then 9369e35772b2Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9370e35772b2Smrg fi 9371e35772b2Smrg have_asciidoc=no 9372e35772b2Smrgelse 9373e35772b2Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9374e35772b2Smrgfi 9375e35772b2Smrgm4_ifval([$1], 9376e35772b2Smrg[if test "$have_asciidoc" = yes; then 9377e35772b2Smrg # scrape the asciidoc version 9378e35772b2Smrg AC_MSG_CHECKING([the asciidoc version]) 9379e35772b2Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9380e35772b2Smrg AC_MSG_RESULT([$asciidoc_version]) 9381e35772b2Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9382e35772b2Smrg [if test "x$use_asciidoc" = xauto; then 9383e35772b2Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9384e35772b2Smrg have_asciidoc=no 9385e35772b2Smrg else 9386e35772b2Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9387e35772b2Smrg fi]) 9388e35772b2Smrgfi]) 9389e35772b2SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9390e35772b2Smrg]) # XORG_WITH_ASCIIDOC 9391e35772b2Smrg 939274c14cd6Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9393e35772b2Smrg# -------------------------------- 9394e35772b2Smrg# Minimum version: 1.5.0 939574c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9396e35772b2Smrg# 9397e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9398e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9399e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9400e35772b2Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 940174c14cd6Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 940274c14cd6Smrg# --with-doxygen assumes 'auto'. 9403e35772b2Smrg# 9404e35772b2Smrg# Interface to module: 9405e35772b2Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9406e35772b2Smrg# DOXYGEN: returns the path of the doxygen program found 9407e35772b2Smrg# returns the path set by the user in the environment 9408e35772b2Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9409e35772b2Smrg# 'no' user instructs the module not to use doxygen 9410e35772b2Smrg# 9411e35772b2Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9412e35772b2Smrg# 9413e35772b2SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9414e35772b2SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 941574c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9416e35772b2SmrgAC_ARG_WITH(doxygen, 9417e35772b2Smrg AS_HELP_STRING([--with-doxygen], 941874c14cd6Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 941974c14cd6Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 942074c14cd6Smrgm4_undefine([_defopt]) 9421e35772b2Smrg 9422e35772b2Smrgif test "x$use_doxygen" = x"auto"; then 9423e35772b2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9424e35772b2Smrg if test "x$DOXYGEN" = "x"; then 9425e35772b2Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9426e35772b2Smrg have_doxygen=no 9427e35772b2Smrg else 9428e35772b2Smrg have_doxygen=yes 9429e35772b2Smrg fi 9430e35772b2Smrgelif test "x$use_doxygen" = x"yes" ; then 9431e35772b2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9432e35772b2Smrg if test "x$DOXYGEN" = "x"; then 9433e35772b2Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9434e35772b2Smrg fi 9435e35772b2Smrg have_doxygen=yes 9436e35772b2Smrgelif test "x$use_doxygen" = x"no" ; then 9437e35772b2Smrg if test "x$DOXYGEN" != "x"; then 9438e35772b2Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9439e35772b2Smrg fi 9440e35772b2Smrg have_doxygen=no 9441e35772b2Smrgelse 9442e35772b2Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9443e35772b2Smrgfi 9444e35772b2Smrgm4_ifval([$1], 9445e35772b2Smrg[if test "$have_doxygen" = yes; then 9446e35772b2Smrg # scrape the doxygen version 9447e35772b2Smrg AC_MSG_CHECKING([the doxygen version]) 9448e35772b2Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 9449e35772b2Smrg AC_MSG_RESULT([$doxygen_version]) 9450e35772b2Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 9451e35772b2Smrg [if test "x$use_doxygen" = xauto; then 9452e35772b2Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9453e35772b2Smrg have_doxygen=no 9454e35772b2Smrg else 9455e35772b2Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9456e35772b2Smrg fi]) 9457e35772b2Smrgfi]) 9458e35772b2SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9459e35772b2Smrg]) # XORG_WITH_DOXYGEN 9460e35772b2Smrg 946174c14cd6Smrg# XORG_WITH_GROFF([DEFAULT]) 9462e35772b2Smrg# ---------------- 9463e35772b2Smrg# Minimum version: 1.6.0 946474c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9465e35772b2Smrg# 9466e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9467e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9468e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9469e35772b2Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 947074c14cd6Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 947174c14cd6Smrg# --with-groff assumes 'auto'. 9472e35772b2Smrg# 9473e35772b2Smrg# Interface to module: 9474e35772b2Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 9475e35772b2Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 9476e35772b2Smrg# HAVE_GROFF_MS: the -ms macros package 9477e35772b2Smrg# GROFF: returns the path of the groff program found 9478e35772b2Smrg# returns the path set by the user in the environment 9479e35772b2Smrg# --with-groff: 'yes' user instructs the module to use groff 9480e35772b2Smrg# 'no' user instructs the module not to use groff 9481e35772b2Smrg# 948274c14cd6Smrg# Added in version 1.9.0: 948374c14cd6Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 948474c14cd6Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 948574c14cd6Smrg# psselect from the psutils package. 948674c14cd6Smrg# the ghostcript package. Refer to the grohtml man pages 948774c14cd6Smrg# 9488e35772b2Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9489e35772b2Smrg# 9490e35772b2Smrg# OS and distros often splits groff in a basic and full package, the former 9491e35772b2Smrg# having the groff program and the later having devices, fonts and macros 9492e35772b2Smrg# Checking for the groff executable is not enough. 9493e35772b2Smrg# 9494e35772b2Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 9495e35772b2Smrg# unset HAVE_GROFF or GROFF env variables. 9496e35772b2Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 9497e35772b2Smrg# 9498e35772b2SmrgAC_DEFUN([XORG_WITH_GROFF],[ 9499e35772b2SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 950074c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 9501e35772b2SmrgAC_ARG_WITH(groff, 9502e35772b2Smrg AS_HELP_STRING([--with-groff], 950374c14cd6Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 950474c14cd6Smrg [use_groff=$withval], [use_groff=]_defopt) 950574c14cd6Smrgm4_undefine([_defopt]) 9506e35772b2Smrg 9507e35772b2Smrgif test "x$use_groff" = x"auto"; then 9508e35772b2Smrg AC_PATH_PROG([GROFF], [groff]) 9509e35772b2Smrg if test "x$GROFF" = "x"; then 9510e35772b2Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 9511e35772b2Smrg have_groff=no 9512e35772b2Smrg else 9513e35772b2Smrg have_groff=yes 9514e35772b2Smrg fi 9515e35772b2Smrgelif test "x$use_groff" = x"yes" ; then 9516e35772b2Smrg AC_PATH_PROG([GROFF], [groff]) 9517e35772b2Smrg if test "x$GROFF" = "x"; then 9518e35772b2Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 9519e35772b2Smrg fi 9520e35772b2Smrg have_groff=yes 9521e35772b2Smrgelif test "x$use_groff" = x"no" ; then 9522e35772b2Smrg if test "x$GROFF" != "x"; then 9523e35772b2Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 9524e35772b2Smrg fi 9525e35772b2Smrg have_groff=no 9526e35772b2Smrgelse 9527e35772b2Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 9528e35772b2Smrgfi 952974c14cd6Smrg 9530e35772b2Smrg# We have groff, test for the presence of the macro packages 9531e35772b2Smrgif test "x$have_groff" = x"yes"; then 9532e35772b2Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 9533e35772b2Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 9534e35772b2Smrg groff_ms_works=yes 9535e35772b2Smrg else 9536e35772b2Smrg groff_ms_works=no 9537e35772b2Smrg fi 9538e35772b2Smrg AC_MSG_RESULT([$groff_ms_works]) 9539e35772b2Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 9540e35772b2Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 9541e35772b2Smrg groff_mm_works=yes 9542e35772b2Smrg else 9543e35772b2Smrg groff_mm_works=no 9544e35772b2Smrg fi 9545e35772b2Smrg AC_MSG_RESULT([$groff_mm_works]) 9546e35772b2Smrgfi 954774c14cd6Smrg 954874c14cd6Smrg# We have groff, test for HTML dependencies, one command per package 954974c14cd6Smrgif test "x$have_groff" = x"yes"; then 955074c14cd6Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 955174c14cd6Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 955274c14cd6Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 955374c14cd6Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 955474c14cd6Smrg have_groff_html=yes 955574c14cd6Smrg else 955674c14cd6Smrg have_groff_html=no 955774c14cd6Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 955874c14cd6Smrg fi 955974c14cd6Smrgfi 956074c14cd6Smrg 956174c14cd6Smrg# Set Automake conditionals for Makefiles 9562e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 9563e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 9564e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 956574c14cd6SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 9566e35772b2Smrg]) # XORG_WITH_GROFF 9567e35772b2Smrg 956874c14cd6Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 956974c14cd6Smrg# --------------------------------------- 9570e35772b2Smrg# Minimum version: 1.6.0 957174c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 957274c14cd6Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 9573e35772b2Smrg# 9574e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9575e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9576e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9577e35772b2Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 957874c14cd6Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 957974c14cd6Smrg# --with-fop assumes 'auto'. 9580e35772b2Smrg# 9581e35772b2Smrg# Interface to module: 9582e35772b2Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 9583e35772b2Smrg# FOP: returns the path of the fop program found 9584e35772b2Smrg# returns the path set by the user in the environment 9585e35772b2Smrg# --with-fop: 'yes' user instructs the module to use fop 9586e35772b2Smrg# 'no' user instructs the module not to use fop 9587e35772b2Smrg# 9588e35772b2Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 9589e35772b2Smrg# 9590e35772b2SmrgAC_DEFUN([XORG_WITH_FOP],[ 9591e35772b2SmrgAC_ARG_VAR([FOP], [Path to fop command]) 959274c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9593e35772b2SmrgAC_ARG_WITH(fop, 9594e35772b2Smrg AS_HELP_STRING([--with-fop], 959574c14cd6Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 959674c14cd6Smrg [use_fop=$withval], [use_fop=]_defopt) 959774c14cd6Smrgm4_undefine([_defopt]) 9598e35772b2Smrg 9599e35772b2Smrgif test "x$use_fop" = x"auto"; then 9600e35772b2Smrg AC_PATH_PROG([FOP], [fop]) 9601e35772b2Smrg if test "x$FOP" = "x"; then 9602e35772b2Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 9603e35772b2Smrg have_fop=no 9604e35772b2Smrg else 9605e35772b2Smrg have_fop=yes 9606e35772b2Smrg fi 9607e35772b2Smrgelif test "x$use_fop" = x"yes" ; then 9608e35772b2Smrg AC_PATH_PROG([FOP], [fop]) 9609e35772b2Smrg if test "x$FOP" = "x"; then 9610e35772b2Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 9611e35772b2Smrg fi 9612e35772b2Smrg have_fop=yes 9613e35772b2Smrgelif test "x$use_fop" = x"no" ; then 9614e35772b2Smrg if test "x$FOP" != "x"; then 9615e35772b2Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 9616e35772b2Smrg fi 9617e35772b2Smrg have_fop=no 9618e35772b2Smrgelse 9619e35772b2Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 9620e35772b2Smrgfi 962174c14cd6Smrg 962274c14cd6Smrg# Test for a minimum version of fop, if provided. 962374c14cd6Smrgm4_ifval([$1], 962474c14cd6Smrg[if test "$have_fop" = yes; then 962574c14cd6Smrg # scrape the fop version 962674c14cd6Smrg AC_MSG_CHECKING([for fop minimum version]) 962774c14cd6Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 962874c14cd6Smrg AC_MSG_RESULT([$fop_version]) 962974c14cd6Smrg AS_VERSION_COMPARE([$fop_version], [$1], 963074c14cd6Smrg [if test "x$use_fop" = xauto; then 963174c14cd6Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 963274c14cd6Smrg have_fop=no 963374c14cd6Smrg else 963474c14cd6Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 963574c14cd6Smrg fi]) 963674c14cd6Smrgfi]) 9637e35772b2SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 9638e35772b2Smrg]) # XORG_WITH_FOP 9639e35772b2Smrg 964074c14cd6Smrg# XORG_WITH_PS2PDF([DEFAULT]) 9641e35772b2Smrg# ---------------- 9642e35772b2Smrg# Minimum version: 1.6.0 964374c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9644e35772b2Smrg# 9645e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9646e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9647e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9648e35772b2Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 964974c14cd6Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 965074c14cd6Smrg# --with-ps2pdf assumes 'auto'. 9651e35772b2Smrg# 9652e35772b2Smrg# Interface to module: 9653e35772b2Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 9654e35772b2Smrg# PS2PDF: returns the path of the ps2pdf program found 9655e35772b2Smrg# returns the path set by the user in the environment 9656e35772b2Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 9657e35772b2Smrg# 'no' user instructs the module not to use ps2pdf 9658e35772b2Smrg# 9659e35772b2Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 9660e35772b2Smrg# 9661e35772b2SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 9662e35772b2SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 966374c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 9664e35772b2SmrgAC_ARG_WITH(ps2pdf, 9665e35772b2Smrg AS_HELP_STRING([--with-ps2pdf], 966674c14cd6Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 966774c14cd6Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 966874c14cd6Smrgm4_undefine([_defopt]) 9669e35772b2Smrg 9670e35772b2Smrgif test "x$use_ps2pdf" = x"auto"; then 9671e35772b2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9672e35772b2Smrg if test "x$PS2PDF" = "x"; then 9673e35772b2Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 9674e35772b2Smrg have_ps2pdf=no 9675e35772b2Smrg else 9676e35772b2Smrg have_ps2pdf=yes 9677e35772b2Smrg fi 9678e35772b2Smrgelif test "x$use_ps2pdf" = x"yes" ; then 9679e35772b2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9680e35772b2Smrg if test "x$PS2PDF" = "x"; then 9681e35772b2Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 9682e35772b2Smrg fi 9683e35772b2Smrg have_ps2pdf=yes 9684e35772b2Smrgelif test "x$use_ps2pdf" = x"no" ; then 9685e35772b2Smrg if test "x$PS2PDF" != "x"; then 9686e35772b2Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 9687e35772b2Smrg fi 9688e35772b2Smrg have_ps2pdf=no 9689e35772b2Smrgelse 9690e35772b2Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 9691e35772b2Smrgfi 9692e35772b2SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 9693e35772b2Smrg]) # XORG_WITH_PS2PDF 9694e35772b2Smrg 9695e35772b2Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 9696e35772b2Smrg# ---------------- 9697e35772b2Smrg# Minimum version: 1.6.0 9698e35772b2Smrg# 9699e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9700e35772b2Smrg# not at the appropriate level. This macro enables a builder to skip all 9701e35772b2Smrg# documentation targets except traditional man pages. 9702e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9703e35772b2Smrg# maximum flexibilty in controlling documentation building. 9704e35772b2Smrg# Refer to: 9705e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 9706e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9707e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 9708e35772b2Smrg# XORG_WITH_FOP --with-fop 9709e35772b2Smrg# XORG_WITH_GROFF --with-groff 9710e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9711e35772b2Smrg# 9712e35772b2Smrg# Interface to module: 9713e35772b2Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 9714e35772b2Smrg# --enable-docs: 'yes' user instructs the module to generate docs 9715e35772b2Smrg# 'no' user instructs the module not to generate docs 9716e35772b2Smrg# parm1: specify the default value, yes or no. 9717e35772b2Smrg# 9718e35772b2SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 971974c14cd6Smrgm4_define([docs_default], m4_default([$1], [yes])) 9720e35772b2SmrgAC_ARG_ENABLE(docs, 9721e35772b2Smrg AS_HELP_STRING([--enable-docs], 972274c14cd6Smrg [Enable building the documentation (default: ]docs_default[)]), 972374c14cd6Smrg [build_docs=$enableval], [build_docs=]docs_default) 972474c14cd6Smrgm4_undefine([docs_default]) 9725e35772b2SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 9726e35772b2SmrgAC_MSG_CHECKING([whether to build documentation]) 9727e35772b2SmrgAC_MSG_RESULT([$build_docs]) 9728e35772b2Smrg]) # XORG_ENABLE_DOCS 9729e35772b2Smrg 9730e35772b2Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 9731e35772b2Smrg# ---------------- 9732e35772b2Smrg# Minimum version: 1.6.0 9733e35772b2Smrg# 9734e35772b2Smrg# This macro enables a builder to skip all developer documentation. 9735e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9736e35772b2Smrg# maximum flexibilty in controlling documentation building. 9737e35772b2Smrg# Refer to: 9738e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 9739e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9740e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 9741e35772b2Smrg# XORG_WITH_FOP --with-fop 9742e35772b2Smrg# XORG_WITH_GROFF --with-groff 9743e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9744e35772b2Smrg# 9745e35772b2Smrg# Interface to module: 9746e35772b2Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 9747e35772b2Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 9748e35772b2Smrg# 'no' user instructs the module not to generate developer docs 9749e35772b2Smrg# parm1: specify the default value, yes or no. 9750e35772b2Smrg# 9751e35772b2SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 975274c14cd6Smrgm4_define([devel_default], m4_default([$1], [yes])) 9753e35772b2SmrgAC_ARG_ENABLE(devel-docs, 9754e35772b2Smrg AS_HELP_STRING([--enable-devel-docs], 975574c14cd6Smrg [Enable building the developer documentation (default: ]devel_default[)]), 975674c14cd6Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 975774c14cd6Smrgm4_undefine([devel_default]) 9758e35772b2SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 9759e35772b2SmrgAC_MSG_CHECKING([whether to build developer documentation]) 9760e35772b2SmrgAC_MSG_RESULT([$build_devel_docs]) 9761e35772b2Smrg]) # XORG_ENABLE_DEVEL_DOCS 9762e35772b2Smrg 9763e35772b2Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 9764e35772b2Smrg# ---------------- 9765e35772b2Smrg# Minimum version: 1.6.0 9766e35772b2Smrg# 9767e35772b2Smrg# This macro enables a builder to skip all functional specification targets. 9768e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9769e35772b2Smrg# maximum flexibilty in controlling documentation building. 9770e35772b2Smrg# Refer to: 9771e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 9772e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9773e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 9774e35772b2Smrg# XORG_WITH_FOP --with-fop 9775e35772b2Smrg# XORG_WITH_GROFF --with-groff 9776e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9777e35772b2Smrg# 9778e35772b2Smrg# Interface to module: 9779e35772b2Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 9780e35772b2Smrg# --enable-specs: 'yes' user instructs the module to generate specs 9781e35772b2Smrg# 'no' user instructs the module not to generate specs 9782e35772b2Smrg# parm1: specify the default value, yes or no. 9783e35772b2Smrg# 9784e35772b2SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 978574c14cd6Smrgm4_define([spec_default], m4_default([$1], [yes])) 9786e35772b2SmrgAC_ARG_ENABLE(specs, 9787e35772b2Smrg AS_HELP_STRING([--enable-specs], 978874c14cd6Smrg [Enable building the specs (default: ]spec_default[)]), 978974c14cd6Smrg [build_specs=$enableval], [build_specs=]spec_default) 979074c14cd6Smrgm4_undefine([spec_default]) 9791e35772b2SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 9792e35772b2SmrgAC_MSG_CHECKING([whether to build functional specifications]) 9793e35772b2SmrgAC_MSG_RESULT([$build_specs]) 9794e35772b2Smrg]) # XORG_ENABLE_SPECS 9795e35772b2Smrg 979674c14cd6Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 979774c14cd6Smrg# ---------------------------------------------- 979874c14cd6Smrg# Minimum version: 1.13.0 979974c14cd6Smrg# 980074c14cd6Smrg# This macro enables a builder to enable/disable unit testing 980174c14cd6Smrg# It makes no assumption about the test cases implementation 980274c14cd6Smrg# Test cases may or may not use Automake "Support for test suites" 980374c14cd6Smrg# They may or may not use the software utility library GLib 980474c14cd6Smrg# 980574c14cd6Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 980674c14cd6Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 980774c14cd6Smrg# The variable enable_unit_tests is used by other macros in this file. 980874c14cd6Smrg# 980974c14cd6Smrg# Interface to module: 981074c14cd6Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 981174c14cd6Smrg# enable_unit_tests: used in configure.ac for additional configuration 981274c14cd6Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 981374c14cd6Smrg# 'no' user instructs the module not to build tests 981474c14cd6Smrg# parm1: specify the default value, yes or no. 981574c14cd6Smrg# 981674c14cd6SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 981774c14cd6SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 981874c14cd6SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 981974c14cd6SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 982074c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 982174c14cd6SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 982274c14cd6Smrg [Enable building unit test cases (default: ]_defopt[)]), 982374c14cd6Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 982474c14cd6Smrgm4_undefine([_defopt]) 982574c14cd6SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 982674c14cd6SmrgAC_MSG_CHECKING([whether to build unit test cases]) 982774c14cd6SmrgAC_MSG_RESULT([$enable_unit_tests]) 982874c14cd6Smrg]) # XORG_ENABLE_UNIT_TESTS 982974c14cd6Smrg 983074c14cd6Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 983174c14cd6Smrg# ------------------------------------------------------ 983274c14cd6Smrg# Minimum version: 1.17.0 983374c14cd6Smrg# 983474c14cd6Smrg# This macro enables a builder to enable/disable integration testing 983574c14cd6Smrg# It makes no assumption about the test cases' implementation 983674c14cd6Smrg# Test cases may or may not use Automake "Support for test suites" 983774c14cd6Smrg# 983874c14cd6Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 983974c14cd6Smrg# usually requires less dependencies and may be built and run under less 984074c14cd6Smrg# stringent environments than integration tests. 984174c14cd6Smrg# 984274c14cd6Smrg# Interface to module: 984374c14cd6Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 984474c14cd6Smrg# enable_integration_tests: used in configure.ac for additional configuration 984574c14cd6Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 984674c14cd6Smrg# 'no' user instructs the module not to build tests 984774c14cd6Smrg# parm1: specify the default value, yes or no. 984874c14cd6Smrg# 984974c14cd6SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 985074c14cd6SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 985174c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 985274c14cd6SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 985374c14cd6Smrg [Enable building integration test cases (default: ]_defopt[)]), 985474c14cd6Smrg [enable_integration_tests=$enableval], 985574c14cd6Smrg [enable_integration_tests=]_defopt) 985674c14cd6Smrgm4_undefine([_defopt]) 985774c14cd6SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 985874c14cd6Smrg [test "x$enable_integration_tests" != xno]) 985974c14cd6SmrgAC_MSG_CHECKING([whether to build unit test cases]) 986074c14cd6SmrgAC_MSG_RESULT([$enable_integration_tests]) 986174c14cd6Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 986274c14cd6Smrg 986374c14cd6Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 986474c14cd6Smrg# ---------------------------------------- 986574c14cd6Smrg# Minimum version: 1.13.0 986674c14cd6Smrg# 986774c14cd6Smrg# GLib is a library which provides advanced data structures and functions. 986874c14cd6Smrg# This macro enables a module to test for the presence of Glib. 986974c14cd6Smrg# 987074c14cd6Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 987174c14cd6Smrg# Otherwise the value of $enable_unit_tests is blank. 987274c14cd6Smrg# 987374c14cd6Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 987474c14cd6Smrg# test support usually requires less dependencies and may be built and run under 987574c14cd6Smrg# less stringent environments than integration tests. 987674c14cd6Smrg# 987774c14cd6Smrg# Interface to module: 987874c14cd6Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 987974c14cd6Smrg# with_glib: used in configure.ac to know if GLib has been found 988074c14cd6Smrg# --with-glib: 'yes' user instructs the module to use glib 988174c14cd6Smrg# 'no' user instructs the module not to use glib 988274c14cd6Smrg# 988374c14cd6SmrgAC_DEFUN([XORG_WITH_GLIB],[ 988474c14cd6SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 988574c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 988674c14cd6SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 988774c14cd6Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 988874c14cd6Smrg [with_glib=$withval], [with_glib=]_defopt) 988974c14cd6Smrgm4_undefine([_defopt]) 989074c14cd6Smrg 989174c14cd6Smrghave_glib=no 989274c14cd6Smrg# Do not probe GLib if user explicitly disabled unit testing 989374c14cd6Smrgif test "x$enable_unit_tests" != x"no"; then 989474c14cd6Smrg # Do not probe GLib if user explicitly disabled it 989574c14cd6Smrg if test "x$with_glib" != x"no"; then 989674c14cd6Smrg m4_ifval( 989774c14cd6Smrg [$1], 989874c14cd6Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 989974c14cd6Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 990074c14cd6Smrg ) 990174c14cd6Smrg fi 990274c14cd6Smrgfi 990374c14cd6Smrg 990474c14cd6Smrg# Not having GLib when unit testing has been explicitly requested is an error 990574c14cd6Smrgif test "x$enable_unit_tests" = x"yes"; then 990674c14cd6Smrg if test "x$have_glib" = x"no"; then 990774c14cd6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 990874c14cd6Smrg fi 990974c14cd6Smrgfi 991074c14cd6Smrg 991174c14cd6Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 991274c14cd6Smrgif test "x$enable_unit_tests" = x"no"; then 991374c14cd6Smrg if test "x$with_glib" = x"yes"; then 991474c14cd6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 991574c14cd6Smrg fi 991674c14cd6Smrgfi 991774c14cd6Smrg 991874c14cd6Smrg# Not having GLib when it has been explicitly requested is an error 991974c14cd6Smrgif test "x$with_glib" = x"yes"; then 992074c14cd6Smrg if test "x$have_glib" = x"no"; then 992174c14cd6Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 992274c14cd6Smrg fi 992374c14cd6Smrgfi 992474c14cd6Smrg 992574c14cd6SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 992674c14cd6Smrg]) # XORG_WITH_GLIB 992774c14cd6Smrg 992874c14cd6Smrg# XORG_LD_WRAP([required|optional]) 992974c14cd6Smrg# --------------------------------- 993074c14cd6Smrg# Minimum version: 1.13.0 993174c14cd6Smrg# 993274c14cd6Smrg# Check if linker supports -wrap, passed via compiler flags 993374c14cd6Smrg# 993474c14cd6Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 993574c14cd6Smrg# Otherwise the value of $enable_unit_tests is blank. 993674c14cd6Smrg# 993774c14cd6Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 993874c14cd6Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 993974c14cd6Smrg# available, an argument of "optional" allows use when some unit tests require 994074c14cd6Smrg# ld -wrap and others do not. 994174c14cd6Smrg# 994274c14cd6SmrgAC_DEFUN([XORG_LD_WRAP],[ 994374c14cd6SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 994474c14cd6Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 994574c14cd6Smrg void __wrap_exit(int status) { return; }], 994674c14cd6Smrg [exit(0);])]) 994774c14cd6Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 994874c14cd6Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 994974c14cd6Smrg if test "x$have_ld_wrap" = x"no"; then 995074c14cd6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 995174c14cd6Smrg fi 995274c14cd6Smrgfi 995374c14cd6SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 995474c14cd6Smrg# 995574c14cd6Smrg]) # XORG_LD_WRAP 995674c14cd6Smrg 995774c14cd6Smrg# XORG_CHECK_LINKER_FLAGS 995874c14cd6Smrg# ----------------------- 995974c14cd6Smrg# SYNOPSIS 996074c14cd6Smrg# 996174c14cd6Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 996274c14cd6Smrg# 996374c14cd6Smrg# DESCRIPTION 996474c14cd6Smrg# 996574c14cd6Smrg# Check whether the given linker FLAGS work with the current language's 996674c14cd6Smrg# linker, or whether they give an error. 996774c14cd6Smrg# 996874c14cd6Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 996974c14cd6Smrg# success/failure. 997074c14cd6Smrg# 997174c14cd6Smrg# PROGRAM-SOURCE is the program source to link with, if needed 997274c14cd6Smrg# 997374c14cd6Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 997474c14cd6Smrg# 997574c14cd6Smrg# LICENSE 997674c14cd6Smrg# 997774c14cd6Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 997874c14cd6Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 997974c14cd6Smrg# Copyright (c) 2009 Matteo Frigo 998074c14cd6Smrg# 998174c14cd6Smrg# This program is free software: you can redistribute it and/or modify it 998274c14cd6Smrg# under the terms of the GNU General Public License as published by the 998374c14cd6Smrg# Free Software Foundation, either version 3 of the License, or (at your 998474c14cd6Smrg# option) any later version. 998574c14cd6Smrg# 998674c14cd6Smrg# This program is distributed in the hope that it will be useful, but 998774c14cd6Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 998874c14cd6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 998974c14cd6Smrg# Public License for more details. 999074c14cd6Smrg# 999174c14cd6Smrg# You should have received a copy of the GNU General Public License along 999274c14cd6Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 999374c14cd6Smrg# 999474c14cd6Smrg# As a special exception, the respective Autoconf Macro's copyright owner 999574c14cd6Smrg# gives unlimited permission to copy, distribute and modify the configure 999674c14cd6Smrg# scripts that are the output of Autoconf when processing the Macro. You 999774c14cd6Smrg# need not follow the terms of the GNU General Public License when using 999874c14cd6Smrg# or distributing such scripts, even though portions of the text of the 999974c14cd6Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1000074c14cd6Smrg# all other use of the material that constitutes the Autoconf Macro. 1000174c14cd6Smrg# 1000274c14cd6Smrg# This special exception to the GPL applies to versions of the Autoconf 1000374c14cd6Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1000474c14cd6Smrg# modified version of the Autoconf Macro, you may extend this special 1000574c14cd6Smrg# exception to the GPL to apply to your modified version as well.# 1000674c14cd6SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1000774c14cd6Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1000874c14cd6Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1000974c14cd6SmrgAS_LITERAL_IF([$1], 1001074c14cd6Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1001174c14cd6Smrg ax_save_FLAGS=$LDFLAGS 1001274c14cd6Smrg LDFLAGS="$1" 1001374c14cd6Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1001474c14cd6Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1001574c14cd6Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1001674c14cd6Smrg LDFLAGS=$ax_save_FLAGS])], 1001774c14cd6Smrg [ax_save_FLAGS=$LDFLAGS 1001874c14cd6Smrg LDFLAGS="$1" 1001974c14cd6Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1002074c14cd6Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1002174c14cd6Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1002274c14cd6Smrg LDFLAGS=$ax_save_FLAGS]) 1002374c14cd6Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1002474c14cd6SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1002574c14cd6Smrgif test "x$xorg_check_linker_flags" = xyes; then 1002674c14cd6Smrg m4_default([$2], :) 1002774c14cd6Smrgelse 1002874c14cd6Smrg m4_default([$3], :) 1002974c14cd6Smrgfi 1003074c14cd6Smrg]) # XORG_CHECK_LINKER_FLAGS 1003174c14cd6Smrg 1003274c14cd6Smrg# XORG_MEMORY_CHECK_FLAGS 1003374c14cd6Smrg# ----------------------- 1003474c14cd6Smrg# Minimum version: 1.16.0 1003574c14cd6Smrg# 1003674c14cd6Smrg# This macro attempts to find appropriate memory checking functionality 1003774c14cd6Smrg# for various platforms which unit testing code may use to catch various 1003874c14cd6Smrg# forms of memory allocation and access errors in testing. 1003974c14cd6Smrg# 1004074c14cd6Smrg# Interface to module: 1004174c14cd6Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1004274c14cd6Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1004374c14cd6Smrg# 1004474c14cd6Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1004574c14cd6Smrg# 1004674c14cd6SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1004774c14cd6Smrg 1004874c14cd6SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1004974c14cd6SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1005074c14cd6Smrg [Environment variables to enable memory checking in tests]) 1005174c14cd6Smrg 1005274c14cd6Smrg# Check for different types of support on different platforms 1005374c14cd6Smrgcase $host_os in 1005474c14cd6Smrg solaris*) 1005574c14cd6Smrg AC_CHECK_LIB([umem], [umem_alloc], 1005674c14cd6Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1005774c14cd6Smrg ;; 1005874c14cd6Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1005974c14cd6Smrg # both directly and inverted, so should not be 0 or 255. 1006074c14cd6Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1006174c14cd6Smrg ;; 1006274c14cd6Smrg darwin*) 1006374c14cd6Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1006474c14cd6Smrg ;; 1006574c14cd6Smrg *bsd*) 1006674c14cd6Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1006774c14cd6Smrg ;; 1006874c14cd6Smrgesac 1006974c14cd6Smrg 1007074c14cd6Smrg# User supplied flags override default flags 1007174c14cd6Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1007274c14cd6Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1007374c14cd6Smrgfi 1007474c14cd6Smrg 1007574c14cd6SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1007674c14cd6Smrg]) # XORG_WITH_LINT 1007774c14cd6Smrg 1007872b676d7Smrg# XORG_CHECK_MALLOC_ZERO 1007972b676d7Smrg# ---------------------- 1008072b676d7Smrg# Minimum version: 1.0.0 1008172b676d7Smrg# 1008272b676d7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1008372b676d7Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1008472b676d7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1008572b676d7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1008672b676d7SmrgAC_ARG_ENABLE(malloc0returnsnull, 10087e35772b2Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1008872b676d7Smrg [malloc(0) returns NULL (default: auto)]), 1008972b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1009072b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1009172b676d7Smrg 1009272b676d7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1009372b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1009474c14cd6Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1009574c14cd6Smrg#include <stdlib.h> 1009674c14cd6Smrg],[ 1009772b676d7Smrg char *m0, *r0, *c0, *p; 1009872b676d7Smrg m0 = malloc(0); 1009972b676d7Smrg p = malloc(10); 1010072b676d7Smrg r0 = realloc(p,0); 1010174c14cd6Smrg c0 = calloc(0,10); 1010274c14cd6Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1010374c14cd6Smrg])], 1010472b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 10105e35772b2Smrg [MALLOC_ZERO_RETURNS_NULL=no], 10106e35772b2Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1010772b676d7Smrgfi 1010872b676d7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1010972b676d7Smrg 1011072b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1011172b676d7Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1011272b676d7Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1011372b676d7Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1011472b676d7Smrgelse 1011572b676d7Smrg MALLOC_ZERO_CFLAGS="" 1011672b676d7Smrg XMALLOC_ZERO_CFLAGS="" 1011772b676d7Smrg XTMALLOC_ZERO_CFLAGS="" 1011872b676d7Smrgfi 1011972b676d7Smrg 1012072b676d7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1012172b676d7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1012272b676d7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1012372b676d7Smrg]) # XORG_CHECK_MALLOC_ZERO 1012472b676d7Smrg 1012572b676d7Smrg# XORG_WITH_LINT() 1012672b676d7Smrg# ---------------- 1012772b676d7Smrg# Minimum version: 1.1.0 1012872b676d7Smrg# 10129e35772b2Smrg# This macro enables the use of a tool that flags some suspicious and 10130e35772b2Smrg# non-portable constructs (likely to be bugs) in C language source code. 10131e35772b2Smrg# It will attempt to locate the tool and use appropriate options. 10132e35772b2Smrg# There are various lint type tools on different platforms. 10133e35772b2Smrg# 10134e35772b2Smrg# Interface to module: 10135e35772b2Smrg# LINT: returns the path to the tool found on the platform 10136e35772b2Smrg# or the value set to LINT on the configure cmd line 10137e35772b2Smrg# also an Automake conditional 10138e35772b2Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10139e35772b2Smrg# 10140e35772b2Smrg# --with-lint: 'yes' user instructs the module to use lint 10141e35772b2Smrg# 'no' user instructs the module not to use lint (default) 10142e35772b2Smrg# 10143e35772b2Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10144e35772b2Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1014572b676d7Smrg# 1014672b676d7SmrgAC_DEFUN([XORG_WITH_LINT],[ 1014772b676d7Smrg 10148e35772b2SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10149e35772b2SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10150e35772b2SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1015172b676d7Smrg [Use a lint-style source code checker (default: disabled)])], 1015272b676d7Smrg [use_lint=$withval], [use_lint=no]) 10153e35772b2Smrg 10154e35772b2Smrg# Obtain platform specific info like program name and options 10155e35772b2Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10156e35772b2Smrgcase $host_os in 10157e35772b2Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10158e35772b2Smrg lint_name=splint 10159e35772b2Smrg lint_options="-badflag" 10160e35772b2Smrg ;; 10161e35772b2Smrg *freebsd* | *netbsd*) 10162e35772b2Smrg lint_name=lint 10163e35772b2Smrg lint_options="-u -b" 10164e35772b2Smrg ;; 10165e35772b2Smrg *solaris*) 10166e35772b2Smrg lint_name=lint 10167e35772b2Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10168e35772b2Smrg ;; 10169e35772b2Smrgesac 10170e35772b2Smrg 10171e35772b2Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10172e35772b2Smrgif test "x$use_lint" = x"yes" ; then 10173e35772b2Smrg AC_PATH_PROG([LINT], [$lint_name]) 10174e35772b2Smrg if test "x$LINT" = "x"; then 10175e35772b2Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10176e35772b2Smrg fi 10177e35772b2Smrgelif test "x$use_lint" = x"no" ; then 10178e35772b2Smrg if test "x$LINT" != "x"; then 10179e35772b2Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10180e35772b2Smrg fi 1018172b676d7Smrgelse 10182e35772b2Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1018372b676d7Smrgfi 10184e35772b2Smrg 10185e35772b2Smrg# User supplied flags override default flags 10186e35772b2Smrgif test "x$LINT_FLAGS" != "x"; then 10187e35772b2Smrg lint_options=$LINT_FLAGS 1018872b676d7Smrgfi 1018972b676d7Smrg 10190e35772b2SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10191e35772b2SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1019272b676d7Smrg 1019372b676d7Smrg]) # XORG_WITH_LINT 1019472b676d7Smrg 1019572b676d7Smrg# XORG_LINT_LIBRARY(LIBNAME) 1019672b676d7Smrg# -------------------------- 1019772b676d7Smrg# Minimum version: 1.1.0 1019872b676d7Smrg# 1019972b676d7Smrg# Sets up flags for building lint libraries for checking programs that call 1020072b676d7Smrg# functions in the library. 1020172b676d7Smrg# 10202e35772b2Smrg# Interface to module: 10203e35772b2Smrg# LINTLIB - Automake variable with the name of lint library file to make 10204e35772b2Smrg# MAKE_LINT_LIB - Automake conditional 10205e35772b2Smrg# 10206e35772b2Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10207e35772b2Smrg# - 'no' user instructs the module not to create a lint library (default) 1020872b676d7Smrg 1020972b676d7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1021072b676d7SmrgAC_REQUIRE([XORG_WITH_LINT]) 10211e35772b2SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1021272b676d7Smrg [Create lint library (default: disabled)])], 1021372b676d7Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10214e35772b2Smrg 10215e35772b2Smrgif test "x$make_lint_lib" = x"yes" ; then 10216e35772b2Smrg LINTLIB=llib-l$1.ln 10217e35772b2Smrg if test "x$LINT" = "x"; then 10218e35772b2Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10219e35772b2Smrg fi 10220e35772b2Smrgelif test "x$make_lint_lib" != x"no" ; then 10221e35772b2Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1022272b676d7Smrgfi 10223e35772b2Smrg 1022472b676d7SmrgAC_SUBST(LINTLIB) 1022572b676d7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1022672b676d7Smrg 1022772b676d7Smrg]) # XORG_LINT_LIBRARY 1022872b676d7Smrg 1022974c14cd6Smrg# XORG_COMPILER_BRAND 1023074c14cd6Smrg# ------------------- 1023174c14cd6Smrg# Minimum version: 1.14.0 1023274c14cd6Smrg# 1023374c14cd6Smrg# Checks for various brands of compilers and sets flags as appropriate: 1023474c14cd6Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1023574c14cd6Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1023674c14cd6Smrg# clang compiler - sets CLANGCC to "yes" 1023774c14cd6Smrg# Intel compiler - sets INTELCC to "yes" 1023874c14cd6Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1023974c14cd6Smrg# 1024074c14cd6SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1024174c14cd6SmrgAC_LANG_CASE( 1024274c14cd6Smrg [C], [ 1024374c14cd6Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1024474c14cd6Smrg ], 1024574c14cd6Smrg [C++], [ 1024674c14cd6Smrg AC_REQUIRE([AC_PROG_CXX]) 1024774c14cd6Smrg ] 1024874c14cd6Smrg) 1024974c14cd6SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1025074c14cd6SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1025174c14cd6SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1025274c14cd6Smrg]) # XORG_COMPILER_BRAND 1025374c14cd6Smrg 1025474c14cd6Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1025574c14cd6Smrg# --------------- 1025674c14cd6Smrg# Minimum version: 1.16.0 1025774c14cd6Smrg# 1025874c14cd6Smrg# Test if the compiler works when passed the given flag as a command line argument. 1025974c14cd6Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1026074c14cd6Smrg# next flag in the list until there are no more options. 1026174c14cd6Smrg# 1026274c14cd6Smrg# Note that this does not guarantee that the compiler supports the flag as some 1026374c14cd6Smrg# compilers will simply ignore arguments that they do not understand, but we do 1026474c14cd6Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1026574c14cd6Smrg# -Werror=unused-command-line-argument 1026674c14cd6Smrg# 1026774c14cd6SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1026874c14cd6Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1026974c14cd6Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1027074c14cd6Smrg 1027174c14cd6SmrgAC_LANG_COMPILER_REQUIRE 1027274c14cd6Smrg 1027374c14cd6SmrgAC_LANG_CASE( 1027474c14cd6Smrg [C], [ 1027574c14cd6Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1027674c14cd6Smrg define([PREFIX], [C]) 1027774c14cd6Smrg define([CACHE_PREFIX], [cc]) 1027874c14cd6Smrg define([COMPILER], [$CC]) 1027974c14cd6Smrg ], 1028074c14cd6Smrg [C++], [ 1028174c14cd6Smrg define([PREFIX], [CXX]) 1028274c14cd6Smrg define([CACHE_PREFIX], [cxx]) 1028374c14cd6Smrg define([COMPILER], [$CXX]) 1028474c14cd6Smrg ] 1028574c14cd6Smrg) 1028674c14cd6Smrg 1028774c14cd6Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1028874c14cd6Smrg 1028974c14cd6Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1029074c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1029174c14cd6Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1029274c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1029374c14cd6Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1029474c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1029574c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1029674c14cd6Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1029774c14cd6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1029874c14cd6Smrgfi 1029974c14cd6Smrg 1030074c14cd6Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1030174c14cd6Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1030274c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1030374c14cd6Smrg fi 1030474c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1030574c14cd6Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1030674c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1030774c14cd6Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1030874c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1030974c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1031074c14cd6Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1031174c14cd6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1031274c14cd6Smrgfi 1031374c14cd6Smrg 1031474c14cd6Smrgfound="no" 1031574c14cd6Smrgm4_foreach([flag], m4_cdr($@), [ 1031674c14cd6Smrg if test $found = "no" ; then 1031774c14cd6Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1031874c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1031974c14cd6Smrg fi 1032074c14cd6Smrg 1032174c14cd6Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 1032274c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1032374c14cd6Smrg fi 1032474c14cd6Smrg 1032574c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1032674c14cd6Smrg 1032774c14cd6Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1032874c14cd6Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1032974c14cd6Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1033074c14cd6Smrg AC_CACHE_VAL($cacheid, 1033174c14cd6Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1033274c14cd6Smrg [eval $cacheid=yes], 1033374c14cd6Smrg [eval $cacheid=no])]) 1033474c14cd6Smrg 1033574c14cd6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1033674c14cd6Smrg 1033774c14cd6Smrg eval supported=\$$cacheid 1033874c14cd6Smrg AC_MSG_RESULT([$supported]) 1033974c14cd6Smrg if test "$supported" = "yes" ; then 1034074c14cd6Smrg $1="$$1 ]flag[" 1034174c14cd6Smrg found="yes" 1034274c14cd6Smrg fi 1034374c14cd6Smrg fi 1034474c14cd6Smrg]) 1034574c14cd6Smrg]) # XORG_TESTSET_CFLAG 1034674c14cd6Smrg 1034774c14cd6Smrg# XORG_COMPILER_FLAGS 1034874c14cd6Smrg# --------------- 1034974c14cd6Smrg# Minimum version: 1.16.0 1035074c14cd6Smrg# 1035174c14cd6Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1035274c14cd6Smrg# arguments supported by the selected compiler which do NOT alter the generated 1035374c14cd6Smrg# code. These arguments will cause the compiler to print various warnings 1035474c14cd6Smrg# during compilation AND turn a conservative set of warnings into errors. 1035574c14cd6Smrg# 1035674c14cd6Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1035774c14cd6Smrg# future versions of util-macros as options are added to new compilers. 1035874c14cd6Smrg# 1035974c14cd6SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1036074c14cd6SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1036174c14cd6Smrg 1036274c14cd6SmrgAC_ARG_ENABLE(selective-werror, 1036374c14cd6Smrg AS_HELP_STRING([--disable-selective-werror], 1036474c14cd6Smrg [Turn off selective compiler errors. (default: enabled)]), 1036574c14cd6Smrg [SELECTIVE_WERROR=$enableval], 1036674c14cd6Smrg [SELECTIVE_WERROR=yes]) 1036774c14cd6Smrg 1036874c14cd6SmrgAC_LANG_CASE( 1036974c14cd6Smrg [C], [ 1037074c14cd6Smrg define([PREFIX], [C]) 1037174c14cd6Smrg ], 1037274c14cd6Smrg [C++], [ 1037374c14cd6Smrg define([PREFIX], [CXX]) 1037474c14cd6Smrg ] 1037574c14cd6Smrg) 1037674c14cd6Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1037774c14cd6Smrgif test "x$SUNCC" = "xyes"; then 1037874c14cd6Smrg [BASE_]PREFIX[FLAGS]="-v" 1037974c14cd6Smrgelse 1038074c14cd6Smrg [BASE_]PREFIX[FLAGS]="" 1038174c14cd6Smrgfi 1038274c14cd6Smrg 1038374c14cd6Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1038474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1038574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1038674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1038774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1038874c14cd6Smrg 1038974c14cd6SmrgAC_LANG_CASE( 1039074c14cd6Smrg [C], [ 1039174c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1039274c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1039374c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1039474c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1039574c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 1039674c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1039774c14cd6Smrg ] 1039874c14cd6Smrg) 1039974c14cd6Smrg 1040074c14cd6Smrg# This chunk adds additional warnings that could catch undesired effects. 1040174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1040274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1040374c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1040474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1040574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1040674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1040774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1040874c14cd6Smrg 1040974c14cd6Smrg# These are currently disabled because they are noisy. They will be enabled 1041074c14cd6Smrg# in the future once the codebase is sufficiently modernized to silence 1041174c14cd6Smrg# them. For now, I don't want them to drown out the other warnings. 1041274c14cd6Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1041374c14cd6Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1041474c14cd6Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1041574c14cd6Smrg 1041674c14cd6Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1041774c14cd6Smrg# when there are problems that should be fixed. 1041874c14cd6Smrg 1041974c14cd6Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1042074c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1042174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1042274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1042374c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1042474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1042574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1042674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1042774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1042874c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1042974c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1043074c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1043174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1043274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1043374c14cd6Smrgelse 1043474c14cd6SmrgAC_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]) 1043574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1043674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1043774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1043874c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1043974c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1044074c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1044174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1044274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1044374c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1044474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1044574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1044674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1044774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1044874c14cd6Smrgfi 1044974c14cd6Smrg 1045074c14cd6SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1045174c14cd6Smrg]) # XORG_COMPILER_FLAGS 1045274c14cd6Smrg 10453e47418d9Smrg# XORG_CWARNFLAGS 10454e47418d9Smrg# --------------- 10455e47418d9Smrg# Minimum version: 1.2.0 1045674c14cd6Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 10457e47418d9Smrg# 10458e47418d9Smrg# Defines CWARNFLAGS to enable C compiler warnings. 10459e47418d9Smrg# 1046074c14cd6Smrg# This function is deprecated because it defines -fno-strict-aliasing 1046174c14cd6Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1046274c14cd6Smrg# is needed, then it should be added explicitly in the module when 1046374c14cd6Smrg# it is updated to use BASE_CFLAGS. 1046474c14cd6Smrg# 10465e47418d9SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1046674c14cd6SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1046774c14cd6SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1046874c14cd6SmrgAC_LANG_CASE( 1046974c14cd6Smrg [C], [ 1047074c14cd6Smrg CWARNFLAGS="$BASE_CFLAGS" 1047174c14cd6Smrg if test "x$GCC" = xyes ; then 1047274c14cd6Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1047374c14cd6Smrg fi 1047474c14cd6Smrg AC_SUBST(CWARNFLAGS) 1047574c14cd6Smrg ] 1047674c14cd6Smrg) 10477e47418d9Smrg]) # XORG_CWARNFLAGS 10478e35772b2Smrg 10479e35772b2Smrg# XORG_STRICT_OPTION 10480e35772b2Smrg# ----------------------- 10481e35772b2Smrg# Minimum version: 1.3.0 10482e35772b2Smrg# 1048374c14cd6Smrg# Add configure option to enable strict compilation flags, such as treating 1048474c14cd6Smrg# warnings as fatal errors. 1048574c14cd6Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1048674c14cd6Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1048774c14cd6Smrg# 1048874c14cd6Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1048974c14cd6Smrg# when strict compilation is unconditionally desired. 10490e35772b2SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 10491e35772b2SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1049274c14cd6SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10493e35772b2Smrg 10494e35772b2SmrgAC_ARG_ENABLE(strict-compilation, 10495e35772b2Smrg AS_HELP_STRING([--enable-strict-compilation], 10496e35772b2Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 10497e35772b2Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1049874c14cd6Smrg 1049974c14cd6SmrgAC_LANG_CASE( 1050074c14cd6Smrg [C], [ 1050174c14cd6Smrg define([PREFIX], [C]) 1050274c14cd6Smrg ], 1050374c14cd6Smrg [C++], [ 1050474c14cd6Smrg define([PREFIX], [CXX]) 1050574c14cd6Smrg ] 1050674c14cd6Smrg) 1050774c14cd6Smrg 1050874c14cd6Smrg[STRICT_]PREFIX[FLAGS]="" 1050974c14cd6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1051074c14cd6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1051174c14cd6Smrg 1051274c14cd6Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1051374c14cd6Smrg# activate it with -Werror, so we add it here explicitly. 1051474c14cd6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1051574c14cd6Smrg 10516e35772b2Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1051774c14cd6Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1051874c14cd6Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 10519e35772b2Smrgfi 1052074c14cd6SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1052174c14cd6SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1052274c14cd6SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 10523e35772b2Smrg]) # XORG_STRICT_OPTION 10524e35772b2Smrg 10525e35772b2Smrg# XORG_DEFAULT_OPTIONS 10526e35772b2Smrg# -------------------- 10527e35772b2Smrg# Minimum version: 1.3.0 10528e35772b2Smrg# 10529e35772b2Smrg# Defines default options for X.Org modules. 10530e35772b2Smrg# 10531e35772b2SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10532e35772b2SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1053374c14cd6SmrgXORG_COMPILER_FLAGS 10534e35772b2SmrgXORG_CWARNFLAGS 10535e35772b2SmrgXORG_STRICT_OPTION 10536e35772b2SmrgXORG_RELEASE_VERSION 10537e35772b2SmrgXORG_CHANGELOG 10538e35772b2SmrgXORG_INSTALL 10539e35772b2SmrgXORG_MANPAGE_SECTIONS 10540e35772b2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 10541e35772b2Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 10542e35772b2Smrg]) # XORG_DEFAULT_OPTIONS 10543e35772b2Smrg 10544e35772b2Smrg# XORG_INSTALL() 10545e35772b2Smrg# ---------------- 10546e35772b2Smrg# Minimum version: 1.4.0 10547e35772b2Smrg# 10548e35772b2Smrg# Defines the variable INSTALL_CMD as the command to copy 10549e35772b2Smrg# INSTALL from $prefix/share/util-macros. 10550e35772b2Smrg# 10551e35772b2SmrgAC_DEFUN([XORG_INSTALL], [ 10552e35772b2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10553e35772b2Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 10554e35772b2SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 10555e35772b2Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 10556e35772b2Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 10557e35772b2Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 10558e35772b2SmrgAC_SUBST([INSTALL_CMD]) 10559e35772b2Smrg]) # XORG_INSTALL 1056072b676d7Smrgdnl Copyright 2005 Red Hat, Inc 1056172b676d7Smrgdnl 1056272b676d7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1056372b676d7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1056472b676d7Smrgdnl the above copyright notice appear in all copies and that both that 1056572b676d7Smrgdnl copyright notice and this permission notice appear in supporting 1056672b676d7Smrgdnl documentation. 1056772b676d7Smrgdnl 1056872b676d7Smrgdnl The above copyright notice and this permission notice shall be included 1056972b676d7Smrgdnl in all copies or substantial portions of the Software. 1057072b676d7Smrgdnl 1057172b676d7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1057272b676d7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1057372b676d7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1057472b676d7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1057572b676d7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1057672b676d7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1057772b676d7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1057872b676d7Smrgdnl 1057972b676d7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1058072b676d7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1058172b676d7Smrgdnl other dealings in this Software without prior written authorization 1058272b676d7Smrgdnl from the copyright holders. 1058372b676d7Smrgdnl 1058472b676d7Smrg 1058572b676d7Smrg# XORG_RELEASE_VERSION 1058672b676d7Smrg# -------------------- 10587e35772b2Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1058872b676d7Smrg 1058972b676d7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 105901fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 105911fd23544Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 105921fd23544Smrg [Major version of this package]) 105931fd23544Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 105941fd23544Smrg if test "x$PVM" = "x"; then 105951fd23544Smrg PVM="0" 105961fd23544Smrg fi 105971fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 105981fd23544Smrg [$PVM], 105991fd23544Smrg [Minor version of this package]) 106001fd23544Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 106011fd23544Smrg if test "x$PVP" = "x"; then 106021fd23544Smrg PVP="0" 106031fd23544Smrg fi 106041fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 106051fd23544Smrg [$PVP], 106061fd23544Smrg [Patch version of this package]) 1060772b676d7Smrg]) 1060872b676d7Smrg 10609e47418d9Smrg# XORG_CHANGELOG() 10610e47418d9Smrg# ---------------- 10611e47418d9Smrg# Minimum version: 1.2.0 10612e47418d9Smrg# 10613e47418d9Smrg# Defines the variable CHANGELOG_CMD as the command to generate 10614e47418d9Smrg# ChangeLog from git. 10615e47418d9Smrg# 10616e47418d9Smrg# 10617e47418d9SmrgAC_DEFUN([XORG_CHANGELOG], [ 10618e35772b2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 10619e35772b2Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 10620e35772b2Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 10621e47418d9Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 10622e47418d9SmrgAC_SUBST([CHANGELOG_CMD]) 10623e47418d9Smrg]) # XORG_CHANGELOG 10624e47418d9Smrg 10625e35772b2Smrgdnl Copyright 2005 Red Hat, Inc 10626e35772b2Smrgdnl 10627e35772b2Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10628e35772b2Smrgdnl documentation for any purpose is hereby granted without fee, provided that 10629e35772b2Smrgdnl the above copyright notice appear in all copies and that both that 10630e35772b2Smrgdnl copyright notice and this permission notice appear in supporting 10631e35772b2Smrgdnl documentation. 10632e35772b2Smrgdnl 10633e35772b2Smrgdnl The above copyright notice and this permission notice shall be included 10634e35772b2Smrgdnl in all copies or substantial portions of the Software. 10635e35772b2Smrgdnl 10636e35772b2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10637e35772b2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10638e35772b2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10639e35772b2Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10640e35772b2Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10641e35772b2Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10642e35772b2Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 10643e35772b2Smrgdnl 10644e35772b2Smrgdnl Except as contained in this notice, the name of the copyright holders shall 10645e35772b2Smrgdnl not be used in advertising or otherwise to promote the sale, use or 10646e35772b2Smrgdnl other dealings in this Software without prior written authorization 10647e35772b2Smrgdnl from the copyright holders. 10648e35772b2Smrgdnl 10649e35772b2Smrg 10650e35772b2Smrg# XORG_DRIVER_CHECK_EXT() 10651e35772b2Smrg# -------------------------- 10652e35772b2Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 10653e35772b2Smrg# is defined, then add $1 to $REQUIRED_MODULES. 10654e35772b2Smrg 10655e35772b2SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 10656e35772b2Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10657e35772b2Smrg SAVE_CFLAGS="$CFLAGS" 10658e35772b2Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 10659e35772b2Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 10660e35772b2Smrg#include "xorg-server.h" 10661e35772b2Smrg#if !defined $1 10662e35772b2Smrg#error $1 not defined 10663e35772b2Smrg#endif 10664e35772b2Smrg ]])], 10665e35772b2Smrg [_EXT_CHECK=yes], 10666e35772b2Smrg [_EXT_CHECK=no]) 10667e35772b2Smrg CFLAGS="$SAVE_CFLAGS" 10668e35772b2Smrg AC_MSG_CHECKING([if $1 is defined]) 10669e35772b2Smrg AC_MSG_RESULT([$_EXT_CHECK]) 10670e35772b2Smrg if test "$_EXT_CHECK" != no; then 10671e35772b2Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 10672e35772b2Smrg fi 10673e35772b2Smrg]) 10674e35772b2Smrg 1067574c14cd6Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 1067674c14cd6Smrg# Foundation, Inc. 1067772b676d7Smrg# 1067872b676d7Smrg# This file is free software; the Free Software Foundation 1067972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1068072b676d7Smrg# with or without modifications, as long as this notice is preserved. 1068172b676d7Smrg 1068274c14cd6Smrg# serial 1 1068374c14cd6Smrg 1068472b676d7Smrg# AM_AUTOMAKE_VERSION(VERSION) 1068572b676d7Smrg# ---------------------------- 1068672b676d7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1068772b676d7Smrg# generated from the m4 files accompanying Automake X.Y. 106881fd23544Smrg# (This private macro should not be called outside this file.) 106891fd23544SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 10690e47418d9Smrg[am__api_version='1.11' 106911fd23544Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 106921fd23544Smrgdnl require some minimum version. Point them to the right macro. 1069374c14cd6Smrgm4_if([$1], [1.11.3], [], 106941fd23544Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 106951fd23544Smrg]) 106961fd23544Smrg 106971fd23544Smrg# _AM_AUTOCONF_VERSION(VERSION) 106981fd23544Smrg# ----------------------------- 106991fd23544Smrg# aclocal traces this macro to find the Autoconf version. 107001fd23544Smrg# This is a private macro too. Using m4_define simplifies 107011fd23544Smrg# the logic in aclocal, which can simply ignore this definition. 107021fd23544Smrgm4_define([_AM_AUTOCONF_VERSION], []) 1070372b676d7Smrg 1070472b676d7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1070572b676d7Smrg# ------------------------------- 107061fd23544Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 10707e47418d9Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1070872b676d7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1070974c14cd6Smrg[AM_AUTOMAKE_VERSION([1.11.3])dnl 107101fd23544Smrgm4_ifndef([AC_AUTOCONF_VERSION], 107111fd23544Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 10712e47418d9Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1071372b676d7Smrg 1071472b676d7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1071572b676d7Smrg 1071674c14cd6Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 1071772b676d7Smrg# 1071872b676d7Smrg# This file is free software; the Free Software Foundation 1071972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1072072b676d7Smrg# with or without modifications, as long as this notice is preserved. 1072172b676d7Smrg 1072274c14cd6Smrg# serial 1 1072374c14cd6Smrg 1072472b676d7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1072572b676d7Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 1072672b676d7Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 1072772b676d7Smrg# 1072872b676d7Smrg# Of course, Automake must honor this variable whenever it calls a 1072972b676d7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 1073072b676d7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 1073172b676d7Smrg# depending on how configure is run. This is pretty annoying, since 1073272b676d7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1073372b676d7Smrg# source directory, any form will work fine, but in subdirectories a 1073472b676d7Smrg# relative path needs to be adjusted first. 1073572b676d7Smrg# 1073672b676d7Smrg# $ac_aux_dir/missing 1073772b676d7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 1073872b676d7Smrg# $top_srcdir/$ac_aux_dir/missing 1073972b676d7Smrg# fails if $ac_aux_dir is absolute, 1074072b676d7Smrg# fails when called from a subdirectory in a VPATH build with 1074172b676d7Smrg# a relative $ac_aux_dir 1074272b676d7Smrg# 1074372b676d7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1074472b676d7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 1074572b676d7Smrg# harmless because $srcdir is `.', but things will broke when you 1074672b676d7Smrg# start a VPATH build or use an absolute $srcdir. 1074772b676d7Smrg# 1074872b676d7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1074972b676d7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1075072b676d7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1075172b676d7Smrg# and then we would define $MISSING as 1075272b676d7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 1075372b676d7Smrg# This will work as long as MISSING is not called from configure, because 1075472b676d7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 1075572b676d7Smrg# However there are other variables, like CC, which are often used in 1075672b676d7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1075772b676d7Smrg# 1075872b676d7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1075972b676d7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1076072b676d7Smrg# configured tree to be moved without reconfiguration. 1076172b676d7Smrg 1076272b676d7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1076372b676d7Smrg[dnl Rely on autoconf to set up CDPATH properly. 1076472b676d7SmrgAC_PREREQ([2.50])dnl 1076572b676d7Smrg# expand $ac_aux_dir to an absolute path 1076672b676d7Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 1076772b676d7Smrg]) 1076872b676d7Smrg 1076972b676d7Smrg# AM_CONDITIONAL -*- Autoconf -*- 1077072b676d7Smrg 10771e47418d9Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1077272b676d7Smrg# Free Software Foundation, Inc. 1077372b676d7Smrg# 1077472b676d7Smrg# This file is free software; the Free Software Foundation 1077572b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1077672b676d7Smrg# with or without modifications, as long as this notice is preserved. 1077772b676d7Smrg 10778e47418d9Smrg# serial 9 1077972b676d7Smrg 1078072b676d7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1078172b676d7Smrg# ------------------------------------- 1078272b676d7Smrg# Define a conditional. 1078372b676d7SmrgAC_DEFUN([AM_CONDITIONAL], 1078472b676d7Smrg[AC_PREREQ(2.52)dnl 1078572b676d7Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1078672b676d7Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 107871fd23544SmrgAC_SUBST([$1_TRUE])dnl 107881fd23544SmrgAC_SUBST([$1_FALSE])dnl 107891fd23544Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 107901fd23544Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 10791e47418d9Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1079272b676d7Smrgif $2; then 1079372b676d7Smrg $1_TRUE= 1079472b676d7Smrg $1_FALSE='#' 1079572b676d7Smrgelse 1079672b676d7Smrg $1_TRUE='#' 1079772b676d7Smrg $1_FALSE= 1079872b676d7Smrgfi 1079972b676d7SmrgAC_CONFIG_COMMANDS_PRE( 1080072b676d7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1080172b676d7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1080272b676d7SmrgUsually this means the macro was only invoked conditionally.]]) 1080372b676d7Smrgfi])]) 1080472b676d7Smrg 1080574c14cd6Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 1080674c14cd6Smrg# 2010, 2011 Free Software Foundation, Inc. 1080772b676d7Smrg# 1080872b676d7Smrg# This file is free software; the Free Software Foundation 1080972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1081072b676d7Smrg# with or without modifications, as long as this notice is preserved. 1081172b676d7Smrg 1081274c14cd6Smrg# serial 12 1081372b676d7Smrg 1081472b676d7Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1081572b676d7Smrg# written in clear, in which case automake, when reading aclocal.m4, 1081672b676d7Smrg# will think it sees a *use*, and therefore will trigger all it's 1081772b676d7Smrg# C support machinery. Also note that it means that autoscan, seeing 1081872b676d7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1081972b676d7Smrg 1082072b676d7Smrg 1082172b676d7Smrg# _AM_DEPENDENCIES(NAME) 1082272b676d7Smrg# ---------------------- 1082372b676d7Smrg# See how the compiler implements dependency checking. 1082472b676d7Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 1082572b676d7Smrg# We try a few techniques and use that to set a single cache variable. 1082672b676d7Smrg# 1082772b676d7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1082872b676d7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1082972b676d7Smrg# dependency, and given that the user is not expected to run this macro, 1083072b676d7Smrg# just rely on AC_PROG_CC. 1083172b676d7SmrgAC_DEFUN([_AM_DEPENDENCIES], 1083272b676d7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1083372b676d7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1083472b676d7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1083572b676d7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1083672b676d7Smrg 1083772b676d7Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1083872b676d7Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 1083972b676d7Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 108401fd23544Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 1084172b676d7Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1084272b676d7Smrg [depcc="$$1" am_compiler_list=]) 1084372b676d7Smrg 1084472b676d7SmrgAC_CACHE_CHECK([dependency style of $depcc], 1084572b676d7Smrg [am_cv_$1_dependencies_compiler_type], 1084672b676d7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1084772b676d7Smrg # We make a subdir and do the tests there. Otherwise we can end up 1084872b676d7Smrg # making bogus files that we don't know about and never remove. For 1084972b676d7Smrg # instance it was reported that on HP-UX the gcc test will end up 1085072b676d7Smrg # making a dummy file named `D' -- because `-MD' means `put the output 1085172b676d7Smrg # in D'. 1085274c14cd6Smrg rm -rf conftest.dir 1085372b676d7Smrg mkdir conftest.dir 1085472b676d7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1085572b676d7Smrg # using a relative directory. 1085672b676d7Smrg cp "$am_depcomp" conftest.dir 1085772b676d7Smrg cd conftest.dir 1085872b676d7Smrg # We will build objects and dependencies in a subdirectory because 1085972b676d7Smrg # it helps to detect inapplicable dependency modes. For instance 1086072b676d7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 1086172b676d7Smrg # side effect of compilation, but ICC will put the dependencies in 1086272b676d7Smrg # the current directory while Tru64 will put them in the object 1086372b676d7Smrg # directory. 1086472b676d7Smrg mkdir sub 1086572b676d7Smrg 1086672b676d7Smrg am_cv_$1_dependencies_compiler_type=none 1086772b676d7Smrg if test "$am_compiler_list" = ""; then 1086872b676d7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1086972b676d7Smrg fi 10870e47418d9Smrg am__universal=false 10871e47418d9Smrg m4_case([$1], [CC], 10872e47418d9Smrg [case " $depcc " in #( 10873e47418d9Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10874e47418d9Smrg esac], 10875e47418d9Smrg [CXX], 10876e47418d9Smrg [case " $depcc " in #( 10877e47418d9Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10878e47418d9Smrg esac]) 10879e47418d9Smrg 1088072b676d7Smrg for depmode in $am_compiler_list; do 1088172b676d7Smrg # Setup a source with many dependencies, because some compilers 1088272b676d7Smrg # like to wrap large dependency lists on column 80 (with \), and 1088372b676d7Smrg # we should not choose a depcomp mode which is confused by this. 1088472b676d7Smrg # 1088572b676d7Smrg # We need to recreate these files for each test, as the compiler may 1088672b676d7Smrg # overwrite some of them when testing with obscure command lines. 1088772b676d7Smrg # This happens at least with the AIX C compiler. 1088872b676d7Smrg : > sub/conftest.c 1088972b676d7Smrg for i in 1 2 3 4 5 6; do 1089072b676d7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 1089172b676d7Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 1089272b676d7Smrg # Solaris 8's {/usr,}/bin/sh. 1089372b676d7Smrg touch sub/conftst$i.h 1089472b676d7Smrg done 1089572b676d7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1089672b676d7Smrg 10897e47418d9Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 10898e47418d9Smrg # mode. It turns out that the SunPro C++ compiler does not properly 10899e47418d9Smrg # handle `-M -o', and we need to detect this. Also, some Intel 10900e47418d9Smrg # versions had trouble with output in subdirs 10901e47418d9Smrg am__obj=sub/conftest.${OBJEXT-o} 10902e47418d9Smrg am__minus_obj="-o $am__obj" 1090372b676d7Smrg case $depmode in 10904e47418d9Smrg gcc) 10905e47418d9Smrg # This depmode causes a compiler race in universal mode. 10906e47418d9Smrg test "$am__universal" = false || continue 10907e47418d9Smrg ;; 1090872b676d7Smrg nosideeffect) 1090972b676d7Smrg # after this tag, mechanisms are not by side-effect, so they'll 1091072b676d7Smrg # only be used when explicitly requested 1091172b676d7Smrg if test "x$enable_dependency_tracking" = xyes; then 1091272b676d7Smrg continue 1091372b676d7Smrg else 1091472b676d7Smrg break 1091572b676d7Smrg fi 1091672b676d7Smrg ;; 1091774c14cd6Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 10918e47418d9Smrg # This compiler won't grok `-c -o', but also, the minuso test has 10919e47418d9Smrg # not run yet. These depmodes are late enough in the game, and 10920e47418d9Smrg # so weak that their functioning should not be impacted. 10921e47418d9Smrg am__obj=conftest.${OBJEXT-o} 10922e47418d9Smrg am__minus_obj= 10923e47418d9Smrg ;; 1092472b676d7Smrg none) break ;; 1092572b676d7Smrg esac 1092672b676d7Smrg if depmode=$depmode \ 10927e47418d9Smrg source=sub/conftest.c object=$am__obj \ 1092872b676d7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 10929e47418d9Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1093072b676d7Smrg >/dev/null 2>conftest.err && 109311fd23544Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1093272b676d7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 10933e47418d9Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1093472b676d7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1093572b676d7Smrg # icc doesn't choke on unknown options, it will just issue warnings 1093672b676d7Smrg # or remarks (even with -Werror). So we grep stderr for any message 1093772b676d7Smrg # that says an option was ignored or not supported. 1093872b676d7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 1093972b676d7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 1094072b676d7Smrg # The diagnosis changed in icc 8.0: 1094172b676d7Smrg # icc: Command line remark: option '-MP' not supported 1094272b676d7Smrg if (grep 'ignoring option' conftest.err || 1094372b676d7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1094472b676d7Smrg am_cv_$1_dependencies_compiler_type=$depmode 1094572b676d7Smrg break 1094672b676d7Smrg fi 1094772b676d7Smrg fi 1094872b676d7Smrg done 1094972b676d7Smrg 1095072b676d7Smrg cd .. 1095172b676d7Smrg rm -rf conftest.dir 1095272b676d7Smrgelse 1095372b676d7Smrg am_cv_$1_dependencies_compiler_type=none 1095472b676d7Smrgfi 1095572b676d7Smrg]) 1095672b676d7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1095772b676d7SmrgAM_CONDITIONAL([am__fastdep$1], [ 1095872b676d7Smrg test "x$enable_dependency_tracking" != xno \ 1095972b676d7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1096072b676d7Smrg]) 1096172b676d7Smrg 1096272b676d7Smrg 1096372b676d7Smrg# AM_SET_DEPDIR 1096472b676d7Smrg# ------------- 1096572b676d7Smrg# Choose a directory name for dependency files. 1096672b676d7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 1096772b676d7SmrgAC_DEFUN([AM_SET_DEPDIR], 1096872b676d7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1096972b676d7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1097072b676d7Smrg]) 1097172b676d7Smrg 1097272b676d7Smrg 1097372b676d7Smrg# AM_DEP_TRACK 1097472b676d7Smrg# ------------ 1097572b676d7SmrgAC_DEFUN([AM_DEP_TRACK], 1097672b676d7Smrg[AC_ARG_ENABLE(dependency-tracking, 1097772b676d7Smrg[ --disable-dependency-tracking speeds up one-time build 1097872b676d7Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 1097972b676d7Smrgif test "x$enable_dependency_tracking" != xno; then 1098072b676d7Smrg am_depcomp="$ac_aux_dir/depcomp" 1098172b676d7Smrg AMDEPBACKSLASH='\' 1098274c14cd6Smrg am__nodep='_no' 1098372b676d7Smrgfi 1098472b676d7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 109851fd23544SmrgAC_SUBST([AMDEPBACKSLASH])dnl 109861fd23544Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1098774c14cd6SmrgAC_SUBST([am__nodep])dnl 1098874c14cd6Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 1098972b676d7Smrg]) 1099072b676d7Smrg 1099172b676d7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1099272b676d7Smrg 10993e47418d9Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 1099472b676d7Smrg# Free Software Foundation, Inc. 1099572b676d7Smrg# 1099672b676d7Smrg# This file is free software; the Free Software Foundation 1099772b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1099872b676d7Smrg# with or without modifications, as long as this notice is preserved. 1099972b676d7Smrg 11000e47418d9Smrg#serial 5 1100172b676d7Smrg 1100272b676d7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 1100372b676d7Smrg# ------------------------------ 1100472b676d7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11005e47418d9Smrg[{ 11006e47418d9Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 11007e47418d9Smrg # are listed without --file. Let's play safe and only enable the eval 11008e47418d9Smrg # if we detect the quoting. 11009e47418d9Smrg case $CONFIG_FILES in 11010e47418d9Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11011e47418d9Smrg *) set x $CONFIG_FILES ;; 11012e47418d9Smrg esac 11013e47418d9Smrg shift 11014e47418d9Smrg for mf 11015e47418d9Smrg do 11016e47418d9Smrg # Strip MF so we end up with the name of the file. 11017e47418d9Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11018e47418d9Smrg # Check whether this is an Automake generated Makefile or not. 11019e47418d9Smrg # We used to match only the files named `Makefile.in', but 11020e47418d9Smrg # some people rename them; so instead we look at the file content. 11021e47418d9Smrg # Grep'ing the first line is not enough: some people post-process 11022e47418d9Smrg # each Makefile.in and add a new line on top of each file to say so. 11023e47418d9Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11024e47418d9Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11025e47418d9Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11026e47418d9Smrg dirpart=`AS_DIRNAME("$mf")` 11027e47418d9Smrg else 11028e47418d9Smrg continue 11029e47418d9Smrg fi 11030e47418d9Smrg # Extract the definition of DEPDIR, am__include, and am__quote 11031e47418d9Smrg # from the Makefile without running `make'. 11032e47418d9Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11033e47418d9Smrg test -z "$DEPDIR" && continue 11034e47418d9Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11035e47418d9Smrg test -z "am__include" && continue 11036e47418d9Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11037e47418d9Smrg # When using ansi2knr, U may be empty or an underscore; expand it 11038e47418d9Smrg U=`sed -n 's/^U = //p' < "$mf"` 11039e47418d9Smrg # Find all dependency output files, they are included files with 11040e47418d9Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11041e47418d9Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11042e47418d9Smrg # expansion. 11043e47418d9Smrg for file in `sed -n " 11044e47418d9Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11045e47418d9Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 11046e47418d9Smrg # Make sure the directory exists. 11047e47418d9Smrg test -f "$dirpart/$file" && continue 11048e47418d9Smrg fdir=`AS_DIRNAME(["$file"])` 11049e47418d9Smrg AS_MKDIR_P([$dirpart/$fdir]) 11050e47418d9Smrg # echo "creating $dirpart/$file" 11051e47418d9Smrg echo '# dummy' > "$dirpart/$file" 11052e47418d9Smrg done 1105372b676d7Smrg done 11054e47418d9Smrg} 1105572b676d7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1105672b676d7Smrg 1105772b676d7Smrg 1105872b676d7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 1105972b676d7Smrg# ----------------------------- 1106072b676d7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 1106172b676d7Smrg# 1106272b676d7Smrg# This code is only required when automatic dependency tracking 1106372b676d7Smrg# is enabled. FIXME. This creates each `.P' file that we will 1106472b676d7Smrg# need in order to bootstrap the dependency handling code. 1106572b676d7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1106672b676d7Smrg[AC_CONFIG_COMMANDS([depfiles], 1106772b676d7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1106872b676d7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1106972b676d7Smrg]) 1107072b676d7Smrg 1107172b676d7Smrg# Do all the work for Automake. -*- Autoconf -*- 1107272b676d7Smrg 110731fd23544Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 11074e47418d9Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 1107572b676d7Smrg# 1107672b676d7Smrg# This file is free software; the Free Software Foundation 1107772b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1107872b676d7Smrg# with or without modifications, as long as this notice is preserved. 1107972b676d7Smrg 11080e47418d9Smrg# serial 16 1108172b676d7Smrg 1108272b676d7Smrg# This macro actually does too much. Some checks are only needed if 1108372b676d7Smrg# your package does certain things. But this isn't really a big deal. 1108472b676d7Smrg 1108572b676d7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1108672b676d7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 1108772b676d7Smrg# ----------------------------------------------- 1108872b676d7Smrg# The call with PACKAGE and VERSION arguments is the old style 1108972b676d7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 1109072b676d7Smrg# and VERSION should now be passed to AC_INIT and removed from 1109172b676d7Smrg# the call to AM_INIT_AUTOMAKE. 1109272b676d7Smrg# We support both call styles for the transition. After 1109372b676d7Smrg# the next Automake release, Autoconf can make the AC_INIT 1109472b676d7Smrg# arguments mandatory, and then we can depend on a new Autoconf 1109572b676d7Smrg# release and drop the old call support. 1109672b676d7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11097e47418d9Smrg[AC_PREREQ([2.62])dnl 1109872b676d7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 1109972b676d7Smrgdnl the ones we care about. 1110072b676d7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1110172b676d7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1110272b676d7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 111031fd23544Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 111041fd23544Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 111051fd23544Smrg # is not polluted with repeated "-I." 111061fd23544Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 111071fd23544Smrg # test to see if srcdir already configured 111081fd23544Smrg if test -f $srcdir/config.status; then 111091fd23544Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 111101fd23544Smrg fi 1111172b676d7Smrgfi 1111272b676d7Smrg 1111372b676d7Smrg# test whether we have cygpath 1111472b676d7Smrgif test -z "$CYGPATH_W"; then 1111572b676d7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 1111672b676d7Smrg CYGPATH_W='cygpath -w' 1111772b676d7Smrg else 1111872b676d7Smrg CYGPATH_W=echo 1111972b676d7Smrg fi 1112072b676d7Smrgfi 1112172b676d7SmrgAC_SUBST([CYGPATH_W]) 1112272b676d7Smrg 1112372b676d7Smrg# Define the identity of the package. 1112472b676d7Smrgdnl Distinguish between old-style and new-style calls. 1112572b676d7Smrgm4_ifval([$2], 1112672b676d7Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1112772b676d7Smrg AC_SUBST([PACKAGE], [$1])dnl 1112872b676d7Smrg AC_SUBST([VERSION], [$2])], 1112972b676d7Smrg[_AM_SET_OPTIONS([$1])dnl 111301fd23544Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 111311fd23544Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 111321fd23544Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1113372b676d7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1113472b676d7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1113572b676d7Smrg 1113672b676d7Smrg_AM_IF_OPTION([no-define],, 1113772b676d7Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 1113872b676d7Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 1113972b676d7Smrg 1114072b676d7Smrg# Some tools Automake needs. 1114172b676d7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 1114272b676d7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 1114372b676d7SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 1114472b676d7SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 1114572b676d7SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 1114672b676d7SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 1114772b676d7SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 11148e47418d9SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11149e47418d9SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1115072b676d7SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 1115172b676d7Smrg# We need awk for the "check" target. The system "awk" is bad on 1115272b676d7Smrg# some platforms. 1115372b676d7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 1115472b676d7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1115572b676d7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1115672b676d7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11157e47418d9Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11158e47418d9Smrg [_AM_PROG_TAR([v7])])]) 1115972b676d7Smrg_AM_IF_OPTION([no-dependencies],, 1116072b676d7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11161e47418d9Smrg [_AM_DEPENDENCIES(CC)], 11162e47418d9Smrg [define([AC_PROG_CC], 11163e47418d9Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1116472b676d7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11165e47418d9Smrg [_AM_DEPENDENCIES(CXX)], 11166e47418d9Smrg [define([AC_PROG_CXX], 11167e47418d9Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 111681fd23544SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11169e47418d9Smrg [_AM_DEPENDENCIES(OBJC)], 11170e47418d9Smrg [define([AC_PROG_OBJC], 11171e47418d9Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 1117272b676d7Smrg]) 11173e47418d9Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 11174e47418d9Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 11175e47418d9Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 11176e47418d9Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 11177e47418d9SmrgAC_CONFIG_COMMANDS_PRE(dnl 11178e47418d9Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11179e47418d9Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1118072b676d7Smrg]) 1118172b676d7Smrg 11182e47418d9Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11183e47418d9Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11184e47418d9Smrgdnl mangled by Autoconf and run in a shell conditional statement. 11185e47418d9Smrgm4_define([_AC_COMPILER_EXEEXT], 11186e47418d9Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11187e47418d9Smrg 1118872b676d7Smrg 1118972b676d7Smrg# When config.status generates a header, we must update the stamp-h file. 1119072b676d7Smrg# This file resides in the same directory as the config header 1119172b676d7Smrg# that is generated. The stamp files are numbered to have different names. 1119272b676d7Smrg 1119372b676d7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1119472b676d7Smrg# loop where config.status creates the headers, so we can generate 1119572b676d7Smrg# our stamp files there. 1119672b676d7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1119772b676d7Smrg[# Compute $1's index in $config_headers. 111981fd23544Smrg_am_arg=$1 1119972b676d7Smrg_am_stamp_count=1 1120072b676d7Smrgfor _am_header in $config_headers :; do 1120172b676d7Smrg case $_am_header in 112021fd23544Smrg $_am_arg | $_am_arg:* ) 1120372b676d7Smrg break ;; 1120472b676d7Smrg * ) 1120572b676d7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1120672b676d7Smrg esac 1120772b676d7Smrgdone 112081fd23544Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1120972b676d7Smrg 1121074c14cd6Smrg# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 1121174c14cd6Smrg# Inc. 1121272b676d7Smrg# 1121372b676d7Smrg# This file is free software; the Free Software Foundation 1121472b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1121572b676d7Smrg# with or without modifications, as long as this notice is preserved. 1121672b676d7Smrg 1121774c14cd6Smrg# serial 1 1121874c14cd6Smrg 1121972b676d7Smrg# AM_PROG_INSTALL_SH 1122072b676d7Smrg# ------------------ 1122172b676d7Smrg# Define $install_sh. 1122272b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 1122372b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11224e47418d9Smrgif test x"${install_sh}" != xset; then 11225e47418d9Smrg case $am_aux_dir in 11226e47418d9Smrg *\ * | *\ *) 11227e47418d9Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11228e47418d9Smrg *) 11229e47418d9Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11230e47418d9Smrg esac 11231e47418d9Smrgfi 1123272b676d7SmrgAC_SUBST(install_sh)]) 1123372b676d7Smrg 1123472b676d7Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 1123572b676d7Smrg# 1123672b676d7Smrg# This file is free software; the Free Software Foundation 1123772b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1123872b676d7Smrg# with or without modifications, as long as this notice is preserved. 1123972b676d7Smrg 1124072b676d7Smrg# serial 2 1124172b676d7Smrg 1124272b676d7Smrg# Check whether the underlying file-system supports filenames 1124372b676d7Smrg# with a leading dot. For instance MS-DOS doesn't. 1124472b676d7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 1124572b676d7Smrg[rm -rf .tst 2>/dev/null 1124672b676d7Smrgmkdir .tst 2>/dev/null 1124772b676d7Smrgif test -d .tst; then 1124872b676d7Smrg am__leading_dot=. 1124972b676d7Smrgelse 1125072b676d7Smrg am__leading_dot=_ 1125172b676d7Smrgfi 1125272b676d7Smrgrmdir .tst 2>/dev/null 1125372b676d7SmrgAC_SUBST([am__leading_dot])]) 1125472b676d7Smrg 1125572b676d7Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 1125672b676d7Smrg# From Jim Meyering 1125772b676d7Smrg 1125874c14cd6Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 1125974c14cd6Smrg# 2011 Free Software Foundation, Inc. 1126072b676d7Smrg# 1126172b676d7Smrg# This file is free software; the Free Software Foundation 1126272b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1126372b676d7Smrg# with or without modifications, as long as this notice is preserved. 1126472b676d7Smrg 11265e47418d9Smrg# serial 5 1126672b676d7Smrg 11267e47418d9Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 11268e47418d9Smrg# ---------------------------------- 11269e47418d9Smrg# Control maintainer-specific portions of Makefiles. 11270e47418d9Smrg# Default is to disable them, unless `enable' is passed literally. 11271e47418d9Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 11272e47418d9Smrg# can override the default with the --enable/--disable switch. 1127372b676d7SmrgAC_DEFUN([AM_MAINTAINER_MODE], 11274e47418d9Smrg[m4_case(m4_default([$1], [disable]), 11275e47418d9Smrg [enable], [m4_define([am_maintainer_other], [disable])], 11276e47418d9Smrg [disable], [m4_define([am_maintainer_other], [enable])], 11277e47418d9Smrg [m4_define([am_maintainer_other], [enable]) 11278e47418d9Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 1127974c14cd6SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 11280e47418d9Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 11281e47418d9Smrg AC_ARG_ENABLE([maintainer-mode], 11282e47418d9Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 1128372b676d7Smrg (and sometimes confusing) to the casual installer], 11284e47418d9Smrg [USE_MAINTAINER_MODE=$enableval], 11285e47418d9Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 1128672b676d7Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11287e47418d9Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 1128872b676d7Smrg MAINT=$MAINTAINER_MODE_TRUE 11289e47418d9Smrg AC_SUBST([MAINT])dnl 1129072b676d7Smrg] 1129172b676d7Smrg) 1129272b676d7Smrg 1129372b676d7SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 1129472b676d7Smrg 1129572b676d7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1129672b676d7Smrg 11297e47418d9Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 1129872b676d7Smrg# 1129972b676d7Smrg# This file is free software; the Free Software Foundation 1130072b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1130172b676d7Smrg# with or without modifications, as long as this notice is preserved. 1130272b676d7Smrg 11303e47418d9Smrg# serial 4 1130472b676d7Smrg 1130572b676d7Smrg# AM_MAKE_INCLUDE() 1130672b676d7Smrg# ----------------- 1130772b676d7Smrg# Check to see how make treats includes. 1130872b676d7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 1130972b676d7Smrg[am_make=${MAKE-make} 1131072b676d7Smrgcat > confinc << 'END' 1131172b676d7Smrgam__doit: 11312e47418d9Smrg @echo this is the am__doit target 1131372b676d7Smrg.PHONY: am__doit 1131472b676d7SmrgEND 1131572b676d7Smrg# If we don't find an include directive, just comment out the code. 1131672b676d7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 1131772b676d7Smrgam__include="#" 1131872b676d7Smrgam__quote= 1131972b676d7Smrg_am_result=none 1132072b676d7Smrg# First try GNU make style include. 1132172b676d7Smrgecho "include confinc" > confmf 11322e47418d9Smrg# Ignore all kinds of additional output from `make'. 11323e47418d9Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11324e47418d9Smrg*the\ am__doit\ target*) 11325e47418d9Smrg am__include=include 11326e47418d9Smrg am__quote= 11327e47418d9Smrg _am_result=GNU 11328e47418d9Smrg ;; 11329e47418d9Smrgesac 1133072b676d7Smrg# Now try BSD make style include. 1133172b676d7Smrgif test "$am__include" = "#"; then 1133272b676d7Smrg echo '.include "confinc"' > confmf 11333e47418d9Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 11334e47418d9Smrg *the\ am__doit\ target*) 11335e47418d9Smrg am__include=.include 11336e47418d9Smrg am__quote="\"" 11337e47418d9Smrg _am_result=BSD 11338e47418d9Smrg ;; 11339e47418d9Smrg esac 1134072b676d7Smrgfi 1134172b676d7SmrgAC_SUBST([am__include]) 1134272b676d7SmrgAC_SUBST([am__quote]) 1134372b676d7SmrgAC_MSG_RESULT([$_am_result]) 1134472b676d7Smrgrm -f confinc confmf 1134572b676d7Smrg]) 1134672b676d7Smrg 1134772b676d7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1134872b676d7Smrg 11349e47418d9Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 1135072b676d7Smrg# Free Software Foundation, Inc. 1135172b676d7Smrg# 1135272b676d7Smrg# This file is free software; the Free Software Foundation 1135372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1135472b676d7Smrg# with or without modifications, as long as this notice is preserved. 1135572b676d7Smrg 11356e47418d9Smrg# serial 6 1135772b676d7Smrg 1135872b676d7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 1135972b676d7Smrg# ------------------------------ 1136072b676d7SmrgAC_DEFUN([AM_MISSING_PROG], 1136172b676d7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1136272b676d7Smrg$1=${$1-"${am_missing_run}$2"} 1136372b676d7SmrgAC_SUBST($1)]) 1136472b676d7Smrg 1136572b676d7Smrg 1136672b676d7Smrg# AM_MISSING_HAS_RUN 1136772b676d7Smrg# ------------------ 1136872b676d7Smrg# Define MISSING if not defined so far and test if it supports --run. 1136972b676d7Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 1137072b676d7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 1137172b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 113721fd23544SmrgAC_REQUIRE_AUX_FILE([missing])dnl 11373e47418d9Smrgif test x"${MISSING+set}" != xset; then 11374e47418d9Smrg case $am_aux_dir in 11375e47418d9Smrg *\ * | *\ *) 11376e47418d9Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11377e47418d9Smrg *) 11378e47418d9Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11379e47418d9Smrg esac 11380e47418d9Smrgfi 1138172b676d7Smrg# Use eval to expand $SHELL 1138272b676d7Smrgif eval "$MISSING --run true"; then 1138372b676d7Smrg am_missing_run="$MISSING --run " 1138472b676d7Smrgelse 1138572b676d7Smrg am_missing_run= 1138672b676d7Smrg AC_MSG_WARN([`missing' script is too old or missing]) 1138772b676d7Smrgfi 1138872b676d7Smrg]) 1138972b676d7Smrg 1139074c14cd6Smrg# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 1139174c14cd6Smrg# Inc. 1139272b676d7Smrg# 1139372b676d7Smrg# This file is free software; the Free Software Foundation 1139472b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1139572b676d7Smrg# with or without modifications, as long as this notice is preserved. 1139672b676d7Smrg 1139774c14cd6Smrg# serial 1 1139874c14cd6Smrg 1139972b676d7Smrg# AM_PROG_MKDIR_P 1140072b676d7Smrg# --------------- 114011fd23544Smrg# Check for `mkdir -p'. 1140272b676d7SmrgAC_DEFUN([AM_PROG_MKDIR_P], 114031fd23544Smrg[AC_PREREQ([2.60])dnl 114041fd23544SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 114051fd23544Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 114061fd23544Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 114071fd23544Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 114081fd23544Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 114091fd23544Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 114101fd23544Smrgdnl adjustment using top_builddir (which is defined more often than 114111fd23544Smrgdnl MKDIR_P). 114121fd23544SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 114131fd23544Smrgcase $mkdir_p in 114141fd23544Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 114151fd23544Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 114161fd23544Smrgesac 114171fd23544Smrg]) 1141872b676d7Smrg 1141972b676d7Smrg# Helper functions for option handling. -*- Autoconf -*- 1142072b676d7Smrg 1142174c14cd6Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 1142274c14cd6Smrg# Foundation, Inc. 1142372b676d7Smrg# 1142472b676d7Smrg# This file is free software; the Free Software Foundation 1142572b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1142672b676d7Smrg# with or without modifications, as long as this notice is preserved. 1142772b676d7Smrg 1142874c14cd6Smrg# serial 5 1142972b676d7Smrg 1143072b676d7Smrg# _AM_MANGLE_OPTION(NAME) 1143172b676d7Smrg# ----------------------- 1143272b676d7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1143372b676d7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1143472b676d7Smrg 1143572b676d7Smrg# _AM_SET_OPTION(NAME) 1143674c14cd6Smrg# -------------------- 1143772b676d7Smrg# Set option NAME. Presently that only means defining a flag for this option. 1143872b676d7SmrgAC_DEFUN([_AM_SET_OPTION], 1143972b676d7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1144072b676d7Smrg 1144172b676d7Smrg# _AM_SET_OPTIONS(OPTIONS) 1144274c14cd6Smrg# ------------------------ 1144372b676d7Smrg# OPTIONS is a space-separated list of Automake options. 1144472b676d7SmrgAC_DEFUN([_AM_SET_OPTIONS], 11445e47418d9Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1144672b676d7Smrg 1144772b676d7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1144872b676d7Smrg# ------------------------------------------- 1144972b676d7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1145072b676d7SmrgAC_DEFUN([_AM_IF_OPTION], 1145172b676d7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1145272b676d7Smrg 1145372b676d7Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1145472b676d7Smrg 11455e47418d9Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 1145672b676d7Smrg# Free Software Foundation, Inc. 1145772b676d7Smrg# 1145872b676d7Smrg# This file is free software; the Free Software Foundation 1145972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1146072b676d7Smrg# with or without modifications, as long as this notice is preserved. 1146172b676d7Smrg 11462e47418d9Smrg# serial 5 1146372b676d7Smrg 1146472b676d7Smrg# AM_SANITY_CHECK 1146572b676d7Smrg# --------------- 1146672b676d7SmrgAC_DEFUN([AM_SANITY_CHECK], 1146772b676d7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 1146872b676d7Smrg# Just in case 1146972b676d7Smrgsleep 1 1147072b676d7Smrgecho timestamp > conftest.file 11471e47418d9Smrg# Reject unsafe characters in $srcdir or the absolute working directory 11472e47418d9Smrg# name. Accept space and tab only in the latter. 11473e47418d9Smrgam_lf=' 11474e47418d9Smrg' 11475e47418d9Smrgcase `pwd` in 11476e47418d9Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 11477e47418d9Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 11478e47418d9Smrgesac 11479e47418d9Smrgcase $srcdir in 11480e47418d9Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 11481e47418d9Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 11482e47418d9Smrgesac 11483e47418d9Smrg 1148472b676d7Smrg# Do `set' in a subshell so we don't clobber the current shell's 1148572b676d7Smrg# arguments. Must try -L first in case configure is actually a 1148672b676d7Smrg# symlink; some systems play weird games with the mod time of symlinks 1148772b676d7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 1148872b676d7Smrg# directory). 1148972b676d7Smrgif ( 11490e47418d9Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1149172b676d7Smrg if test "$[*]" = "X"; then 1149272b676d7Smrg # -L didn't work. 11493e47418d9Smrg set X `ls -t "$srcdir/configure" conftest.file` 1149472b676d7Smrg fi 1149572b676d7Smrg rm -f conftest.file 1149672b676d7Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1149772b676d7Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1149872b676d7Smrg 1149972b676d7Smrg # If neither matched, then we have a broken ls. This can happen 1150072b676d7Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1150172b676d7Smrg # broken ls alias from the environment. This has actually 1150272b676d7Smrg # happened. Such a system could not be considered "sane". 1150372b676d7Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1150472b676d7Smrgalias in your environment]) 1150572b676d7Smrg fi 1150672b676d7Smrg 1150772b676d7Smrg test "$[2]" = conftest.file 1150872b676d7Smrg ) 1150972b676d7Smrgthen 1151072b676d7Smrg # Ok. 1151172b676d7Smrg : 1151272b676d7Smrgelse 1151372b676d7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 1151472b676d7SmrgCheck your system clock]) 1151572b676d7Smrgfi 1151672b676d7SmrgAC_MSG_RESULT(yes)]) 1151772b676d7Smrg 1151874c14cd6Smrg# Copyright (C) 2009, 2011 Free Software Foundation, Inc. 11519e35772b2Smrg# 11520e35772b2Smrg# This file is free software; the Free Software Foundation 11521e35772b2Smrg# gives unlimited permission to copy and/or distribute it, 11522e35772b2Smrg# with or without modifications, as long as this notice is preserved. 11523e35772b2Smrg 1152474c14cd6Smrg# serial 2 11525e35772b2Smrg 11526e35772b2Smrg# AM_SILENT_RULES([DEFAULT]) 11527e35772b2Smrg# -------------------------- 11528e35772b2Smrg# Enable less verbose build rules; with the default set to DEFAULT 11529e35772b2Smrg# (`yes' being less verbose, `no' or empty being verbose). 11530e35772b2SmrgAC_DEFUN([AM_SILENT_RULES], 11531e35772b2Smrg[AC_ARG_ENABLE([silent-rules], 11532e35772b2Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 11533e35772b2Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 11534e35772b2Smrgcase $enable_silent_rules in 11535e35772b2Smrgyes) AM_DEFAULT_VERBOSITY=0;; 11536e35772b2Smrgno) AM_DEFAULT_VERBOSITY=1;; 11537e35772b2Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 11538e35772b2Smrgesac 1153974c14cd6Smrgdnl 1154074c14cd6Smrgdnl A few `make' implementations (e.g., NonStop OS and NextStep) 1154174c14cd6Smrgdnl do not support nested variable expansions. 1154274c14cd6Smrgdnl See automake bug#9928 and bug#10237. 1154374c14cd6Smrgam_make=${MAKE-make} 1154474c14cd6SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 1154574c14cd6Smrg [am_cv_make_support_nested_variables], 1154674c14cd6Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 1154774c14cd6SmrgBAR0=false 1154874c14cd6SmrgBAR1=true 1154974c14cd6SmrgV=1 1155074c14cd6Smrgam__doit: 1155174c14cd6Smrg @$(TRUE) 1155274c14cd6Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1155374c14cd6Smrg am_cv_make_support_nested_variables=yes 1155474c14cd6Smrgelse 1155574c14cd6Smrg am_cv_make_support_nested_variables=no 1155674c14cd6Smrgfi]) 1155774c14cd6Smrgif test $am_cv_make_support_nested_variables = yes; then 1155874c14cd6Smrg dnl Using `$V' instead of `$(V)' breaks IRIX make. 1155974c14cd6Smrg AM_V='$(V)' 1156074c14cd6Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1156174c14cd6Smrgelse 1156274c14cd6Smrg AM_V=$AM_DEFAULT_VERBOSITY 1156374c14cd6Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1156474c14cd6Smrgfi 1156574c14cd6SmrgAC_SUBST([AM_V])dnl 1156674c14cd6SmrgAM_SUBST_NOTMAKE([AM_V])dnl 1156774c14cd6SmrgAC_SUBST([AM_DEFAULT_V])dnl 1156874c14cd6SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 11569e35772b2SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 11570e35772b2SmrgAM_BACKSLASH='\' 11571e35772b2SmrgAC_SUBST([AM_BACKSLASH])dnl 11572e35772b2Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 11573e35772b2Smrg]) 11574e35772b2Smrg 1157574c14cd6Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 1157672b676d7Smrg# 1157772b676d7Smrg# This file is free software; the Free Software Foundation 1157872b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1157972b676d7Smrg# with or without modifications, as long as this notice is preserved. 1158072b676d7Smrg 1158174c14cd6Smrg# serial 1 1158274c14cd6Smrg 1158372b676d7Smrg# AM_PROG_INSTALL_STRIP 1158472b676d7Smrg# --------------------- 1158572b676d7Smrg# One issue with vendor `install' (even GNU) is that you can't 1158672b676d7Smrg# specify the program used to strip binaries. This is especially 1158772b676d7Smrg# annoying in cross-compiling environments, where the build's strip 1158872b676d7Smrg# is unlikely to handle the host's binaries. 1158972b676d7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1159072b676d7Smrg# always use install-sh in `make install-strip', and initialize 1159172b676d7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 1159272b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1159372b676d7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1159472b676d7Smrg# Installed binaries are usually stripped using `strip' when the user 1159572b676d7Smrg# run `make install-strip'. However `strip' might not be the right 1159672b676d7Smrg# tool to use in cross-compilation environments, therefore Automake 1159772b676d7Smrg# will honor the `STRIP' environment variable to overrule this program. 1159872b676d7Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1159972b676d7Smrgif test "$cross_compiling" != no; then 1160072b676d7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1160172b676d7Smrgfi 116021fd23544SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1160372b676d7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1160472b676d7Smrg 1160574c14cd6Smrg# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 116061fd23544Smrg# 116071fd23544Smrg# This file is free software; the Free Software Foundation 116081fd23544Smrg# gives unlimited permission to copy and/or distribute it, 116091fd23544Smrg# with or without modifications, as long as this notice is preserved. 116101fd23544Smrg 1161174c14cd6Smrg# serial 3 11612e47418d9Smrg 116131fd23544Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 116141fd23544Smrg# --------------------------- 116151fd23544Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 116161fd23544Smrg# This macro is traced by Automake. 116171fd23544SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 116181fd23544Smrg 11619e47418d9Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1162074c14cd6Smrg# -------------------------- 11621e47418d9Smrg# Public sister of _AM_SUBST_NOTMAKE. 11622e47418d9SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 11623e47418d9Smrg 1162472b676d7Smrg# Check how to create a tarball. -*- Autoconf -*- 1162572b676d7Smrg 1162674c14cd6Smrg# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. 1162772b676d7Smrg# 1162872b676d7Smrg# This file is free software; the Free Software Foundation 1162972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1163072b676d7Smrg# with or without modifications, as long as this notice is preserved. 1163172b676d7Smrg 1163272b676d7Smrg# serial 2 1163372b676d7Smrg 1163472b676d7Smrg# _AM_PROG_TAR(FORMAT) 1163572b676d7Smrg# -------------------- 1163672b676d7Smrg# Check how to create a tarball in format FORMAT. 1163772b676d7Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 1163872b676d7Smrg# 1163972b676d7Smrg# Substitute a variable $(am__tar) that is a command 1164072b676d7Smrg# writing to stdout a FORMAT-tarball containing the directory 1164172b676d7Smrg# $tardir. 1164272b676d7Smrg# tardir=directory && $(am__tar) > result.tar 1164372b676d7Smrg# 1164472b676d7Smrg# Substitute a variable $(am__untar) that extract such 1164572b676d7Smrg# a tarball read from stdin. 1164672b676d7Smrg# $(am__untar) < result.tar 1164772b676d7SmrgAC_DEFUN([_AM_PROG_TAR], 1164874c14cd6Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1164974c14cd6Smrg# in the wild :-( We should find a proper way to deprecate it ... 1165074c14cd6SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1165172b676d7Smrgm4_if([$1], [v7], 1165274c14cd6Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1165372b676d7Smrg [m4_case([$1], [ustar],, [pax],, 1165472b676d7Smrg [m4_fatal([Unknown tar format])]) 1165572b676d7SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 1165672b676d7Smrg# Loop over all known methods to create a tar archive until one works. 1165772b676d7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1165872b676d7Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1165972b676d7Smrg# Do not fold the above two line into one, because Tru64 sh and 1166072b676d7Smrg# Solaris sh will not grok spaces in the rhs of `-'. 1166172b676d7Smrgfor _am_tool in $_am_tools 1166272b676d7Smrgdo 1166372b676d7Smrg case $_am_tool in 1166472b676d7Smrg gnutar) 1166572b676d7Smrg for _am_tar in tar gnutar gtar; 1166672b676d7Smrg do 1166772b676d7Smrg AM_RUN_LOG([$_am_tar --version]) && break 1166872b676d7Smrg done 1166972b676d7Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1167072b676d7Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1167172b676d7Smrg am__untar="$_am_tar -xf -" 1167272b676d7Smrg ;; 1167372b676d7Smrg plaintar) 1167472b676d7Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1167572b676d7Smrg # ustar tarball either. 1167672b676d7Smrg (tar --version) >/dev/null 2>&1 && continue 1167772b676d7Smrg am__tar='tar chf - "$$tardir"' 1167872b676d7Smrg am__tar_='tar chf - "$tardir"' 1167972b676d7Smrg am__untar='tar xf -' 1168072b676d7Smrg ;; 1168172b676d7Smrg pax) 1168272b676d7Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1168372b676d7Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1168472b676d7Smrg am__untar='pax -r' 1168572b676d7Smrg ;; 1168672b676d7Smrg cpio) 1168772b676d7Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1168872b676d7Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1168972b676d7Smrg am__untar='cpio -i -H $1 -d' 1169072b676d7Smrg ;; 1169172b676d7Smrg none) 1169272b676d7Smrg am__tar=false 1169372b676d7Smrg am__tar_=false 1169472b676d7Smrg am__untar=false 1169572b676d7Smrg ;; 1169672b676d7Smrg esac 1169772b676d7Smrg 1169872b676d7Smrg # If the value was cached, stop now. We just wanted to have am__tar 1169972b676d7Smrg # and am__untar set. 1170072b676d7Smrg test -n "${am_cv_prog_tar_$1}" && break 1170172b676d7Smrg 1170272b676d7Smrg # tar/untar a dummy directory, and stop if the command works 1170372b676d7Smrg rm -rf conftest.dir 1170472b676d7Smrg mkdir conftest.dir 1170572b676d7Smrg echo GrepMe > conftest.dir/file 1170672b676d7Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1170772b676d7Smrg rm -rf conftest.dir 1170872b676d7Smrg if test -s conftest.tar; then 1170972b676d7Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1171072b676d7Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1171172b676d7Smrg fi 1171272b676d7Smrgdone 1171372b676d7Smrgrm -rf conftest.dir 1171472b676d7Smrg 1171572b676d7SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1171672b676d7SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1171772b676d7SmrgAC_SUBST([am__tar]) 1171872b676d7SmrgAC_SUBST([am__untar]) 1171972b676d7Smrg]) # _AM_PROG_TAR 1172072b676d7Smrg 11721