aclocal.m4 revision e35772b2
1e35772b2Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 272b676d7Smrg 372b676d7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4e47418d9Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 572b676d7Smrg# This file is free software; the Free Software Foundation 672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 772b676d7Smrg# with or without modifications, as long as this notice is preserved. 872b676d7Smrg 972b676d7Smrg# This program is distributed in the hope that it will be useful, 1072b676d7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1172b676d7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1272b676d7Smrg# PARTICULAR PURPOSE. 1372b676d7Smrg 141fd23544Smrgm4_ifndef([AC_AUTOCONF_VERSION], 151fd23544Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16e47418d9Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 171fd23544Smrg[m4_warning([this file was generated for autoconf 2.63. 181fd23544SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 191fd23544SmrgIf you have problems, you may need to regenerate the build system entirely. 201fd23544SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 211fd23544Smrg 2272b676d7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23e35772b2Smrg# 24e35772b2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 25e35772b2Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 26e35772b2Smrg# Written by Gordon Matzigkeit, 1996 27e35772b2Smrg# 28e35772b2Smrg# This file is free software; the Free Software Foundation gives 29e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 30e35772b2Smrg# modifications, as long as this notice is preserved. 31e35772b2Smrg 32e35772b2Smrgm4_define([_LT_COPYING], [dnl 33e35772b2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 34e35772b2Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 35e35772b2Smrg# Written by Gordon Matzigkeit, 1996 36e35772b2Smrg# 37e35772b2Smrg# This file is part of GNU Libtool. 38e35772b2Smrg# 39e35772b2Smrg# GNU Libtool is free software; you can redistribute it and/or 40e35772b2Smrg# modify it under the terms of the GNU General Public License as 41e35772b2Smrg# published by the Free Software Foundation; either version 2 of 42e35772b2Smrg# the License, or (at your option) any later version. 43e35772b2Smrg# 44e35772b2Smrg# As a special exception to the GNU General Public License, 45e35772b2Smrg# if you distribute this file as part of a program or library that 46e35772b2Smrg# is built using GNU Libtool, you may include this file under the 47e35772b2Smrg# same distribution terms that you use for the rest of that program. 48e35772b2Smrg# 49e35772b2Smrg# GNU Libtool is distributed in the hope that it will be useful, 50e35772b2Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 51e35772b2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 52e35772b2Smrg# GNU General Public License for more details. 53e35772b2Smrg# 54e35772b2Smrg# You should have received a copy of the GNU General Public License 55e35772b2Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 56e35772b2Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 57e35772b2Smrg# obtained by writing to the Free Software Foundation, Inc., 58e35772b2Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 59e35772b2Smrg]) 6072b676d7Smrg 61e35772b2Smrg# serial 56 LT_INIT 6272b676d7Smrg 6372b676d7Smrg 64e35772b2Smrg# LT_PREREQ(VERSION) 65e35772b2Smrg# ------------------ 66e35772b2Smrg# Complain and exit if this libtool version is less that VERSION. 67e35772b2Smrgm4_defun([LT_PREREQ], 68e35772b2Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 69e35772b2Smrg [m4_default([$3], 70e35772b2Smrg [m4_fatal([Libtool version $1 or higher is required], 71e35772b2Smrg 63)])], 72e35772b2Smrg [$2])]) 7372b676d7Smrg 7472b676d7Smrg 75e35772b2Smrg# _LT_CHECK_BUILDDIR 76e35772b2Smrg# ------------------ 77e35772b2Smrg# Complain if the absolute build directory name contains unusual characters 78e35772b2Smrgm4_defun([_LT_CHECK_BUILDDIR], 79e35772b2Smrg[case `pwd` in 80e35772b2Smrg *\ * | *\ *) 81e35772b2Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 82e35772b2Smrgesac 83e35772b2Smrg]) 84e35772b2Smrg 85e35772b2Smrg 86e35772b2Smrg# LT_INIT([OPTIONS]) 87e35772b2Smrg# ------------------ 88e35772b2SmrgAC_DEFUN([LT_INIT], 89e35772b2Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 90e35772b2SmrgAC_BEFORE([$0], [LT_LANG])dnl 91e35772b2SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 92e35772b2SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 93e35772b2Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 94e35772b2Smrg 95e35772b2Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 96e35772b2Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 97e35772b2Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 98e35772b2Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 99e35772b2Smrgdnl unless we require an AC_DEFUNed macro: 100e35772b2SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 101e35772b2SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 102e35772b2SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 103e35772b2SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 104e35772b2Smrgm4_require([_LT_PROG_LTMAIN])dnl 105e35772b2Smrg 106e35772b2Smrgdnl Parse OPTIONS 107e35772b2Smrg_LT_SET_OPTIONS([$0], [$1]) 10872b676d7Smrg 10972b676d7Smrg# This can be used to rebuild libtool when needed 110e35772b2SmrgLIBTOOL_DEPS="$ltmain" 11172b676d7Smrg 11272b676d7Smrg# Always use our own libtool. 11372b676d7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 11472b676d7SmrgAC_SUBST(LIBTOOL)dnl 11572b676d7Smrg 116e35772b2Smrg_LT_SETUP 11772b676d7Smrg 118e35772b2Smrg# Only expand once: 119e35772b2Smrgm4_define([LT_INIT]) 120e35772b2Smrg])# LT_INIT 12172b676d7Smrg 122e35772b2Smrg# Old names: 123e35772b2SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 124e35772b2SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 125e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 126e35772b2Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 127e35772b2Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 128e35772b2Smrg 129e35772b2Smrg 130e35772b2Smrg# _LT_CC_BASENAME(CC) 131e35772b2Smrg# ------------------- 132e35772b2Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 133e35772b2Smrgm4_defun([_LT_CC_BASENAME], 134e35772b2Smrg[for cc_temp in $1""; do 135e35772b2Smrg case $cc_temp in 136e35772b2Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137e35772b2Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138e35772b2Smrg \-*) ;; 139e35772b2Smrg *) break;; 140e35772b2Smrg esac 141e35772b2Smrgdone 142e35772b2Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 143e35772b2Smrg]) 144e35772b2Smrg 145e35772b2Smrg 146e35772b2Smrg# _LT_FILEUTILS_DEFAULTS 147e35772b2Smrg# ---------------------- 148e35772b2Smrg# It is okay to use these file commands and assume they have been set 149e35772b2Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 150e35772b2Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 151e35772b2Smrg[: ${CP="cp -f"} 152e35772b2Smrg: ${MV="mv -f"} 153e35772b2Smrg: ${RM="rm -f"} 154e35772b2Smrg])# _LT_FILEUTILS_DEFAULTS 155e35772b2Smrg 156e35772b2Smrg 157e35772b2Smrg# _LT_SETUP 158e35772b2Smrg# --------- 159e35772b2Smrgm4_defun([_LT_SETUP], 160e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16172b676d7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 162e35772b2Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 163e35772b2Smrg_LT_DECL([], [host], [0])dnl 164e35772b2Smrg_LT_DECL([], [host_os], [0])dnl 165e35772b2Smrgdnl 166e35772b2Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 167e35772b2Smrg_LT_DECL([], [build], [0])dnl 168e35772b2Smrg_LT_DECL([], [build_os], [0])dnl 169e35772b2Smrgdnl 17072b676d7SmrgAC_REQUIRE([AC_PROG_CC])dnl 171e35772b2SmrgAC_REQUIRE([LT_PATH_LD])dnl 172e35772b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 173e35772b2Smrgdnl 17472b676d7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 175e35772b2Smrgtest -z "$LN_S" && LN_S="ln -s" 176e35772b2Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 17772b676d7Smrgdnl 178e35772b2SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 179e35772b2Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 180e35772b2Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 181e35772b2Smrgdnl 182e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 183e35772b2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 184e35772b2Smrgm4_require([_LT_CMD_RELOAD])dnl 185e35772b2Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 186e35772b2Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 187e35772b2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 188e35772b2Smrg 189e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([ 190e35772b2Smrg# See if we are running on zsh, and set the options which allow our 191e35772b2Smrg# commands through without removal of \ escapes INIT. 192e35772b2Smrgif test -n "\${ZSH_VERSION+set}" ; then 193e35772b2Smrg setopt NO_GLOB_SUBST 194e35772b2Smrgfi 195e35772b2Smrg]) 196e35772b2Smrgif test -n "${ZSH_VERSION+set}" ; then 197e35772b2Smrg setopt NO_GLOB_SUBST 198e35772b2Smrgfi 19972b676d7Smrg 200e35772b2Smrg_LT_CHECK_OBJDIR 201e35772b2Smrg 202e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 203e35772b2Smrg_LT_PROG_ECHO_BACKSLASH 20472b676d7Smrg 20572b676d7Smrgcase $host_os in 20672b676d7Smrgaix3*) 20772b676d7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 20872b676d7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 20972b676d7Smrg # vanish in a puff of smoke. 21072b676d7Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 21172b676d7Smrg COLLECT_NAMES= 21272b676d7Smrg export COLLECT_NAMES 21372b676d7Smrg fi 21472b676d7Smrg ;; 21572b676d7Smrgesac 21672b676d7Smrg 21772b676d7Smrg# Sed substitution that helps us do robust quoting. It backslashifies 21872b676d7Smrg# metacharacters that are still active within double-quoted strings. 219e35772b2Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 22072b676d7Smrg 22172b676d7Smrg# Same as above, but do not quote variable references. 222e35772b2Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 22372b676d7Smrg 22472b676d7Smrg# Sed substitution to delay expansion of an escaped shell variable in a 22572b676d7Smrg# double_quote_subst'ed string. 22672b676d7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 22772b676d7Smrg 228e35772b2Smrg# Sed substitution to delay expansion of an escaped single quote. 229e35772b2Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 230e35772b2Smrg 23172b676d7Smrg# Sed substitution to avoid accidental globbing in evaled expressions 23272b676d7Smrgno_glob_subst='s/\*/\\\*/g' 23372b676d7Smrg 23472b676d7Smrg# Global variables: 235e35772b2Smrgofile=libtool 23672b676d7Smrgcan_build_shared=yes 23772b676d7Smrg 23872b676d7Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 23972b676d7Smrg# which needs '.lib'). 24072b676d7Smrglibext=a 24172b676d7Smrg 242e35772b2Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 24372b676d7Smrg 24472b676d7Smrgold_CC="$CC" 24572b676d7Smrgold_CFLAGS="$CFLAGS" 24672b676d7Smrg 24772b676d7Smrg# Set sane defaults for various variables 24872b676d7Smrgtest -z "$CC" && CC=cc 24972b676d7Smrgtest -z "$LTCC" && LTCC=$CC 25072b676d7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 25172b676d7Smrgtest -z "$LD" && LD=ld 25272b676d7Smrgtest -z "$ac_objext" && ac_objext=o 25372b676d7Smrg 25472b676d7Smrg_LT_CC_BASENAME([$compiler]) 25572b676d7Smrg 25672b676d7Smrg# Only perform the check for file, if the check method requires it 257e35772b2Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 25872b676d7Smrgcase $deplibs_check_method in 25972b676d7Smrgfile_magic*) 26072b676d7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 261e35772b2Smrg _LT_PATH_MAGIC 26272b676d7Smrg fi 26372b676d7Smrg ;; 26472b676d7Smrgesac 26572b676d7Smrg 266e35772b2Smrg# Use C for the default configuration in the libtool script 267e35772b2SmrgLT_SUPPORTED_TAG([CC]) 268e35772b2Smrg_LT_LANG_C_CONFIG 269e35772b2Smrg_LT_LANG_DEFAULT_CONFIG 270e35772b2Smrg_LT_CONFIG_COMMANDS 271e35772b2Smrg])# _LT_SETUP 2721fd23544Smrg 27372b676d7Smrg 274e35772b2Smrg# _LT_PROG_LTMAIN 275e35772b2Smrg# --------------- 276e35772b2Smrg# Note that this code is called both from `configure', and `config.status' 277e35772b2Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 278e35772b2Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 279e35772b2Smrg# so we pass a copy along to make sure it has a sensible value anyway. 280e35772b2Smrgm4_defun([_LT_PROG_LTMAIN], 281e35772b2Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 282e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 283e35772b2Smrgltmain="$ac_aux_dir/ltmain.sh" 284e35772b2Smrg])# _LT_PROG_LTMAIN 28572b676d7Smrg 28672b676d7Smrg 287e35772b2Smrg 288e35772b2Smrg# So that we can recreate a full libtool script including additional 289e35772b2Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 290e35772b2Smrg# in macros and then make a single call at the end using the `libtool' 291e35772b2Smrg# label. 292e35772b2Smrg 293e35772b2Smrg 294e35772b2Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 295e35772b2Smrg# ---------------------------------------- 296e35772b2Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 297e35772b2Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 298e35772b2Smrg[m4_ifval([$1], 299e35772b2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 300e35772b2Smrg [$1 301e35772b2Smrg])])]) 302e35772b2Smrg 303e35772b2Smrg# Initialize. 304e35772b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 305e35772b2Smrg 306e35772b2Smrg 307e35772b2Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 308e35772b2Smrg# ------------------------------ 309e35772b2Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 310e35772b2Smrgm4_define([_LT_CONFIG_LIBTOOL], 311e35772b2Smrg[m4_ifval([$1], 312e35772b2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 313e35772b2Smrg [$1 314e35772b2Smrg])])]) 315e35772b2Smrg 316e35772b2Smrg# Initialize. 317e35772b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 318e35772b2Smrg 319e35772b2Smrg 320e35772b2Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 321e35772b2Smrg# ----------------------------------------------------- 322e35772b2Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 323e35772b2Smrg[_LT_CONFIG_LIBTOOL([$1]) 324e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 325e35772b2Smrg]) 326e35772b2Smrg 327e35772b2Smrg 328e35772b2Smrg# _LT_FORMAT_COMMENT([COMMENT]) 329e35772b2Smrg# ----------------------------- 330e35772b2Smrg# Add leading comment marks to the start of each line, and a trailing 331e35772b2Smrg# full-stop to the whole comment if one is not present already. 332e35772b2Smrgm4_define([_LT_FORMAT_COMMENT], 333e35772b2Smrg[m4_ifval([$1], [ 334e35772b2Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 335e35772b2Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 336e35772b2Smrg)]) 337e35772b2Smrg 338e35772b2Smrg 339e35772b2Smrg 340e35772b2Smrg 341e35772b2Smrg 342e35772b2Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 343e35772b2Smrg# ------------------------------------------------------------------- 344e35772b2Smrg# CONFIGNAME is the name given to the value in the libtool script. 345e35772b2Smrg# VARNAME is the (base) name used in the configure script. 346e35772b2Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 347e35772b2Smrg# VARNAME. Any other value will be used directly. 348e35772b2Smrgm4_define([_LT_DECL], 349e35772b2Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 350e35772b2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 351e35772b2Smrg [m4_ifval([$1], [$1], [$2])]) 352e35772b2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 353e35772b2Smrg m4_ifval([$4], 354e35772b2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 355e35772b2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 356e35772b2Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 357e35772b2Smrg]) 358e35772b2Smrg 359e35772b2Smrg 360e35772b2Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 361e35772b2Smrg# -------------------------------------------------------- 362e35772b2Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 363e35772b2Smrg 364e35772b2Smrg 365e35772b2Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 366e35772b2Smrg# ------------------------------------------------ 367e35772b2Smrgm4_define([lt_decl_tag_varnames], 368e35772b2Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 369e35772b2Smrg 370e35772b2Smrg 371e35772b2Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 372e35772b2Smrg# --------------------------------------------------------- 373e35772b2Smrgm4_define([_lt_decl_filter], 374e35772b2Smrg[m4_case([$#], 375e35772b2Smrg [0], [m4_fatal([$0: too few arguments: $#])], 376e35772b2Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 377e35772b2Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 378e35772b2Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 379e35772b2Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 380e35772b2Smrg]) 381e35772b2Smrg 382e35772b2Smrg 383e35772b2Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 384e35772b2Smrg# -------------------------------------------------- 385e35772b2Smrgm4_define([lt_decl_quote_varnames], 386e35772b2Smrg[_lt_decl_filter([value], [1], $@)]) 387e35772b2Smrg 388e35772b2Smrg 389e35772b2Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 390e35772b2Smrg# --------------------------------------------------- 391e35772b2Smrgm4_define([lt_decl_dquote_varnames], 392e35772b2Smrg[_lt_decl_filter([value], [2], $@)]) 393e35772b2Smrg 394e35772b2Smrg 395e35772b2Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 396e35772b2Smrg# --------------------------------------------------- 397e35772b2Smrgm4_define([lt_decl_varnames_tagged], 398e35772b2Smrg[m4_assert([$# <= 2])dnl 399e35772b2Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 400e35772b2Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 401e35772b2Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 402e35772b2Smrgm4_define([_lt_decl_varnames_tagged], 403e35772b2Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 404e35772b2Smrg 405e35772b2Smrg 406e35772b2Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 407e35772b2Smrg# ------------------------------------------------ 408e35772b2Smrgm4_define([lt_decl_all_varnames], 409e35772b2Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 410e35772b2Smrg m4_if([$2], [], 411e35772b2Smrg m4_quote(lt_decl_varnames), 412e35772b2Smrg m4_quote(m4_shift($@))))[]dnl 413e35772b2Smrg]) 414e35772b2Smrgm4_define([_lt_decl_all_varnames], 415e35772b2Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 416e35772b2Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 417e35772b2Smrg]) 418e35772b2Smrg 419e35772b2Smrg 420e35772b2Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 421e35772b2Smrg# ------------------------------------ 422e35772b2Smrg# Quote a variable value, and forward it to `config.status' so that its 423e35772b2Smrg# declaration there will have the same value as in `configure'. VARNAME 424e35772b2Smrg# must have a single quote delimited value for this to work. 425e35772b2Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 426e35772b2Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 427e35772b2Smrg 428e35772b2Smrg 429e35772b2Smrg# _LT_CONFIG_STATUS_DECLARATIONS 430e35772b2Smrg# ------------------------------ 431e35772b2Smrg# We delimit libtool config variables with single quotes, so when 432e35772b2Smrg# we write them to config.status, we have to be sure to quote all 433e35772b2Smrg# embedded single quotes properly. In configure, this macro expands 434e35772b2Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 435e35772b2Smrg# 436e35772b2Smrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 437e35772b2Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 438e35772b2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 439e35772b2Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 440e35772b2Smrg 441e35772b2Smrg 442e35772b2Smrg# _LT_LIBTOOL_TAGS 443e35772b2Smrg# ---------------- 444e35772b2Smrg# Output comment and list of tags supported by the script 445e35772b2Smrgm4_defun([_LT_LIBTOOL_TAGS], 446e35772b2Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 447e35772b2Smrgavailable_tags="_LT_TAGS"dnl 448e35772b2Smrg]) 449e35772b2Smrg 450e35772b2Smrg 451e35772b2Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 452e35772b2Smrg# ----------------------------------- 453e35772b2Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 454e35772b2Smrg# expand to a commented shell variable setting: 455e35772b2Smrg# 456e35772b2Smrg# # Some comment about what VAR is for. 457e35772b2Smrg# visible_name=$lt_internal_name 458e35772b2Smrgm4_define([_LT_LIBTOOL_DECLARE], 459e35772b2Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 460e35772b2Smrg [description])))[]dnl 461e35772b2Smrgm4_pushdef([_libtool_name], 462e35772b2Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 463e35772b2Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 464e35772b2Smrg [0], [_libtool_name=[$]$1], 465e35772b2Smrg [1], [_libtool_name=$lt_[]$1], 466e35772b2Smrg [2], [_libtool_name=$lt_[]$1], 467e35772b2Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 468e35772b2Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 469e35772b2Smrg]) 470e35772b2Smrg 471e35772b2Smrg 472e35772b2Smrg# _LT_LIBTOOL_CONFIG_VARS 473e35772b2Smrg# ----------------------- 474e35772b2Smrg# Produce commented declarations of non-tagged libtool config variables 475e35772b2Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 476e35772b2Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 477e35772b2Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 478e35772b2Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 479e35772b2Smrg[m4_foreach([_lt_var], 480e35772b2Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 481e35772b2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 482e35772b2Smrg 483e35772b2Smrg 484e35772b2Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 485e35772b2Smrg# ------------------------- 486e35772b2Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 487e35772b2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 488e35772b2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 48972b676d7Smrg 49072b676d7Smrg 491e35772b2Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 492e35772b2Smrg# ------------------------------ 493e35772b2Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 494e35772b2Smrg 495e35772b2Smrg 496e35772b2Smrg# _LT_CONFIG_COMMANDS 49772b676d7Smrg# ------------------- 498e35772b2Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 499e35772b2Smrg# variables for single and double quote escaping we saved from calls 500e35772b2Smrg# to _LT_DECL, we can put quote escaped variables declarations 501e35772b2Smrg# into `config.status', and then the shell code to quote escape them in 502e35772b2Smrg# for loops in `config.status'. Finally, any additional code accumulated 503e35772b2Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 504e35772b2Smrgm4_defun([_LT_CONFIG_COMMANDS], 505e35772b2Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 506e35772b2Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 507e35772b2Smrg dnl instead of duplicating it all over again into config.status, 508e35772b2Smrg dnl then we will have config.status run $CONFIG_LT later, so it 509e35772b2Smrg dnl needs to know what name is stored there: 510e35772b2Smrg [AC_CONFIG_COMMANDS([libtool], 511e35772b2Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 512e35772b2Smrg dnl If the libtool generation code is destined for config.status, 513e35772b2Smrg dnl expand the accumulated commands and init code now: 514e35772b2Smrg [AC_CONFIG_COMMANDS([libtool], 515e35772b2Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 516e35772b2Smrg])#_LT_CONFIG_COMMANDS 517e35772b2Smrg 518e35772b2Smrg 519e35772b2Smrg# Initialize. 520e35772b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 521e35772b2Smrg[ 522e35772b2Smrg 523e35772b2Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 524e35772b2Smrg# if CDPATH is set. 525e35772b2Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 526e35772b2Smrg 527e35772b2Smrgsed_quote_subst='$sed_quote_subst' 528e35772b2Smrgdouble_quote_subst='$double_quote_subst' 529e35772b2Smrgdelay_variable_subst='$delay_variable_subst' 530e35772b2Smrg_LT_CONFIG_STATUS_DECLARATIONS 531e35772b2SmrgLTCC='$LTCC' 532e35772b2SmrgLTCFLAGS='$LTCFLAGS' 533e35772b2Smrgcompiler='$compiler_DEFAULT' 534e35772b2Smrg 535e35772b2Smrg# Quote evaled strings. 536e35772b2Smrgfor var in lt_decl_all_varnames([[ \ 537e35772b2Smrg]], lt_decl_quote_varnames); do 538e35772b2Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 539e35772b2Smrg *[[\\\\\\\`\\"\\\$]]*) 540e35772b2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 541e35772b2Smrg ;; 542e35772b2Smrg *) 543e35772b2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 544e35772b2Smrg ;; 545e35772b2Smrg esac 546e35772b2Smrgdone 547e35772b2Smrg 548e35772b2Smrg# Double-quote double-evaled strings. 549e35772b2Smrgfor var in lt_decl_all_varnames([[ \ 550e35772b2Smrg]], lt_decl_dquote_varnames); do 551e35772b2Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 552e35772b2Smrg *[[\\\\\\\`\\"\\\$]]*) 553e35772b2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 554e35772b2Smrg ;; 555e35772b2Smrg *) 556e35772b2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 557e35772b2Smrg ;; 558e35772b2Smrg esac 559e35772b2Smrgdone 560e35772b2Smrg 561e35772b2Smrg# Fix-up fallback echo if it was mangled by the above quoting rules. 562e35772b2Smrgcase \$lt_ECHO in 563e35772b2Smrg*'\\\[$]0 --fallback-echo"')dnl " 564e35772b2Smrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 565e35772b2Smrg ;; 566e35772b2Smrgesac 567e35772b2Smrg 568e35772b2Smrg_LT_OUTPUT_LIBTOOL_INIT 569e35772b2Smrg]) 570e35772b2Smrg 571e35772b2Smrg 572e35772b2Smrg# LT_OUTPUT 573e35772b2Smrg# --------- 574e35772b2Smrg# This macro allows early generation of the libtool script (before 575e35772b2Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 576e35772b2Smrg# tests. 577e35772b2SmrgAC_DEFUN([LT_OUTPUT], 578e35772b2Smrg[: ${CONFIG_LT=./config.lt} 579e35772b2SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 580e35772b2Smrgcat >"$CONFIG_LT" <<_LTEOF 581e35772b2Smrg#! $SHELL 582e35772b2Smrg# Generated by $as_me. 583e35772b2Smrg# Run this file to recreate a libtool stub with the current configuration. 584e35772b2Smrg 585e35772b2Smrglt_cl_silent=false 586e35772b2SmrgSHELL=\${CONFIG_SHELL-$SHELL} 587e35772b2Smrg_LTEOF 588e35772b2Smrg 589e35772b2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 590e35772b2SmrgAS_SHELL_SANITIZE 591e35772b2Smrg_AS_PREPARE 592e35772b2Smrg 593e35772b2Smrgexec AS_MESSAGE_FD>&1 594e35772b2Smrgexec AS_MESSAGE_LOG_FD>>config.log 595e35772b2Smrg{ 596e35772b2Smrg echo 597e35772b2Smrg AS_BOX([Running $as_me.]) 598e35772b2Smrg} >&AS_MESSAGE_LOG_FD 599e35772b2Smrg 600e35772b2Smrglt_cl_help="\ 601e35772b2Smrg\`$as_me' creates a local libtool stub from the current configuration, 602e35772b2Smrgfor use in further configure time tests before the real libtool is 603e35772b2Smrggenerated. 604e35772b2Smrg 605e35772b2SmrgUsage: $[0] [[OPTIONS]] 606e35772b2Smrg 607e35772b2Smrg -h, --help print this help, then exit 608e35772b2Smrg -V, --version print version number, then exit 609e35772b2Smrg -q, --quiet do not print progress messages 610e35772b2Smrg -d, --debug don't remove temporary files 611e35772b2Smrg 612e35772b2SmrgReport bugs to <bug-libtool@gnu.org>." 613e35772b2Smrg 614e35772b2Smrglt_cl_version="\ 615e35772b2Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 616e35772b2Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 617e35772b2Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 618e35772b2Smrg 619e35772b2SmrgCopyright (C) 2008 Free Software Foundation, Inc. 620e35772b2SmrgThis config.lt script is free software; the Free Software Foundation 621e35772b2Smrggives unlimited permision to copy, distribute and modify it." 622e35772b2Smrg 623e35772b2Smrgwhile test $[#] != 0 624e35772b2Smrgdo 625e35772b2Smrg case $[1] in 626e35772b2Smrg --version | --v* | -V ) 627e35772b2Smrg echo "$lt_cl_version"; exit 0 ;; 628e35772b2Smrg --help | --h* | -h ) 629e35772b2Smrg echo "$lt_cl_help"; exit 0 ;; 630e35772b2Smrg --debug | --d* | -d ) 631e35772b2Smrg debug=: ;; 632e35772b2Smrg --quiet | --q* | --silent | --s* | -q ) 633e35772b2Smrg lt_cl_silent=: ;; 634e35772b2Smrg 635e35772b2Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 636e35772b2SmrgTry \`$[0] --help' for more information.]) ;; 637e35772b2Smrg 638e35772b2Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 639e35772b2SmrgTry \`$[0] --help' for more information.]) ;; 640e35772b2Smrg esac 641e35772b2Smrg shift 642e35772b2Smrgdone 643e35772b2Smrg 644e35772b2Smrgif $lt_cl_silent; then 645e35772b2Smrg exec AS_MESSAGE_FD>/dev/null 646e35772b2Smrgfi 647e35772b2Smrg_LTEOF 648e35772b2Smrg 649e35772b2Smrgcat >>"$CONFIG_LT" <<_LTEOF 650e35772b2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 651e35772b2Smrg_LTEOF 652e35772b2Smrg 653e35772b2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 654e35772b2SmrgAC_MSG_NOTICE([creating $ofile]) 655e35772b2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 656e35772b2SmrgAS_EXIT(0) 657e35772b2Smrg_LTEOF 658e35772b2Smrgchmod +x "$CONFIG_LT" 659e35772b2Smrg 660e35772b2Smrg# configure is writing to config.log, but config.lt does its own redirection, 661e35772b2Smrg# appending to config.log, which fails on DOS, as config.log is still kept 662e35772b2Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 663e35772b2Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 664e35772b2Smrgif test "$no_create" != yes; then 665e35772b2Smrg lt_cl_success=: 666e35772b2Smrg test "$silent" = yes && 667e35772b2Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 668e35772b2Smrg exec AS_MESSAGE_LOG_FD>/dev/null 669e35772b2Smrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 670e35772b2Smrg exec AS_MESSAGE_LOG_FD>>config.log 671e35772b2Smrg $lt_cl_success || AS_EXIT(1) 672e35772b2Smrgfi 673e35772b2Smrg])# LT_OUTPUT 674e35772b2Smrg 675e35772b2Smrg 676e35772b2Smrg# _LT_CONFIG(TAG) 677e35772b2Smrg# --------------- 678e35772b2Smrg# If TAG is the built-in tag, create an initial libtool script with a 679e35772b2Smrg# default configuration from the untagged config vars. Otherwise add code 680e35772b2Smrg# to config.status for appending the configuration named by TAG from the 681e35772b2Smrg# matching tagged config vars. 682e35772b2Smrgm4_defun([_LT_CONFIG], 683e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 684e35772b2Smrg_LT_CONFIG_SAVE_COMMANDS([ 685e35772b2Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 686e35772b2Smrg m4_if(_LT_TAG, [C], [ 687e35772b2Smrg # See if we are running on zsh, and set the options which allow our 688e35772b2Smrg # commands through without removal of \ escapes. 689e35772b2Smrg if test -n "${ZSH_VERSION+set}" ; then 690e35772b2Smrg setopt NO_GLOB_SUBST 691e35772b2Smrg fi 692e35772b2Smrg 693e35772b2Smrg cfgfile="${ofile}T" 694e35772b2Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 695e35772b2Smrg $RM "$cfgfile" 696e35772b2Smrg 697e35772b2Smrg cat <<_LT_EOF >> "$cfgfile" 698e35772b2Smrg#! $SHELL 699e35772b2Smrg 700e35772b2Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 701e35772b2Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 702e35772b2Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 703e35772b2Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 704e35772b2Smrg# 705e35772b2Smrg_LT_COPYING 706e35772b2Smrg_LT_LIBTOOL_TAGS 707e35772b2Smrg 708e35772b2Smrg# ### BEGIN LIBTOOL CONFIG 709e35772b2Smrg_LT_LIBTOOL_CONFIG_VARS 710e35772b2Smrg_LT_LIBTOOL_TAG_VARS 711e35772b2Smrg# ### END LIBTOOL CONFIG 712e35772b2Smrg 713e35772b2Smrg_LT_EOF 714e35772b2Smrg 715e35772b2Smrg case $host_os in 716e35772b2Smrg aix3*) 717e35772b2Smrg cat <<\_LT_EOF >> "$cfgfile" 718e35772b2Smrg# AIX sometimes has problems with the GCC collect2 program. For some 719e35772b2Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 720e35772b2Smrg# vanish in a puff of smoke. 721e35772b2Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 722e35772b2Smrg COLLECT_NAMES= 723e35772b2Smrg export COLLECT_NAMES 724e35772b2Smrgfi 725e35772b2Smrg_LT_EOF 726e35772b2Smrg ;; 727e35772b2Smrg esac 728e35772b2Smrg 729e35772b2Smrg _LT_PROG_LTMAIN 730e35772b2Smrg 731e35772b2Smrg # We use sed instead of cat because bash on DJGPP gets confused if 732e35772b2Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 733e35772b2Smrg # text mode, it properly converts lines to CR/LF. This bash problem 734e35772b2Smrg # is reportedly fixed, but why not run on old versions too? 735e35772b2Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 736e35772b2Smrg || (rm -f "$cfgfile"; exit 1) 737e35772b2Smrg 738e35772b2Smrg _LT_PROG_XSI_SHELLFNS 739e35772b2Smrg 740e35772b2Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 741e35772b2Smrg || (rm -f "$cfgfile"; exit 1) 742e35772b2Smrg 743e35772b2Smrg mv -f "$cfgfile" "$ofile" || 744e35772b2Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 745e35772b2Smrg chmod +x "$ofile" 746e35772b2Smrg], 747e35772b2Smrg[cat <<_LT_EOF >> "$ofile" 748e35772b2Smrg 749e35772b2Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 750e35772b2Smrgdnl in a comment (ie after a #). 751e35772b2Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 752e35772b2Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 753e35772b2Smrg# ### END LIBTOOL TAG CONFIG: $1 754e35772b2Smrg_LT_EOF 755e35772b2Smrg])dnl /m4_if 756e35772b2Smrg], 757e35772b2Smrg[m4_if([$1], [], [ 758e35772b2Smrg PACKAGE='$PACKAGE' 759e35772b2Smrg VERSION='$VERSION' 760e35772b2Smrg TIMESTAMP='$TIMESTAMP' 761e35772b2Smrg RM='$RM' 762e35772b2Smrg ofile='$ofile'], []) 763e35772b2Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 764e35772b2Smrg])# _LT_CONFIG 765e35772b2Smrg 766e35772b2Smrg 767e35772b2Smrg# LT_SUPPORTED_TAG(TAG) 768e35772b2Smrg# --------------------- 769e35772b2Smrg# Trace this macro to discover what tags are supported by the libtool 770e35772b2Smrg# --tag option, using: 771e35772b2Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 772e35772b2SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 773e35772b2Smrg 774e35772b2Smrg 775e35772b2Smrg# C support is built-in for now 776e35772b2Smrgm4_define([_LT_LANG_C_enabled], []) 777e35772b2Smrgm4_define([_LT_TAGS], []) 778e35772b2Smrg 779e35772b2Smrg 780e35772b2Smrg# LT_LANG(LANG) 781e35772b2Smrg# ------------- 782e35772b2Smrg# Enable libtool support for the given language if not already enabled. 783e35772b2SmrgAC_DEFUN([LT_LANG], 784e35772b2Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 785e35772b2Smrgm4_case([$1], 786e35772b2Smrg [C], [_LT_LANG(C)], 787e35772b2Smrg [C++], [_LT_LANG(CXX)], 788e35772b2Smrg [Java], [_LT_LANG(GCJ)], 789e35772b2Smrg [Fortran 77], [_LT_LANG(F77)], 790e35772b2Smrg [Fortran], [_LT_LANG(FC)], 791e35772b2Smrg [Windows Resource], [_LT_LANG(RC)], 792e35772b2Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 793e35772b2Smrg [_LT_LANG($1)], 794e35772b2Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 795e35772b2Smrg])# LT_LANG 796e35772b2Smrg 797e35772b2Smrg 798e35772b2Smrg# _LT_LANG(LANGNAME) 799e35772b2Smrg# ------------------ 800e35772b2Smrgm4_defun([_LT_LANG], 801e35772b2Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 802e35772b2Smrg [LT_SUPPORTED_TAG([$1])dnl 803e35772b2Smrg m4_append([_LT_TAGS], [$1 ])dnl 804e35772b2Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 805e35772b2Smrg _LT_LANG_$1_CONFIG($1)])dnl 806e35772b2Smrg])# _LT_LANG 807e35772b2Smrg 808e35772b2Smrg 809e35772b2Smrg# _LT_LANG_DEFAULT_CONFIG 810e35772b2Smrg# ----------------------- 811e35772b2Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 812e35772b2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 813e35772b2Smrg [LT_LANG(CXX)], 814e35772b2Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 815e35772b2Smrg 816e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 817e35772b2Smrg [LT_LANG(F77)], 818e35772b2Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 819e35772b2Smrg 820e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 821e35772b2Smrg [LT_LANG(FC)], 822e35772b2Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 823e35772b2Smrg 824e35772b2Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 825e35772b2Smrgdnl pulling things in needlessly. 826e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 827e35772b2Smrg [LT_LANG(GCJ)], 828e35772b2Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 829e35772b2Smrg [LT_LANG(GCJ)], 830e35772b2Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 831e35772b2Smrg [LT_LANG(GCJ)], 832e35772b2Smrg [m4_ifdef([AC_PROG_GCJ], 833e35772b2Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 834e35772b2Smrg m4_ifdef([A][M_PROG_GCJ], 835e35772b2Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 836e35772b2Smrg m4_ifdef([LT_PROG_GCJ], 837e35772b2Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 838e35772b2Smrg 839e35772b2SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 840e35772b2Smrg [LT_LANG(RC)], 841e35772b2Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 842e35772b2Smrg])# _LT_LANG_DEFAULT_CONFIG 843e35772b2Smrg 844e35772b2Smrg# Obsolete macros: 845e35772b2SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 846e35772b2SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 847e35772b2SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 848e35772b2SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 849e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 850e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 851e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 852e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 853e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 854e35772b2Smrg 855e35772b2Smrg 856e35772b2Smrg# _LT_TAG_COMPILER 857e35772b2Smrg# ---------------- 858e35772b2Smrgm4_defun([_LT_TAG_COMPILER], 85972b676d7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 86072b676d7Smrg 861e35772b2Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 862e35772b2Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 863e35772b2Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 864e35772b2Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 865e35772b2Smrg 86672b676d7Smrg# If no C compiler was specified, use CC. 86772b676d7SmrgLTCC=${LTCC-"$CC"} 86872b676d7Smrg 86972b676d7Smrg# If no C compiler flags were specified, use CFLAGS. 87072b676d7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 87172b676d7Smrg 87272b676d7Smrg# Allow CC to be a program name with arguments. 87372b676d7Smrgcompiler=$CC 874e35772b2Smrg])# _LT_TAG_COMPILER 87572b676d7Smrg 87672b676d7Smrg 87772b676d7Smrg# _LT_COMPILER_BOILERPLATE 87872b676d7Smrg# ------------------------ 87972b676d7Smrg# Check for compiler boilerplate output or warnings with 88072b676d7Smrg# the simple compiler test code. 881e35772b2Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 882e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 8831fd23544Smrgac_outfile=conftest.$ac_objext 8841fd23544Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 88572b676d7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 88672b676d7Smrg_lt_compiler_boilerplate=`cat conftest.err` 887e35772b2Smrg$RM conftest* 88872b676d7Smrg])# _LT_COMPILER_BOILERPLATE 88972b676d7Smrg 89072b676d7Smrg 89172b676d7Smrg# _LT_LINKER_BOILERPLATE 89272b676d7Smrg# ---------------------- 89372b676d7Smrg# Check for linker boilerplate output or warnings with 89472b676d7Smrg# the simple link test code. 895e35772b2Smrgm4_defun([_LT_LINKER_BOILERPLATE], 896e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 8971fd23544Smrgac_outfile=conftest.$ac_objext 8981fd23544Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 89972b676d7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 90072b676d7Smrg_lt_linker_boilerplate=`cat conftest.err` 901e35772b2Smrg$RM -r conftest* 90272b676d7Smrg])# _LT_LINKER_BOILERPLATE 90372b676d7Smrg 9041fd23544Smrg# _LT_REQUIRED_DARWIN_CHECKS 905e35772b2Smrg# ------------------------- 906e35772b2Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9071fd23544Smrg case $host_os in 9081fd23544Smrg rhapsody* | darwin*) 9091fd23544Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9101fd23544Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 911e35772b2Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 912e35772b2Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 913e35772b2Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 914e35772b2Smrg _LT_DECL([], [DSYMUTIL], [1], 915e35772b2Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 916e35772b2Smrg _LT_DECL([], [NMEDIT], [1], 917e35772b2Smrg [Tool to change global to local symbols on Mac OS X]) 918e35772b2Smrg _LT_DECL([], [LIPO], [1], 919e35772b2Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 920e35772b2Smrg _LT_DECL([], [OTOOL], [1], 921e35772b2Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 922e35772b2Smrg _LT_DECL([], [OTOOL64], [1], 923e35772b2Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9241fd23544Smrg 9251fd23544Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9261fd23544Smrg [lt_cv_apple_cc_single_mod=no 9271fd23544Smrg if test -z "${LT_MULTI_MODULE}"; then 928e35772b2Smrg # By default we will add the -single_module flag. You can override 929e35772b2Smrg # by either setting the environment variable LT_MULTI_MODULE 930e35772b2Smrg # non-empty at configure time, or by adding -multi_module to the 931e35772b2Smrg # link flags. 932e35772b2Smrg rm -rf libconftest.dylib* 933e35772b2Smrg echo "int foo(void){return 1;}" > conftest.c 934e35772b2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 935e35772b2Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 936e35772b2Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 937e35772b2Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 938e35772b2Smrg _lt_result=$? 939e35772b2Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 940e35772b2Smrg lt_cv_apple_cc_single_mod=yes 941e35772b2Smrg else 942e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 943e35772b2Smrg fi 944e35772b2Smrg rm -rf libconftest.dylib* 945e35772b2Smrg rm -f conftest.* 9461fd23544Smrg fi]) 9471fd23544Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 9481fd23544Smrg [lt_cv_ld_exported_symbols_list], 9491fd23544Smrg [lt_cv_ld_exported_symbols_list=no 9501fd23544Smrg save_LDFLAGS=$LDFLAGS 9511fd23544Smrg echo "_main" > conftest.sym 9521fd23544Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 9531fd23544Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 954e35772b2Smrg [lt_cv_ld_exported_symbols_list=yes], 955e35772b2Smrg [lt_cv_ld_exported_symbols_list=no]) 956e35772b2Smrg LDFLAGS="$save_LDFLAGS" 9571fd23544Smrg ]) 9581fd23544Smrg case $host_os in 959e35772b2Smrg rhapsody* | darwin1.[[012]]) 9601fd23544Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 9611fd23544Smrg darwin1.*) 962e35772b2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 963e35772b2Smrg darwin*) # darwin 5.x on 9641fd23544Smrg # if running on 10.5 or later, the deployment target defaults 9651fd23544Smrg # to the OS version, if on x86, and 10.4, the deployment 9661fd23544Smrg # target defaults to 10.4. Don't you love it? 9671fd23544Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 968e35772b2Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 969e35772b2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 970e35772b2Smrg 10.[[012]]*) 971e35772b2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 972e35772b2Smrg 10.*) 973e35772b2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 9741fd23544Smrg esac 9751fd23544Smrg ;; 9761fd23544Smrg esac 9771fd23544Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 9781fd23544Smrg _lt_dar_single_mod='$single_module' 9791fd23544Smrg fi 9801fd23544Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 9811fd23544Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 9821fd23544Smrg else 983e35772b2Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 9841fd23544Smrg fi 9851fd23544Smrg if test "$DSYMUTIL" != ":"; then 986e35772b2Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 9871fd23544Smrg else 9881fd23544Smrg _lt_dsymutil= 9891fd23544Smrg fi 9901fd23544Smrg ;; 9911fd23544Smrg esac 9921fd23544Smrg]) 99372b676d7Smrg 994e35772b2Smrg 995e35772b2Smrg# _LT_DARWIN_LINKER_FEATURES 996e35772b2Smrg# -------------------------- 997e35772b2Smrg# Checks for linker and compiler features on darwin 998e35772b2Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 999e35772b2Smrg[ 1000e35772b2Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1001e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1002e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1003e35772b2Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1004e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1005e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1006e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1007e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1008e35772b2Smrg case $cc_basename in 1009e35772b2Smrg ifort*) _lt_dar_can_shared=yes ;; 1010e35772b2Smrg *) _lt_dar_can_shared=$GCC ;; 1011e35772b2Smrg esac 1012e35772b2Smrg if test "$_lt_dar_can_shared" = "yes"; then 1013e35772b2Smrg output_verbose_link_cmd=echo 1014e35772b2Smrg _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}" 1015e35772b2Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1016e35772b2Smrg _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}" 1017e35772b2Smrg _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}" 1018e35772b2Smrg m4_if([$1], [CXX], 1019e35772b2Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1020e35772b2Smrg _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}" 1021e35772b2Smrg _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}" 1022e35772b2Smrg fi 1023e35772b2Smrg],[]) 1024e35772b2Smrg else 1025e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1026e35772b2Smrg fi 1027e35772b2Smrg]) 1028e35772b2Smrg 1029e35772b2Smrg# _LT_SYS_MODULE_PATH_AIX 1030e35772b2Smrg# ----------------------- 103172b676d7Smrg# Links a minimal program and checks the executable 103272b676d7Smrg# for the system default hardcoded library path. In most cases, 103372b676d7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 103472b676d7Smrg# the location of the communication and MPI libs are included too. 103572b676d7Smrg# If we don't find anything, use the default library path according 103672b676d7Smrg# to the aix ld manual. 1037e35772b2Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1038e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 10391fd23544SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 10401fd23544Smrglt_aix_libpath_sed=' 10411fd23544Smrg /Import File Strings/,/^$/ { 10421fd23544Smrg /^0/ { 10431fd23544Smrg s/^0 *\(.*\)$/\1/ 10441fd23544Smrg p 10451fd23544Smrg } 10461fd23544Smrg }' 10471fd23544Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 104872b676d7Smrg# Check for a 64-bit object if we didn't find anything. 10491fd23544Smrgif test -z "$aix_libpath"; then 10501fd23544Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 10511fd23544Smrgfi],[]) 105272b676d7Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1053e35772b2Smrg])# _LT_SYS_MODULE_PATH_AIX 105472b676d7Smrg 105572b676d7Smrg 1056e35772b2Smrg# _LT_SHELL_INIT(ARG) 1057e35772b2Smrg# ------------------- 1058e35772b2Smrgm4_define([_LT_SHELL_INIT], 105972b676d7Smrg[ifdef([AC_DIVERSION_NOTICE], 106072b676d7Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 106172b676d7Smrg [AC_DIVERT_PUSH(NOTICE)]) 106272b676d7Smrg$1 106372b676d7SmrgAC_DIVERT_POP 1064e35772b2Smrg])# _LT_SHELL_INIT 106572b676d7Smrg 106672b676d7Smrg 1067e35772b2Smrg# _LT_PROG_ECHO_BACKSLASH 1068e35772b2Smrg# ----------------------- 106972b676d7Smrg# Add some code to the start of the generated configure script which 107072b676d7Smrg# will find an echo command which doesn't interpret backslashes. 1071e35772b2Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1072e35772b2Smrg[_LT_SHELL_INIT([ 107372b676d7Smrg# Check that we are running under the correct shell. 107472b676d7SmrgSHELL=${CONFIG_SHELL-/bin/sh} 107572b676d7Smrg 1076e35772b2Smrgcase X$lt_ECHO in 107772b676d7SmrgX*--fallback-echo) 107872b676d7Smrg # Remove one level of quotation (which was required for Make). 1079e35772b2Smrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 108072b676d7Smrg ;; 108172b676d7Smrgesac 108272b676d7Smrg 1083e35772b2SmrgECHO=${lt_ECHO-echo} 108472b676d7Smrgif test "X[$]1" = X--no-reexec; then 108572b676d7Smrg # Discard the --no-reexec flag, and continue. 108672b676d7Smrg shift 108772b676d7Smrgelif test "X[$]1" = X--fallback-echo; then 108872b676d7Smrg # Avoid inline document here, it may be left over 108972b676d7Smrg : 1090e35772b2Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 1091e35772b2Smrg # Yippee, $ECHO works! 109272b676d7Smrg : 109372b676d7Smrgelse 109472b676d7Smrg # Restart under the correct shell. 109572b676d7Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 109672b676d7Smrgfi 109772b676d7Smrg 109872b676d7Smrgif test "X[$]1" = X--fallback-echo; then 109972b676d7Smrg # used as fallback echo 110072b676d7Smrg shift 1101e35772b2Smrg cat <<_LT_EOF 110272b676d7Smrg[$]* 1103e35772b2Smrg_LT_EOF 110472b676d7Smrg exit 0 110572b676d7Smrgfi 110672b676d7Smrg 110772b676d7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 110872b676d7Smrg# if CDPATH is set. 110972b676d7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 111072b676d7Smrg 1111e35772b2Smrgif test -z "$lt_ECHO"; then 1112e35772b2Smrg if test "X${echo_test_string+set}" != Xset; then 1113e35772b2Smrg # find a string as large as possible, as long as the shell can cope with it 1114e35772b2Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1115e35772b2Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1116e35772b2Smrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 1117e35772b2Smrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 1118e35772b2Smrg then 1119e35772b2Smrg break 1120e35772b2Smrg fi 1121e35772b2Smrg done 1122e35772b2Smrg fi 112372b676d7Smrg 1124e35772b2Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1125e35772b2Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1126e35772b2Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1127e35772b2Smrg : 1128e35772b2Smrg else 1129e35772b2Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 1130e35772b2Smrg # backslashes. This makes it impossible to quote backslashes using 1131e35772b2Smrg # echo "$something" | sed 's/\\/\\\\/g' 1132e35772b2Smrg # 1133e35772b2Smrg # So, first we look for a working echo in the user's PATH. 113472b676d7Smrg 1135e35772b2Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1136e35772b2Smrg for dir in $PATH /usr/ucb; do 1137e35772b2Smrg IFS="$lt_save_ifs" 1138e35772b2Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1139e35772b2Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1140e35772b2Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1141e35772b2Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1142e35772b2Smrg ECHO="$dir/echo" 1143e35772b2Smrg break 1144e35772b2Smrg fi 1145e35772b2Smrg done 114672b676d7Smrg IFS="$lt_save_ifs" 114772b676d7Smrg 1148e35772b2Smrg if test "X$ECHO" = Xecho; then 1149e35772b2Smrg # We didn't find a better echo, so look for alternatives. 1150e35772b2Smrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 1151e35772b2Smrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 1152e35772b2Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1153e35772b2Smrg # This shell has a builtin print -r that does the trick. 1154e35772b2Smrg ECHO='print -r' 1155e35772b2Smrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 1156e35772b2Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 1157e35772b2Smrg # If we have ksh, try running configure again with it. 1158e35772b2Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1159e35772b2Smrg export ORIGINAL_CONFIG_SHELL 1160e35772b2Smrg CONFIG_SHELL=/bin/ksh 1161e35772b2Smrg export CONFIG_SHELL 1162e35772b2Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 116372b676d7Smrg else 1164e35772b2Smrg # Try using printf. 1165e35772b2Smrg ECHO='printf %s\n' 1166e35772b2Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1167e35772b2Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1168e35772b2Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1169e35772b2Smrg # Cool, printf works 1170e35772b2Smrg : 1171e35772b2Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1172e35772b2Smrg test "X$echo_testing_string" = 'X\t' && 1173e35772b2Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1174e35772b2Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1175e35772b2Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1176e35772b2Smrg export CONFIG_SHELL 1177e35772b2Smrg SHELL="$CONFIG_SHELL" 1178e35772b2Smrg export SHELL 1179e35772b2Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1180e35772b2Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1181e35772b2Smrg test "X$echo_testing_string" = 'X\t' && 1182e35772b2Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1183e35772b2Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1184e35772b2Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1185e35772b2Smrg else 1186e35772b2Smrg # maybe with a smaller string... 1187e35772b2Smrg prev=: 118872b676d7Smrg 1189e35772b2Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1190e35772b2Smrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 1191e35772b2Smrg then 1192e35772b2Smrg break 1193e35772b2Smrg fi 1194e35772b2Smrg prev="$cmd" 1195e35772b2Smrg done 119672b676d7Smrg 1197e35772b2Smrg if test "$prev" != 'sed 50q "[$]0"'; then 1198e35772b2Smrg echo_test_string=`eval $prev` 1199e35772b2Smrg export echo_test_string 1200e35772b2Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1201e35772b2Smrg else 1202e35772b2Smrg # Oops. We lost completely, so just stick with echo. 1203e35772b2Smrg ECHO=echo 1204e35772b2Smrg fi 1205e35772b2Smrg fi 120672b676d7Smrg fi 120772b676d7Smrg fi 120872b676d7Smrg fi 120972b676d7Smrgfi 121072b676d7Smrg 121172b676d7Smrg# Copy echo and quote the copy suitably for passing to libtool from 121272b676d7Smrg# the Makefile, instead of quoting the original, which is used later. 1213e35772b2Smrglt_ECHO=$ECHO 1214e35772b2Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1215e35772b2Smrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 121672b676d7Smrgfi 121772b676d7Smrg 1218e35772b2SmrgAC_SUBST(lt_ECHO) 1219e35772b2Smrg]) 1220e35772b2Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1221e35772b2Smrg_LT_DECL([], [ECHO], [1], 1222e35772b2Smrg [An echo program that does not interpret backslashes]) 1223e35772b2Smrg])# _LT_PROG_ECHO_BACKSLASH 122472b676d7Smrg 122572b676d7Smrg 1226e35772b2Smrg# _LT_ENABLE_LOCK 1227e35772b2Smrg# --------------- 1228e35772b2Smrgm4_defun([_LT_ENABLE_LOCK], 122972b676d7Smrg[AC_ARG_ENABLE([libtool-lock], 1230e35772b2Smrg [AS_HELP_STRING([--disable-libtool-lock], 1231e35772b2Smrg [avoid locking (might break parallel builds)])]) 123272b676d7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 123372b676d7Smrg 123472b676d7Smrg# Some flags need to be propagated to the compiler or linker for good 123572b676d7Smrg# libtool support. 123672b676d7Smrgcase $host in 123772b676d7Smrgia64-*-hpux*) 123872b676d7Smrg # Find out which ABI we are using. 123972b676d7Smrg echo 'int i;' > conftest.$ac_ext 124072b676d7Smrg if AC_TRY_EVAL(ac_compile); then 124172b676d7Smrg case `/usr/bin/file conftest.$ac_objext` in 1242e35772b2Smrg *ELF-32*) 1243e35772b2Smrg HPUX_IA64_MODE="32" 1244e35772b2Smrg ;; 1245e35772b2Smrg *ELF-64*) 1246e35772b2Smrg HPUX_IA64_MODE="64" 1247e35772b2Smrg ;; 124872b676d7Smrg esac 124972b676d7Smrg fi 125072b676d7Smrg rm -rf conftest* 125172b676d7Smrg ;; 125272b676d7Smrg*-*-irix6*) 125372b676d7Smrg # Find out which ABI we are using. 125472b676d7Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 125572b676d7Smrg if AC_TRY_EVAL(ac_compile); then 1256e35772b2Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1257e35772b2Smrg case `/usr/bin/file conftest.$ac_objext` in 1258e35772b2Smrg *32-bit*) 1259e35772b2Smrg LD="${LD-ld} -melf32bsmip" 1260e35772b2Smrg ;; 1261e35772b2Smrg *N32*) 1262e35772b2Smrg LD="${LD-ld} -melf32bmipn32" 1263e35772b2Smrg ;; 1264e35772b2Smrg *64-bit*) 1265e35772b2Smrg LD="${LD-ld} -melf64bmip" 1266e35772b2Smrg ;; 1267e35772b2Smrg esac 1268e35772b2Smrg else 1269e35772b2Smrg case `/usr/bin/file conftest.$ac_objext` in 1270e35772b2Smrg *32-bit*) 1271e35772b2Smrg LD="${LD-ld} -32" 1272e35772b2Smrg ;; 1273e35772b2Smrg *N32*) 1274e35772b2Smrg LD="${LD-ld} -n32" 1275e35772b2Smrg ;; 1276e35772b2Smrg *64-bit*) 1277e35772b2Smrg LD="${LD-ld} -64" 1278e35772b2Smrg ;; 1279e35772b2Smrg esac 1280e35772b2Smrg fi 128172b676d7Smrg fi 128272b676d7Smrg rm -rf conftest* 128372b676d7Smrg ;; 128472b676d7Smrg 12851fd23544Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1286e35772b2Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 128772b676d7Smrg # Find out which ABI we are using. 128872b676d7Smrg echo 'int i;' > conftest.$ac_ext 128972b676d7Smrg if AC_TRY_EVAL(ac_compile); then 129072b676d7Smrg case `/usr/bin/file conftest.o` in 1291e35772b2Smrg *32-bit*) 1292e35772b2Smrg case $host in 1293e35772b2Smrg x86_64-*kfreebsd*-gnu) 1294e35772b2Smrg LD="${LD-ld} -m elf_i386_fbsd" 1295e35772b2Smrg ;; 1296e35772b2Smrg x86_64-*linux*) 1297e35772b2Smrg LD="${LD-ld} -m elf_i386" 1298e35772b2Smrg ;; 1299e35772b2Smrg ppc64-*linux*|powerpc64-*linux*) 1300e35772b2Smrg LD="${LD-ld} -m elf32ppclinux" 1301e35772b2Smrg ;; 1302e35772b2Smrg s390x-*linux*) 1303e35772b2Smrg LD="${LD-ld} -m elf_s390" 1304e35772b2Smrg ;; 1305e35772b2Smrg sparc64-*linux*) 1306e35772b2Smrg LD="${LD-ld} -m elf32_sparc" 1307e35772b2Smrg ;; 1308e35772b2Smrg esac 1309e35772b2Smrg ;; 1310e35772b2Smrg *64-bit*) 1311e35772b2Smrg case $host in 1312e35772b2Smrg x86_64-*kfreebsd*-gnu) 1313e35772b2Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1314e35772b2Smrg ;; 1315e35772b2Smrg x86_64-*linux*) 1316e35772b2Smrg LD="${LD-ld} -m elf_x86_64" 1317e35772b2Smrg ;; 1318e35772b2Smrg ppc*-*linux*|powerpc*-*linux*) 1319e35772b2Smrg LD="${LD-ld} -m elf64ppc" 1320e35772b2Smrg ;; 1321e35772b2Smrg s390*-*linux*|s390*-*tpf*) 1322e35772b2Smrg LD="${LD-ld} -m elf64_s390" 1323e35772b2Smrg ;; 1324e35772b2Smrg sparc*-*linux*) 1325e35772b2Smrg LD="${LD-ld} -m elf64_sparc" 1326e35772b2Smrg ;; 1327e35772b2Smrg esac 1328e35772b2Smrg ;; 132972b676d7Smrg esac 133072b676d7Smrg fi 133172b676d7Smrg rm -rf conftest* 133272b676d7Smrg ;; 133372b676d7Smrg 133472b676d7Smrg*-*-sco3.2v5*) 133572b676d7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 133672b676d7Smrg SAVE_CFLAGS="$CFLAGS" 133772b676d7Smrg CFLAGS="$CFLAGS -belf" 133872b676d7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 133972b676d7Smrg [AC_LANG_PUSH(C) 1340e35772b2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 134172b676d7Smrg AC_LANG_POP]) 134272b676d7Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 134372b676d7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 134472b676d7Smrg CFLAGS="$SAVE_CFLAGS" 134572b676d7Smrg fi 134672b676d7Smrg ;; 134772b676d7Smrgsparc*-*solaris*) 134872b676d7Smrg # Find out which ABI we are using. 134972b676d7Smrg echo 'int i;' > conftest.$ac_ext 135072b676d7Smrg if AC_TRY_EVAL(ac_compile); then 135172b676d7Smrg case `/usr/bin/file conftest.o` in 135272b676d7Smrg *64-bit*) 135372b676d7Smrg case $lt_cv_prog_gnu_ld in 135472b676d7Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 13551fd23544Smrg *) 1356e35772b2Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 13571fd23544Smrg LD="${LD-ld} -64" 13581fd23544Smrg fi 13591fd23544Smrg ;; 136072b676d7Smrg esac 136172b676d7Smrg ;; 136272b676d7Smrg esac 136372b676d7Smrg fi 136472b676d7Smrg rm -rf conftest* 136572b676d7Smrg ;; 136672b676d7Smrgesac 136772b676d7Smrg 136872b676d7Smrgneed_locks="$enable_libtool_lock" 1369e35772b2Smrg])# _LT_ENABLE_LOCK 1370e35772b2Smrg 1371e35772b2Smrg 1372e35772b2Smrg# _LT_CMD_OLD_ARCHIVE 1373e35772b2Smrg# ------------------- 1374e35772b2Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1375e35772b2Smrg[AC_CHECK_TOOL(AR, ar, false) 1376e35772b2Smrgtest -z "$AR" && AR=ar 1377e35772b2Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1378e35772b2Smrg_LT_DECL([], [AR], [1], [The archiver]) 1379e35772b2Smrg_LT_DECL([], [AR_FLAGS], [1]) 1380e35772b2Smrg 1381e35772b2SmrgAC_CHECK_TOOL(STRIP, strip, :) 1382e35772b2Smrgtest -z "$STRIP" && STRIP=: 1383e35772b2Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1384e35772b2Smrg 1385e35772b2SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1386e35772b2Smrgtest -z "$RANLIB" && RANLIB=: 1387e35772b2Smrg_LT_DECL([], [RANLIB], [1], 1388e35772b2Smrg [Commands used to install an old-style archive]) 1389e35772b2Smrg 1390e35772b2Smrg# Determine commands to create old-style static archives. 1391e35772b2Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1392e35772b2Smrgold_postinstall_cmds='chmod 644 $oldlib' 1393e35772b2Smrgold_postuninstall_cmds= 139472b676d7Smrg 1395e35772b2Smrgif test -n "$RANLIB"; then 1396e35772b2Smrg case $host_os in 1397e35772b2Smrg openbsd*) 1398e35772b2Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1399e35772b2Smrg ;; 1400e35772b2Smrg *) 1401e35772b2Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1402e35772b2Smrg ;; 1403e35772b2Smrg esac 1404e35772b2Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1405e35772b2Smrgfi 1406e35772b2Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1407e35772b2Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1408e35772b2Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1409e35772b2Smrg [Commands used to build an old-style archive]) 1410e35772b2Smrg])# _LT_CMD_OLD_ARCHIVE 141172b676d7Smrg 141272b676d7Smrg 1413e35772b2Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 141472b676d7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 141572b676d7Smrg# ---------------------------------------------------------------- 141672b676d7Smrg# Check whether the given compiler option works 1417e35772b2SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1418e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1419e35772b2Smrgm4_require([_LT_DECL_SED])dnl 142072b676d7SmrgAC_CACHE_CHECK([$1], [$2], 142172b676d7Smrg [$2=no 1422e35772b2Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 14231fd23544Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 142472b676d7Smrg lt_compiler_flag="$3" 142572b676d7Smrg # Insert the option either (1) after the last *FLAGS variable, or 142672b676d7Smrg # (2) before a word containing "conftest.", or (3) at the end. 142772b676d7Smrg # Note that $ac_compile itself does not contain backslashes and begins 142872b676d7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 142972b676d7Smrg # The option is referenced via a variable to avoid confusing sed. 143072b676d7Smrg lt_compile=`echo "$ac_compile" | $SED \ 143172b676d7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 143272b676d7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 143372b676d7Smrg -e 's:$: $lt_compiler_flag:'` 143472b676d7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 143572b676d7Smrg (eval "$lt_compile" 2>conftest.err) 143672b676d7Smrg ac_status=$? 143772b676d7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 143872b676d7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 143972b676d7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 144072b676d7Smrg # The compiler can only warn and ignore the option if not recognized 144172b676d7Smrg # So say no if there are warnings other than the usual output. 1442e35772b2Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 144372b676d7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 144472b676d7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 144572b676d7Smrg $2=yes 144672b676d7Smrg fi 144772b676d7Smrg fi 1448e35772b2Smrg $RM conftest* 144972b676d7Smrg]) 145072b676d7Smrg 145172b676d7Smrgif test x"[$]$2" = xyes; then 1452e35772b2Smrg m4_if([$5], , :, [$5]) 145372b676d7Smrgelse 1454e35772b2Smrg m4_if([$6], , :, [$6]) 145572b676d7Smrgfi 1456e35772b2Smrg])# _LT_COMPILER_OPTION 145772b676d7Smrg 1458e35772b2Smrg# Old name: 1459e35772b2SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1460e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1461e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 146272b676d7Smrg 1463e35772b2Smrg 1464e35772b2Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1465e35772b2Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1466e35772b2Smrg# ---------------------------------------------------- 1467e35772b2Smrg# Check whether the given linker option works 1468e35772b2SmrgAC_DEFUN([_LT_LINKER_OPTION], 1469e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1470e35772b2Smrgm4_require([_LT_DECL_SED])dnl 14711fd23544SmrgAC_CACHE_CHECK([$1], [$2], 147272b676d7Smrg [$2=no 147372b676d7Smrg save_LDFLAGS="$LDFLAGS" 147472b676d7Smrg LDFLAGS="$LDFLAGS $3" 14751fd23544Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 147672b676d7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 147772b676d7Smrg # The linker can only warn and ignore the option if not recognized 147872b676d7Smrg # So say no if there are warnings 147972b676d7Smrg if test -s conftest.err; then 148072b676d7Smrg # Append any errors to the config.log. 148172b676d7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1482e35772b2Smrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 148372b676d7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 148472b676d7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 148572b676d7Smrg $2=yes 148672b676d7Smrg fi 148772b676d7Smrg else 148872b676d7Smrg $2=yes 148972b676d7Smrg fi 149072b676d7Smrg fi 1491e35772b2Smrg $RM -r conftest* 149272b676d7Smrg LDFLAGS="$save_LDFLAGS" 149372b676d7Smrg]) 149472b676d7Smrg 149572b676d7Smrgif test x"[$]$2" = xyes; then 1496e35772b2Smrg m4_if([$4], , :, [$4]) 149772b676d7Smrgelse 1498e35772b2Smrg m4_if([$5], , :, [$5]) 149972b676d7Smrgfi 1500e35772b2Smrg])# _LT_LINKER_OPTION 150172b676d7Smrg 1502e35772b2Smrg# Old name: 1503e35772b2SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1504e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1505e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 150672b676d7Smrg 1507e35772b2Smrg 1508e35772b2Smrg# LT_CMD_MAX_LEN 1509e35772b2Smrg#--------------- 1510e35772b2SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1511e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1512e35772b2Smrg# find the maximum length of command line arguments 151372b676d7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 151472b676d7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 151572b676d7Smrg i=0 151672b676d7Smrg teststring="ABCD" 151772b676d7Smrg 151872b676d7Smrg case $build_os in 151972b676d7Smrg msdosdjgpp*) 152072b676d7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 152172b676d7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 152272b676d7Smrg # during glob expansion). Even if it were fixed, the result of this 152372b676d7Smrg # check would be larger than it should be. 152472b676d7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 152572b676d7Smrg ;; 152672b676d7Smrg 152772b676d7Smrg gnu*) 152872b676d7Smrg # Under GNU Hurd, this test is not required because there is 152972b676d7Smrg # no limit to the length of command line arguments. 153072b676d7Smrg # Libtool will interpret -1 as no limit whatsoever 153172b676d7Smrg lt_cv_sys_max_cmd_len=-1; 153272b676d7Smrg ;; 153372b676d7Smrg 1534e35772b2Smrg cygwin* | mingw* | cegcc*) 153572b676d7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 153672b676d7Smrg # about 5 minutes as the teststring grows exponentially. 153772b676d7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 153872b676d7Smrg # you end up with a "frozen" computer, even though with patience 153972b676d7Smrg # the test eventually succeeds (with a max line length of 256k). 154072b676d7Smrg # Instead, let's just punt: use the minimum linelength reported by 154172b676d7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 154272b676d7Smrg lt_cv_sys_max_cmd_len=8192; 154372b676d7Smrg ;; 154472b676d7Smrg 154572b676d7Smrg amigaos*) 154672b676d7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 154772b676d7Smrg # So we just punt and use a minimum line length of 8192. 154872b676d7Smrg lt_cv_sys_max_cmd_len=8192; 154972b676d7Smrg ;; 155072b676d7Smrg 155172b676d7Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 155272b676d7Smrg # This has been around since 386BSD, at least. Likely further. 155372b676d7Smrg if test -x /sbin/sysctl; then 155472b676d7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 155572b676d7Smrg elif test -x /usr/sbin/sysctl; then 155672b676d7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 155772b676d7Smrg else 155872b676d7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 155972b676d7Smrg fi 156072b676d7Smrg # And add a safety zone 156172b676d7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 156272b676d7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 156372b676d7Smrg ;; 156472b676d7Smrg 156572b676d7Smrg interix*) 156672b676d7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 156772b676d7Smrg lt_cv_sys_max_cmd_len=196608 156872b676d7Smrg ;; 156972b676d7Smrg 157072b676d7Smrg osf*) 157172b676d7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 157272b676d7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 157372b676d7Smrg # nice to cause kernel panics so lets avoid the loop below. 157472b676d7Smrg # First set a reasonable default. 157572b676d7Smrg lt_cv_sys_max_cmd_len=16384 157672b676d7Smrg # 157772b676d7Smrg if test -x /sbin/sysconfig; then 157872b676d7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 157972b676d7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 158072b676d7Smrg esac 158172b676d7Smrg fi 158272b676d7Smrg ;; 158372b676d7Smrg sco3.2v5*) 158472b676d7Smrg lt_cv_sys_max_cmd_len=102400 158572b676d7Smrg ;; 158672b676d7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 158772b676d7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 158872b676d7Smrg if test -n "$kargmax"; then 1589e35772b2Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 159072b676d7Smrg else 159172b676d7Smrg lt_cv_sys_max_cmd_len=32768 159272b676d7Smrg fi 159372b676d7Smrg ;; 159472b676d7Smrg *) 15951fd23544Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 15961fd23544Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 15971fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 15981fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 15991fd23544Smrg else 1600e35772b2Smrg # Make teststring a little bigger before we do anything with it. 1601e35772b2Smrg # a 1K string should be a reasonable start. 1602e35772b2Smrg for i in 1 2 3 4 5 6 7 8 ; do 1603e35772b2Smrg teststring=$teststring$teststring 1604e35772b2Smrg done 16051fd23544Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1606e35772b2Smrg # If test is not a shell built-in, we'll probably end up computing a 1607e35772b2Smrg # maximum length that is only half of the actual maximum length, but 1608e35772b2Smrg # we can't tell. 1609e35772b2Smrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 1610e35772b2Smrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 16111fd23544Smrg test $i != 17 # 1/2 MB should be enough 16121fd23544Smrg do 16131fd23544Smrg i=`expr $i + 1` 16141fd23544Smrg teststring=$teststring$teststring 16151fd23544Smrg done 1616e35772b2Smrg # Only check the string length outside the loop. 1617e35772b2Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 16181fd23544Smrg teststring= 1619e35772b2Smrg # Add a significant safety factor because C++ compilers can tack on 1620e35772b2Smrg # massive amounts of additional arguments before passing them to the 1621e35772b2Smrg # linker. It appears as though 1/2 is a usable value. 16221fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 16231fd23544Smrg fi 162472b676d7Smrg ;; 162572b676d7Smrg esac 162672b676d7Smrg]) 162772b676d7Smrgif test -n $lt_cv_sys_max_cmd_len ; then 162872b676d7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 162972b676d7Smrgelse 163072b676d7Smrg AC_MSG_RESULT(none) 163172b676d7Smrgfi 1632e35772b2Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1633e35772b2Smrg_LT_DECL([], [max_cmd_len], [0], 1634e35772b2Smrg [What is the maximum length of a command?]) 1635e35772b2Smrg])# LT_CMD_MAX_LEN 163672b676d7Smrg 1637e35772b2Smrg# Old name: 1638e35772b2SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1639e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1640e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 164172b676d7Smrg 1642e35772b2Smrg 1643e35772b2Smrg# _LT_HEADER_DLFCN 1644e35772b2Smrg# ---------------- 1645e35772b2Smrgm4_defun([_LT_HEADER_DLFCN], 1646e35772b2Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1647e35772b2Smrg])# _LT_HEADER_DLFCN 164872b676d7Smrg 164972b676d7Smrg 1650e35772b2Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1651e35772b2Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1652e35772b2Smrg# ---------------------------------------------------------------- 1653e35772b2Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1654e35772b2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 165572b676d7Smrgif test "$cross_compiling" = yes; then : 165672b676d7Smrg [$4] 165772b676d7Smrgelse 165872b676d7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 165972b676d7Smrg lt_status=$lt_dlunknown 1660e35772b2Smrg cat > conftest.$ac_ext <<_LT_EOF 166172b676d7Smrg[#line __oline__ "configure" 166272b676d7Smrg#include "confdefs.h" 166372b676d7Smrg 166472b676d7Smrg#if HAVE_DLFCN_H 166572b676d7Smrg#include <dlfcn.h> 166672b676d7Smrg#endif 166772b676d7Smrg 166872b676d7Smrg#include <stdio.h> 166972b676d7Smrg 167072b676d7Smrg#ifdef RTLD_GLOBAL 167172b676d7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 167272b676d7Smrg#else 167372b676d7Smrg# ifdef DL_GLOBAL 167472b676d7Smrg# define LT_DLGLOBAL DL_GLOBAL 167572b676d7Smrg# else 167672b676d7Smrg# define LT_DLGLOBAL 0 167772b676d7Smrg# endif 167872b676d7Smrg#endif 167972b676d7Smrg 168072b676d7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 168172b676d7Smrg find out it does not work in some platform. */ 168272b676d7Smrg#ifndef LT_DLLAZY_OR_NOW 168372b676d7Smrg# ifdef RTLD_LAZY 168472b676d7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 168572b676d7Smrg# else 168672b676d7Smrg# ifdef DL_LAZY 168772b676d7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 168872b676d7Smrg# else 168972b676d7Smrg# ifdef RTLD_NOW 169072b676d7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 169172b676d7Smrg# else 169272b676d7Smrg# ifdef DL_NOW 169372b676d7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 169472b676d7Smrg# else 169572b676d7Smrg# define LT_DLLAZY_OR_NOW 0 169672b676d7Smrg# endif 169772b676d7Smrg# endif 169872b676d7Smrg# endif 169972b676d7Smrg# endif 170072b676d7Smrg#endif 170172b676d7Smrg 170272b676d7Smrgvoid fnord() { int i=42;} 170372b676d7Smrgint main () 170472b676d7Smrg{ 170572b676d7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 170672b676d7Smrg int status = $lt_dlunknown; 170772b676d7Smrg 170872b676d7Smrg if (self) 170972b676d7Smrg { 171072b676d7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 171172b676d7Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 171272b676d7Smrg /* dlclose (self); */ 171372b676d7Smrg } 171472b676d7Smrg else 171572b676d7Smrg puts (dlerror ()); 171672b676d7Smrg 1717e35772b2Smrg return status; 171872b676d7Smrg}] 1719e35772b2Smrg_LT_EOF 172072b676d7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 172172b676d7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 172272b676d7Smrg lt_status=$? 172372b676d7Smrg case x$lt_status in 172472b676d7Smrg x$lt_dlno_uscore) $1 ;; 172572b676d7Smrg x$lt_dlneed_uscore) $2 ;; 172672b676d7Smrg x$lt_dlunknown|x*) $3 ;; 172772b676d7Smrg esac 172872b676d7Smrg else : 172972b676d7Smrg # compilation failed 173072b676d7Smrg $3 173172b676d7Smrg fi 173272b676d7Smrgfi 173372b676d7Smrgrm -fr conftest* 1734e35772b2Smrg])# _LT_TRY_DLOPEN_SELF 173572b676d7Smrg 173672b676d7Smrg 1737e35772b2Smrg# LT_SYS_DLOPEN_SELF 1738e35772b2Smrg# ------------------ 1739e35772b2SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1740e35772b2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 174172b676d7Smrgif test "x$enable_dlopen" != xyes; then 174272b676d7Smrg enable_dlopen=unknown 174372b676d7Smrg enable_dlopen_self=unknown 174472b676d7Smrg enable_dlopen_self_static=unknown 174572b676d7Smrgelse 174672b676d7Smrg lt_cv_dlopen=no 174772b676d7Smrg lt_cv_dlopen_libs= 174872b676d7Smrg 174972b676d7Smrg case $host_os in 175072b676d7Smrg beos*) 175172b676d7Smrg lt_cv_dlopen="load_add_on" 175272b676d7Smrg lt_cv_dlopen_libs= 175372b676d7Smrg lt_cv_dlopen_self=yes 175472b676d7Smrg ;; 175572b676d7Smrg 1756e35772b2Smrg mingw* | pw32* | cegcc*) 175772b676d7Smrg lt_cv_dlopen="LoadLibrary" 175872b676d7Smrg lt_cv_dlopen_libs= 1759e35772b2Smrg ;; 176072b676d7Smrg 176172b676d7Smrg cygwin*) 176272b676d7Smrg lt_cv_dlopen="dlopen" 176372b676d7Smrg lt_cv_dlopen_libs= 1764e35772b2Smrg ;; 176572b676d7Smrg 176672b676d7Smrg darwin*) 176772b676d7Smrg # if libdl is installed we need to link against it 176872b676d7Smrg AC_CHECK_LIB([dl], [dlopen], 176972b676d7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 177072b676d7Smrg lt_cv_dlopen="dyld" 177172b676d7Smrg lt_cv_dlopen_libs= 177272b676d7Smrg lt_cv_dlopen_self=yes 177372b676d7Smrg ]) 1774e35772b2Smrg ;; 177572b676d7Smrg 177672b676d7Smrg *) 177772b676d7Smrg AC_CHECK_FUNC([shl_load], 177872b676d7Smrg [lt_cv_dlopen="shl_load"], 177972b676d7Smrg [AC_CHECK_LIB([dld], [shl_load], 17801fd23544Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 178172b676d7Smrg [AC_CHECK_FUNC([dlopen], 178272b676d7Smrg [lt_cv_dlopen="dlopen"], 178372b676d7Smrg [AC_CHECK_LIB([dl], [dlopen], 178472b676d7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 178572b676d7Smrg [AC_CHECK_LIB([svld], [dlopen], 178672b676d7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 178772b676d7Smrg [AC_CHECK_LIB([dld], [dld_link], 17881fd23544Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 178972b676d7Smrg ]) 179072b676d7Smrg ]) 179172b676d7Smrg ]) 179272b676d7Smrg ]) 179372b676d7Smrg ]) 179472b676d7Smrg ;; 179572b676d7Smrg esac 179672b676d7Smrg 179772b676d7Smrg if test "x$lt_cv_dlopen" != xno; then 179872b676d7Smrg enable_dlopen=yes 179972b676d7Smrg else 180072b676d7Smrg enable_dlopen=no 180172b676d7Smrg fi 180272b676d7Smrg 180372b676d7Smrg case $lt_cv_dlopen in 180472b676d7Smrg dlopen) 180572b676d7Smrg save_CPPFLAGS="$CPPFLAGS" 180672b676d7Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 180772b676d7Smrg 180872b676d7Smrg save_LDFLAGS="$LDFLAGS" 180972b676d7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 181072b676d7Smrg 181172b676d7Smrg save_LIBS="$LIBS" 181272b676d7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 181372b676d7Smrg 181472b676d7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 181572b676d7Smrg lt_cv_dlopen_self, [dnl 1816e35772b2Smrg _LT_TRY_DLOPEN_SELF( 181772b676d7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 181872b676d7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 181972b676d7Smrg ]) 182072b676d7Smrg 182172b676d7Smrg if test "x$lt_cv_dlopen_self" = xyes; then 182272b676d7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 182372b676d7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1824e35772b2Smrg lt_cv_dlopen_self_static, [dnl 1825e35772b2Smrg _LT_TRY_DLOPEN_SELF( 182672b676d7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 182772b676d7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 182872b676d7Smrg ]) 182972b676d7Smrg fi 183072b676d7Smrg 183172b676d7Smrg CPPFLAGS="$save_CPPFLAGS" 183272b676d7Smrg LDFLAGS="$save_LDFLAGS" 183372b676d7Smrg LIBS="$save_LIBS" 183472b676d7Smrg ;; 183572b676d7Smrg esac 183672b676d7Smrg 183772b676d7Smrg case $lt_cv_dlopen_self in 183872b676d7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 183972b676d7Smrg *) enable_dlopen_self=unknown ;; 184072b676d7Smrg esac 184172b676d7Smrg 184272b676d7Smrg case $lt_cv_dlopen_self_static in 184372b676d7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 184472b676d7Smrg *) enable_dlopen_self_static=unknown ;; 184572b676d7Smrg esac 184672b676d7Smrgfi 1847e35772b2Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1848e35772b2Smrg [Whether dlopen is supported]) 1849e35772b2Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1850e35772b2Smrg [Whether dlopen of programs is supported]) 1851e35772b2Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1852e35772b2Smrg [Whether dlopen of statically linked programs is supported]) 1853e35772b2Smrg])# LT_SYS_DLOPEN_SELF 185472b676d7Smrg 1855e35772b2Smrg# Old name: 1856e35772b2SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1857e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1858e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 185972b676d7Smrg 1860e35772b2Smrg 1861e35772b2Smrg# _LT_COMPILER_C_O([TAGNAME]) 1862e35772b2Smrg# --------------------------- 1863e35772b2Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 1864e35772b2Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1865e35772b2Smrgm4_defun([_LT_COMPILER_C_O], 1866e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 1867e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1868e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 186972b676d7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1870e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1871e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1872e35772b2Smrg $RM -r conftest 2>/dev/null 187372b676d7Smrg mkdir conftest 187472b676d7Smrg cd conftest 187572b676d7Smrg mkdir out 18761fd23544Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 187772b676d7Smrg 187872b676d7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 187972b676d7Smrg # Insert the option either (1) after the last *FLAGS variable, or 188072b676d7Smrg # (2) before a word containing "conftest.", or (3) at the end. 188172b676d7Smrg # Note that $ac_compile itself does not contain backslashes and begins 188272b676d7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 188372b676d7Smrg lt_compile=`echo "$ac_compile" | $SED \ 188472b676d7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 188572b676d7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 188672b676d7Smrg -e 's:$: $lt_compiler_flag:'` 188772b676d7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 188872b676d7Smrg (eval "$lt_compile" 2>out/conftest.err) 188972b676d7Smrg ac_status=$? 189072b676d7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 189172b676d7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 189272b676d7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 189372b676d7Smrg then 189472b676d7Smrg # The compiler can only warn and ignore the option if not recognized 189572b676d7Smrg # So say no if there are warnings 1896e35772b2Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 189772b676d7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 189872b676d7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1899e35772b2Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 190072b676d7Smrg fi 190172b676d7Smrg fi 190272b676d7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1903e35772b2Smrg $RM conftest* 190472b676d7Smrg # SGI C++ compiler will create directory out/ii_files/ for 190572b676d7Smrg # template instantiation 1906e35772b2Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1907e35772b2Smrg $RM out/* && rmdir out 190872b676d7Smrg cd .. 1909e35772b2Smrg $RM -r conftest 1910e35772b2Smrg $RM conftest* 191172b676d7Smrg]) 1912e35772b2Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1913e35772b2Smrg [Does compiler simultaneously support -c and -o options?]) 1914e35772b2Smrg])# _LT_COMPILER_C_O 191572b676d7Smrg 191672b676d7Smrg 1917e35772b2Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1918e35772b2Smrg# ---------------------------------- 191972b676d7Smrg# Check to see if we can do hard links to lock some files if needed 1920e35772b2Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1921e35772b2Smrg[m4_require([_LT_ENABLE_LOCK])dnl 1922e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1923e35772b2Smrg_LT_COMPILER_C_O([$1]) 192472b676d7Smrg 192572b676d7Smrghard_links="nottested" 1926e35772b2Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 192772b676d7Smrg # do not overwrite the value of need_locks provided by the user 192872b676d7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 192972b676d7Smrg hard_links=yes 1930e35772b2Smrg $RM conftest* 193172b676d7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 193272b676d7Smrg touch conftest.a 193372b676d7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 193472b676d7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 193572b676d7Smrg AC_MSG_RESULT([$hard_links]) 193672b676d7Smrg if test "$hard_links" = no; then 193772b676d7Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 193872b676d7Smrg need_locks=warn 193972b676d7Smrg fi 194072b676d7Smrgelse 194172b676d7Smrg need_locks=no 194272b676d7Smrgfi 1943e35772b2Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 1944e35772b2Smrg])# _LT_COMPILER_FILE_LOCKS 194572b676d7Smrg 194672b676d7Smrg 1947e35772b2Smrg# _LT_CHECK_OBJDIR 1948e35772b2Smrg# ---------------- 1949e35772b2Smrgm4_defun([_LT_CHECK_OBJDIR], 195072b676d7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 195172b676d7Smrg[rm -f .libs 2>/dev/null 195272b676d7Smrgmkdir .libs 2>/dev/null 195372b676d7Smrgif test -d .libs; then 195472b676d7Smrg lt_cv_objdir=.libs 195572b676d7Smrgelse 195672b676d7Smrg # MS-DOS does not allow filenames that begin with a dot. 195772b676d7Smrg lt_cv_objdir=_libs 195872b676d7Smrgfi 195972b676d7Smrgrmdir .libs 2>/dev/null]) 196072b676d7Smrgobjdir=$lt_cv_objdir 1961e35772b2Smrg_LT_DECL([], [objdir], [0], 1962e35772b2Smrg [The name of the directory that contains temporary libtool files])dnl 1963e35772b2Smrgm4_pattern_allow([LT_OBJDIR])dnl 1964e35772b2SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 1965e35772b2Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 1966e35772b2Smrg])# _LT_CHECK_OBJDIR 196772b676d7Smrg 196872b676d7Smrg 1969e35772b2Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 1970e35772b2Smrg# -------------------------------------- 197172b676d7Smrg# Check hardcoding attributes. 1972e35772b2Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 197372b676d7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1974e35772b2Smrg_LT_TAGVAR(hardcode_action, $1)= 1975e35772b2Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 1976e35772b2Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 1977e35772b2Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 197872b676d7Smrg 1979e35772b2Smrg # We can hardcode non-existent directories. 1980e35772b2Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 198172b676d7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 198272b676d7Smrg # have to relink, otherwise we might link with an installed library 198372b676d7Smrg # when we should be linking with a yet-to-be-installed one 1984e35772b2Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1985e35772b2Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 198672b676d7Smrg # Linking always hardcodes the temporary library directory. 1987e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=relink 198872b676d7Smrg else 198972b676d7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1990e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 199172b676d7Smrg fi 199272b676d7Smrgelse 199372b676d7Smrg # We cannot hardcode anything, or else we can only hardcode existing 199472b676d7Smrg # directories. 1995e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 199672b676d7Smrgfi 1997e35772b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 199872b676d7Smrg 1999e35772b2Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2000e35772b2Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 200172b676d7Smrg # Fast installation is not supported 200272b676d7Smrg enable_fast_install=no 200372b676d7Smrgelif test "$shlibpath_overrides_runpath" = yes || 200472b676d7Smrg test "$enable_shared" = no; then 200572b676d7Smrg # Fast installation is not necessary 200672b676d7Smrg enable_fast_install=needless 200772b676d7Smrgfi 2008e35772b2Smrg_LT_TAGDECL([], [hardcode_action], [0], 2009e35772b2Smrg [How to hardcode a shared library path into an executable]) 2010e35772b2Smrg])# _LT_LINKER_HARDCODE_LIBPATH 201172b676d7Smrg 201272b676d7Smrg 2013e35772b2Smrg# _LT_CMD_STRIPLIB 2014e35772b2Smrg# ---------------- 2015e35772b2Smrgm4_defun([_LT_CMD_STRIPLIB], 2016e35772b2Smrg[m4_require([_LT_DECL_EGREP]) 2017e35772b2Smrgstriplib= 201872b676d7Smrgold_striplib= 201972b676d7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2020e35772b2Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 202172b676d7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 202272b676d7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 202372b676d7Smrg AC_MSG_RESULT([yes]) 202472b676d7Smrgelse 202572b676d7Smrg# FIXME - insert some real tests, host_os isn't really good enough 202672b676d7Smrg case $host_os in 2027e35772b2Smrg darwin*) 2028e35772b2Smrg if test -n "$STRIP" ; then 2029e35772b2Smrg striplib="$STRIP -x" 2030e35772b2Smrg old_striplib="$STRIP -S" 2031e35772b2Smrg AC_MSG_RESULT([yes]) 2032e35772b2Smrg else 2033e35772b2Smrg AC_MSG_RESULT([no]) 2034e35772b2Smrg fi 2035e35772b2Smrg ;; 2036e35772b2Smrg *) 2037e35772b2Smrg AC_MSG_RESULT([no]) 203872b676d7Smrg ;; 203972b676d7Smrg esac 204072b676d7Smrgfi 2041e35772b2Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2042e35772b2Smrg_LT_DECL([], [striplib], [1]) 2043e35772b2Smrg])# _LT_CMD_STRIPLIB 204472b676d7Smrg 204572b676d7Smrg 2046e35772b2Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 204772b676d7Smrg# ----------------------------- 204872b676d7Smrg# PORTME Fill in your ld.so characteristics 2049e35772b2Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2050e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2051e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 2052e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2053e35772b2Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2054e35772b2Smrgm4_require([_LT_DECL_SED])dnl 20551fd23544SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2056e35772b2Smrgm4_if([$1], 2057e35772b2Smrg [], [ 205872b676d7Smrgif test "$GCC" = yes; then 20591fd23544Smrg case $host_os in 20601fd23544Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 20611fd23544Smrg *) lt_awk_arg="/^libraries:/" ;; 20621fd23544Smrg esac 20631fd23544Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2064e35772b2Smrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 206572b676d7Smrg # if the path contains ";" then we assume it to be the separator 206672b676d7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 206772b676d7Smrg # assumed that no part of a normal pathname contains ";" but that should 206872b676d7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2069e35772b2Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 207072b676d7Smrg else 2071e35772b2Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 207272b676d7Smrg fi 20731fd23544Smrg # Ok, now we have the path, separated by spaces, we can step through it 20741fd23544Smrg # and add multilib dir if necessary. 20751fd23544Smrg lt_tmp_lt_search_path_spec= 20761fd23544Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 20771fd23544Smrg for lt_sys_path in $lt_search_path_spec; do 20781fd23544Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 20791fd23544Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 20801fd23544Smrg else 20811fd23544Smrg test -d "$lt_sys_path" && \ 20821fd23544Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 20831fd23544Smrg fi 20841fd23544Smrg done 2085e35772b2Smrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 20861fd23544SmrgBEGIN {RS=" "; FS="/|\n";} { 20871fd23544Smrg lt_foo=""; 20881fd23544Smrg lt_count=0; 20891fd23544Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 20901fd23544Smrg if ($lt_i != "" && $lt_i != ".") { 20911fd23544Smrg if ($lt_i == "..") { 20921fd23544Smrg lt_count++; 20931fd23544Smrg } else { 20941fd23544Smrg if (lt_count == 0) { 20951fd23544Smrg lt_foo="/" $lt_i lt_foo; 20961fd23544Smrg } else { 20971fd23544Smrg lt_count--; 20981fd23544Smrg } 20991fd23544Smrg } 21001fd23544Smrg } 21011fd23544Smrg } 21021fd23544Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 21031fd23544Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 21041fd23544Smrg}'` 2105e35772b2Smrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 210672b676d7Smrgelse 210772b676d7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 21081fd23544Smrgfi]) 2109e35772b2Smrglibrary_names_spec= 2110e35772b2Smrglibname_spec='lib$name' 2111e35772b2Smrgsoname_spec= 2112e35772b2Smrgshrext_cmds=".so" 2113e35772b2Smrgpostinstall_cmds= 2114e35772b2Smrgpostuninstall_cmds= 2115e35772b2Smrgfinish_cmds= 2116e35772b2Smrgfinish_eval= 2117e35772b2Smrgshlibpath_var= 2118e35772b2Smrgshlibpath_overrides_runpath=unknown 2119e35772b2Smrgversion_type=none 2120e35772b2Smrgdynamic_linker="$host_os ld.so" 2121e35772b2Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 212272b676d7Smrgneed_lib_prefix=unknown 212372b676d7Smrghardcode_into_libs=no 212472b676d7Smrg 212572b676d7Smrg# when you set need_version to no, make sure it does not cause -set_version 212672b676d7Smrg# flags to be left without arguments 212772b676d7Smrgneed_version=unknown 212872b676d7Smrg 212972b676d7Smrgcase $host_os in 213072b676d7Smrgaix3*) 213172b676d7Smrg version_type=linux 213272b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 213372b676d7Smrg shlibpath_var=LIBPATH 213472b676d7Smrg 213572b676d7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 213672b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 213772b676d7Smrg ;; 213872b676d7Smrg 21391fd23544Smrgaix[[4-9]]*) 214072b676d7Smrg version_type=linux 214172b676d7Smrg need_lib_prefix=no 214272b676d7Smrg need_version=no 214372b676d7Smrg hardcode_into_libs=yes 214472b676d7Smrg if test "$host_cpu" = ia64; then 214572b676d7Smrg # AIX 5 supports IA64 214672b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 214772b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 214872b676d7Smrg else 214972b676d7Smrg # With GCC up to 2.95.x, collect2 would create an import file 215072b676d7Smrg # for dependence libraries. The import file would start with 215172b676d7Smrg # the line `#! .'. This would cause the generated library to 215272b676d7Smrg # depend on `.', always an invalid library. This was fixed in 215372b676d7Smrg # development snapshots of GCC prior to 3.0. 215472b676d7Smrg case $host_os in 215572b676d7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 215672b676d7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 215772b676d7Smrg echo ' yes ' 2158e35772b2Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 215972b676d7Smrg : 216072b676d7Smrg else 216172b676d7Smrg can_build_shared=no 216272b676d7Smrg fi 216372b676d7Smrg ;; 216472b676d7Smrg esac 216572b676d7Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 216672b676d7Smrg # soname into executable. Probably we can add versioning support to 216772b676d7Smrg # collect2, so additional links can be useful in future. 216872b676d7Smrg if test "$aix_use_runtimelinking" = yes; then 216972b676d7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 217072b676d7Smrg # instead of lib<name>.a to let people know that these are not 217172b676d7Smrg # typical AIX shared libraries. 217272b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 217372b676d7Smrg else 217472b676d7Smrg # We preserve .a as extension for shared libraries through AIX4.2 217572b676d7Smrg # and later when we are not doing run time linking. 217672b676d7Smrg library_names_spec='${libname}${release}.a $libname.a' 217772b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 217872b676d7Smrg fi 217972b676d7Smrg shlibpath_var=LIBPATH 218072b676d7Smrg fi 218172b676d7Smrg ;; 218272b676d7Smrg 218372b676d7Smrgamigaos*) 2184e35772b2Smrg case $host_cpu in 2185e35772b2Smrg powerpc) 2186e35772b2Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2187e35772b2Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2188e35772b2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2189e35772b2Smrg ;; 2190e35772b2Smrg m68k) 2191e35772b2Smrg library_names_spec='$libname.ixlibrary $libname.a' 2192e35772b2Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2193e35772b2Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''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' 2194e35772b2Smrg ;; 2195e35772b2Smrg esac 219672b676d7Smrg ;; 219772b676d7Smrg 219872b676d7Smrgbeos*) 219972b676d7Smrg library_names_spec='${libname}${shared_ext}' 220072b676d7Smrg dynamic_linker="$host_os ld.so" 220172b676d7Smrg shlibpath_var=LIBRARY_PATH 220272b676d7Smrg ;; 220372b676d7Smrg 220472b676d7Smrgbsdi[[45]]*) 220572b676d7Smrg version_type=linux 220672b676d7Smrg need_version=no 220772b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 220872b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 220972b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 221072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 221172b676d7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 221272b676d7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 221372b676d7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 221472b676d7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 221572b676d7Smrg # libtool to hard-code these into programs 221672b676d7Smrg ;; 221772b676d7Smrg 2218e35772b2Smrgcygwin* | mingw* | pw32* | cegcc*) 221972b676d7Smrg version_type=windows 222072b676d7Smrg shrext_cmds=".dll" 222172b676d7Smrg need_version=no 222272b676d7Smrg need_lib_prefix=no 222372b676d7Smrg 222472b676d7Smrg case $GCC,$host_os in 2225e35772b2Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 222672b676d7Smrg library_names_spec='$libname.dll.a' 222772b676d7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 222872b676d7Smrg postinstall_cmds='base_file=`basename \${file}`~ 2229e35772b2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 223072b676d7Smrg dldir=$destdir/`dirname \$dlpath`~ 223172b676d7Smrg test -d \$dldir || mkdir -p \$dldir~ 223272b676d7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2233e35772b2Smrg chmod a+x \$dldir/$dlname~ 2234e35772b2Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2235e35772b2Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2236e35772b2Smrg fi' 223772b676d7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 223872b676d7Smrg dlpath=$dir/\$dldll~ 2239e35772b2Smrg $RM \$dlpath' 224072b676d7Smrg shlibpath_overrides_runpath=yes 224172b676d7Smrg 224272b676d7Smrg case $host_os in 224372b676d7Smrg cygwin*) 224472b676d7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 224572b676d7Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 224672b676d7Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 224772b676d7Smrg ;; 2248e35772b2Smrg mingw* | cegcc*) 224972b676d7Smrg # MinGW DLLs use traditional 'lib' prefix 225072b676d7Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2251e35772b2Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2252e35772b2Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 225372b676d7Smrg # It is most probably a Windows format PATH printed by 225472b676d7Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 225572b676d7Smrg # path with ; separators, and with drive letters. We can handle the 225672b676d7Smrg # drive letters (cygwin fileutils understands them), so leave them, 225772b676d7Smrg # especially as we might pass files found there to a mingw objdump, 225872b676d7Smrg # which wouldn't understand a cygwinified path. Ahh. 2259e35772b2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 226072b676d7Smrg else 2261e35772b2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 226272b676d7Smrg fi 226372b676d7Smrg ;; 226472b676d7Smrg pw32*) 226572b676d7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 226672b676d7Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 226772b676d7Smrg ;; 226872b676d7Smrg esac 226972b676d7Smrg ;; 227072b676d7Smrg 227172b676d7Smrg *) 227272b676d7Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 227372b676d7Smrg ;; 227472b676d7Smrg esac 227572b676d7Smrg dynamic_linker='Win32 ld.exe' 227672b676d7Smrg # FIXME: first we should search . and the directory the executable is in 227772b676d7Smrg shlibpath_var=PATH 227872b676d7Smrg ;; 227972b676d7Smrg 228072b676d7Smrgdarwin* | rhapsody*) 228172b676d7Smrg dynamic_linker="$host_os dyld" 228272b676d7Smrg version_type=darwin 228372b676d7Smrg need_lib_prefix=no 228472b676d7Smrg need_version=no 2285e35772b2Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 228672b676d7Smrg soname_spec='${libname}${release}${major}$shared_ext' 228772b676d7Smrg shlibpath_overrides_runpath=yes 228872b676d7Smrg shlibpath_var=DYLD_LIBRARY_PATH 228972b676d7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2290e35772b2Smrgm4_if([$1], [],[ 2291e35772b2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 229272b676d7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 229372b676d7Smrg ;; 229472b676d7Smrg 229572b676d7Smrgdgux*) 229672b676d7Smrg version_type=linux 229772b676d7Smrg need_lib_prefix=no 229872b676d7Smrg need_version=no 229972b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 230072b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 230172b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 230272b676d7Smrg ;; 230372b676d7Smrg 230472b676d7Smrgfreebsd1*) 230572b676d7Smrg dynamic_linker=no 230672b676d7Smrg ;; 230772b676d7Smrg 230872b676d7Smrgfreebsd* | dragonfly*) 230972b676d7Smrg # DragonFly does not have aout. When/if they implement a new 231072b676d7Smrg # versioning mechanism, adjust this. 231172b676d7Smrg if test -x /usr/bin/objformat; then 231272b676d7Smrg objformat=`/usr/bin/objformat` 231372b676d7Smrg else 231472b676d7Smrg case $host_os in 231572b676d7Smrg freebsd[[123]]*) objformat=aout ;; 231672b676d7Smrg *) objformat=elf ;; 231772b676d7Smrg esac 231872b676d7Smrg fi 231972b676d7Smrg version_type=freebsd-$objformat 232072b676d7Smrg case $version_type in 232172b676d7Smrg freebsd-elf*) 232272b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 232372b676d7Smrg need_version=no 232472b676d7Smrg need_lib_prefix=no 232572b676d7Smrg ;; 232672b676d7Smrg freebsd-*) 232772b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 232872b676d7Smrg need_version=yes 232972b676d7Smrg ;; 233072b676d7Smrg esac 233172b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 233272b676d7Smrg case $host_os in 233372b676d7Smrg freebsd2*) 233472b676d7Smrg shlibpath_overrides_runpath=yes 233572b676d7Smrg ;; 233672b676d7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 233772b676d7Smrg shlibpath_overrides_runpath=yes 233872b676d7Smrg hardcode_into_libs=yes 233972b676d7Smrg ;; 234072b676d7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 234172b676d7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 234272b676d7Smrg shlibpath_overrides_runpath=no 234372b676d7Smrg hardcode_into_libs=yes 234472b676d7Smrg ;; 23451fd23544Smrg *) # from 4.6 on, and DragonFly 234672b676d7Smrg shlibpath_overrides_runpath=yes 234772b676d7Smrg hardcode_into_libs=yes 234872b676d7Smrg ;; 234972b676d7Smrg esac 235072b676d7Smrg ;; 235172b676d7Smrg 235272b676d7Smrggnu*) 235372b676d7Smrg version_type=linux 235472b676d7Smrg need_lib_prefix=no 235572b676d7Smrg need_version=no 235672b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 235772b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 235872b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 235972b676d7Smrg hardcode_into_libs=yes 236072b676d7Smrg ;; 236172b676d7Smrg 236272b676d7Smrghpux9* | hpux10* | hpux11*) 236372b676d7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 236472b676d7Smrg # link against other versions. 236572b676d7Smrg version_type=sunos 236672b676d7Smrg need_lib_prefix=no 236772b676d7Smrg need_version=no 236872b676d7Smrg case $host_cpu in 236972b676d7Smrg ia64*) 237072b676d7Smrg shrext_cmds='.so' 237172b676d7Smrg hardcode_into_libs=yes 237272b676d7Smrg dynamic_linker="$host_os dld.so" 237372b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 237472b676d7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 237572b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 237672b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 237772b676d7Smrg if test "X$HPUX_IA64_MODE" = X32; then 237872b676d7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 237972b676d7Smrg else 238072b676d7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 238172b676d7Smrg fi 238272b676d7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 238372b676d7Smrg ;; 2384e35772b2Smrg hppa*64*) 2385e35772b2Smrg shrext_cmds='.sl' 2386e35772b2Smrg hardcode_into_libs=yes 2387e35772b2Smrg dynamic_linker="$host_os dld.sl" 2388e35772b2Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2389e35772b2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2390e35772b2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2391e35772b2Smrg soname_spec='${libname}${release}${shared_ext}$major' 2392e35772b2Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2393e35772b2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2394e35772b2Smrg ;; 2395e35772b2Smrg *) 239672b676d7Smrg shrext_cmds='.sl' 239772b676d7Smrg dynamic_linker="$host_os dld.sl" 239872b676d7Smrg shlibpath_var=SHLIB_PATH 239972b676d7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 240072b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 240172b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 240272b676d7Smrg ;; 240372b676d7Smrg esac 240472b676d7Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 240572b676d7Smrg postinstall_cmds='chmod 555 $lib' 240672b676d7Smrg ;; 240772b676d7Smrg 24081fd23544Smrginterix[[3-9]]*) 240972b676d7Smrg version_type=linux 241072b676d7Smrg need_lib_prefix=no 241172b676d7Smrg need_version=no 241272b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 241372b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 241472b676d7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 241572b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 241672b676d7Smrg shlibpath_overrides_runpath=no 241772b676d7Smrg hardcode_into_libs=yes 241872b676d7Smrg ;; 241972b676d7Smrg 242072b676d7Smrgirix5* | irix6* | nonstopux*) 242172b676d7Smrg case $host_os in 242272b676d7Smrg nonstopux*) version_type=nonstopux ;; 242372b676d7Smrg *) 242472b676d7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 242572b676d7Smrg version_type=linux 242672b676d7Smrg else 242772b676d7Smrg version_type=irix 242872b676d7Smrg fi ;; 242972b676d7Smrg esac 243072b676d7Smrg need_lib_prefix=no 243172b676d7Smrg need_version=no 243272b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 243372b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 243472b676d7Smrg case $host_os in 243572b676d7Smrg irix5* | nonstopux*) 243672b676d7Smrg libsuff= shlibsuff= 243772b676d7Smrg ;; 243872b676d7Smrg *) 243972b676d7Smrg case $LD in # libtool.m4 will add one of these switches to LD 244072b676d7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 244172b676d7Smrg libsuff= shlibsuff= libmagic=32-bit;; 244272b676d7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 244372b676d7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 244472b676d7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 244572b676d7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 244672b676d7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 244772b676d7Smrg esac 244872b676d7Smrg ;; 244972b676d7Smrg esac 245072b676d7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 245172b676d7Smrg shlibpath_overrides_runpath=no 245272b676d7Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 245372b676d7Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 245472b676d7Smrg hardcode_into_libs=yes 245572b676d7Smrg ;; 245672b676d7Smrg 245772b676d7Smrg# No shared lib support for Linux oldld, aout, or coff. 245872b676d7Smrglinux*oldld* | linux*aout* | linux*coff*) 245972b676d7Smrg dynamic_linker=no 246072b676d7Smrg ;; 246172b676d7Smrg 246272b676d7Smrg# This must be Linux ELF. 246372b676d7Smrglinux* | k*bsd*-gnu) 246472b676d7Smrg version_type=linux 246572b676d7Smrg need_lib_prefix=no 246672b676d7Smrg need_version=no 246772b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 246872b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 246972b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 247072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 247172b676d7Smrg shlibpath_overrides_runpath=no 2472e35772b2Smrg # Some binutils ld are patched to set DT_RUNPATH 2473e35772b2Smrg save_LDFLAGS=$LDFLAGS 2474e35772b2Smrg save_libdir=$libdir 2475e35772b2Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2476e35772b2Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2477e35772b2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2478e35772b2Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2479e35772b2Smrg [shlibpath_overrides_runpath=yes])]) 2480e35772b2Smrg LDFLAGS=$save_LDFLAGS 2481e35772b2Smrg libdir=$save_libdir 2482e35772b2Smrg 248372b676d7Smrg # This implies no fast_install, which is unacceptable. 248472b676d7Smrg # Some rework will be needed to allow for fast_install 248572b676d7Smrg # before this can be enabled. 248672b676d7Smrg hardcode_into_libs=yes 2487e35772b2Smrg 2488e35772b2Smrg # Add ABI-specific directories to the system library path. 2489e35772b2Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 249072b676d7Smrg 249172b676d7Smrg # Append ld.so.conf contents to the search path 249272b676d7Smrg if test -f /etc/ld.so.conf; then 2493e35772b2Smrg 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;/^$/d' | tr '\n' ' '` 24941fd23544Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 249572b676d7Smrg fi 249672b676d7Smrg 249772b676d7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 249872b676d7Smrg # powerpc, because MkLinux only supported shared libraries with the 249972b676d7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 250072b676d7Smrg # most powerpc-linux boxes support dynamic linking these days and 250172b676d7Smrg # people can always --disable-shared, the test was removed, and we 250272b676d7Smrg # assume the GNU/Linux dynamic linker is in use. 250372b676d7Smrg dynamic_linker='GNU/Linux ld.so' 250472b676d7Smrg ;; 250572b676d7Smrg 250672b676d7Smrgnetbsd*) 250772b676d7Smrg version_type=sunos 250872b676d7Smrg need_lib_prefix=no 250972b676d7Smrg need_version=no 2510e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 251172b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 251272b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 251372b676d7Smrg dynamic_linker='NetBSD (a.out) ld.so' 251472b676d7Smrg else 251572b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 251672b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 251772b676d7Smrg dynamic_linker='NetBSD ld.elf_so' 251872b676d7Smrg fi 251972b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 252072b676d7Smrg shlibpath_overrides_runpath=yes 252172b676d7Smrg hardcode_into_libs=yes 252272b676d7Smrg ;; 252372b676d7Smrg 252472b676d7Smrgnewsos6) 252572b676d7Smrg version_type=linux 252672b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 252772b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 252872b676d7Smrg shlibpath_overrides_runpath=yes 252972b676d7Smrg ;; 253072b676d7Smrg 2531e35772b2Smrg*nto* | *qnx*) 2532e35772b2Smrg version_type=qnx 253372b676d7Smrg need_lib_prefix=no 253472b676d7Smrg need_version=no 253572b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 253672b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 253772b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 2538e35772b2Smrg shlibpath_overrides_runpath=no 2539e35772b2Smrg hardcode_into_libs=yes 2540e35772b2Smrg dynamic_linker='ldqnx.so' 254172b676d7Smrg ;; 254272b676d7Smrg 254372b676d7Smrgopenbsd*) 254472b676d7Smrg version_type=sunos 254572b676d7Smrg sys_lib_dlsearch_path_spec="/usr/lib" 254672b676d7Smrg need_lib_prefix=no 254772b676d7Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 254872b676d7Smrg case $host_os in 2549e35772b2Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2550e35772b2Smrg *) need_version=no ;; 255172b676d7Smrg esac 255272b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 255372b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 255472b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 2555e35772b2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 255672b676d7Smrg case $host_os in 255772b676d7Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 255872b676d7Smrg shlibpath_overrides_runpath=no 255972b676d7Smrg ;; 256072b676d7Smrg *) 256172b676d7Smrg shlibpath_overrides_runpath=yes 256272b676d7Smrg ;; 256372b676d7Smrg esac 256472b676d7Smrg else 256572b676d7Smrg shlibpath_overrides_runpath=yes 256672b676d7Smrg fi 256772b676d7Smrg ;; 256872b676d7Smrg 256972b676d7Smrgos2*) 257072b676d7Smrg libname_spec='$name' 257172b676d7Smrg shrext_cmds=".dll" 257272b676d7Smrg need_lib_prefix=no 257372b676d7Smrg library_names_spec='$libname${shared_ext} $libname.a' 257472b676d7Smrg dynamic_linker='OS/2 ld.exe' 257572b676d7Smrg shlibpath_var=LIBPATH 257672b676d7Smrg ;; 257772b676d7Smrg 257872b676d7Smrgosf3* | osf4* | osf5*) 257972b676d7Smrg version_type=osf 258072b676d7Smrg need_lib_prefix=no 258172b676d7Smrg need_version=no 258272b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 258372b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 258472b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 258572b676d7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 258672b676d7Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 258772b676d7Smrg ;; 258872b676d7Smrg 25891fd23544Smrgrdos*) 25901fd23544Smrg dynamic_linker=no 25911fd23544Smrg ;; 25921fd23544Smrg 259372b676d7Smrgsolaris*) 259472b676d7Smrg version_type=linux 259572b676d7Smrg need_lib_prefix=no 259672b676d7Smrg need_version=no 259772b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 259872b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 259972b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 260072b676d7Smrg shlibpath_overrides_runpath=yes 260172b676d7Smrg hardcode_into_libs=yes 260272b676d7Smrg # ldd complains unless libraries are executable 260372b676d7Smrg postinstall_cmds='chmod +x $lib' 260472b676d7Smrg ;; 260572b676d7Smrg 260672b676d7Smrgsunos4*) 260772b676d7Smrg version_type=sunos 260872b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 260972b676d7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 261072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 261172b676d7Smrg shlibpath_overrides_runpath=yes 261272b676d7Smrg if test "$with_gnu_ld" = yes; then 261372b676d7Smrg need_lib_prefix=no 261472b676d7Smrg fi 261572b676d7Smrg need_version=yes 261672b676d7Smrg ;; 261772b676d7Smrg 261872b676d7Smrgsysv4 | sysv4.3*) 261972b676d7Smrg version_type=linux 262072b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 262172b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 262272b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 262372b676d7Smrg case $host_vendor in 262472b676d7Smrg sni) 262572b676d7Smrg shlibpath_overrides_runpath=no 262672b676d7Smrg need_lib_prefix=no 262772b676d7Smrg runpath_var=LD_RUN_PATH 262872b676d7Smrg ;; 262972b676d7Smrg siemens) 263072b676d7Smrg need_lib_prefix=no 263172b676d7Smrg ;; 263272b676d7Smrg motorola) 263372b676d7Smrg need_lib_prefix=no 263472b676d7Smrg need_version=no 263572b676d7Smrg shlibpath_overrides_runpath=no 263672b676d7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 263772b676d7Smrg ;; 263872b676d7Smrg esac 263972b676d7Smrg ;; 264072b676d7Smrg 264172b676d7Smrgsysv4*MP*) 264272b676d7Smrg if test -d /usr/nec ;then 264372b676d7Smrg version_type=linux 264472b676d7Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 264572b676d7Smrg soname_spec='$libname${shared_ext}.$major' 264672b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 264772b676d7Smrg fi 264872b676d7Smrg ;; 264972b676d7Smrg 265072b676d7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 265172b676d7Smrg version_type=freebsd-elf 265272b676d7Smrg need_lib_prefix=no 265372b676d7Smrg need_version=no 265472b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 265572b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 265672b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 2657e35772b2Smrg shlibpath_overrides_runpath=yes 265872b676d7Smrg hardcode_into_libs=yes 265972b676d7Smrg if test "$with_gnu_ld" = yes; then 266072b676d7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 266172b676d7Smrg else 266272b676d7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 266372b676d7Smrg case $host_os in 266472b676d7Smrg sco3.2v5*) 266572b676d7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 266672b676d7Smrg ;; 266772b676d7Smrg esac 266872b676d7Smrg fi 266972b676d7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 267072b676d7Smrg ;; 267172b676d7Smrg 2672e35772b2Smrgtpf*) 2673e35772b2Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2674e35772b2Smrg version_type=linux 2675e35772b2Smrg need_lib_prefix=no 2676e35772b2Smrg need_version=no 2677e35772b2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2678e35772b2Smrg shlibpath_var=LD_LIBRARY_PATH 2679e35772b2Smrg shlibpath_overrides_runpath=no 2680e35772b2Smrg hardcode_into_libs=yes 2681e35772b2Smrg ;; 2682e35772b2Smrg 268372b676d7Smrguts4*) 268472b676d7Smrg version_type=linux 268572b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 268672b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 268772b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 268872b676d7Smrg ;; 268972b676d7Smrg 269072b676d7Smrg*) 269172b676d7Smrg dynamic_linker=no 269272b676d7Smrg ;; 269372b676d7Smrgesac 269472b676d7SmrgAC_MSG_RESULT([$dynamic_linker]) 269572b676d7Smrgtest "$dynamic_linker" = no && can_build_shared=no 269672b676d7Smrg 269772b676d7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 269872b676d7Smrgif test "$GCC" = yes; then 269972b676d7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 270072b676d7Smrgfi 270172b676d7Smrg 2702e35772b2Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2703e35772b2Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2704e35772b2Smrgfi 2705e35772b2Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2706e35772b2Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2707e35772b2Smrgfi 270872b676d7Smrg 2709e35772b2Smrg_LT_DECL([], [variables_saved_for_relink], [1], 2710e35772b2Smrg [Variables whose values should be saved in libtool wrapper scripts and 2711e35772b2Smrg restored at link time]) 2712e35772b2Smrg_LT_DECL([], [need_lib_prefix], [0], 2713e35772b2Smrg [Do we need the "lib" prefix for modules?]) 2714e35772b2Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2715e35772b2Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2716e35772b2Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2717e35772b2Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2718e35772b2Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2719e35772b2Smrg [Is shlibpath searched before the hard-coded library search path?]) 2720e35772b2Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2721e35772b2Smrg_LT_DECL([], [library_names_spec], [1], 2722e35772b2Smrg [[List of archive names. First name is the real one, the rest are links. 2723e35772b2Smrg The last name is the one that the linker finds with -lNAME]]) 2724e35772b2Smrg_LT_DECL([], [soname_spec], [1], 2725e35772b2Smrg [[The coded name of the library, if different from the real name]]) 2726e35772b2Smrg_LT_DECL([], [postinstall_cmds], [2], 2727e35772b2Smrg [Command to use after installation of a shared archive]) 2728e35772b2Smrg_LT_DECL([], [postuninstall_cmds], [2], 2729e35772b2Smrg [Command to use after uninstallation of a shared archive]) 2730e35772b2Smrg_LT_DECL([], [finish_cmds], [2], 2731e35772b2Smrg [Commands used to finish a libtool library installation in a directory]) 2732e35772b2Smrg_LT_DECL([], [finish_eval], [1], 2733e35772b2Smrg [[As "finish_cmds", except a single script fragment to be evaled but 2734e35772b2Smrg not shown]]) 2735e35772b2Smrg_LT_DECL([], [hardcode_into_libs], [0], 2736e35772b2Smrg [Whether we should hardcode library paths into libraries]) 2737e35772b2Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2738e35772b2Smrg [Compile-time system search path for libraries]) 2739e35772b2Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2740e35772b2Smrg [Run-time system search path for libraries]) 2741e35772b2Smrg])# _LT_SYS_DYNAMIC_LINKER 2742e35772b2Smrg 2743e35772b2Smrg 2744e35772b2Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 274572b676d7Smrg# -------------------------- 27461fd23544Smrg# find a file program which can recognize shared library 2747e35772b2SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2748e35772b2Smrg[m4_require([_LT_DECL_EGREP])dnl 274972b676d7SmrgAC_MSG_CHECKING([for $1]) 275072b676d7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 275172b676d7Smrg[case $MAGIC_CMD in 275272b676d7Smrg[[\\/*] | ?:[\\/]*]) 275372b676d7Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 275472b676d7Smrg ;; 275572b676d7Smrg*) 275672b676d7Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 275772b676d7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 275872b676d7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 275972b676d7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 276072b676d7Smrgdnl not every word. This closes a longstanding sh security hole. 2761e35772b2Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 276272b676d7Smrg for ac_dir in $ac_dummy; do 276372b676d7Smrg IFS="$lt_save_ifs" 276472b676d7Smrg test -z "$ac_dir" && ac_dir=. 276572b676d7Smrg if test -f $ac_dir/$1; then 276672b676d7Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 276772b676d7Smrg if test -n "$file_magic_test_file"; then 276872b676d7Smrg case $deplibs_check_method in 276972b676d7Smrg "file_magic "*) 277072b676d7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 277172b676d7Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 277272b676d7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 277372b676d7Smrg $EGREP "$file_magic_regex" > /dev/null; then 277472b676d7Smrg : 277572b676d7Smrg else 2776e35772b2Smrg cat <<_LT_EOF 1>&2 277772b676d7Smrg 277872b676d7Smrg*** Warning: the command libtool uses to detect shared libraries, 277972b676d7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 278072b676d7Smrg*** The result is that libtool may fail to recognize shared libraries 278172b676d7Smrg*** as such. This will affect the creation of libtool libraries that 278272b676d7Smrg*** depend on shared libraries, but programs linked with such libtool 278372b676d7Smrg*** libraries will work regardless of this problem. Nevertheless, you 278472b676d7Smrg*** may want to report the problem to your system manager and/or to 278572b676d7Smrg*** bug-libtool@gnu.org 278672b676d7Smrg 2787e35772b2Smrg_LT_EOF 278872b676d7Smrg fi ;; 278972b676d7Smrg esac 279072b676d7Smrg fi 279172b676d7Smrg break 279272b676d7Smrg fi 279372b676d7Smrg done 279472b676d7Smrg IFS="$lt_save_ifs" 279572b676d7Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 279672b676d7Smrg ;; 279772b676d7Smrgesac]) 279872b676d7SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 279972b676d7Smrgif test -n "$MAGIC_CMD"; then 280072b676d7Smrg AC_MSG_RESULT($MAGIC_CMD) 280172b676d7Smrgelse 280272b676d7Smrg AC_MSG_RESULT(no) 280372b676d7Smrgfi 2804e35772b2Smrg_LT_DECL([], [MAGIC_CMD], [0], 2805e35772b2Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2806e35772b2Smrg])# _LT_PATH_TOOL_PREFIX 280772b676d7Smrg 2808e35772b2Smrg# Old name: 2809e35772b2SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2810e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 2811e35772b2Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 281272b676d7Smrg 2813e35772b2Smrg 2814e35772b2Smrg# _LT_PATH_MAGIC 2815e35772b2Smrg# -------------- 28161fd23544Smrg# find a file program which can recognize a shared library 2817e35772b2Smrgm4_defun([_LT_PATH_MAGIC], 2818e35772b2Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 281972b676d7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 282072b676d7Smrg if test -n "$ac_tool_prefix"; then 2821e35772b2Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 282272b676d7Smrg else 282372b676d7Smrg MAGIC_CMD=: 282472b676d7Smrg fi 282572b676d7Smrgfi 2826e35772b2Smrg])# _LT_PATH_MAGIC 282772b676d7Smrg 282872b676d7Smrg 2829e35772b2Smrg# LT_PATH_LD 283072b676d7Smrg# ---------- 283172b676d7Smrg# find the pathname to the GNU or non-GNU linker 2832e35772b2SmrgAC_DEFUN([LT_PATH_LD], 2833e35772b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 283472b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 283572b676d7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2836e35772b2Smrgm4_require([_LT_DECL_SED])dnl 2837e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 2838e35772b2Smrg 2839e35772b2SmrgAC_ARG_WITH([gnu-ld], 2840e35772b2Smrg [AS_HELP_STRING([--with-gnu-ld], 2841e35772b2Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2842e35772b2Smrg [test "$withval" = no || with_gnu_ld=yes], 2843e35772b2Smrg [with_gnu_ld=no])dnl 2844e35772b2Smrg 284572b676d7Smrgac_prog=ld 284672b676d7Smrgif test "$GCC" = yes; then 284772b676d7Smrg # Check if gcc -print-prog-name=ld gives a path. 284872b676d7Smrg AC_MSG_CHECKING([for ld used by $CC]) 284972b676d7Smrg case $host in 285072b676d7Smrg *-*-mingw*) 285172b676d7Smrg # gcc leaves a trailing carriage return which upsets mingw 285272b676d7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 285372b676d7Smrg *) 285472b676d7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 285572b676d7Smrg esac 285672b676d7Smrg case $ac_prog in 285772b676d7Smrg # Accept absolute paths. 285872b676d7Smrg [[\\/]]* | ?:[[\\/]]*) 285972b676d7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 286072b676d7Smrg # Canonicalize the pathname of ld 2861e35772b2Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 2862e35772b2Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 2863e35772b2Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 286472b676d7Smrg done 286572b676d7Smrg test -z "$LD" && LD="$ac_prog" 286672b676d7Smrg ;; 286772b676d7Smrg "") 286872b676d7Smrg # If it fails, then pretend we aren't using GCC. 286972b676d7Smrg ac_prog=ld 287072b676d7Smrg ;; 287172b676d7Smrg *) 287272b676d7Smrg # If it is relative, then search for the first ld in PATH. 287372b676d7Smrg with_gnu_ld=unknown 287472b676d7Smrg ;; 287572b676d7Smrg esac 287672b676d7Smrgelif test "$with_gnu_ld" = yes; then 287772b676d7Smrg AC_MSG_CHECKING([for GNU ld]) 287872b676d7Smrgelse 287972b676d7Smrg AC_MSG_CHECKING([for non-GNU ld]) 288072b676d7Smrgfi 288172b676d7SmrgAC_CACHE_VAL(lt_cv_path_LD, 288272b676d7Smrg[if test -z "$LD"; then 288372b676d7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 288472b676d7Smrg for ac_dir in $PATH; do 288572b676d7Smrg IFS="$lt_save_ifs" 288672b676d7Smrg test -z "$ac_dir" && ac_dir=. 288772b676d7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 288872b676d7Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 288972b676d7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 289072b676d7Smrg # but apparently some variants of GNU ld only accept -v. 289172b676d7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 289272b676d7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 289372b676d7Smrg *GNU* | *'with BFD'*) 289472b676d7Smrg test "$with_gnu_ld" != no && break 289572b676d7Smrg ;; 289672b676d7Smrg *) 289772b676d7Smrg test "$with_gnu_ld" != yes && break 289872b676d7Smrg ;; 289972b676d7Smrg esac 290072b676d7Smrg fi 290172b676d7Smrg done 290272b676d7Smrg IFS="$lt_save_ifs" 290372b676d7Smrgelse 290472b676d7Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 290572b676d7Smrgfi]) 290672b676d7SmrgLD="$lt_cv_path_LD" 290772b676d7Smrgif test -n "$LD"; then 290872b676d7Smrg AC_MSG_RESULT($LD) 290972b676d7Smrgelse 291072b676d7Smrg AC_MSG_RESULT(no) 291172b676d7Smrgfi 291272b676d7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2913e35772b2Smrg_LT_PATH_LD_GNU 2914e35772b2SmrgAC_SUBST([LD]) 291572b676d7Smrg 2916e35772b2Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 2917e35772b2Smrg])# LT_PATH_LD 291872b676d7Smrg 2919e35772b2Smrg# Old names: 2920e35772b2SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 2921e35772b2SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 2922e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 2923e35772b2Smrgdnl AC_DEFUN([AM_PROG_LD], []) 2924e35772b2Smrgdnl AC_DEFUN([AC_PROG_LD], []) 2925e35772b2Smrg 2926e35772b2Smrg 2927e35772b2Smrg# _LT_PATH_LD_GNU 2928e35772b2Smrg#- -------------- 2929e35772b2Smrgm4_defun([_LT_PATH_LD_GNU], 2930e35772b2Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 293172b676d7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 293272b676d7Smrgcase `$LD -v 2>&1 </dev/null` in 293372b676d7Smrg*GNU* | *'with BFD'*) 293472b676d7Smrg lt_cv_prog_gnu_ld=yes 293572b676d7Smrg ;; 293672b676d7Smrg*) 293772b676d7Smrg lt_cv_prog_gnu_ld=no 293872b676d7Smrg ;; 293972b676d7Smrgesac]) 294072b676d7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2941e35772b2Smrg])# _LT_PATH_LD_GNU 294272b676d7Smrg 294372b676d7Smrg 2944e35772b2Smrg# _LT_CMD_RELOAD 2945e35772b2Smrg# -------------- 294672b676d7Smrg# find reload flag for linker 294772b676d7Smrg# -- PORTME Some linkers may need a different reload flag. 2948e35772b2Smrgm4_defun([_LT_CMD_RELOAD], 294972b676d7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 295072b676d7Smrg lt_cv_ld_reload_flag, 295172b676d7Smrg [lt_cv_ld_reload_flag='-r']) 295272b676d7Smrgreload_flag=$lt_cv_ld_reload_flag 295372b676d7Smrgcase $reload_flag in 295472b676d7Smrg"" | " "*) ;; 295572b676d7Smrg*) reload_flag=" $reload_flag" ;; 295672b676d7Smrgesac 295772b676d7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 295872b676d7Smrgcase $host_os in 295972b676d7Smrg darwin*) 296072b676d7Smrg if test "$GCC" = yes; then 296172b676d7Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 296272b676d7Smrg else 296372b676d7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 296472b676d7Smrg fi 296572b676d7Smrg ;; 296672b676d7Smrgesac 2967e35772b2Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 2968e35772b2Smrg_LT_DECL([], [reload_cmds], [2])dnl 2969e35772b2Smrg])# _LT_CMD_RELOAD 297072b676d7Smrg 297172b676d7Smrg 2972e35772b2Smrg# _LT_CHECK_MAGIC_METHOD 2973e35772b2Smrg# ---------------------- 297472b676d7Smrg# how to check for library dependencies 297572b676d7Smrg# -- PORTME fill in with the dynamic library characteristics 2976e35772b2Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 2977e35772b2Smrg[m4_require([_LT_DECL_EGREP]) 2978e35772b2Smrgm4_require([_LT_DECL_OBJDUMP]) 2979e35772b2SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 298072b676d7Smrglt_cv_deplibs_check_method, 298172b676d7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 298272b676d7Smrglt_cv_file_magic_test_file= 298372b676d7Smrglt_cv_deplibs_check_method='unknown' 298472b676d7Smrg# Need to set the preceding variable on all platforms that support 298572b676d7Smrg# interlibrary dependencies. 298672b676d7Smrg# 'none' -- dependencies not supported. 298772b676d7Smrg# `unknown' -- same as none, but documents that we really don't know. 298872b676d7Smrg# 'pass_all' -- all dependencies passed with no checks. 298972b676d7Smrg# 'test_compile' -- check by making test program. 299072b676d7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 299172b676d7Smrg# which responds to the $file_magic_cmd with a given extended regex. 299272b676d7Smrg# If you have `file' or equivalent on your system and you're not sure 299372b676d7Smrg# whether `pass_all' will *always* work, you probably want this one. 299472b676d7Smrg 299572b676d7Smrgcase $host_os in 29961fd23544Smrgaix[[4-9]]*) 299772b676d7Smrg lt_cv_deplibs_check_method=pass_all 299872b676d7Smrg ;; 299972b676d7Smrg 300072b676d7Smrgbeos*) 300172b676d7Smrg lt_cv_deplibs_check_method=pass_all 300272b676d7Smrg ;; 300372b676d7Smrg 300472b676d7Smrgbsdi[[45]]*) 300572b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 300672b676d7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 300772b676d7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 300872b676d7Smrg ;; 300972b676d7Smrg 301072b676d7Smrgcygwin*) 301172b676d7Smrg # func_win32_libid is a shell function defined in ltmain.sh 301272b676d7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 301372b676d7Smrg lt_cv_file_magic_cmd='func_win32_libid' 301472b676d7Smrg ;; 301572b676d7Smrg 301672b676d7Smrgmingw* | pw32*) 301772b676d7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 30181fd23544Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 30191fd23544Smrg # unless we find 'file', for example because we are cross-compiling. 30201fd23544Smrg if ( file / ) >/dev/null 2>&1; then 30211fd23544Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 30221fd23544Smrg lt_cv_file_magic_cmd='func_win32_libid' 30231fd23544Smrg else 30241fd23544Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 30251fd23544Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 30261fd23544Smrg fi 302772b676d7Smrg ;; 302872b676d7Smrg 3029e35772b2Smrgcegcc) 3030e35772b2Smrg # use the weaker test based on 'objdump'. See mingw*. 3031e35772b2Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3032e35772b2Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3033e35772b2Smrg ;; 3034e35772b2Smrg 303572b676d7Smrgdarwin* | rhapsody*) 303672b676d7Smrg lt_cv_deplibs_check_method=pass_all 303772b676d7Smrg ;; 303872b676d7Smrg 303972b676d7Smrgfreebsd* | dragonfly*) 3040e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 304172b676d7Smrg case $host_cpu in 304272b676d7Smrg i*86 ) 304372b676d7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 304472b676d7Smrg # Let's accept both of them until this is cleared up. 304572b676d7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 304672b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 304772b676d7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 304872b676d7Smrg ;; 304972b676d7Smrg esac 305072b676d7Smrg else 305172b676d7Smrg lt_cv_deplibs_check_method=pass_all 305272b676d7Smrg fi 305372b676d7Smrg ;; 305472b676d7Smrg 305572b676d7Smrggnu*) 305672b676d7Smrg lt_cv_deplibs_check_method=pass_all 305772b676d7Smrg ;; 305872b676d7Smrg 305972b676d7Smrghpux10.20* | hpux11*) 306072b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 306172b676d7Smrg case $host_cpu in 306272b676d7Smrg ia64*) 306372b676d7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 306472b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 306572b676d7Smrg ;; 306672b676d7Smrg hppa*64*) 306772b676d7Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 306872b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 306972b676d7Smrg ;; 307072b676d7Smrg *) 307172b676d7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 307272b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 307372b676d7Smrg ;; 307472b676d7Smrg esac 307572b676d7Smrg ;; 307672b676d7Smrg 30771fd23544Smrginterix[[3-9]]*) 307872b676d7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 307972b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 308072b676d7Smrg ;; 308172b676d7Smrg 308272b676d7Smrgirix5* | irix6* | nonstopux*) 308372b676d7Smrg case $LD in 308472b676d7Smrg *-32|*"-32 ") libmagic=32-bit;; 308572b676d7Smrg *-n32|*"-n32 ") libmagic=N32;; 308672b676d7Smrg *-64|*"-64 ") libmagic=64-bit;; 308772b676d7Smrg *) libmagic=never-match;; 308872b676d7Smrg esac 308972b676d7Smrg lt_cv_deplibs_check_method=pass_all 309072b676d7Smrg ;; 309172b676d7Smrg 309272b676d7Smrg# This must be Linux ELF. 309372b676d7Smrglinux* | k*bsd*-gnu) 309472b676d7Smrg lt_cv_deplibs_check_method=pass_all 309572b676d7Smrg ;; 309672b676d7Smrg 30971fd23544Smrgnetbsd*) 3098e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 309972b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 310072b676d7Smrg else 310172b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 310272b676d7Smrg fi 310372b676d7Smrg ;; 310472b676d7Smrg 310572b676d7Smrgnewos6*) 310672b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 310772b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 310872b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 310972b676d7Smrg ;; 311072b676d7Smrg 3111e35772b2Smrg*nto* | *qnx*) 3112e35772b2Smrg lt_cv_deplibs_check_method=pass_all 311372b676d7Smrg ;; 311472b676d7Smrg 311572b676d7Smrgopenbsd*) 3116e35772b2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 311772b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 311872b676d7Smrg else 311972b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 312072b676d7Smrg fi 312172b676d7Smrg ;; 312272b676d7Smrg 312372b676d7Smrgosf3* | osf4* | osf5*) 312472b676d7Smrg lt_cv_deplibs_check_method=pass_all 312572b676d7Smrg ;; 312672b676d7Smrg 31271fd23544Smrgrdos*) 31281fd23544Smrg lt_cv_deplibs_check_method=pass_all 31291fd23544Smrg ;; 31301fd23544Smrg 313172b676d7Smrgsolaris*) 313272b676d7Smrg lt_cv_deplibs_check_method=pass_all 313372b676d7Smrg ;; 313472b676d7Smrg 3135e35772b2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3136e35772b2Smrg lt_cv_deplibs_check_method=pass_all 3137e35772b2Smrg ;; 3138e35772b2Smrg 313972b676d7Smrgsysv4 | sysv4.3*) 314072b676d7Smrg case $host_vendor in 314172b676d7Smrg motorola) 314272b676d7Smrg 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]]' 314372b676d7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 314472b676d7Smrg ;; 314572b676d7Smrg ncr) 314672b676d7Smrg lt_cv_deplibs_check_method=pass_all 314772b676d7Smrg ;; 314872b676d7Smrg sequent) 314972b676d7Smrg lt_cv_file_magic_cmd='/bin/file' 315072b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 315172b676d7Smrg ;; 315272b676d7Smrg sni) 315372b676d7Smrg lt_cv_file_magic_cmd='/bin/file' 315472b676d7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 315572b676d7Smrg lt_cv_file_magic_test_file=/lib/libc.so 315672b676d7Smrg ;; 315772b676d7Smrg siemens) 315872b676d7Smrg lt_cv_deplibs_check_method=pass_all 315972b676d7Smrg ;; 316072b676d7Smrg pc) 316172b676d7Smrg lt_cv_deplibs_check_method=pass_all 316272b676d7Smrg ;; 316372b676d7Smrg esac 316472b676d7Smrg ;; 316572b676d7Smrg 3166e35772b2Smrgtpf*) 316772b676d7Smrg lt_cv_deplibs_check_method=pass_all 316872b676d7Smrg ;; 316972b676d7Smrgesac 317072b676d7Smrg]) 317172b676d7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 317272b676d7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 317372b676d7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 317472b676d7Smrg 3175e35772b2Smrg_LT_DECL([], [deplibs_check_method], [1], 3176e35772b2Smrg [Method to check whether dependent libraries are shared objects]) 3177e35772b2Smrg_LT_DECL([], [file_magic_cmd], [1], 3178e35772b2Smrg [Command to use when deplibs_check_method == "file_magic"]) 3179e35772b2Smrg])# _LT_CHECK_MAGIC_METHOD 318072b676d7Smrg 3181e35772b2Smrg 3182e35772b2Smrg# LT_PATH_NM 318372b676d7Smrg# ---------- 3184e35772b2Smrg# find the pathname to a BSD- or MS-compatible name lister 3185e35772b2SmrgAC_DEFUN([LT_PATH_NM], 3186e35772b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3187e35772b2SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 318872b676d7Smrg[if test -n "$NM"; then 318972b676d7Smrg # Let the user override the test. 319072b676d7Smrg lt_cv_path_NM="$NM" 319172b676d7Smrgelse 319272b676d7Smrg lt_nm_to_check="${ac_tool_prefix}nm" 31931fd23544Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 319472b676d7Smrg lt_nm_to_check="$lt_nm_to_check nm" 319572b676d7Smrg fi 319672b676d7Smrg for lt_tmp_nm in $lt_nm_to_check; do 319772b676d7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 319872b676d7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 319972b676d7Smrg IFS="$lt_save_ifs" 320072b676d7Smrg test -z "$ac_dir" && ac_dir=. 320172b676d7Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 320272b676d7Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 320372b676d7Smrg # Check to see if the nm accepts a BSD-compat flag. 320472b676d7Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 320572b676d7Smrg # nm: unknown option "B" ignored 320672b676d7Smrg # Tru64's nm complains that /dev/null is an invalid object file 320772b676d7Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 320872b676d7Smrg */dev/null* | *'Invalid file or object type'*) 320972b676d7Smrg lt_cv_path_NM="$tmp_nm -B" 321072b676d7Smrg break 321172b676d7Smrg ;; 321272b676d7Smrg *) 321372b676d7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 321472b676d7Smrg */dev/null*) 321572b676d7Smrg lt_cv_path_NM="$tmp_nm -p" 321672b676d7Smrg break 321772b676d7Smrg ;; 321872b676d7Smrg *) 321972b676d7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 322072b676d7Smrg continue # so that we can try to find one that supports BSD flags 322172b676d7Smrg ;; 322272b676d7Smrg esac 322372b676d7Smrg ;; 322472b676d7Smrg esac 322572b676d7Smrg fi 322672b676d7Smrg done 322772b676d7Smrg IFS="$lt_save_ifs" 322872b676d7Smrg done 3229e35772b2Smrg : ${lt_cv_path_NM=no} 323072b676d7Smrgfi]) 3231e35772b2Smrgif test "$lt_cv_path_NM" != "no"; then 3232e35772b2Smrg NM="$lt_cv_path_NM" 3233e35772b2Smrgelse 3234e35772b2Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3235e35772b2Smrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 3236e35772b2Smrg AC_SUBST([DUMPBIN]) 3237e35772b2Smrg if test "$DUMPBIN" != ":"; then 3238e35772b2Smrg NM="$DUMPBIN" 3239e35772b2Smrg fi 3240e35772b2Smrgfi 3241e35772b2Smrgtest -z "$NM" && NM=nm 3242e35772b2SmrgAC_SUBST([NM]) 3243e35772b2Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3244e35772b2Smrg 3245e35772b2SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3246e35772b2Smrg [lt_cv_nm_interface="BSD nm" 3247e35772b2Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3248e35772b2Smrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3249e35772b2Smrg (eval "$ac_compile" 2>conftest.err) 3250e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3251e35772b2Smrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3252e35772b2Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3253e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3254e35772b2Smrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 3255e35772b2Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3256e35772b2Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3257e35772b2Smrg lt_cv_nm_interface="MS dumpbin" 3258e35772b2Smrg fi 3259e35772b2Smrg rm -f conftest*]) 3260e35772b2Smrg])# LT_PATH_NM 326172b676d7Smrg 3262e35772b2Smrg# Old names: 3263e35772b2SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3264e35772b2SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3265e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3266e35772b2Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3267e35772b2Smrgdnl AC_DEFUN([AC_PROG_NM], []) 326872b676d7Smrg 3269e35772b2Smrg 3270e35772b2Smrg# LT_LIB_M 3271e35772b2Smrg# -------- 327272b676d7Smrg# check for math library 3273e35772b2SmrgAC_DEFUN([LT_LIB_M], 327472b676d7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 327572b676d7SmrgLIBM= 327672b676d7Smrgcase $host in 327772b676d7Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 327872b676d7Smrg # These system don't have libm, or don't need it 327972b676d7Smrg ;; 328072b676d7Smrg*-ncr-sysv4.3*) 328172b676d7Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 328272b676d7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 328372b676d7Smrg ;; 328472b676d7Smrg*) 328572b676d7Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 328672b676d7Smrg ;; 328772b676d7Smrgesac 3288e35772b2SmrgAC_SUBST([LIBM]) 3289e35772b2Smrg])# LT_LIB_M 329072b676d7Smrg 3291e35772b2Smrg# Old name: 3292e35772b2SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3293e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3294e35772b2Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 329572b676d7Smrg 329672b676d7Smrg 3297e35772b2Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3298e35772b2Smrg# ------------------------------- 3299e35772b2Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3300e35772b2Smrg[m4_require([_LT_TAG_COMPILER])dnl 330172b676d7Smrg 3302e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 330372b676d7Smrg 3304e35772b2Smrgif test "$GCC" = yes; then 3305e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 330672b676d7Smrg 3307e35772b2Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3308e35772b2Smrg lt_cv_prog_compiler_rtti_exceptions, 3309e35772b2Smrg [-fno-rtti -fno-exceptions], [], 3310e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3311e35772b2Smrgfi 3312e35772b2Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3313e35772b2Smrg [Compiler flag to turn off builtin functions]) 3314e35772b2Smrg])# _LT_COMPILER_NO_RTTI 331572b676d7Smrg 331672b676d7Smrg 3317e35772b2Smrg# _LT_CMD_GLOBAL_SYMBOLS 3318e35772b2Smrg# ---------------------- 3319e35772b2Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3320e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3321e35772b2SmrgAC_REQUIRE([AC_PROG_CC])dnl 3322e35772b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 3323e35772b2SmrgAC_REQUIRE([LT_PATH_LD])dnl 3324e35772b2Smrgm4_require([_LT_DECL_SED])dnl 3325e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 3326e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 332772b676d7Smrg 3328e35772b2Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3329e35772b2SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3330e35772b2SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 333172b676d7Smrg[ 3332e35772b2Smrg# These are sane defaults that work on at least a few old systems. 3333e35772b2Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 333472b676d7Smrg 3335e35772b2Smrg# Character class describing NM global symbol codes. 3336e35772b2Smrgsymcode='[[BCDEGRST]]' 333772b676d7Smrg 3338e35772b2Smrg# Regexp to match symbols that can be accessed directly from C. 3339e35772b2Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 334072b676d7Smrg 3341e35772b2Smrg# Define system-specific variables. 3342e35772b2Smrgcase $host_os in 3343e35772b2Smrgaix*) 3344e35772b2Smrg symcode='[[BCDT]]' 3345e35772b2Smrg ;; 3346e35772b2Smrgcygwin* | mingw* | pw32* | cegcc*) 3347e35772b2Smrg symcode='[[ABCDGISTW]]' 3348e35772b2Smrg ;; 3349e35772b2Smrghpux*) 3350e35772b2Smrg if test "$host_cpu" = ia64; then 3351e35772b2Smrg symcode='[[ABCDEGRST]]' 3352e35772b2Smrg fi 3353e35772b2Smrg ;; 3354e35772b2Smrgirix* | nonstopux*) 3355e35772b2Smrg symcode='[[BCDEGRST]]' 3356e35772b2Smrg ;; 3357e35772b2Smrgosf*) 3358e35772b2Smrg symcode='[[BCDEGQRST]]' 3359e35772b2Smrg ;; 3360e35772b2Smrgsolaris*) 3361e35772b2Smrg symcode='[[BDRT]]' 3362e35772b2Smrg ;; 3363e35772b2Smrgsco3.2v5*) 3364e35772b2Smrg symcode='[[DT]]' 3365e35772b2Smrg ;; 3366e35772b2Smrgsysv4.2uw2*) 3367e35772b2Smrg symcode='[[DT]]' 3368e35772b2Smrg ;; 3369e35772b2Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3370e35772b2Smrg symcode='[[ABDT]]' 3371e35772b2Smrg ;; 3372e35772b2Smrgsysv4) 3373e35772b2Smrg symcode='[[DFNSTU]]' 3374e35772b2Smrg ;; 3375e35772b2Smrgesac 337672b676d7Smrg 3377e35772b2Smrg# If we're using GNU nm, then use its standard symbol codes. 3378e35772b2Smrgcase `$NM -V 2>&1` in 3379e35772b2Smrg*GNU* | *'with BFD'*) 3380e35772b2Smrg symcode='[[ABCDGIRSTW]]' ;; 3381e35772b2Smrgesac 338272b676d7Smrg 3383e35772b2Smrg# Transform an extracted symbol line into a proper C declaration. 3384e35772b2Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3385e35772b2Smrg# so use this general approach. 3386e35772b2Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 338772b676d7Smrg 3388e35772b2Smrg# Transform an extracted symbol line into symbol name and symbol address 3389e35772b2Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3390e35772b2Smrglt_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'" 339172b676d7Smrg 3392e35772b2Smrg# Handle CRLF in mingw tool chain 3393e35772b2Smrgopt_cr= 3394e35772b2Smrgcase $build_os in 3395e35772b2Smrgmingw*) 3396e35772b2Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3397e35772b2Smrg ;; 3398e35772b2Smrgesac 339972b676d7Smrg 3400e35772b2Smrg# Try without a prefix underscore, then with it. 3401e35772b2Smrgfor ac_symprfx in "" "_"; do 340272b676d7Smrg 3403e35772b2Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3404e35772b2Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 340572b676d7Smrg 3406e35772b2Smrg # Write the raw and C identifiers. 3407e35772b2Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3408e35772b2Smrg # Fake it for dumpbin and say T for any non-static function 3409e35772b2Smrg # and D for any global variable. 3410e35772b2Smrg # Also find C++ and __fastcall symbols from MSVC++, 3411e35772b2Smrg # which start with @ or ?. 3412e35772b2Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3413e35772b2Smrg" {last_section=section; section=\$ 3};"\ 3414e35772b2Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3415e35772b2Smrg" \$ 0!~/External *\|/{next};"\ 3416e35772b2Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3417e35772b2Smrg" {if(hide[section]) next};"\ 3418e35772b2Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3419e35772b2Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3420e35772b2Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3421e35772b2Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3422e35772b2Smrg" ' prfx=^$ac_symprfx]" 3423e35772b2Smrg else 3424e35772b2Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 342572b676d7Smrg fi 342672b676d7Smrg 3427e35772b2Smrg # Check to see that the pipe works correctly. 3428e35772b2Smrg pipe_works=no 342972b676d7Smrg 3430e35772b2Smrg rm -f conftest* 3431e35772b2Smrg cat > conftest.$ac_ext <<_LT_EOF 3432e35772b2Smrg#ifdef __cplusplus 3433e35772b2Smrgextern "C" { 3434e35772b2Smrg#endif 3435e35772b2Smrgchar nm_test_var; 3436e35772b2Smrgvoid nm_test_func(void); 3437e35772b2Smrgvoid nm_test_func(void){} 3438e35772b2Smrg#ifdef __cplusplus 3439e35772b2Smrg} 3440e35772b2Smrg#endif 3441e35772b2Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3442e35772b2Smrg_LT_EOF 344372b676d7Smrg 3444e35772b2Smrg if AC_TRY_EVAL(ac_compile); then 3445e35772b2Smrg # Now try to grab the symbols. 3446e35772b2Smrg nlist=conftest.nm 3447e35772b2Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 3448e35772b2Smrg # Try sorting and uniquifying the output. 3449e35772b2Smrg if sort "$nlist" | uniq > "$nlist"T; then 3450e35772b2Smrg mv -f "$nlist"T "$nlist" 3451e35772b2Smrg else 3452e35772b2Smrg rm -f "$nlist"T 3453e35772b2Smrg fi 345472b676d7Smrg 3455e35772b2Smrg # Make sure that we snagged all the symbols we need. 3456e35772b2Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3457e35772b2Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3458e35772b2Smrg cat <<_LT_EOF > conftest.$ac_ext 3459e35772b2Smrg#ifdef __cplusplus 3460e35772b2Smrgextern "C" { 3461e35772b2Smrg#endif 346272b676d7Smrg 3463e35772b2Smrg_LT_EOF 3464e35772b2Smrg # Now generate the symbol file. 3465e35772b2Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 346672b676d7Smrg 3467e35772b2Smrg cat <<_LT_EOF >> conftest.$ac_ext 346872b676d7Smrg 3469e35772b2Smrg/* The mapping between symbol names and symbols. */ 3470e35772b2Smrgconst struct { 3471e35772b2Smrg const char *name; 3472e35772b2Smrg void *address; 3473e35772b2Smrg} 3474e35772b2Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3475e35772b2Smrg{ 3476e35772b2Smrg { "@PROGRAM@", (void *) 0 }, 3477e35772b2Smrg_LT_EOF 3478e35772b2Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3479e35772b2Smrg cat <<\_LT_EOF >> conftest.$ac_ext 3480e35772b2Smrg {0, (void *) 0} 3481e35772b2Smrg}; 348272b676d7Smrg 3483e35772b2Smrg/* This works around a problem in FreeBSD linker */ 3484e35772b2Smrg#ifdef FREEBSD_WORKAROUND 3485e35772b2Smrgstatic const void *lt_preloaded_setup() { 3486e35772b2Smrg return lt__PROGRAM__LTX_preloaded_symbols; 3487e35772b2Smrg} 3488e35772b2Smrg#endif 348972b676d7Smrg 3490e35772b2Smrg#ifdef __cplusplus 3491e35772b2Smrg} 3492e35772b2Smrg#endif 3493e35772b2Smrg_LT_EOF 3494e35772b2Smrg # Now try linking the two files. 3495e35772b2Smrg mv conftest.$ac_objext conftstm.$ac_objext 3496e35772b2Smrg lt_save_LIBS="$LIBS" 3497e35772b2Smrg lt_save_CFLAGS="$CFLAGS" 3498e35772b2Smrg LIBS="conftstm.$ac_objext" 3499e35772b2Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3500e35772b2Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3501e35772b2Smrg pipe_works=yes 3502e35772b2Smrg fi 3503e35772b2Smrg LIBS="$lt_save_LIBS" 3504e35772b2Smrg CFLAGS="$lt_save_CFLAGS" 3505e35772b2Smrg else 3506e35772b2Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3507e35772b2Smrg fi 3508e35772b2Smrg else 3509e35772b2Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3510e35772b2Smrg fi 351172b676d7Smrg else 3512e35772b2Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 351372b676d7Smrg fi 351472b676d7Smrg else 3515e35772b2Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3516e35772b2Smrg cat conftest.$ac_ext >&5 351772b676d7Smrg fi 3518e35772b2Smrg rm -rf conftest* conftst* 351972b676d7Smrg 3520e35772b2Smrg # Do not use the global_symbol_pipe unless it works. 3521e35772b2Smrg if test "$pipe_works" = yes; then 3522e35772b2Smrg break 3523e35772b2Smrg else 3524e35772b2Smrg lt_cv_sys_global_symbol_pipe= 3525e35772b2Smrg fi 3526e35772b2Smrgdone 3527e35772b2Smrg]) 3528e35772b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3529e35772b2Smrg lt_cv_sys_global_symbol_to_cdecl= 3530e35772b2Smrgfi 3531e35772b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3532e35772b2Smrg AC_MSG_RESULT(failed) 353372b676d7Smrgelse 3534e35772b2Smrg AC_MSG_RESULT(ok) 353572b676d7Smrgfi 353672b676d7Smrg 3537e35772b2Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3538e35772b2Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 3539e35772b2Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3540e35772b2Smrg [Transform the output of nm in a proper C declaration]) 3541e35772b2Smrg_LT_DECL([global_symbol_to_c_name_address], 3542e35772b2Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3543e35772b2Smrg [Transform the output of nm in a C name address pair]) 3544e35772b2Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3545e35772b2Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3546e35772b2Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3547e35772b2Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 354872b676d7Smrg 354972b676d7Smrg 3550e35772b2Smrg# _LT_COMPILER_PIC([TAGNAME]) 3551e35772b2Smrg# --------------------------- 3552e35772b2Smrgm4_defun([_LT_COMPILER_PIC], 3553e35772b2Smrg[m4_require([_LT_TAG_COMPILER])dnl 3554e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3555e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3556e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 355772b676d7Smrg 3558e35772b2SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 3559e35772b2Smrgm4_if([$1], [CXX], [ 3560e35772b2Smrg # C++ specific cases for pic, static, wl, etc. 3561e35772b2Smrg if test "$GXX" = yes; then 3562e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3563e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 356472b676d7Smrg 3565e35772b2Smrg case $host_os in 3566e35772b2Smrg aix*) 3567e35772b2Smrg # All AIX code is PIC. 356872b676d7Smrg if test "$host_cpu" = ia64; then 3569e35772b2Smrg # AIX 5 now supports IA64 processor 3570e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 357172b676d7Smrg fi 357272b676d7Smrg ;; 357372b676d7Smrg 3574e35772b2Smrg amigaos*) 357572b676d7Smrg case $host_cpu in 3576e35772b2Smrg powerpc) 3577e35772b2Smrg # see comment about AmigaOS4 .so support 3578e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3579e35772b2Smrg ;; 3580e35772b2Smrg m68k) 3581e35772b2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3582e35772b2Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3583e35772b2Smrg # like `-m68040'. 3584e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 358572b676d7Smrg ;; 358672b676d7Smrg esac 358772b676d7Smrg ;; 358872b676d7Smrg 3589e35772b2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3590e35772b2Smrg # PIC is the default for these OSes. 3591e35772b2Smrg ;; 3592e35772b2Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3593e35772b2Smrg # This hack is so that the source file can tell whether it is being 3594e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 3595e35772b2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3596e35772b2Smrg # (--disable-auto-import) libraries 3597e35772b2Smrg m4_if([$1], [GCJ], [], 3598e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3599e35772b2Smrg ;; 3600e35772b2Smrg darwin* | rhapsody*) 3601e35772b2Smrg # PIC is the default on this platform 3602e35772b2Smrg # Common symbols not allowed in MH_DYLIB files 3603e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3604e35772b2Smrg ;; 3605e35772b2Smrg *djgpp*) 3606e35772b2Smrg # DJGPP does not support shared libraries at all 3607e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3608e35772b2Smrg ;; 3609e35772b2Smrg interix[[3-9]]*) 3610e35772b2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3611e35772b2Smrg # Instead, we relocate shared libraries at runtime. 3612e35772b2Smrg ;; 3613e35772b2Smrg sysv4*MP*) 3614e35772b2Smrg if test -d /usr/nec; then 3615e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3616e35772b2Smrg fi 3617e35772b2Smrg ;; 3618e35772b2Smrg hpux*) 3619e35772b2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3620e35772b2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3621e35772b2Smrg # sets the default TLS model and affects inlining. 3622e35772b2Smrg case $host_cpu in 3623e35772b2Smrg hppa*64*) 362472b676d7Smrg ;; 362572b676d7Smrg *) 3626e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 362772b676d7Smrg ;; 3628e35772b2Smrg esac 3629e35772b2Smrg ;; 3630e35772b2Smrg *qnx* | *nto*) 3631e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3632e35772b2Smrg # it will coredump. 3633e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3634e35772b2Smrg ;; 3635e35772b2Smrg *) 3636e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3637e35772b2Smrg ;; 363872b676d7Smrg esac 3639e35772b2Smrg else 3640e35772b2Smrg case $host_os in 3641e35772b2Smrg aix[[4-9]]*) 3642e35772b2Smrg # All AIX code is PIC. 3643e35772b2Smrg if test "$host_cpu" = ia64; then 3644e35772b2Smrg # AIX 5 now supports IA64 processor 3645e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3646e35772b2Smrg else 3647e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 364872b676d7Smrg fi 364972b676d7Smrg ;; 3650e35772b2Smrg chorus*) 3651e35772b2Smrg case $cc_basename in 3652e35772b2Smrg cxch68*) 3653e35772b2Smrg # Green Hills C++ Compiler 3654e35772b2Smrg # _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" 365572b676d7Smrg ;; 365672b676d7Smrg esac 365772b676d7Smrg ;; 3658e35772b2Smrg dgux*) 3659e35772b2Smrg case $cc_basename in 3660e35772b2Smrg ec++*) 3661e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3662e35772b2Smrg ;; 3663e35772b2Smrg ghcx*) 3664e35772b2Smrg # Green Hills C++ Compiler 3665e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3666e35772b2Smrg ;; 3667e35772b2Smrg *) 3668e35772b2Smrg ;; 36691fd23544Smrg esac 36701fd23544Smrg ;; 3671e35772b2Smrg freebsd* | dragonfly*) 3672e35772b2Smrg # FreeBSD uses GNU C++ 367372b676d7Smrg ;; 3674e35772b2Smrg hpux9* | hpux10* | hpux11*) 3675e35772b2Smrg case $cc_basename in 3676e35772b2Smrg CC*) 3677e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3678e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3679e35772b2Smrg if test "$host_cpu" != ia64; then 3680e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3681e35772b2Smrg fi 3682e35772b2Smrg ;; 3683e35772b2Smrg aCC*) 3684e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3685e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3686e35772b2Smrg case $host_cpu in 3687e35772b2Smrg hppa*64*|ia64*) 3688e35772b2Smrg # +Z the default 3689e35772b2Smrg ;; 3690e35772b2Smrg *) 3691e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3692e35772b2Smrg ;; 3693e35772b2Smrg esac 3694e35772b2Smrg ;; 3695e35772b2Smrg *) 3696e35772b2Smrg ;; 3697e35772b2Smrg esac 369872b676d7Smrg ;; 3699e35772b2Smrg interix*) 3700e35772b2Smrg # This is c89, which is MS Visual C++ (no shared libs) 3701e35772b2Smrg # Anyone wants to do a port? 370272b676d7Smrg ;; 3703e35772b2Smrg irix5* | irix6* | nonstopux*) 3704e35772b2Smrg case $cc_basename in 3705e35772b2Smrg CC*) 3706e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3707e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3708e35772b2Smrg # CC pic flag -KPIC is the default. 3709e35772b2Smrg ;; 3710e35772b2Smrg *) 3711e35772b2Smrg ;; 3712e35772b2Smrg esac 371372b676d7Smrg ;; 3714e35772b2Smrg linux* | k*bsd*-gnu) 3715e35772b2Smrg case $cc_basename in 3716e35772b2Smrg KCC*) 3717e35772b2Smrg # KAI C++ Compiler 3718e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3719e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3720e35772b2Smrg ;; 3721e35772b2Smrg ecpc* ) 3722e35772b2Smrg # old Intel C++ for x86_64 which still supported -KPIC. 3723e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3724e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3725e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3726e35772b2Smrg ;; 3727e35772b2Smrg icpc* ) 3728e35772b2Smrg # Intel C++, used to be incompatible with GCC. 3729e35772b2Smrg # ICC 10 doesn't accept -KPIC any more. 3730e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3731e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3732e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3733e35772b2Smrg ;; 3734e35772b2Smrg pgCC* | pgcpp*) 3735e35772b2Smrg # Portland Group C++ compiler 3736e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3737e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 3738e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3739e35772b2Smrg ;; 3740e35772b2Smrg cxx*) 3741e35772b2Smrg # Compaq C++ 3742e35772b2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 3743e35772b2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 3744e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3745e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3746e35772b2Smrg ;; 3747e35772b2Smrg xlc* | xlC*) 3748e35772b2Smrg # IBM XL 8.0 on PPC 3749e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3750e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 3751e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 3752e35772b2Smrg ;; 3753e35772b2Smrg *) 3754e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 3755e35772b2Smrg *Sun\ C*) 3756e35772b2Smrg # Sun C++ 5.9 3757e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3758e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3759e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3760e35772b2Smrg ;; 3761e35772b2Smrg esac 3762e35772b2Smrg ;; 3763e35772b2Smrg esac 376472b676d7Smrg ;; 3765e35772b2Smrg lynxos*) 376672b676d7Smrg ;; 3767e35772b2Smrg m88k*) 376872b676d7Smrg ;; 3769e35772b2Smrg mvs*) 3770e35772b2Smrg case $cc_basename in 3771e35772b2Smrg cxx*) 3772e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 3773e35772b2Smrg ;; 3774e35772b2Smrg *) 3775e35772b2Smrg ;; 3776e35772b2Smrg esac 377772b676d7Smrg ;; 3778e35772b2Smrg netbsd*) 377972b676d7Smrg ;; 3780e35772b2Smrg *qnx* | *nto*) 3781e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3782e35772b2Smrg # it will coredump. 3783e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3784e35772b2Smrg ;; 3785e35772b2Smrg osf3* | osf4* | osf5*) 3786e35772b2Smrg case $cc_basename in 3787e35772b2Smrg KCC*) 3788e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3789e35772b2Smrg ;; 3790e35772b2Smrg RCC*) 3791e35772b2Smrg # Rational C++ 2.4.1 3792e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3793e35772b2Smrg ;; 3794e35772b2Smrg cxx*) 3795e35772b2Smrg # Digital/Compaq C++ 3796e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3797e35772b2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 3798e35772b2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 3799e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3800e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3801e35772b2Smrg ;; 3802e35772b2Smrg *) 3803e35772b2Smrg ;; 3804e35772b2Smrg esac 380572b676d7Smrg ;; 3806e35772b2Smrg psos*) 380772b676d7Smrg ;; 3808e35772b2Smrg solaris*) 3809e35772b2Smrg case $cc_basename in 3810e35772b2Smrg CC*) 3811e35772b2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 3812e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3813e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3814e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3815e35772b2Smrg ;; 3816e35772b2Smrg gcx*) 3817e35772b2Smrg # Green Hills C++ Compiler 3818e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 3819e35772b2Smrg ;; 3820e35772b2Smrg *) 3821e35772b2Smrg ;; 3822e35772b2Smrg esac 382372b676d7Smrg ;; 3824e35772b2Smrg sunos4*) 3825e35772b2Smrg case $cc_basename in 3826e35772b2Smrg CC*) 3827e35772b2Smrg # Sun C++ 4.x 3828e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3829e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3830e35772b2Smrg ;; 3831e35772b2Smrg lcc*) 3832e35772b2Smrg # Lucid 3833e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3834e35772b2Smrg ;; 383572b676d7Smrg *) 383672b676d7Smrg ;; 383772b676d7Smrg esac 383872b676d7Smrg ;; 3839e35772b2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 3840e35772b2Smrg case $cc_basename in 3841e35772b2Smrg CC*) 3842e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3843e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3844e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3845e35772b2Smrg ;; 3846e35772b2Smrg esac 384772b676d7Smrg ;; 3848e35772b2Smrg tandem*) 3849e35772b2Smrg case $cc_basename in 3850e35772b2Smrg NCC*) 3851e35772b2Smrg # NonStop-UX NCC 3.20 3852e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3853e35772b2Smrg ;; 38541fd23544Smrg *) 38551fd23544Smrg ;; 3856e35772b2Smrg esac 385772b676d7Smrg ;; 3858e35772b2Smrg vxworks*) 385972b676d7Smrg ;; 386072b676d7Smrg *) 3861e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 386272b676d7Smrg ;; 386372b676d7Smrg esac 3864e35772b2Smrg fi 3865e35772b2Smrg], 3866e35772b2Smrg[ 3867e35772b2Smrg if test "$GCC" = yes; then 3868e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3869e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3870e35772b2Smrg 3871e35772b2Smrg case $host_os in 3872e35772b2Smrg aix*) 3873e35772b2Smrg # All AIX code is PIC. 3874e35772b2Smrg if test "$host_cpu" = ia64; then 3875e35772b2Smrg # AIX 5 now supports IA64 processor 3876e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3877e35772b2Smrg fi 3878e35772b2Smrg ;; 3879e35772b2Smrg 3880e35772b2Smrg amigaos*) 3881e35772b2Smrg case $host_cpu in 3882e35772b2Smrg powerpc) 3883e35772b2Smrg # see comment about AmigaOS4 .so support 3884e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3885e35772b2Smrg ;; 3886e35772b2Smrg m68k) 3887e35772b2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3888e35772b2Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3889e35772b2Smrg # like `-m68040'. 3890e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3891e35772b2Smrg ;; 3892e35772b2Smrg esac 3893e35772b2Smrg ;; 3894e35772b2Smrg 3895e35772b2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3896e35772b2Smrg # PIC is the default for these OSes. 3897e35772b2Smrg ;; 3898e35772b2Smrg 3899e35772b2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3900e35772b2Smrg # This hack is so that the source file can tell whether it is being 3901e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 3902e35772b2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3903e35772b2Smrg # (--disable-auto-import) libraries 3904e35772b2Smrg m4_if([$1], [GCJ], [], 3905e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3906e35772b2Smrg ;; 3907e35772b2Smrg 3908e35772b2Smrg darwin* | rhapsody*) 3909e35772b2Smrg # PIC is the default on this platform 3910e35772b2Smrg # Common symbols not allowed in MH_DYLIB files 3911e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3912e35772b2Smrg ;; 3913e35772b2Smrg 3914e35772b2Smrg hpux*) 3915e35772b2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3916e35772b2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3917e35772b2Smrg # sets the default TLS model and affects inlining. 3918e35772b2Smrg case $host_cpu in 3919e35772b2Smrg hppa*64*) 3920e35772b2Smrg # +Z the default 392172b676d7Smrg ;; 392272b676d7Smrg *) 3923e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 392472b676d7Smrg ;; 3925e35772b2Smrg esac 3926e35772b2Smrg ;; 3927e35772b2Smrg 3928e35772b2Smrg interix[[3-9]]*) 3929e35772b2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3930e35772b2Smrg # Instead, we relocate shared libraries at runtime. 3931e35772b2Smrg ;; 3932e35772b2Smrg 3933e35772b2Smrg msdosdjgpp*) 3934e35772b2Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 3935e35772b2Smrg # on systems that don't support them. 3936e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3937e35772b2Smrg enable_shared=no 3938e35772b2Smrg ;; 3939e35772b2Smrg 3940e35772b2Smrg *nto* | *qnx*) 3941e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3942e35772b2Smrg # it will coredump. 3943e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3944e35772b2Smrg ;; 3945e35772b2Smrg 3946e35772b2Smrg sysv4*MP*) 3947e35772b2Smrg if test -d /usr/nec; then 3948e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3949e35772b2Smrg fi 3950e35772b2Smrg ;; 3951e35772b2Smrg 3952e35772b2Smrg *) 3953e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3954e35772b2Smrg ;; 395572b676d7Smrg esac 3956e35772b2Smrg else 3957e35772b2Smrg # PORTME Check for flag to pass linker flags through the system compiler. 3958e35772b2Smrg case $host_os in 3959e35772b2Smrg aix*) 3960e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3961e35772b2Smrg if test "$host_cpu" = ia64; then 3962e35772b2Smrg # AIX 5 now supports IA64 processor 3963e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3964e35772b2Smrg else 3965e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3966e35772b2Smrg fi 3967e35772b2Smrg ;; 3968e35772b2Smrg 3969e35772b2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3970e35772b2Smrg # This hack is so that the source file can tell whether it is being 3971e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 3972e35772b2Smrg m4_if([$1], [GCJ], [], 3973e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3974e35772b2Smrg ;; 3975e35772b2Smrg 3976e35772b2Smrg hpux9* | hpux10* | hpux11*) 3977e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3978e35772b2Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 3979e35772b2Smrg # not for PA HP-UX. 3980e35772b2Smrg case $host_cpu in 3981e35772b2Smrg hppa*64*|ia64*) 3982e35772b2Smrg # +Z the default 398372b676d7Smrg ;; 398472b676d7Smrg *) 3985e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 398672b676d7Smrg ;; 3987e35772b2Smrg esac 3988e35772b2Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 3989e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3990e35772b2Smrg ;; 399172b676d7Smrg 3992e35772b2Smrg irix5* | irix6* | nonstopux*) 3993e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3994e35772b2Smrg # PIC (with -KPIC) is the default. 3995e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3996e35772b2Smrg ;; 399772b676d7Smrg 3998e35772b2Smrg linux* | k*bsd*-gnu) 3999e35772b2Smrg case $cc_basename in 4000e35772b2Smrg # old Intel for x86_64 which still supported -KPIC. 4001e35772b2Smrg ecc*) 4002e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4003e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4004e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4005e35772b2Smrg ;; 4006e35772b2Smrg # icc used to be incompatible with GCC. 4007e35772b2Smrg # ICC 10 doesn't accept -KPIC any more. 4008e35772b2Smrg icc* | ifort*) 4009e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4010e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4011e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4012e35772b2Smrg ;; 4013e35772b2Smrg # Lahey Fortran 8.1. 4014e35772b2Smrg lf95*) 4015e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4016e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4017e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4018e35772b2Smrg ;; 4019e35772b2Smrg pgcc* | pgf77* | pgf90* | pgf95*) 4020e35772b2Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4021e35772b2Smrg # which looks to be a dead project) 4022e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4023e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4024e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4025e35772b2Smrg ;; 4026e35772b2Smrg ccc*) 4027e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4028e35772b2Smrg # All Alpha code is PIC. 4029e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4030e35772b2Smrg ;; 4031e35772b2Smrg xl*) 4032e35772b2Smrg # IBM XL C 8.0/Fortran 10.1 on PPC 4033e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4034e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4035e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4036e35772b2Smrg ;; 4037e35772b2Smrg *) 4038e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 4039e35772b2Smrg *Sun\ C*) 4040e35772b2Smrg # Sun C 5.9 4041e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4042e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4043e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4044e35772b2Smrg ;; 4045e35772b2Smrg *Sun\ F*) 4046e35772b2Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4047e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4048e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4049e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4050e35772b2Smrg ;; 4051e35772b2Smrg esac 4052e35772b2Smrg ;; 4053e35772b2Smrg esac 4054e35772b2Smrg ;; 405572b676d7Smrg 4056e35772b2Smrg newsos6) 4057e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4058e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4059e35772b2Smrg ;; 406072b676d7Smrg 4061e35772b2Smrg *nto* | *qnx*) 4062e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4063e35772b2Smrg # it will coredump. 4064e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4065e35772b2Smrg ;; 406672b676d7Smrg 4067e35772b2Smrg osf3* | osf4* | osf5*) 4068e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4069e35772b2Smrg # All OSF/1 code is PIC. 4070e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4071e35772b2Smrg ;; 407272b676d7Smrg 4073e35772b2Smrg rdos*) 4074e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4075e35772b2Smrg ;; 407672b676d7Smrg 4077e35772b2Smrg solaris*) 4078e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4079e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4080e35772b2Smrg case $cc_basename in 4081e35772b2Smrg f77* | f90* | f95*) 4082e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4083e35772b2Smrg *) 4084e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4085e35772b2Smrg esac 4086e35772b2Smrg ;; 408772b676d7Smrg 4088e35772b2Smrg sunos4*) 4089e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4090e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4091e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4092e35772b2Smrg ;; 409372b676d7Smrg 4094e35772b2Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4095e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4096e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4097e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4098e35772b2Smrg ;; 409972b676d7Smrg 4100e35772b2Smrg sysv4*MP*) 4101e35772b2Smrg if test -d /usr/nec ;then 4102e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4103e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4104e35772b2Smrg fi 4105e35772b2Smrg ;; 410672b676d7Smrg 4107e35772b2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4108e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4109e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4110e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4111e35772b2Smrg ;; 411272b676d7Smrg 4113e35772b2Smrg unicos*) 4114e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4115e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4116e35772b2Smrg ;; 411772b676d7Smrg 4118e35772b2Smrg uts4*) 4119e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4120e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4121e35772b2Smrg ;; 412272b676d7Smrg 4123e35772b2Smrg *) 4124e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4125e35772b2Smrg ;; 4126e35772b2Smrg esac 4127e35772b2Smrg fi 4128e35772b2Smrg]) 4129e35772b2Smrgcase $host_os in 4130e35772b2Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4131e35772b2Smrg *djgpp*) 4132e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4133e35772b2Smrg ;; 4134e35772b2Smrg *) 4135e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4136e35772b2Smrg ;; 4137e35772b2Smrgesac 4138e35772b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4139e35772b2Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4140e35772b2Smrg [How to pass a linker flag through the compiler]) 414172b676d7Smrg 4142e35772b2Smrg# 4143e35772b2Smrg# Check to make sure the PIC flag actually works. 4144e35772b2Smrg# 4145e35772b2Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4146e35772b2Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4147e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4148e35772b2Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4149e35772b2Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4150e35772b2Smrg "" | " "*) ;; 4151e35772b2Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4152e35772b2Smrg esac], 4153e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4154e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 41551fd23544Smrgfi 4156e35772b2Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4157e35772b2Smrg [Additional compiler flags for building library objects]) 41581fd23544Smrg 4159e35772b2Smrg# 4160e35772b2Smrg# Check to make sure the static flag actually works. 4161e35772b2Smrg# 4162e35772b2Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4163e35772b2Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4164e35772b2Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4165e35772b2Smrg $lt_tmp_static_flag, 4166e35772b2Smrg [], 4167e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4168e35772b2Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4169e35772b2Smrg [Compiler flag to prevent dynamic linking]) 4170e35772b2Smrg])# _LT_COMPILER_PIC 417172b676d7Smrg 4172e35772b2Smrg 4173e35772b2Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4174e35772b2Smrg# ---------------------------- 4175e35772b2Smrg# See if the linker supports building shared libraries. 4176e35772b2Smrgm4_defun([_LT_LINKER_SHLIBS], 4177e35772b2Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4178e35772b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 4179e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4180e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 4181e35772b2Smrgm4_require([_LT_DECL_SED])dnl 4182e35772b2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4183e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 4184e35772b2SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4185e35772b2Smrgm4_if([$1], [CXX], [ 4186e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4187e35772b2Smrg case $host_os in 4188e35772b2Smrg aix[[4-9]]*) 4189e35772b2Smrg # If we're using GNU nm, then we don't want the "-C" option. 4190e35772b2Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4191e35772b2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4192e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4193e35772b2Smrg else 4194e35772b2Smrg _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' 41951fd23544Smrg fi 41961fd23544Smrg ;; 4197e35772b2Smrg pw32*) 4198e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 41991fd23544Smrg ;; 4200e35772b2Smrg cygwin* | mingw* | cegcc*) 4201e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4202e35772b2Smrg ;; 4203e35772b2Smrg *) 4204e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4205e35772b2Smrg ;; 4206e35772b2Smrg esac 4207e35772b2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4208e35772b2Smrg], [ 4209e35772b2Smrg runpath_var= 4210e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4211e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4212e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)= 4213e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4214e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4215e35772b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4216e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4217e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4218e35772b2Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4219e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4220e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4221e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4222e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4223e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4224e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4225e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4226e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4227e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4228e35772b2Smrg _LT_TAGVAR(module_cmds, $1)= 4229e35772b2Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4230e35772b2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4231e35772b2Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4232e35772b2Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4233e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4234e35772b2Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4235e35772b2Smrg # included in the symbol list 4236e35772b2Smrg _LT_TAGVAR(include_expsyms, $1)= 4237e35772b2Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4238e35772b2Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4239e35772b2Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4240e35772b2Smrg # as well as any symbol that contains `d'. 4241e35772b2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4242e35772b2Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4243e35772b2Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4244e35772b2Smrg # the symbol is explicitly referenced. Since portable code cannot 4245e35772b2Smrg # rely on this symbol name, it's probably fine to never include it in 4246e35772b2Smrg # preloaded symbol tables. 4247e35772b2Smrg # Exclude shared library initialization/finalization symbols. 4248e35772b2Smrgdnl Note also adjust exclude_expsyms for C++ above. 4249e35772b2Smrg extract_expsyms_cmds= 42501fd23544Smrg 4251e35772b2Smrg case $host_os in 4252e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 4253e35772b2Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4254e35772b2Smrg # When not using gcc, we currently assume that we are using 4255e35772b2Smrg # Microsoft Visual C++. 4256e35772b2Smrg if test "$GCC" != yes; then 4257e35772b2Smrg with_gnu_ld=no 42581fd23544Smrg fi 425972b676d7Smrg ;; 4260e35772b2Smrg interix*) 4261e35772b2Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4262e35772b2Smrg with_gnu_ld=yes 4263e35772b2Smrg ;; 4264e35772b2Smrg openbsd*) 4265e35772b2Smrg with_gnu_ld=no 4266e35772b2Smrg ;; 426772b676d7Smrg esac 426872b676d7Smrg 4269e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4270e35772b2Smrg if test "$with_gnu_ld" = yes; then 4271e35772b2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4272e35772b2Smrg wlarc='${wl}' 427372b676d7Smrg 4274e35772b2Smrg # Set some defaults for GNU ld with shared library support. These 4275e35772b2Smrg # are reset later if shared libraries are not supported. Putting them 4276e35772b2Smrg # here allows them to be overridden if necessary. 4277e35772b2Smrg runpath_var=LD_RUN_PATH 4278e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4279e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4280e35772b2Smrg # ancient GNU ld didn't support --whole-archive et. al. 4281e35772b2Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4282e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4283e35772b2Smrg else 4284e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4285e35772b2Smrg fi 4286e35772b2Smrg supports_anon_versioning=no 4287e35772b2Smrg case `$LD -v 2>&1` in 4288e35772b2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4289e35772b2Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4290e35772b2Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4291e35772b2Smrg *\ 2.11.*) ;; # other 2.11 versions 4292e35772b2Smrg *) supports_anon_versioning=yes ;; 4293e35772b2Smrg esac 429472b676d7Smrg 4295e35772b2Smrg # See if GNU ld supports shared libraries. 4296e35772b2Smrg case $host_os in 4297e35772b2Smrg aix[[3-9]]*) 4298e35772b2Smrg # On AIX/PPC, the GNU linker is very broken 4299e35772b2Smrg if test "$host_cpu" != ia64; then 4300e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4301e35772b2Smrg cat <<_LT_EOF 1>&2 430272b676d7Smrg 4303e35772b2Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 4304e35772b2Smrg*** to be unable to reliably create shared libraries on AIX. 4305e35772b2Smrg*** Therefore, libtool is disabling shared libraries support. If you 4306e35772b2Smrg*** really care for shared libraries, you may want to modify your PATH 4307e35772b2Smrg*** so that a non-GNU linker is found, and then restart. 430872b676d7Smrg 4309e35772b2Smrg_LT_EOF 4310e35772b2Smrg fi 4311e35772b2Smrg ;; 431272b676d7Smrg 4313e35772b2Smrg amigaos*) 4314e35772b2Smrg case $host_cpu in 4315e35772b2Smrg powerpc) 4316e35772b2Smrg # see comment about AmigaOS4 .so support 4317e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4318e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4319e35772b2Smrg ;; 4320e35772b2Smrg m68k) 4321e35772b2Smrg _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)' 4322e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4323e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4324e35772b2Smrg ;; 4325e35772b2Smrg esac 4326e35772b2Smrg ;; 432772b676d7Smrg 4328e35772b2Smrg beos*) 4329e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4330e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4331e35772b2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4332e35772b2Smrg # support --undefined. This deserves some investigation. FIXME 4333e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4334e35772b2Smrg else 4335e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4336e35772b2Smrg fi 4337e35772b2Smrg ;; 433872b676d7Smrg 4339e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 4340e35772b2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4341e35772b2Smrg # as there is no search path for DLLs. 4342e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4343e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4344e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4345e35772b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4346e35772b2Smrg _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' 4347e35772b2Smrg 4348e35772b2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4349e35772b2Smrg _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' 4350e35772b2Smrg # If the export-symbols file already is a .def file (1st line 4351e35772b2Smrg # is EXPORTS), use it as is; otherwise, prepend... 4352e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4353e35772b2Smrg cp $export_symbols $output_objdir/$soname.def; 4354e35772b2Smrg else 4355e35772b2Smrg echo EXPORTS > $output_objdir/$soname.def; 4356e35772b2Smrg cat $export_symbols >> $output_objdir/$soname.def; 4357e35772b2Smrg fi~ 4358e35772b2Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4359e35772b2Smrg else 4360e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4361e35772b2Smrg fi 4362e35772b2Smrg ;; 436372b676d7Smrg 4364e35772b2Smrg interix[[3-9]]*) 4365e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4366e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4367e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4368e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4369e35772b2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4370e35772b2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4371e35772b2Smrg # default) and relocated if they conflict, which is a slow very memory 4372e35772b2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 4373e35772b2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4374e35772b2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4375e35772b2Smrg _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' 4376e35772b2Smrg _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' 4377e35772b2Smrg ;; 437872b676d7Smrg 4379e35772b2Smrg gnu* | linux* | tpf* | k*bsd*-gnu) 4380e35772b2Smrg tmp_diet=no 4381e35772b2Smrg if test "$host_os" = linux-dietlibc; then 4382e35772b2Smrg case $cc_basename in 4383e35772b2Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4384e35772b2Smrg esac 4385e35772b2Smrg fi 4386e35772b2Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4387e35772b2Smrg && test "$tmp_diet" = no 4388e35772b2Smrg then 4389e35772b2Smrg tmp_addflag= 4390e35772b2Smrg tmp_sharedflag='-shared' 4391e35772b2Smrg case $cc_basename,$host_cpu in 4392e35772b2Smrg pgcc*) # Portland Group C compiler 4393e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 4394e35772b2Smrg tmp_addflag=' $pic_flag' 4395e35772b2Smrg ;; 4396e35772b2Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 4397e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 4398e35772b2Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 4399e35772b2Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4400e35772b2Smrg tmp_addflag=' -i_dynamic' ;; 4401e35772b2Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4402e35772b2Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4403e35772b2Smrg ifc* | ifort*) # Intel Fortran compiler 4404e35772b2Smrg tmp_addflag=' -nofor_main' ;; 4405e35772b2Smrg lf95*) # Lahey Fortran 8.1 4406e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4407e35772b2Smrg tmp_sharedflag='--shared' ;; 4408e35772b2Smrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4409e35772b2Smrg tmp_sharedflag='-qmkshrobj' 4410e35772b2Smrg tmp_addflag= ;; 4411e35772b2Smrg esac 4412e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 4413e35772b2Smrg *Sun\ C*) # Sun C 5.9 4414e35772b2Smrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 4415e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4416e35772b2Smrg tmp_sharedflag='-G' ;; 4417e35772b2Smrg *Sun\ F*) # Sun Fortran 8.3 4418e35772b2Smrg tmp_sharedflag='-G' ;; 4419e35772b2Smrg esac 4420e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 442172b676d7Smrg 4422e35772b2Smrg if test "x$supports_anon_versioning" = xyes; then 4423e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4424e35772b2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4425e35772b2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4426e35772b2Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4427e35772b2Smrg fi 442872b676d7Smrg 4429e35772b2Smrg case $cc_basename in 4430e35772b2Smrg xlf*) 4431e35772b2Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4432e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4433e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4434e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4435e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 4436e35772b2Smrg if test "x$supports_anon_versioning" = xyes; then 4437e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4438e35772b2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4439e35772b2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4440e35772b2Smrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4441e35772b2Smrg fi 4442e35772b2Smrg ;; 4443e35772b2Smrg esac 4444e35772b2Smrg else 4445e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4446e35772b2Smrg fi 4447e35772b2Smrg ;; 444872b676d7Smrg 4449e35772b2Smrg netbsd*) 4450e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4451e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4452e35772b2Smrg wlarc= 4453e35772b2Smrg else 4454e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4455e35772b2Smrg _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' 4456e35772b2Smrg fi 4457e35772b2Smrg ;; 445872b676d7Smrg 4459e35772b2Smrg solaris*) 4460e35772b2Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4461e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4462e35772b2Smrg cat <<_LT_EOF 1>&2 446372b676d7Smrg 4464e35772b2Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4465e35772b2Smrg*** create shared libraries on Solaris systems. Therefore, libtool 4466e35772b2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4467e35772b2Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 4468e35772b2Smrg*** your PATH or compiler configuration so that the native linker is 4469e35772b2Smrg*** used, and then restart. 447072b676d7Smrg 4471e35772b2Smrg_LT_EOF 4472e35772b2Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4473e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4474e35772b2Smrg _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' 4475e35772b2Smrg else 4476e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4477e35772b2Smrg fi 4478e35772b2Smrg ;; 447972b676d7Smrg 4480e35772b2Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4481e35772b2Smrg case `$LD -v 2>&1` in 4482e35772b2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4483e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4484e35772b2Smrg cat <<_LT_EOF 1>&2 448572b676d7Smrg 4486e35772b2Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4487e35772b2Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4488e35772b2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4489e35772b2Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4490e35772b2Smrg*** your PATH or compiler configuration so that the native linker is 4491e35772b2Smrg*** used, and then restart. 449272b676d7Smrg 4493e35772b2Smrg_LT_EOF 4494e35772b2Smrg ;; 4495e35772b2Smrg *) 4496e35772b2Smrg # For security reasons, it is highly recommended that you always 4497e35772b2Smrg # use absolute paths for naming shared libraries, and exclude the 4498e35772b2Smrg # DT_RUNPATH tag from executables and libraries. But doing so 4499e35772b2Smrg # requires that you compile everything twice, which is a pain. 4500e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4501e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4502e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4503e35772b2Smrg _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' 4504e35772b2Smrg else 4505e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4506e35772b2Smrg fi 4507e35772b2Smrg ;; 4508e35772b2Smrg esac 4509e35772b2Smrg ;; 451072b676d7Smrg 4511e35772b2Smrg sunos4*) 4512e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4513e35772b2Smrg wlarc= 4514e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4515e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4516e35772b2Smrg ;; 451772b676d7Smrg 4518e35772b2Smrg *) 4519e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4520e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4521e35772b2Smrg _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' 4522e35772b2Smrg else 4523e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4524e35772b2Smrg fi 4525e35772b2Smrg ;; 4526e35772b2Smrg esac 452772b676d7Smrg 4528e35772b2Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4529e35772b2Smrg runpath_var= 4530e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4531e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4532e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4533e35772b2Smrg fi 4534e35772b2Smrg else 4535e35772b2Smrg # PORTME fill in a description of your system's linker (not GNU ld) 4536e35772b2Smrg case $host_os in 4537e35772b2Smrg aix3*) 4538e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4539e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4540e35772b2Smrg _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' 4541e35772b2Smrg # Note: this linker hardcodes the directories in LIBPATH if there 4542e35772b2Smrg # are no directories specified by -L. 4543e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4544e35772b2Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4545e35772b2Smrg # Neither direct hardcoding nor static linking is supported with a 4546e35772b2Smrg # broken collect2. 4547e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4548e35772b2Smrg fi 4549e35772b2Smrg ;; 455072b676d7Smrg 4551e35772b2Smrg aix[[4-9]]*) 4552e35772b2Smrg if test "$host_cpu" = ia64; then 4553e35772b2Smrg # On IA64, the linker does run time linking by default, so we don't 4554e35772b2Smrg # have to do anything special. 4555e35772b2Smrg aix_use_runtimelinking=no 4556e35772b2Smrg exp_sym_flag='-Bexport' 4557e35772b2Smrg no_entry_flag="" 4558e35772b2Smrg else 4559e35772b2Smrg # If we're using GNU nm, then we don't want the "-C" option. 4560e35772b2Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4561e35772b2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4562e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4563e35772b2Smrg else 4564e35772b2Smrg _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' 4565e35772b2Smrg fi 4566e35772b2Smrg aix_use_runtimelinking=no 456772b676d7Smrg 4568e35772b2Smrg # Test if we are trying to use run time linking or normal 4569e35772b2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4570e35772b2Smrg # need to do runtime linking. 4571e35772b2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4572e35772b2Smrg for ld_flag in $LDFLAGS; do 4573e35772b2Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4574e35772b2Smrg aix_use_runtimelinking=yes 4575e35772b2Smrg break 4576e35772b2Smrg fi 4577e35772b2Smrg done 4578e35772b2Smrg ;; 4579e35772b2Smrg esac 458072b676d7Smrg 4581e35772b2Smrg exp_sym_flag='-bexport' 4582e35772b2Smrg no_entry_flag='-bnoentry' 4583e35772b2Smrg fi 458472b676d7Smrg 4585e35772b2Smrg # When large executables or shared objects are built, AIX ld can 4586e35772b2Smrg # have problems creating the table of contents. If linking a library 4587e35772b2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 4588e35772b2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4589e35772b2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 459072b676d7Smrg 4591e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='' 4592e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4593e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4594e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4595e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4596e35772b2Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 459772b676d7Smrg 4598e35772b2Smrg if test "$GCC" = yes; then 4599e35772b2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4600e35772b2Smrg # We only want to do this on AIX 4.2 and lower, the check 4601e35772b2Smrg # below for broken collect2 doesn't work under 4.3+ 4602e35772b2Smrg collect2name=`${CC} -print-prog-name=collect2` 4603e35772b2Smrg if test -f "$collect2name" && 4604e35772b2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4605e35772b2Smrg then 4606e35772b2Smrg # We have reworked collect2 4607e35772b2Smrg : 4608e35772b2Smrg else 4609e35772b2Smrg # We have old collect2 4610e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4611e35772b2Smrg # It fails to find uninstalled libraries when the uninstalled 4612e35772b2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 4613e35772b2Smrg # to unsupported forces relinking 4614e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4615e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4616e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4617e35772b2Smrg fi 4618e35772b2Smrg ;; 4619e35772b2Smrg esac 4620e35772b2Smrg shared_flag='-shared' 4621e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 4622e35772b2Smrg shared_flag="$shared_flag "'${wl}-G' 4623e35772b2Smrg fi 4624e35772b2Smrg else 4625e35772b2Smrg # not using gcc 4626e35772b2Smrg if test "$host_cpu" = ia64; then 4627e35772b2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4628e35772b2Smrg # chokes on -Wl,-G. The following line is correct: 4629e35772b2Smrg shared_flag='-G' 4630e35772b2Smrg else 4631e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 4632e35772b2Smrg shared_flag='${wl}-G' 4633e35772b2Smrg else 4634e35772b2Smrg shared_flag='${wl}-bM:SRE' 4635e35772b2Smrg fi 4636e35772b2Smrg fi 4637e35772b2Smrg fi 463872b676d7Smrg 4639e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4640e35772b2Smrg # It seems that -bexpall does not export symbols beginning with 4641e35772b2Smrg # underscore (_), so it is better to generate a list of symbols to export. 4642e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4643e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 4644e35772b2Smrg # Warning - without using the other runtime loading flags (-brtl), 4645e35772b2Smrg # -berok will link without error, but may produce a broken library. 4646e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 4647e35772b2Smrg # Determine the default libpath from the value encoded in an 4648e35772b2Smrg # empty executable. 4649e35772b2Smrg _LT_SYS_MODULE_PATH_AIX 4650e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4651e35772b2Smrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 4652e35772b2Smrg else 4653e35772b2Smrg if test "$host_cpu" = ia64; then 4654e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4655e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4656e35772b2Smrg _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" 4657e35772b2Smrg else 4658e35772b2Smrg # Determine the default libpath from the value encoded in an 4659e35772b2Smrg # empty executable. 4660e35772b2Smrg _LT_SYS_MODULE_PATH_AIX 4661e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4662e35772b2Smrg # Warning - without using the other run time loading flags, 4663e35772b2Smrg # -berok will link without error, but may produce a broken library. 4664e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4665e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 4666e35772b2Smrg # Exported symbols can be pulled into shared objects from archives 4667e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 4668e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 4669e35772b2Smrg # This is similar to how AIX traditionally builds its shared libraries. 4670e35772b2Smrg _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' 4671e35772b2Smrg fi 4672e35772b2Smrg fi 4673e35772b2Smrg ;; 467472b676d7Smrg 4675e35772b2Smrg amigaos*) 4676e35772b2Smrg case $host_cpu in 4677e35772b2Smrg powerpc) 4678e35772b2Smrg # see comment about AmigaOS4 .so support 4679e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4680e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4681e35772b2Smrg ;; 4682e35772b2Smrg m68k) 4683e35772b2Smrg _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)' 4684e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4685e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4686e35772b2Smrg ;; 4687e35772b2Smrg esac 4688e35772b2Smrg ;; 468972b676d7Smrg 4690e35772b2Smrg bsdi[[45]]*) 4691e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 4692e35772b2Smrg ;; 469372b676d7Smrg 4694e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 4695e35772b2Smrg # When not using gcc, we currently assume that we are using 4696e35772b2Smrg # Microsoft Visual C++. 4697e35772b2Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 4698e35772b2Smrg # no search path for DLLs. 4699e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 4700e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4701e35772b2Smrg # Tell ltmain to make .lib files, not .a files. 4702e35772b2Smrg libext=lib 4703e35772b2Smrg # Tell ltmain to make .dll files, not .so files. 4704e35772b2Smrg shrext_cmds=".dll" 4705e35772b2Smrg # FIXME: Setting linknames here is a bad hack. 4706e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 4707e35772b2Smrg # The linker will automatically build a .lib file if we build a DLL. 4708e35772b2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 4709e35772b2Smrg # FIXME: Should let the user specify the lib program. 4710e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 4711e35772b2Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 4712e35772b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4713e35772b2Smrg ;; 471472b676d7Smrg 4715e35772b2Smrg darwin* | rhapsody*) 4716e35772b2Smrg _LT_DARWIN_LINKER_FEATURES($1) 4717e35772b2Smrg ;; 471872b676d7Smrg 4719e35772b2Smrg dgux*) 4720e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4721e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4722e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4723e35772b2Smrg ;; 472472b676d7Smrg 4725e35772b2Smrg freebsd1*) 4726e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4727e35772b2Smrg ;; 472872b676d7Smrg 4729e35772b2Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 4730e35772b2Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 4731e35772b2Smrg # does not break anything, and helps significantly (at the cost of a little 4732e35772b2Smrg # extra space). 4733e35772b2Smrg freebsd2.2*) 4734e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 4735e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4736e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4737e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4738e35772b2Smrg ;; 473972b676d7Smrg 4740e35772b2Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 4741e35772b2Smrg freebsd2*) 4742e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4743e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4744e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4745e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4746e35772b2Smrg ;; 474772b676d7Smrg 4748e35772b2Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 4749e35772b2Smrg freebsd* | dragonfly*) 4750e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 4751e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4752e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4753e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4754e35772b2Smrg ;; 475572b676d7Smrg 4756e35772b2Smrg hpux9*) 4757e35772b2Smrg if test "$GCC" = yes; then 4758e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 4759e35772b2Smrg else 4760e35772b2Smrg _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' 4761e35772b2Smrg fi 4762e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4763e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4764e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 476572b676d7Smrg 4766e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 4767e35772b2Smrg # but as the default location of the library. 4768e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4769e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4770e35772b2Smrg ;; 477172b676d7Smrg 4772e35772b2Smrg hpux10*) 4773e35772b2Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4774e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4775e35772b2Smrg else 4776e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 4777e35772b2Smrg fi 4778e35772b2Smrg if test "$with_gnu_ld" = no; then 4779e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4780e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4781e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4782e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4783e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4784e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4785e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 4786e35772b2Smrg # but as the default location of the library. 4787e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4788e35772b2Smrg fi 478972b676d7Smrg ;; 4790e35772b2Smrg 4791e35772b2Smrg hpux11*) 4792e35772b2Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4793e35772b2Smrg case $host_cpu in 4794e35772b2Smrg hppa*64*) 4795e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4796e35772b2Smrg ;; 4797e35772b2Smrg ia64*) 4798e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4799e35772b2Smrg ;; 4800e35772b2Smrg *) 4801e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4802e35772b2Smrg ;; 4803e35772b2Smrg esac 4804e35772b2Smrg else 4805e35772b2Smrg case $host_cpu in 4806e35772b2Smrg hppa*64*) 4807e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4808e35772b2Smrg ;; 4809e35772b2Smrg ia64*) 4810e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4811e35772b2Smrg ;; 4812e35772b2Smrg *) 4813e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4814e35772b2Smrg ;; 4815e35772b2Smrg esac 4816e35772b2Smrg fi 4817e35772b2Smrg if test "$with_gnu_ld" = no; then 4818e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4819e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4820e35772b2Smrg 4821e35772b2Smrg case $host_cpu in 4822e35772b2Smrg hppa*64*|ia64*) 4823e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4824e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4825e35772b2Smrg ;; 4826e35772b2Smrg *) 4827e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4828e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4829e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4830e35772b2Smrg 4831e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 4832e35772b2Smrg # but as the default location of the library. 4833e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4834e35772b2Smrg ;; 4835e35772b2Smrg esac 4836e35772b2Smrg fi 483772b676d7Smrg ;; 483872b676d7Smrg 4839e35772b2Smrg irix5* | irix6* | nonstopux*) 4840e35772b2Smrg if test "$GCC" = yes; then 4841e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4842e35772b2Smrg # Try to use the -exported_symbol ld option, if it does not 4843e35772b2Smrg # work, assume that -exports_file does not work either and 4844e35772b2Smrg # implicitly export all symbols. 4845e35772b2Smrg save_LDFLAGS="$LDFLAGS" 4846e35772b2Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 4847e35772b2Smrg AC_LINK_IFELSE(int foo(void) {}, 4848e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 4849e35772b2Smrg ) 4850e35772b2Smrg LDFLAGS="$save_LDFLAGS" 4851e35772b2Smrg else 4852e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 4853e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 4854e35772b2Smrg fi 4855e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4856e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4857e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4858e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 4859e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4860e35772b2Smrg ;; 486172b676d7Smrg 4862e35772b2Smrg netbsd*) 4863e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4864e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 4865e35772b2Smrg else 4866e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 4867e35772b2Smrg fi 4868e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4869e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4870e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4871e35772b2Smrg ;; 487272b676d7Smrg 4873e35772b2Smrg newsos6) 4874e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4875e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4876e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4877e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4878e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4879e35772b2Smrg ;; 488072b676d7Smrg 4881e35772b2Smrg *nto* | *qnx*) 4882e35772b2Smrg ;; 488372b676d7Smrg 4884e35772b2Smrg openbsd*) 4885e35772b2Smrg if test -f /usr/libexec/ld.so; then 4886e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4887e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4888e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4889e35772b2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4890e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4891e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 4892e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4893e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4894e35772b2Smrg else 4895e35772b2Smrg case $host_os in 4896e35772b2Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 4897e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4898e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4899e35772b2Smrg ;; 4900e35772b2Smrg *) 4901e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4902e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4903e35772b2Smrg ;; 4904e35772b2Smrg esac 4905e35772b2Smrg fi 4906e35772b2Smrg else 4907e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4908e35772b2Smrg fi 4909e35772b2Smrg ;; 491072b676d7Smrg 4911e35772b2Smrg os2*) 4912e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4913e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4914e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4915e35772b2Smrg _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' 4916e35772b2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 4917e35772b2Smrg ;; 491872b676d7Smrg 4919e35772b2Smrg osf3*) 4920e35772b2Smrg if test "$GCC" = yes; then 4921e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4922e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4923e35772b2Smrg else 4924e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4925e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 4926e35772b2Smrg fi 4927e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4928e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4929e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4930e35772b2Smrg ;; 493172b676d7Smrg 4932e35772b2Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 4933e35772b2Smrg if test "$GCC" = yes; then 4934e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4935e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4936e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4937e35772b2Smrg else 4938e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4939e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 4940e35772b2Smrg _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~ 4941e35772b2Smrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 494272b676d7Smrg 4943e35772b2Smrg # Both c and cxx compiler support -rpath directly 4944e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4945e35772b2Smrg fi 4946e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4947e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4948e35772b2Smrg ;; 494972b676d7Smrg 4950e35772b2Smrg solaris*) 4951e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 4952e35772b2Smrg if test "$GCC" = yes; then 4953e35772b2Smrg wlarc='${wl}' 4954e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4955e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4956e35772b2Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4957e35772b2Smrg else 4958e35772b2Smrg case `$CC -V 2>&1` in 4959e35772b2Smrg *"Compilers 5.0"*) 4960e35772b2Smrg wlarc='' 4961e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 4962e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4963e35772b2Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 4964e35772b2Smrg ;; 4965e35772b2Smrg *) 4966e35772b2Smrg wlarc='${wl}' 4967e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 4968e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4969e35772b2Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4970e35772b2Smrg ;; 4971e35772b2Smrg esac 4972e35772b2Smrg fi 4973e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4974e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4975e35772b2Smrg case $host_os in 4976e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 4977e35772b2Smrg *) 4978e35772b2Smrg # The compiler driver will combine and reorder linker options, 4979e35772b2Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 4980e35772b2Smrg # but is careful enough not to reorder. 4981e35772b2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 4982e35772b2Smrg if test "$GCC" = yes; then 4983e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 4984e35772b2Smrg else 4985e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 4986e35772b2Smrg fi 4987e35772b2Smrg ;; 4988e35772b2Smrg esac 4989e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4990e35772b2Smrg ;; 499172b676d7Smrg 4992e35772b2Smrg sunos4*) 4993e35772b2Smrg if test "x$host_vendor" = xsequent; then 4994e35772b2Smrg # Use $CC to link under sequent, because it throws in some extra .o 4995e35772b2Smrg # files that make .init and .fini sections work. 4996e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 4997e35772b2Smrg else 4998e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 4999e35772b2Smrg fi 5000e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5001e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5002e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5003e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5004e35772b2Smrg ;; 500572b676d7Smrg 5006e35772b2Smrg sysv4) 5007e35772b2Smrg case $host_vendor in 5008e35772b2Smrg sni) 5009e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5010e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5011e35772b2Smrg ;; 5012e35772b2Smrg siemens) 5013e35772b2Smrg ## LD is ld it makes a PLAMLIB 5014e35772b2Smrg ## CC just makes a GrossModule. 5015e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5016e35772b2Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5017e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5018e35772b2Smrg ;; 5019e35772b2Smrg motorola) 5020e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5021e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5022e35772b2Smrg ;; 5023e35772b2Smrg esac 5024e35772b2Smrg runpath_var='LD_RUN_PATH' 5025e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5026e35772b2Smrg ;; 502772b676d7Smrg 5028e35772b2Smrg sysv4.3*) 5029e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5030e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5031e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5032e35772b2Smrg ;; 503372b676d7Smrg 5034e35772b2Smrg sysv4*MP*) 5035e35772b2Smrg if test -d /usr/nec; then 5036e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5037e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5038e35772b2Smrg runpath_var=LD_RUN_PATH 5039e35772b2Smrg hardcode_runpath_var=yes 5040e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5041e35772b2Smrg fi 5042e35772b2Smrg ;; 504372b676d7Smrg 5044e35772b2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5045e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5046e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5047e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5048e35772b2Smrg runpath_var='LD_RUN_PATH' 504972b676d7Smrg 5050e35772b2Smrg if test "$GCC" = yes; then 5051e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5052e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5053e35772b2Smrg else 5054e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5055e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5056e35772b2Smrg fi 5057e35772b2Smrg ;; 505872b676d7Smrg 5059e35772b2Smrg sysv5* | sco3.2v5* | sco5v6*) 5060e35772b2Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5061e35772b2Smrg # link with -lc, and that would cause any symbols used from libc to 5062e35772b2Smrg # always be unresolved, which means just about no library would 5063e35772b2Smrg # ever link correctly. If we're not using GNU ld we use -z text 5064e35772b2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5065e35772b2Smrg # as -z defs. 5066e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5067e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5068e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5069e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5070e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5071e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5072e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5073e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5074e35772b2Smrg runpath_var='LD_RUN_PATH' 507572b676d7Smrg 5076e35772b2Smrg if test "$GCC" = yes; then 5077e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5078e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5079e35772b2Smrg else 5080e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5081e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5082e35772b2Smrg fi 5083e35772b2Smrg ;; 508472b676d7Smrg 5085e35772b2Smrg uts4*) 5086e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5087e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5088e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5089e35772b2Smrg ;; 509072b676d7Smrg 5091e35772b2Smrg *) 5092e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5093e35772b2Smrg ;; 5094e35772b2Smrg esac 509572b676d7Smrg 5096e35772b2Smrg if test x$host_vendor = xsni; then 5097e35772b2Smrg case $host in 5098e35772b2Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5099e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5100e35772b2Smrg ;; 5101e35772b2Smrg esac 5102e35772b2Smrg fi 5103e35772b2Smrg fi 5104e35772b2Smrg]) 5105e35772b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5106e35772b2Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 510772b676d7Smrg 5108e35772b2Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 510972b676d7Smrg 5110e35772b2Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5111e35772b2Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5112e35772b2Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 5113e35772b2Smrg [The commands to extract the exported symbol list from a shared archive]) 511472b676d7Smrg 5115e35772b2Smrg# 5116e35772b2Smrg# Do we need to explicitly link libc? 5117e35772b2Smrg# 5118e35772b2Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5119e35772b2Smrgx|xyes) 5120e35772b2Smrg # Assume -lc should be added 5121e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 512272b676d7Smrg 5123e35772b2Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5124e35772b2Smrg case $_LT_TAGVAR(archive_cmds, $1) in 5125e35772b2Smrg *'~'*) 5126e35772b2Smrg # FIXME: we may have to deal with multi-command sequences. 5127e35772b2Smrg ;; 5128e35772b2Smrg '$CC '*) 5129e35772b2Smrg # Test whether the compiler implicitly links with -lc since on some 5130e35772b2Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5131e35772b2Smrg # to ld, don't add -lc before -lgcc. 5132e35772b2Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 5133e35772b2Smrg $RM conftest* 5134e35772b2Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 513572b676d7Smrg 5136e35772b2Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5137e35772b2Smrg soname=conftest 5138e35772b2Smrg lib=conftest 5139e35772b2Smrg libobjs=conftest.$ac_objext 5140e35772b2Smrg deplibs= 5141e35772b2Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5142e35772b2Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5143e35772b2Smrg compiler_flags=-v 5144e35772b2Smrg linker_flags=-v 5145e35772b2Smrg verstring= 5146e35772b2Smrg output_objdir=. 5147e35772b2Smrg libname=conftest 5148e35772b2Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5149e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5150e35772b2Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5151e35772b2Smrg then 5152e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5153e35772b2Smrg else 5154e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5155e35772b2Smrg fi 5156e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5157e35772b2Smrg else 5158e35772b2Smrg cat conftest.err 1>&5 5159e35772b2Smrg fi 5160e35772b2Smrg $RM conftest* 5161e35772b2Smrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 5162e35772b2Smrg ;; 5163e35772b2Smrg esac 5164e35772b2Smrg fi 5165e35772b2Smrg ;; 5166e35772b2Smrgesac 516772b676d7Smrg 5168e35772b2Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5169e35772b2Smrg [Whether or not to add -lc for building shared libraries]) 5170e35772b2Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5171e35772b2Smrg [enable_shared_with_static_runtimes], [0], 5172e35772b2Smrg [Whether or not to disallow shared libs when runtime libs are static]) 5173e35772b2Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5174e35772b2Smrg [Compiler flag to allow reflexive dlopens]) 5175e35772b2Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5176e35772b2Smrg [Compiler flag to generate shared objects directly from archives]) 5177e35772b2Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 5178e35772b2Smrg [Whether the compiler copes with passing no objects directly]) 5179e35772b2Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5180e35772b2Smrg [Create an old-style archive from a shared archive]) 5181e35772b2Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5182e35772b2Smrg [Create a temporary old-style archive to link instead of a shared archive]) 5183e35772b2Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5184e35772b2Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5185e35772b2Smrg_LT_TAGDECL([], [module_cmds], [2], 5186e35772b2Smrg [Commands used to build a loadable module if different from building 5187e35772b2Smrg a shared archive.]) 5188e35772b2Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5189e35772b2Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 5190e35772b2Smrg [Whether we are building with GNU ld or not]) 5191e35772b2Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5192e35772b2Smrg [Flag that allows shared libraries with undefined symbols to be built]) 5193e35772b2Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 5194e35772b2Smrg [Flag that enforces no undefined symbols]) 5195e35772b2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5196e35772b2Smrg [Flag to hardcode $libdir into a binary during linking. 5197e35772b2Smrg This must work even if $libdir does not exist]) 5198e35772b2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5199e35772b2Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5200e35772b2Smrg during linking. This must work even if $libdir does not exist]]) 5201e35772b2Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5202e35772b2Smrg [Whether we need a single "-rpath" flag with a separated argument]) 5203e35772b2Smrg_LT_TAGDECL([], [hardcode_direct], [0], 5204e35772b2Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5205e35772b2Smrg DIR into the resulting binary]) 5206e35772b2Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5207e35772b2Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5208e35772b2Smrg DIR into the resulting binary and the resulting library dependency is 5209e35772b2Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5210e35772b2Smrg library is relocated]) 5211e35772b2Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5212e35772b2Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5213e35772b2Smrg into the resulting binary]) 5214e35772b2Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5215e35772b2Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5216e35772b2Smrg into the resulting binary]) 5217e35772b2Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 5218e35772b2Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 5219e35772b2Smrg into the library and all subsequent libraries and executables linked 5220e35772b2Smrg against it]) 5221e35772b2Smrg_LT_TAGDECL([], [inherit_rpath], [0], 5222e35772b2Smrg [Set to yes if linker adds runtime paths of dependent libraries 5223e35772b2Smrg to runtime path list]) 5224e35772b2Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 5225e35772b2Smrg [Whether libtool must link a program against all its dependency libraries]) 5226e35772b2Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 5227e35772b2Smrg [Fix the shell variable $srcfile for the compiler]) 5228e35772b2Smrg_LT_TAGDECL([], [always_export_symbols], [0], 5229e35772b2Smrg [Set to "yes" if exported symbols are required]) 5230e35772b2Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5231e35772b2Smrg [The commands to list exported symbols]) 5232e35772b2Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 5233e35772b2Smrg [Symbols that should not be listed in the preloaded symbols]) 5234e35772b2Smrg_LT_TAGDECL([], [include_expsyms], [1], 5235e35772b2Smrg [Symbols that must always be exported]) 5236e35772b2Smrg_LT_TAGDECL([], [prelink_cmds], [2], 5237e35772b2Smrg [Commands necessary for linking programs (against libraries) with templates]) 5238e35772b2Smrg_LT_TAGDECL([], [file_list_spec], [1], 5239e35772b2Smrg [Specify filename containing input files]) 5240e35772b2Smrgdnl FIXME: Not yet implemented 5241e35772b2Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5242e35772b2Smrgdnl [Compiler flag to generate thread safe objects]) 5243e35772b2Smrg])# _LT_LINKER_SHLIBS 5244e35772b2Smrg 5245e35772b2Smrg 5246e35772b2Smrg# _LT_LANG_C_CONFIG([TAG]) 5247e35772b2Smrg# ------------------------ 5248e35772b2Smrg# Ensure that the configuration variables for a C compiler are suitably 5249e35772b2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5250e35772b2Smrg# the compiler configuration to `libtool'. 5251e35772b2Smrgm4_defun([_LT_LANG_C_CONFIG], 5252e35772b2Smrg[m4_require([_LT_DECL_EGREP])dnl 5253e35772b2Smrglt_save_CC="$CC" 5254e35772b2SmrgAC_LANG_PUSH(C) 525572b676d7Smrg 5256e35772b2Smrg# Source file extension for C test sources. 5257e35772b2Smrgac_ext=c 525872b676d7Smrg 5259e35772b2Smrg# Object file extension for compiled C test sources. 5260e35772b2Smrgobjext=o 5261e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 526272b676d7Smrg 5263e35772b2Smrg# Code to be used in simple compile tests 5264e35772b2Smrglt_simple_compile_test_code="int some_variable = 0;" 526572b676d7Smrg 5266e35772b2Smrg# Code to be used in simple link tests 5267e35772b2Smrglt_simple_link_test_code='int main(){return(0);}' 526872b676d7Smrg 5269e35772b2Smrg_LT_TAG_COMPILER 5270e35772b2Smrg# Save the default compiler, since it gets overwritten when the other 5271e35772b2Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5272e35772b2Smrgcompiler_DEFAULT=$CC 527372b676d7Smrg 5274e35772b2Smrg# save warnings/boilerplate of simple test code 5275e35772b2Smrg_LT_COMPILER_BOILERPLATE 5276e35772b2Smrg_LT_LINKER_BOILERPLATE 527772b676d7Smrg 5278e35772b2Smrgif test -n "$compiler"; then 5279e35772b2Smrg _LT_COMPILER_NO_RTTI($1) 5280e35772b2Smrg _LT_COMPILER_PIC($1) 5281e35772b2Smrg _LT_COMPILER_C_O($1) 5282e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 5283e35772b2Smrg _LT_LINKER_SHLIBS($1) 5284e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 5285e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 5286e35772b2Smrg LT_SYS_DLOPEN_SELF 5287e35772b2Smrg _LT_CMD_STRIPLIB 5288e35772b2Smrg 5289e35772b2Smrg # Report which library types will actually be built 5290e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5291e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 5292e35772b2Smrg 5293e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 5294e35772b2Smrg test "$can_build_shared" = "no" && enable_shared=no 5295e35772b2Smrg 5296e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 5297e35772b2Smrg # are all built from PIC. 5298e35772b2Smrg case $host_os in 5299e35772b2Smrg aix3*) 5300e35772b2Smrg test "$enable_shared" = yes && enable_static=no 5301e35772b2Smrg if test -n "$RANLIB"; then 5302e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5303e35772b2Smrg postinstall_cmds='$RANLIB $lib' 5304e35772b2Smrg fi 5305e35772b2Smrg ;; 530672b676d7Smrg 5307e35772b2Smrg aix[[4-9]]*) 5308e35772b2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5309e35772b2Smrg test "$enable_shared" = yes && enable_static=no 5310e35772b2Smrg fi 5311e35772b2Smrg ;; 5312e35772b2Smrg esac 5313e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 531472b676d7Smrg 5315e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 5316e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 5317e35772b2Smrg test "$enable_shared" = yes || enable_static=yes 5318e35772b2Smrg AC_MSG_RESULT([$enable_static]) 531972b676d7Smrg 5320e35772b2Smrg _LT_CONFIG($1) 5321e35772b2Smrgfi 5322e35772b2SmrgAC_LANG_POP 5323e35772b2SmrgCC="$lt_save_CC" 5324e35772b2Smrg])# _LT_LANG_C_CONFIG 532572b676d7Smrg 532672b676d7Smrg 5327e35772b2Smrg# _LT_PROG_CXX 5328e35772b2Smrg# ------------ 5329e35772b2Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 5330e35772b2Smrg# compiler, we have our own version here. 5331e35772b2Smrgm4_defun([_LT_PROG_CXX], 5332e35772b2Smrg[ 5333e35772b2Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 5334e35772b2SmrgAC_PROG_CXX 5335e35772b2Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5336e35772b2Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5337e35772b2Smrg (test "X$CXX" != "Xg++"))) ; then 5338e35772b2Smrg AC_PROG_CXXCPP 5339e35772b2Smrgelse 5340e35772b2Smrg _lt_caught_CXX_error=yes 5341e35772b2Smrgfi 5342e35772b2Smrgpopdef([AC_MSG_ERROR]) 5343e35772b2Smrg])# _LT_PROG_CXX 534472b676d7Smrg 5345e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 5346e35772b2Smrgdnl AC_DEFUN([_LT_PROG_CXX], []) 534772b676d7Smrg 534872b676d7Smrg 5349e35772b2Smrg# _LT_LANG_CXX_CONFIG([TAG]) 5350e35772b2Smrg# -------------------------- 5351e35772b2Smrg# Ensure that the configuration variables for a C++ compiler are suitably 5352e35772b2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5353e35772b2Smrg# the compiler configuration to `libtool'. 5354e35772b2Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5355e35772b2Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl 5356e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5357e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 5358e35772b2Smrg 5359e35772b2SmrgAC_LANG_PUSH(C++) 5360e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5361e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5362e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5363e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5364e35772b2Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5365e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5366e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5367e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5368e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5369e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5370e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5371e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5372e35772b2Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5373e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5374e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5375e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 5376e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5377e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5378e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5379e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5380e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5381e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 538272b676d7Smrg 5383e35772b2Smrg# Source file extension for C++ test sources. 5384e35772b2Smrgac_ext=cpp 538572b676d7Smrg 5386e35772b2Smrg# Object file extension for compiled C++ test sources. 5387e35772b2Smrgobjext=o 5388e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 5389e35772b2Smrg 5390e35772b2Smrg# No sense in running all these tests if we already determined that 5391e35772b2Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5392e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 5393e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 5394e35772b2Smrgif test "$_lt_caught_CXX_error" != yes; then 5395e35772b2Smrg # Code to be used in simple compile tests 5396e35772b2Smrg lt_simple_compile_test_code="int some_variable = 0;" 5397e35772b2Smrg 5398e35772b2Smrg # Code to be used in simple link tests 5399e35772b2Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5400e35772b2Smrg 5401e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5402e35772b2Smrg _LT_TAG_COMPILER 5403e35772b2Smrg 5404e35772b2Smrg # save warnings/boilerplate of simple test code 5405e35772b2Smrg _LT_COMPILER_BOILERPLATE 5406e35772b2Smrg _LT_LINKER_BOILERPLATE 5407e35772b2Smrg 5408e35772b2Smrg # Allow CC to be a program name with arguments. 5409e35772b2Smrg lt_save_CC=$CC 5410e35772b2Smrg lt_save_LD=$LD 5411e35772b2Smrg lt_save_GCC=$GCC 5412e35772b2Smrg GCC=$GXX 5413e35772b2Smrg lt_save_with_gnu_ld=$with_gnu_ld 5414e35772b2Smrg lt_save_path_LD=$lt_cv_path_LD 5415e35772b2Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5416e35772b2Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5417e35772b2Smrg else 5418e35772b2Smrg $as_unset lt_cv_prog_gnu_ld 5419e35772b2Smrg fi 5420e35772b2Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 5421e35772b2Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 5422e35772b2Smrg else 5423e35772b2Smrg $as_unset lt_cv_path_LD 5424e35772b2Smrg fi 5425e35772b2Smrg test -z "${LDCXX+set}" || LD=$LDCXX 5426e35772b2Smrg CC=${CXX-"c++"} 5427e35772b2Smrg compiler=$CC 5428e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 5429e35772b2Smrg _LT_CC_BASENAME([$compiler]) 543072b676d7Smrg 5431e35772b2Smrg if test -n "$compiler"; then 5432e35772b2Smrg # We don't want -fno-exception when compiling C++ code, so set the 5433e35772b2Smrg # no_builtin_flag separately 5434e35772b2Smrg if test "$GXX" = yes; then 5435e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5436e35772b2Smrg else 5437e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5438e35772b2Smrg fi 543972b676d7Smrg 5440e35772b2Smrg if test "$GXX" = yes; then 5441e35772b2Smrg # Set up default GNU C++ configuration 544272b676d7Smrg 5443e35772b2Smrg LT_PATH_LD 544472b676d7Smrg 5445e35772b2Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5446e35772b2Smrg # archiving commands below assume that GNU ld is being used. 5447e35772b2Smrg if test "$with_gnu_ld" = yes; then 5448e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5449e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 545072b676d7Smrg 5451e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5452e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 545372b676d7Smrg 5454e35772b2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5455e35772b2Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5456e35772b2Smrg # investigate it a little bit more. (MM) 5457e35772b2Smrg wlarc='${wl}' 545872b676d7Smrg 5459e35772b2Smrg # ancient GNU ld didn't support --whole-archive et. al. 5460e35772b2Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5461e35772b2Smrg $GREP 'no-whole-archive' > /dev/null; then 5462e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5463e35772b2Smrg else 5464e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5465e35772b2Smrg fi 5466e35772b2Smrg else 5467e35772b2Smrg with_gnu_ld=no 5468e35772b2Smrg wlarc= 5469e35772b2Smrg 5470e35772b2Smrg # A generic and very simple default shared library creation 5471e35772b2Smrg # command for GNU C++ for the case where it uses the native 5472e35772b2Smrg # linker, instead of GNU ld. If possible, this setting should 5473e35772b2Smrg # overridden to take advantage of the native linker features on 5474e35772b2Smrg # the platform it is being used on. 5475e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5476e35772b2Smrg fi 547772b676d7Smrg 5478e35772b2Smrg # Commands to make compiler produce verbose output that lists 5479e35772b2Smrg # what "hidden" libraries, object files and flags are used when 5480e35772b2Smrg # linking a shared library. 5481e35772b2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 548272b676d7Smrg 5483e35772b2Smrg else 5484e35772b2Smrg GXX=no 5485e35772b2Smrg with_gnu_ld=no 5486e35772b2Smrg wlarc= 5487e35772b2Smrg fi 548872b676d7Smrg 5489e35772b2Smrg # PORTME: fill in a description of your system's C++ link characteristics 5490e35772b2Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5491e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5492e35772b2Smrg case $host_os in 5493e35772b2Smrg aix3*) 5494e35772b2Smrg # FIXME: insert proper C++ library support 5495e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5496e35772b2Smrg ;; 5497e35772b2Smrg aix[[4-9]]*) 5498e35772b2Smrg if test "$host_cpu" = ia64; then 5499e35772b2Smrg # On IA64, the linker does run time linking by default, so we don't 5500e35772b2Smrg # have to do anything special. 5501e35772b2Smrg aix_use_runtimelinking=no 5502e35772b2Smrg exp_sym_flag='-Bexport' 5503e35772b2Smrg no_entry_flag="" 5504e35772b2Smrg else 5505e35772b2Smrg aix_use_runtimelinking=no 5506e35772b2Smrg 5507e35772b2Smrg # Test if we are trying to use run time linking or normal 5508e35772b2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5509e35772b2Smrg # need to do runtime linking. 5510e35772b2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5511e35772b2Smrg for ld_flag in $LDFLAGS; do 5512e35772b2Smrg case $ld_flag in 5513e35772b2Smrg *-brtl*) 5514e35772b2Smrg aix_use_runtimelinking=yes 5515e35772b2Smrg break 5516e35772b2Smrg ;; 5517e35772b2Smrg esac 5518e35772b2Smrg done 5519e35772b2Smrg ;; 5520e35772b2Smrg esac 552172b676d7Smrg 5522e35772b2Smrg exp_sym_flag='-bexport' 5523e35772b2Smrg no_entry_flag='-bnoentry' 5524e35772b2Smrg fi 552572b676d7Smrg 5526e35772b2Smrg # When large executables or shared objects are built, AIX ld can 5527e35772b2Smrg # have problems creating the table of contents. If linking a library 5528e35772b2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5529e35772b2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5530e35772b2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5531e35772b2Smrg 5532e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='' 5533e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5534e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5535e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5536e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5537e35772b2Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5538e35772b2Smrg 5539e35772b2Smrg if test "$GXX" = yes; then 5540e35772b2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5541e35772b2Smrg # We only want to do this on AIX 4.2 and lower, the check 5542e35772b2Smrg # below for broken collect2 doesn't work under 4.3+ 5543e35772b2Smrg collect2name=`${CC} -print-prog-name=collect2` 5544e35772b2Smrg if test -f "$collect2name" && 5545e35772b2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5546e35772b2Smrg then 5547e35772b2Smrg # We have reworked collect2 5548e35772b2Smrg : 5549e35772b2Smrg else 5550e35772b2Smrg # We have old collect2 5551e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5552e35772b2Smrg # It fails to find uninstalled libraries when the uninstalled 5553e35772b2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5554e35772b2Smrg # to unsupported forces relinking 5555e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5556e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5557e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5558e35772b2Smrg fi 5559e35772b2Smrg esac 5560e35772b2Smrg shared_flag='-shared' 5561e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 5562e35772b2Smrg shared_flag="$shared_flag "'${wl}-G' 5563e35772b2Smrg fi 5564e35772b2Smrg else 5565e35772b2Smrg # not using gcc 5566e35772b2Smrg if test "$host_cpu" = ia64; then 5567e35772b2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5568e35772b2Smrg # chokes on -Wl,-G. The following line is correct: 5569e35772b2Smrg shared_flag='-G' 5570e35772b2Smrg else 5571e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 5572e35772b2Smrg shared_flag='${wl}-G' 5573e35772b2Smrg else 5574e35772b2Smrg shared_flag='${wl}-bM:SRE' 5575e35772b2Smrg fi 5576e35772b2Smrg fi 5577e35772b2Smrg fi 557872b676d7Smrg 5579e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5580e35772b2Smrg # It seems that -bexpall does not export symbols beginning with 5581e35772b2Smrg # underscore (_), so it is better to generate a list of symbols to 5582e35772b2Smrg # export. 5583e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5584e35772b2Smrg if test "$aix_use_runtimelinking" = yes; then 5585e35772b2Smrg # Warning - without using the other runtime loading flags (-brtl), 5586e35772b2Smrg # -berok will link without error, but may produce a broken library. 5587e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5588e35772b2Smrg # Determine the default libpath from the value encoded in an empty 5589e35772b2Smrg # executable. 5590e35772b2Smrg _LT_SYS_MODULE_PATH_AIX 5591e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5592e35772b2Smrg 5593e35772b2Smrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5594e35772b2Smrg else 5595e35772b2Smrg if test "$host_cpu" = ia64; then 5596e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5597e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5598e35772b2Smrg _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" 5599e35772b2Smrg else 5600e35772b2Smrg # Determine the default libpath from the value encoded in an 5601e35772b2Smrg # empty executable. 5602e35772b2Smrg _LT_SYS_MODULE_PATH_AIX 5603e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5604e35772b2Smrg # Warning - without using the other run time loading flags, 5605e35772b2Smrg # -berok will link without error, but may produce a broken library. 5606e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5607e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5608e35772b2Smrg # Exported symbols can be pulled into shared objects from archives 5609e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5610e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5611e35772b2Smrg # This is similar to how AIX traditionally builds its shared 5612e35772b2Smrg # libraries. 5613e35772b2Smrg _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' 5614e35772b2Smrg fi 5615e35772b2Smrg fi 5616e35772b2Smrg ;; 561772b676d7Smrg 5618e35772b2Smrg beos*) 5619e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5620e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5621e35772b2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5622e35772b2Smrg # support --undefined. This deserves some investigation. FIXME 5623e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5624e35772b2Smrg else 5625e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5626e35772b2Smrg fi 5627e35772b2Smrg ;; 562872b676d7Smrg 5629e35772b2Smrg chorus*) 5630e35772b2Smrg case $cc_basename in 5631e35772b2Smrg *) 5632e35772b2Smrg # FIXME: insert proper C++ library support 5633e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5634e35772b2Smrg ;; 5635e35772b2Smrg esac 5636e35772b2Smrg ;; 563772b676d7Smrg 5638e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 5639e35772b2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5640e35772b2Smrg # as there is no search path for DLLs. 5641e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5642e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5643e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5644e35772b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5645e35772b2Smrg 5646e35772b2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5647e35772b2Smrg _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' 5648e35772b2Smrg # If the export-symbols file already is a .def file (1st line 5649e35772b2Smrg # is EXPORTS), use it as is; otherwise, prepend... 5650e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5651e35772b2Smrg cp $export_symbols $output_objdir/$soname.def; 5652e35772b2Smrg else 5653e35772b2Smrg echo EXPORTS > $output_objdir/$soname.def; 5654e35772b2Smrg cat $export_symbols >> $output_objdir/$soname.def; 5655e35772b2Smrg fi~ 5656e35772b2Smrg $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' 5657e35772b2Smrg else 5658e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5659e35772b2Smrg fi 5660e35772b2Smrg ;; 5661e35772b2Smrg darwin* | rhapsody*) 5662e35772b2Smrg _LT_DARWIN_LINKER_FEATURES($1) 5663e35772b2Smrg ;; 566472b676d7Smrg 5665e35772b2Smrg dgux*) 5666e35772b2Smrg case $cc_basename in 5667e35772b2Smrg ec++*) 5668e35772b2Smrg # FIXME: insert proper C++ library support 5669e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5670e35772b2Smrg ;; 5671e35772b2Smrg ghcx*) 5672e35772b2Smrg # Green Hills C++ Compiler 5673e35772b2Smrg # FIXME: insert proper C++ library support 5674e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5675e35772b2Smrg ;; 5676e35772b2Smrg *) 5677e35772b2Smrg # FIXME: insert proper C++ library support 5678e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5679e35772b2Smrg ;; 5680e35772b2Smrg esac 5681e35772b2Smrg ;; 568272b676d7Smrg 5683e35772b2Smrg freebsd[[12]]*) 5684e35772b2Smrg # C++ shared libraries reported to be fairly broken before 5685e35772b2Smrg # switch to ELF 5686e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5687e35772b2Smrg ;; 568872b676d7Smrg 5689e35772b2Smrg freebsd-elf*) 5690e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5691e35772b2Smrg ;; 569272b676d7Smrg 5693e35772b2Smrg freebsd* | dragonfly*) 5694e35772b2Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 5695e35772b2Smrg # conventions 5696e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5697e35772b2Smrg ;; 569872b676d7Smrg 5699e35772b2Smrg gnu*) 5700e35772b2Smrg ;; 570172b676d7Smrg 5702e35772b2Smrg hpux9*) 5703e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5704e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5705e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5706e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5707e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5708e35772b2Smrg # but as the default 5709e35772b2Smrg # location of the library. 5710e35772b2Smrg 5711e35772b2Smrg case $cc_basename in 5712e35772b2Smrg CC*) 5713e35772b2Smrg # FIXME: insert proper C++ library support 5714e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5715e35772b2Smrg ;; 5716e35772b2Smrg aCC*) 5717e35772b2Smrg _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' 5718e35772b2Smrg # Commands to make compiler produce verbose output that lists 5719e35772b2Smrg # what "hidden" libraries, object files and flags are used when 5720e35772b2Smrg # linking a shared library. 5721e35772b2Smrg # 5722e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 5723e35772b2Smrg # explicitly linking system object files so we need to strip them 5724e35772b2Smrg # from the output so that they don't get included in the library 5725e35772b2Smrg # dependencies. 5726e35772b2Smrg 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; $ECHO "X$list" | $Xsed' 5727e35772b2Smrg ;; 5728e35772b2Smrg *) 5729e35772b2Smrg if test "$GXX" = yes; then 5730e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5731e35772b2Smrg else 5732e35772b2Smrg # FIXME: insert proper C++ library support 5733e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5734e35772b2Smrg fi 5735e35772b2Smrg ;; 5736e35772b2Smrg esac 5737e35772b2Smrg ;; 573872b676d7Smrg 5739e35772b2Smrg hpux10*|hpux11*) 5740e35772b2Smrg if test $with_gnu_ld = no; then 5741e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5742e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5743e35772b2Smrg 5744e35772b2Smrg case $host_cpu in 5745e35772b2Smrg hppa*64*|ia64*) 5746e35772b2Smrg ;; 5747e35772b2Smrg *) 5748e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749e35772b2Smrg ;; 5750e35772b2Smrg esac 5751e35772b2Smrg fi 5752e35772b2Smrg case $host_cpu in 5753e35772b2Smrg hppa*64*|ia64*) 5754e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5755e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5756e35772b2Smrg ;; 5757e35772b2Smrg *) 5758e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5759e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5760e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5761e35772b2Smrg # but as the default 5762e35772b2Smrg # location of the library. 5763e35772b2Smrg ;; 5764e35772b2Smrg esac 5765e35772b2Smrg 5766e35772b2Smrg case $cc_basename in 5767e35772b2Smrg CC*) 5768e35772b2Smrg # FIXME: insert proper C++ library support 5769e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5770e35772b2Smrg ;; 5771e35772b2Smrg aCC*) 5772e35772b2Smrg case $host_cpu in 5773e35772b2Smrg hppa*64*) 5774e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5775e35772b2Smrg ;; 5776e35772b2Smrg ia64*) 5777e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5778e35772b2Smrg ;; 5779e35772b2Smrg *) 5780e35772b2Smrg _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' 5781e35772b2Smrg ;; 5782e35772b2Smrg esac 5783e35772b2Smrg # Commands to make compiler produce verbose output that lists 5784e35772b2Smrg # what "hidden" libraries, object files and flags are used when 5785e35772b2Smrg # linking a shared library. 5786e35772b2Smrg # 5787e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 5788e35772b2Smrg # explicitly linking system object files so we need to strip them 5789e35772b2Smrg # from the output so that they don't get included in the library 5790e35772b2Smrg # dependencies. 5791e35772b2Smrg 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; $ECHO "X$list" | $Xsed' 5792e35772b2Smrg ;; 5793e35772b2Smrg *) 5794e35772b2Smrg if test "$GXX" = yes; then 5795e35772b2Smrg if test $with_gnu_ld = no; then 5796e35772b2Smrg case $host_cpu in 5797e35772b2Smrg hppa*64*) 5798e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5799e35772b2Smrg ;; 5800e35772b2Smrg ia64*) 5801e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5802e35772b2Smrg ;; 5803e35772b2Smrg *) 5804e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5805e35772b2Smrg ;; 5806e35772b2Smrg esac 5807e35772b2Smrg fi 5808e35772b2Smrg else 5809e35772b2Smrg # FIXME: insert proper C++ library support 5810e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5811e35772b2Smrg fi 5812e35772b2Smrg ;; 5813e35772b2Smrg esac 5814e35772b2Smrg ;; 581572b676d7Smrg 5816e35772b2Smrg interix[[3-9]]*) 5817e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5818e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5819e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5820e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5821e35772b2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5822e35772b2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5823e35772b2Smrg # default) and relocated if they conflict, which is a slow very memory 5824e35772b2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5825e35772b2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5826e35772b2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5827e35772b2Smrg _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' 5828e35772b2Smrg _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' 5829e35772b2Smrg ;; 5830e35772b2Smrg irix5* | irix6*) 5831e35772b2Smrg case $cc_basename in 5832e35772b2Smrg CC*) 5833e35772b2Smrg # SGI C++ 5834e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 5835e35772b2Smrg 5836e35772b2Smrg # Archives containing C++ object files must be created using 5837e35772b2Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 5838e35772b2Smrg # necessary to make sure instantiated templates are included 5839e35772b2Smrg # in the archive. 5840e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 5841e35772b2Smrg ;; 5842e35772b2Smrg *) 5843e35772b2Smrg if test "$GXX" = yes; then 5844e35772b2Smrg if test "$with_gnu_ld" = no; then 5845e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5846e35772b2Smrg else 5847e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' 5848e35772b2Smrg fi 5849e35772b2Smrg fi 5850e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5851e35772b2Smrg ;; 5852e35772b2Smrg esac 5853e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5854e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5855e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5856e35772b2Smrg ;; 58571fd23544Smrg 5858e35772b2Smrg linux* | k*bsd*-gnu) 5859e35772b2Smrg case $cc_basename in 5860e35772b2Smrg KCC*) 5861e35772b2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5862e35772b2Smrg 5863e35772b2Smrg # KCC will only create a shared library if the output file 5864e35772b2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5865e35772b2Smrg # to its proper name (with version) after linking. 5866e35772b2Smrg _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' 5867e35772b2Smrg _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' 5868e35772b2Smrg # Commands to make compiler produce verbose output that lists 5869e35772b2Smrg # what "hidden" libraries, object files and flags are used when 5870e35772b2Smrg # linking a shared library. 5871e35772b2Smrg # 5872e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 5873e35772b2Smrg # explicitly linking system object files so we need to strip them 5874e35772b2Smrg # from the output so that they don't get included in the library 5875e35772b2Smrg # dependencies. 5876e35772b2Smrg 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; $ECHO "X$list" | $Xsed' 5877e35772b2Smrg 5878e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5879e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5880e35772b2Smrg 5881e35772b2Smrg # Archives containing C++ object files must be created using 5882e35772b2Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5883e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5884e35772b2Smrg ;; 5885e35772b2Smrg icpc* | ecpc* ) 5886e35772b2Smrg # Intel C++ 5887e35772b2Smrg with_gnu_ld=yes 5888e35772b2Smrg # version 8.0 and above of icpc choke on multiply defined symbols 5889e35772b2Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 5890e35772b2Smrg # earlier do not add the objects themselves. 5891e35772b2Smrg case `$CC -V 2>&1` in 5892e35772b2Smrg *"Version 7."*) 5893e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5894e35772b2Smrg _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' 5895e35772b2Smrg ;; 5896e35772b2Smrg *) # Version 8.0 or newer 5897e35772b2Smrg tmp_idyn= 5898e35772b2Smrg case $host_cpu in 5899e35772b2Smrg ia64*) tmp_idyn=' -i_dynamic';; 5900e35772b2Smrg esac 5901e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5902e35772b2Smrg _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' 5903e35772b2Smrg ;; 5904e35772b2Smrg esac 5905e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5906e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5907e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5908e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5909e35772b2Smrg ;; 5910e35772b2Smrg pgCC* | pgcpp*) 5911e35772b2Smrg # Portland Group C++ compiler 5912e35772b2Smrg case `$CC -V` in 5913e35772b2Smrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 5914e35772b2Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 5915e35772b2Smrg rm -rf $tpldir~ 5916e35772b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 5917e35772b2Smrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 5918e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 5919e35772b2Smrg rm -rf $tpldir~ 5920e35772b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 5921e35772b2Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 5922e35772b2Smrg $RANLIB $oldlib' 5923e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 5924e35772b2Smrg rm -rf $tpldir~ 5925e35772b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5926e35772b2Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5927e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 5928e35772b2Smrg rm -rf $tpldir~ 5929e35772b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5930e35772b2Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 5931e35772b2Smrg ;; 5932e35772b2Smrg *) # Version 6 will use weak symbols 5933e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5934e35772b2Smrg _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' 5935e35772b2Smrg ;; 5936e35772b2Smrg esac 593772b676d7Smrg 5938e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5939e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5940e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 5941e35772b2Smrg ;; 5942e35772b2Smrg cxx*) 5943e35772b2Smrg # Compaq C++ 5944e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5945e35772b2Smrg _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' 594672b676d7Smrg 5947e35772b2Smrg runpath_var=LD_RUN_PATH 5948e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5949e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 595072b676d7Smrg 5951e35772b2Smrg # Commands to make compiler produce verbose output that lists 5952e35772b2Smrg # what "hidden" libraries, object files and flags are used when 5953e35772b2Smrg # linking a shared library. 5954e35772b2Smrg # 5955e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 5956e35772b2Smrg # explicitly linking system object files so we need to strip them 5957e35772b2Smrg # from the output so that they don't get included in the library 5958e35772b2Smrg # dependencies. 5959e35772b2Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 5960e35772b2Smrg ;; 5961e35772b2Smrg xl*) 5962e35772b2Smrg # IBM XL 8.0 on PPC, with GNU ld 5963e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5964e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5965e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5966e35772b2Smrg if test "x$supports_anon_versioning" = xyes; then 5967e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5968e35772b2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5969e35772b2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5970e35772b2Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5971e35772b2Smrg fi 5972e35772b2Smrg ;; 5973e35772b2Smrg *) 5974e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 5975e35772b2Smrg *Sun\ C*) 5976e35772b2Smrg # Sun C++ 5.9 5977e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 5978e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5979e35772b2Smrg _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' 5980e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5981e35772b2Smrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 5982e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5983e35772b2Smrg 5984e35772b2Smrg # Not sure whether something based on 5985e35772b2Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 5986e35772b2Smrg # would be better. 5987e35772b2Smrg output_verbose_link_cmd='echo' 5988e35772b2Smrg 5989e35772b2Smrg # Archives containing C++ object files must be created using 5990e35772b2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 5991e35772b2Smrg # necessary to make sure instantiated templates are included 5992e35772b2Smrg # in the archive. 5993e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 5994e35772b2Smrg ;; 5995e35772b2Smrg esac 5996e35772b2Smrg ;; 5997e35772b2Smrg esac 5998e35772b2Smrg ;; 599972b676d7Smrg 6000e35772b2Smrg lynxos*) 6001e35772b2Smrg # FIXME: insert proper C++ library support 6002e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6003e35772b2Smrg ;; 600472b676d7Smrg 6005e35772b2Smrg m88k*) 6006e35772b2Smrg # FIXME: insert proper C++ library support 6007e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6008e35772b2Smrg ;; 600972b676d7Smrg 6010e35772b2Smrg mvs*) 6011e35772b2Smrg case $cc_basename in 6012e35772b2Smrg cxx*) 6013e35772b2Smrg # FIXME: insert proper C++ library support 6014e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6015e35772b2Smrg ;; 6016e35772b2Smrg *) 6017e35772b2Smrg # FIXME: insert proper C++ library support 6018e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6019e35772b2Smrg ;; 6020e35772b2Smrg esac 6021e35772b2Smrg ;; 602272b676d7Smrg 6023e35772b2Smrg netbsd*) 6024e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6025e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6026e35772b2Smrg wlarc= 6027e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6028e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6029e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6030e35772b2Smrg fi 6031e35772b2Smrg # Workaround some broken pre-1.5 toolchains 6032e35772b2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6033e35772b2Smrg ;; 603472b676d7Smrg 6035e35772b2Smrg *nto* | *qnx*) 6036e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6037e35772b2Smrg ;; 603872b676d7Smrg 6039e35772b2Smrg openbsd2*) 6040e35772b2Smrg # C++ shared libraries are fairly broken 6041e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6042e35772b2Smrg ;; 604372b676d7Smrg 6044e35772b2Smrg openbsd*) 6045e35772b2Smrg if test -f /usr/libexec/ld.so; then 6046e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6047e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6048e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6049e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6050e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6051e35772b2Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6052e35772b2Smrg _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' 6053e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6054e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6055e35772b2Smrg fi 6056e35772b2Smrg output_verbose_link_cmd=echo 6057e35772b2Smrg else 6058e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6059e35772b2Smrg fi 6060e35772b2Smrg ;; 606172b676d7Smrg 6062e35772b2Smrg osf3* | osf4* | osf5*) 6063e35772b2Smrg case $cc_basename in 6064e35772b2Smrg KCC*) 6065e35772b2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6066e35772b2Smrg 6067e35772b2Smrg # KCC will only create a shared library if the output file 6068e35772b2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6069e35772b2Smrg # to its proper name (with version) after linking. 6070e35772b2Smrg _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' 6071e35772b2Smrg 6072e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6073e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6074e35772b2Smrg 6075e35772b2Smrg # Archives containing C++ object files must be created using 6076e35772b2Smrg # the KAI C++ compiler. 6077e35772b2Smrg case $host in 6078e35772b2Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6079e35772b2Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6080e35772b2Smrg esac 6081e35772b2Smrg ;; 6082e35772b2Smrg RCC*) 6083e35772b2Smrg # Rational C++ 2.4.1 6084e35772b2Smrg # FIXME: insert proper C++ library support 6085e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6086e35772b2Smrg ;; 6087e35772b2Smrg cxx*) 6088e35772b2Smrg case $host in 6089e35772b2Smrg osf3*) 6090e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6091e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 6092e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6093e35772b2Smrg ;; 6094e35772b2Smrg *) 6095e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6096e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 6097e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6098e35772b2Smrg echo "-hidden">> $lib.exp~ 6099e35772b2Smrg $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ 6100e35772b2Smrg $RM $lib.exp' 6101e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6102e35772b2Smrg ;; 6103e35772b2Smrg esac 610472b676d7Smrg 6105e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 610672b676d7Smrg 6107e35772b2Smrg # Commands to make compiler produce verbose output that lists 6108e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6109e35772b2Smrg # linking a shared library. 6110e35772b2Smrg # 6111e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6112e35772b2Smrg # explicitly linking system object files so we need to strip them 6113e35772b2Smrg # from the output so that they don't get included in the library 6114e35772b2Smrg # dependencies. 6115e35772b2Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 6116e35772b2Smrg ;; 6117e35772b2Smrg *) 6118e35772b2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6119e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6120e35772b2Smrg case $host in 6121e35772b2Smrg osf3*) 6122e35772b2Smrg _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6123e35772b2Smrg ;; 6124e35772b2Smrg *) 6125e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6126e35772b2Smrg ;; 6127e35772b2Smrg esac 6128e35772b2Smrg 6129e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6130e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6131e35772b2Smrg 6132e35772b2Smrg # Commands to make compiler produce verbose output that lists 6133e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6134e35772b2Smrg # linking a shared library. 6135e35772b2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6136e35772b2Smrg 6137e35772b2Smrg else 6138e35772b2Smrg # FIXME: insert proper C++ library support 6139e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6140e35772b2Smrg fi 6141e35772b2Smrg ;; 6142e35772b2Smrg esac 6143e35772b2Smrg ;; 614472b676d7Smrg 6145e35772b2Smrg psos*) 6146e35772b2Smrg # FIXME: insert proper C++ library support 6147e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6148e35772b2Smrg ;; 614972b676d7Smrg 6150e35772b2Smrg sunos4*) 6151e35772b2Smrg case $cc_basename in 6152e35772b2Smrg CC*) 6153e35772b2Smrg # Sun C++ 4.x 6154e35772b2Smrg # FIXME: insert proper C++ library support 6155e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6156e35772b2Smrg ;; 6157e35772b2Smrg lcc*) 6158e35772b2Smrg # Lucid 6159e35772b2Smrg # FIXME: insert proper C++ library support 6160e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6161e35772b2Smrg ;; 6162e35772b2Smrg *) 6163e35772b2Smrg # FIXME: insert proper C++ library support 6164e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6165e35772b2Smrg ;; 6166e35772b2Smrg esac 6167e35772b2Smrg ;; 616872b676d7Smrg 6169e35772b2Smrg solaris*) 6170e35772b2Smrg case $cc_basename in 6171e35772b2Smrg CC*) 6172e35772b2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6173e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6174e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6175e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6176e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6177e35772b2Smrg $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' 6178e35772b2Smrg 6179e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6180e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6181e35772b2Smrg case $host_os in 6182e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6183e35772b2Smrg *) 6184e35772b2Smrg # The compiler driver will combine and reorder linker options, 6185e35772b2Smrg # but understands `-z linker_flag'. 6186e35772b2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6187e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6188e35772b2Smrg ;; 6189e35772b2Smrg esac 6190e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 619172b676d7Smrg 6192e35772b2Smrg output_verbose_link_cmd='echo' 619372b676d7Smrg 6194e35772b2Smrg # Archives containing C++ object files must be created using 6195e35772b2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6196e35772b2Smrg # necessary to make sure instantiated templates are included 6197e35772b2Smrg # in the archive. 6198e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6199e35772b2Smrg ;; 6200e35772b2Smrg gcx*) 6201e35772b2Smrg # Green Hills C++ Compiler 6202e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 620372b676d7Smrg 6204e35772b2Smrg # The C++ compiler must be used to create the archive. 6205e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6206e35772b2Smrg ;; 6207e35772b2Smrg *) 6208e35772b2Smrg # GNU C++ compiler with Solaris linker 6209e35772b2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6210e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6211e35772b2Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6212e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6213e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6214e35772b2Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6215e35772b2Smrg 6216e35772b2Smrg # Commands to make compiler produce verbose output that lists 6217e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6218e35772b2Smrg # linking a shared library. 6219e35772b2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6220e35772b2Smrg else 6221e35772b2Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6222e35772b2Smrg # platform. 6223e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6224e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6225e35772b2Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6226e35772b2Smrg 6227e35772b2Smrg # Commands to make compiler produce verbose output that lists 6228e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6229e35772b2Smrg # linking a shared library. 6230e35772b2Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6231e35772b2Smrg fi 6232e35772b2Smrg 6233e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6234e35772b2Smrg case $host_os in 6235e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6236e35772b2Smrg *) 6237e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6238e35772b2Smrg ;; 6239e35772b2Smrg esac 6240e35772b2Smrg fi 6241e35772b2Smrg ;; 6242e35772b2Smrg esac 6243e35772b2Smrg ;; 624472b676d7Smrg 6245e35772b2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6246e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6247e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6248e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6249e35772b2Smrg runpath_var='LD_RUN_PATH' 625072b676d7Smrg 6251e35772b2Smrg case $cc_basename in 6252e35772b2Smrg CC*) 6253e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6254e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6255e35772b2Smrg ;; 6256e35772b2Smrg *) 6257e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6258e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6259e35772b2Smrg ;; 6260e35772b2Smrg esac 6261e35772b2Smrg ;; 626272b676d7Smrg 6263e35772b2Smrg sysv5* | sco3.2v5* | sco5v6*) 6264e35772b2Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6265e35772b2Smrg # link with -lc, and that would cause any symbols used from libc to 6266e35772b2Smrg # always be unresolved, which means just about no library would 6267e35772b2Smrg # ever link correctly. If we're not using GNU ld we use -z text 6268e35772b2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6269e35772b2Smrg # as -z defs. 6270e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6271e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6272e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6273e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6274e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6275e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6276e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6277e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6278e35772b2Smrg runpath_var='LD_RUN_PATH' 627972b676d7Smrg 6280e35772b2Smrg case $cc_basename in 6281e35772b2Smrg CC*) 6282e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6283e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6284e35772b2Smrg ;; 6285e35772b2Smrg *) 6286e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6287e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6288e35772b2Smrg ;; 6289e35772b2Smrg esac 6290e35772b2Smrg ;; 629172b676d7Smrg 6292e35772b2Smrg tandem*) 6293e35772b2Smrg case $cc_basename in 6294e35772b2Smrg NCC*) 6295e35772b2Smrg # NonStop-UX NCC 3.20 6296e35772b2Smrg # FIXME: insert proper C++ library support 6297e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6298e35772b2Smrg ;; 6299e35772b2Smrg *) 6300e35772b2Smrg # FIXME: insert proper C++ library support 6301e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6302e35772b2Smrg ;; 6303e35772b2Smrg esac 6304e35772b2Smrg ;; 630572b676d7Smrg 6306e35772b2Smrg vxworks*) 6307e35772b2Smrg # FIXME: insert proper C++ library support 6308e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6309e35772b2Smrg ;; 631072b676d7Smrg 6311e35772b2Smrg *) 6312e35772b2Smrg # FIXME: insert proper C++ library support 6313e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6314e35772b2Smrg ;; 6315e35772b2Smrg esac 631672b676d7Smrg 6317e35772b2Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6318e35772b2Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6319e35772b2Smrg 6320e35772b2Smrg _LT_TAGVAR(GCC, $1)="$GXX" 6321e35772b2Smrg _LT_TAGVAR(LD, $1)="$LD" 6322e35772b2Smrg 6323e35772b2Smrg ## CAVEAT EMPTOR: 6324e35772b2Smrg ## There is no encapsulation within the following macros, do not change 6325e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 6326e35772b2Smrg ## what you are doing... 6327e35772b2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6328e35772b2Smrg _LT_COMPILER_PIC($1) 6329e35772b2Smrg _LT_COMPILER_C_O($1) 6330e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 6331e35772b2Smrg _LT_LINKER_SHLIBS($1) 6332e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 6333e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6334e35772b2Smrg 6335e35772b2Smrg _LT_CONFIG($1) 6336e35772b2Smrg fi # test -n "$compiler" 6337e35772b2Smrg 6338e35772b2Smrg CC=$lt_save_CC 6339e35772b2Smrg LDCXX=$LD 6340e35772b2Smrg LD=$lt_save_LD 6341e35772b2Smrg GCC=$lt_save_GCC 6342e35772b2Smrg with_gnu_ld=$lt_save_with_gnu_ld 6343e35772b2Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 6344e35772b2Smrg lt_cv_path_LD=$lt_save_path_LD 6345e35772b2Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6346e35772b2Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6347e35772b2Smrgfi # test "$_lt_caught_CXX_error" != yes 634872b676d7Smrg 6349e35772b2SmrgAC_LANG_POP 6350e35772b2Smrg])# _LT_LANG_CXX_CONFIG 635172b676d7Smrg 635272b676d7Smrg 6353e35772b2Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6354e35772b2Smrg# --------------------------------- 6355e35772b2Smrg# Figure out "hidden" library dependencies from verbose 6356e35772b2Smrg# compiler output when linking a shared library. 6357e35772b2Smrg# Parse the compiler output and extract the necessary 6358e35772b2Smrg# objects, libraries and library flags. 6359e35772b2Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6360e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6361e35772b2Smrg# Dependencies to place before and after the object being linked: 6362e35772b2Smrg_LT_TAGVAR(predep_objects, $1)= 6363e35772b2Smrg_LT_TAGVAR(postdep_objects, $1)= 6364e35772b2Smrg_LT_TAGVAR(predeps, $1)= 6365e35772b2Smrg_LT_TAGVAR(postdeps, $1)= 6366e35772b2Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 636772b676d7Smrg 6368e35772b2Smrgdnl we can't use the lt_simple_compile_test_code here, 6369e35772b2Smrgdnl because it contains code intended for an executable, 6370e35772b2Smrgdnl not a library. It's possible we should let each 6371e35772b2Smrgdnl tag define a new lt_????_link_test_code variable, 6372e35772b2Smrgdnl but it's only used here... 6373e35772b2Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6374e35772b2Smrgint a; 6375e35772b2Smrgvoid foo (void) { a = 0; } 6376e35772b2Smrg_LT_EOF 6377e35772b2Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6378e35772b2Smrgclass Foo 6379e35772b2Smrg{ 6380e35772b2Smrgpublic: 6381e35772b2Smrg Foo (void) { a = 0; } 6382e35772b2Smrgprivate: 6383e35772b2Smrg int a; 6384e35772b2Smrg}; 6385e35772b2Smrg_LT_EOF 6386e35772b2Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6387e35772b2Smrg subroutine foo 6388e35772b2Smrg implicit none 6389e35772b2Smrg integer*4 a 6390e35772b2Smrg a=0 6391e35772b2Smrg return 6392e35772b2Smrg end 6393e35772b2Smrg_LT_EOF 6394e35772b2Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6395e35772b2Smrg subroutine foo 6396e35772b2Smrg implicit none 6397e35772b2Smrg integer a 6398e35772b2Smrg a=0 6399e35772b2Smrg return 6400e35772b2Smrg end 6401e35772b2Smrg_LT_EOF 6402e35772b2Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6403e35772b2Smrgpublic class foo { 6404e35772b2Smrg private int a; 6405e35772b2Smrg public void bar (void) { 6406e35772b2Smrg a = 0; 6407e35772b2Smrg } 6408e35772b2Smrg}; 6409e35772b2Smrg_LT_EOF 6410e35772b2Smrg]) 6411e35772b2Smrgdnl Parse the compiler output and extract the necessary 6412e35772b2Smrgdnl objects, libraries and library flags. 6413e35772b2Smrgif AC_TRY_EVAL(ac_compile); then 6414e35772b2Smrg # Parse the compiler output and extract the necessary 6415e35772b2Smrg # objects, libraries and library flags. 641672b676d7Smrg 6417e35772b2Smrg # Sentinel used to keep track of whether or not we are before 6418e35772b2Smrg # the conftest object file. 6419e35772b2Smrg pre_test_object_deps_done=no 642072b676d7Smrg 6421e35772b2Smrg for p in `eval "$output_verbose_link_cmd"`; do 6422e35772b2Smrg case $p in 642372b676d7Smrg 6424e35772b2Smrg -L* | -R* | -l*) 6425e35772b2Smrg # Some compilers place space between "-{L,R}" and the path. 6426e35772b2Smrg # Remove the space. 6427e35772b2Smrg if test $p = "-L" || 6428e35772b2Smrg test $p = "-R"; then 6429e35772b2Smrg prev=$p 6430e35772b2Smrg continue 6431e35772b2Smrg else 6432e35772b2Smrg prev= 6433e35772b2Smrg fi 643472b676d7Smrg 6435e35772b2Smrg if test "$pre_test_object_deps_done" = no; then 6436e35772b2Smrg case $p in 6437e35772b2Smrg -L* | -R*) 6438e35772b2Smrg # Internal compiler library paths should come after those 6439e35772b2Smrg # provided the user. The postdeps already come after the 6440e35772b2Smrg # user supplied libs so there is no need to process them. 6441e35772b2Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6442e35772b2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6443e35772b2Smrg else 6444e35772b2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6445e35772b2Smrg fi 6446e35772b2Smrg ;; 6447e35772b2Smrg # The "-l" case would never come before the object being 6448e35772b2Smrg # linked, so don't bother handling this case. 6449e35772b2Smrg esac 6450e35772b2Smrg else 6451e35772b2Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6452e35772b2Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6453e35772b2Smrg else 6454e35772b2Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6455e35772b2Smrg fi 6456e35772b2Smrg fi 6457e35772b2Smrg ;; 645872b676d7Smrg 6459e35772b2Smrg *.$objext) 6460e35772b2Smrg # This assumes that the test object file only shows up 6461e35772b2Smrg # once in the compiler output. 6462e35772b2Smrg if test "$p" = "conftest.$objext"; then 6463e35772b2Smrg pre_test_object_deps_done=yes 6464e35772b2Smrg continue 6465e35772b2Smrg fi 646672b676d7Smrg 6467e35772b2Smrg if test "$pre_test_object_deps_done" = no; then 6468e35772b2Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6469e35772b2Smrg _LT_TAGVAR(predep_objects, $1)="$p" 6470e35772b2Smrg else 6471e35772b2Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6472e35772b2Smrg fi 6473e35772b2Smrg else 6474e35772b2Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6475e35772b2Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 6476e35772b2Smrg else 6477e35772b2Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 6478e35772b2Smrg fi 6479e35772b2Smrg fi 6480e35772b2Smrg ;; 648172b676d7Smrg 6482e35772b2Smrg *) ;; # Ignore the rest. 648372b676d7Smrg 6484e35772b2Smrg esac 6485e35772b2Smrg done 648672b676d7Smrg 6487e35772b2Smrg # Clean up. 6488e35772b2Smrg rm -f a.out a.exe 6489e35772b2Smrgelse 6490e35772b2Smrg echo "libtool.m4: error: problem compiling $1 test program" 649172b676d7Smrgfi 649272b676d7Smrg 6493e35772b2Smrg$RM -f confest.$objext 649472b676d7Smrg 6495e35772b2Smrg# PORTME: override above test on systems where it is broken 6496e35772b2Smrgm4_if([$1], [CXX], 6497e35772b2Smrg[case $host_os in 6498e35772b2Smrginterix[[3-9]]*) 6499e35772b2Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 6500e35772b2Smrg # hack all around it, let's just trust "g++" to DTRT. 6501e35772b2Smrg _LT_TAGVAR(predep_objects,$1)= 6502e35772b2Smrg _LT_TAGVAR(postdep_objects,$1)= 6503e35772b2Smrg _LT_TAGVAR(postdeps,$1)= 6504e35772b2Smrg ;; 650572b676d7Smrg 6506e35772b2Smrglinux*) 6507e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 6508e35772b2Smrg *Sun\ C*) 6509e35772b2Smrg # Sun C++ 5.9 651072b676d7Smrg 6511e35772b2Smrg # The more standards-conforming stlport4 library is 6512e35772b2Smrg # incompatible with the Cstd library. Avoid specifying 6513e35772b2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 6514e35772b2Smrg # -library=stlport4 depends on it. 6515e35772b2Smrg case " $CXX $CXXFLAGS " in 6516e35772b2Smrg *" -library=stlport4 "*) 6517e35772b2Smrg solaris_use_stlport4=yes 6518e35772b2Smrg ;; 6519e35772b2Smrg esac 652072b676d7Smrg 6521e35772b2Smrg if test "$solaris_use_stlport4" != yes; then 6522e35772b2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6523e35772b2Smrg fi 6524e35772b2Smrg ;; 6525e35772b2Smrg esac 652672b676d7Smrg ;; 6527e35772b2Smrg 652872b676d7Smrgsolaris*) 6529e35772b2Smrg case $cc_basename in 6530e35772b2Smrg CC*) 6531e35772b2Smrg # The more standards-conforming stlport4 library is 6532e35772b2Smrg # incompatible with the Cstd library. Avoid specifying 6533e35772b2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 6534e35772b2Smrg # -library=stlport4 depends on it. 6535e35772b2Smrg case " $CXX $CXXFLAGS " in 6536e35772b2Smrg *" -library=stlport4 "*) 6537e35772b2Smrg solaris_use_stlport4=yes 6538e35772b2Smrg ;; 6539e35772b2Smrg esac 654072b676d7Smrg 6541e35772b2Smrg # Adding this requires a known-good setup of shared libraries for 6542e35772b2Smrg # Sun compiler versions before 5.6, else PIC objects from an old 6543e35772b2Smrg # archive will be linked into the output, leading to subtle bugs. 6544e35772b2Smrg if test "$solaris_use_stlport4" != yes; then 6545e35772b2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6546e35772b2Smrg fi 6547e35772b2Smrg ;; 6548e35772b2Smrg esac 654972b676d7Smrg ;; 655072b676d7Smrgesac 6551e35772b2Smrg]) 655272b676d7Smrg 6553e35772b2Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 6554e35772b2Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 655572b676d7Smrgesac 6556e35772b2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 6557e35772b2Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 6558e35772b2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 6559e35772b2Smrgfi 6560e35772b2Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 6561e35772b2Smrg [The directories searched by this compiler when creating a shared library]) 6562e35772b2Smrg_LT_TAGDECL([], [predep_objects], [1], 6563e35772b2Smrg [Dependencies to place before and after the objects being linked to 6564e35772b2Smrg create a shared library]) 6565e35772b2Smrg_LT_TAGDECL([], [postdep_objects], [1]) 6566e35772b2Smrg_LT_TAGDECL([], [predeps], [1]) 6567e35772b2Smrg_LT_TAGDECL([], [postdeps], [1]) 6568e35772b2Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 6569e35772b2Smrg [The library search path used internally by the compiler when linking 6570e35772b2Smrg a shared library]) 6571e35772b2Smrg])# _LT_SYS_HIDDEN_LIBDEPS 6572e35772b2Smrg 6573e35772b2Smrg 6574e35772b2Smrg# _LT_PROG_F77 6575e35772b2Smrg# ------------ 6576e35772b2Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string 6577e35772b2Smrg# if there is no fortran compiler, we have our own version here. 6578e35772b2Smrgm4_defun([_LT_PROG_F77], 6579e35772b2Smrg[ 6580e35772b2Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 6581e35772b2SmrgAC_PROG_F77 6582e35772b2Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 6583e35772b2Smrg _lt_disable_F77=yes 6584e35772b2Smrgfi 6585e35772b2Smrgpopdef([AC_MSG_ERROR]) 6586e35772b2Smrg])# _LT_PROG_F77 658772b676d7Smrg 6588e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 6589e35772b2Smrgdnl AC_DEFUN([_LT_PROG_F77], []) 659072b676d7Smrg 659172b676d7Smrg 6592e35772b2Smrg# _LT_LANG_F77_CONFIG([TAG]) 6593e35772b2Smrg# -------------------------- 6594e35772b2Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 6595e35772b2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6596e35772b2Smrg# to write the compiler configuration to `libtool'. 6597e35772b2Smrgm4_defun([_LT_LANG_F77_CONFIG], 6598e35772b2Smrg[AC_REQUIRE([_LT_PROG_F77])dnl 6599e35772b2SmrgAC_LANG_PUSH(Fortran 77) 660072b676d7Smrg 6601e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6602e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6603e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6604e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6605e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6606e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6607e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6608e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6609e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6610e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6611e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6612e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6613e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6614e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 6615e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6616e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6617e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6618e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6619e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6620e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 662172b676d7Smrg 6622e35772b2Smrg# Source file extension for f77 test sources. 6623e35772b2Smrgac_ext=f 662472b676d7Smrg 6625e35772b2Smrg# Object file extension for compiled f77 test sources. 6626e35772b2Smrgobjext=o 6627e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 6628e35772b2Smrg 6629e35772b2Smrg# No sense in running all these tests if we already determined that 6630e35772b2Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 6631e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 6632e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 6633e35772b2Smrgif test "$_lt_disable_F77" != yes; then 6634e35772b2Smrg # Code to be used in simple compile tests 6635e35772b2Smrg lt_simple_compile_test_code="\ 6636e35772b2Smrg subroutine t 6637e35772b2Smrg return 6638e35772b2Smrg end 6639e35772b2Smrg" 664072b676d7Smrg 6641e35772b2Smrg # Code to be used in simple link tests 6642e35772b2Smrg lt_simple_link_test_code="\ 6643e35772b2Smrg program t 6644e35772b2Smrg end 6645e35772b2Smrg" 664672b676d7Smrg 6647e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6648e35772b2Smrg _LT_TAG_COMPILER 664972b676d7Smrg 6650e35772b2Smrg # save warnings/boilerplate of simple test code 6651e35772b2Smrg _LT_COMPILER_BOILERPLATE 6652e35772b2Smrg _LT_LINKER_BOILERPLATE 665372b676d7Smrg 6654e35772b2Smrg # Allow CC to be a program name with arguments. 6655e35772b2Smrg lt_save_CC="$CC" 6656e35772b2Smrg lt_save_GCC=$GCC 6657e35772b2Smrg CC=${F77-"f77"} 6658e35772b2Smrg compiler=$CC 6659e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 6660e35772b2Smrg _LT_CC_BASENAME([$compiler]) 6661e35772b2Smrg GCC=$G77 6662e35772b2Smrg if test -n "$compiler"; then 6663e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6664e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 666572b676d7Smrg 6666e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6667e35772b2Smrg test "$can_build_shared" = "no" && enable_shared=no 6668e35772b2Smrg 6669e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6670e35772b2Smrg # are all built from PIC. 6671e35772b2Smrg case $host_os in 6672e35772b2Smrg aix3*) 6673e35772b2Smrg test "$enable_shared" = yes && enable_static=no 6674e35772b2Smrg if test -n "$RANLIB"; then 6675e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6676e35772b2Smrg postinstall_cmds='$RANLIB $lib' 6677e35772b2Smrg fi 6678e35772b2Smrg ;; 6679e35772b2Smrg aix[[4-9]]*) 6680e35772b2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6681e35772b2Smrg test "$enable_shared" = yes && enable_static=no 668272b676d7Smrg fi 6683e35772b2Smrg ;; 6684e35772b2Smrg esac 6685e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 6686e35772b2Smrg 6687e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 6688e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 6689e35772b2Smrg test "$enable_shared" = yes || enable_static=yes 6690e35772b2Smrg AC_MSG_RESULT([$enable_static]) 6691e35772b2Smrg 6692e35772b2Smrg _LT_TAGVAR(GCC, $1)="$G77" 6693e35772b2Smrg _LT_TAGVAR(LD, $1)="$LD" 6694e35772b2Smrg 6695e35772b2Smrg ## CAVEAT EMPTOR: 6696e35772b2Smrg ## There is no encapsulation within the following macros, do not change 6697e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 6698e35772b2Smrg ## what you are doing... 6699e35772b2Smrg _LT_COMPILER_PIC($1) 6700e35772b2Smrg _LT_COMPILER_C_O($1) 6701e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 6702e35772b2Smrg _LT_LINKER_SHLIBS($1) 6703e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 6704e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6705e35772b2Smrg 6706e35772b2Smrg _LT_CONFIG($1) 6707e35772b2Smrg fi # test -n "$compiler" 6708e35772b2Smrg 6709e35772b2Smrg GCC=$lt_save_GCC 6710e35772b2Smrg CC="$lt_save_CC" 6711e35772b2Smrgfi # test "$_lt_disable_F77" != yes 671272b676d7Smrg 6713e35772b2SmrgAC_LANG_POP 6714e35772b2Smrg])# _LT_LANG_F77_CONFIG 6715e35772b2Smrg 6716e35772b2Smrg 6717e35772b2Smrg# _LT_PROG_FC 6718e35772b2Smrg# ----------- 6719e35772b2Smrg# Since AC_PROG_FC is broken, in that it returns the empty string 6720e35772b2Smrg# if there is no fortran compiler, we have our own version here. 6721e35772b2Smrgm4_defun([_LT_PROG_FC], 6722e35772b2Smrg[ 6723e35772b2Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 6724e35772b2SmrgAC_PROG_FC 6725e35772b2Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 6726e35772b2Smrg _lt_disable_FC=yes 672772b676d7Smrgfi 6728e35772b2Smrgpopdef([AC_MSG_ERROR]) 6729e35772b2Smrg])# _LT_PROG_FC 673072b676d7Smrg 6731e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 6732e35772b2Smrgdnl AC_DEFUN([_LT_PROG_FC], []) 673372b676d7Smrg 673472b676d7Smrg 6735e35772b2Smrg# _LT_LANG_FC_CONFIG([TAG]) 6736e35772b2Smrg# ------------------------- 6737e35772b2Smrg# Ensure that the configuration variables for a Fortran compiler are 6738e35772b2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6739e35772b2Smrg# to write the compiler configuration to `libtool'. 6740e35772b2Smrgm4_defun([_LT_LANG_FC_CONFIG], 6741e35772b2Smrg[AC_REQUIRE([_LT_PROG_FC])dnl 6742e35772b2SmrgAC_LANG_PUSH(Fortran) 6743e35772b2Smrg 6744e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6745e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6746e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6747e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6748e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6749e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6750e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6751e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6752e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6753e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6754e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6755e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6756e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6757e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 6758e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6759e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6760e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6761e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6762e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6763e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6764e35772b2Smrg 6765e35772b2Smrg# Source file extension for fc test sources. 6766e35772b2Smrgac_ext=${ac_fc_srcext-f} 6767e35772b2Smrg 6768e35772b2Smrg# Object file extension for compiled fc test sources. 6769e35772b2Smrgobjext=o 6770e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 6771e35772b2Smrg 6772e35772b2Smrg# No sense in running all these tests if we already determined that 6773e35772b2Smrg# the FC compiler isn't working. Some variables (like enable_shared) 6774e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 6775e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 6776e35772b2Smrgif test "$_lt_disable_FC" != yes; then 6777e35772b2Smrg # Code to be used in simple compile tests 6778e35772b2Smrg lt_simple_compile_test_code="\ 6779e35772b2Smrg subroutine t 6780e35772b2Smrg return 6781e35772b2Smrg end 6782e35772b2Smrg" 6783e35772b2Smrg 6784e35772b2Smrg # Code to be used in simple link tests 6785e35772b2Smrg lt_simple_link_test_code="\ 6786e35772b2Smrg program t 6787e35772b2Smrg end 6788e35772b2Smrg" 6789e35772b2Smrg 6790e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6791e35772b2Smrg _LT_TAG_COMPILER 679272b676d7Smrg 6793e35772b2Smrg # save warnings/boilerplate of simple test code 6794e35772b2Smrg _LT_COMPILER_BOILERPLATE 6795e35772b2Smrg _LT_LINKER_BOILERPLATE 6796e35772b2Smrg 6797e35772b2Smrg # Allow CC to be a program name with arguments. 6798e35772b2Smrg lt_save_CC="$CC" 6799e35772b2Smrg lt_save_GCC=$GCC 6800e35772b2Smrg CC=${FC-"f95"} 6801e35772b2Smrg compiler=$CC 6802e35772b2Smrg GCC=$ac_cv_fc_compiler_gnu 6803e35772b2Smrg 6804e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 6805e35772b2Smrg _LT_CC_BASENAME([$compiler]) 6806e35772b2Smrg 6807e35772b2Smrg if test -n "$compiler"; then 6808e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6809e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 6810e35772b2Smrg 6811e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6812e35772b2Smrg test "$can_build_shared" = "no" && enable_shared=no 6813e35772b2Smrg 6814e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6815e35772b2Smrg # are all built from PIC. 681672b676d7Smrg case $host_os in 6817e35772b2Smrg aix3*) 6818e35772b2Smrg test "$enable_shared" = yes && enable_static=no 6819e35772b2Smrg if test -n "$RANLIB"; then 6820e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6821e35772b2Smrg postinstall_cmds='$RANLIB $lib' 6822e35772b2Smrg fi 6823e35772b2Smrg ;; 68241fd23544Smrg aix[[4-9]]*) 6825e35772b2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6826e35772b2Smrg test "$enable_shared" = yes && enable_static=no 682772b676d7Smrg fi 6828e35772b2Smrg ;; 682972b676d7Smrg esac 6830e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 6831e35772b2Smrg 6832e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 6833e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 6834e35772b2Smrg test "$enable_shared" = yes || enable_static=yes 6835e35772b2Smrg AC_MSG_RESULT([$enable_static]) 6836e35772b2Smrg 6837e35772b2Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 6838e35772b2Smrg _LT_TAGVAR(LD, $1)="$LD" 6839e35772b2Smrg 6840e35772b2Smrg ## CAVEAT EMPTOR: 6841e35772b2Smrg ## There is no encapsulation within the following macros, do not change 6842e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 6843e35772b2Smrg ## what you are doing... 6844e35772b2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6845e35772b2Smrg _LT_COMPILER_PIC($1) 6846e35772b2Smrg _LT_COMPILER_C_O($1) 6847e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 6848e35772b2Smrg _LT_LINKER_SHLIBS($1) 6849e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 6850e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6851e35772b2Smrg 6852e35772b2Smrg _LT_CONFIG($1) 6853e35772b2Smrg fi # test -n "$compiler" 6854e35772b2Smrg 6855e35772b2Smrg GCC=$lt_save_GCC 6856e35772b2Smrg CC="$lt_save_CC" 6857e35772b2Smrgfi # test "$_lt_disable_FC" != yes 685872b676d7Smrg 6859e35772b2SmrgAC_LANG_POP 6860e35772b2Smrg])# _LT_LANG_FC_CONFIG 686172b676d7Smrg 686272b676d7Smrg 6863e35772b2Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 6864e35772b2Smrg# -------------------------- 6865e35772b2Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 6866e35772b2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6867e35772b2Smrg# to write the compiler configuration to `libtool'. 6868e35772b2Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 6869e35772b2Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 6870e35772b2SmrgAC_LANG_SAVE 687172b676d7Smrg 6872e35772b2Smrg# Source file extension for Java test sources. 6873e35772b2Smrgac_ext=java 687472b676d7Smrg 6875e35772b2Smrg# Object file extension for compiled Java test sources. 6876e35772b2Smrgobjext=o 6877e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 687872b676d7Smrg 6879e35772b2Smrg# Code to be used in simple compile tests 6880e35772b2Smrglt_simple_compile_test_code="class foo {}" 688172b676d7Smrg 6882e35772b2Smrg# Code to be used in simple link tests 6883e35772b2Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 688472b676d7Smrg 6885e35772b2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6886e35772b2Smrg_LT_TAG_COMPILER 688772b676d7Smrg 6888e35772b2Smrg# save warnings/boilerplate of simple test code 6889e35772b2Smrg_LT_COMPILER_BOILERPLATE 6890e35772b2Smrg_LT_LINKER_BOILERPLATE 689172b676d7Smrg 6892e35772b2Smrg# Allow CC to be a program name with arguments. 6893e35772b2Smrglt_save_CC="$CC" 6894e35772b2Smrglt_save_GCC=$GCC 6895e35772b2SmrgGCC=yes 6896e35772b2SmrgCC=${GCJ-"gcj"} 6897e35772b2Smrgcompiler=$CC 6898e35772b2Smrg_LT_TAGVAR(compiler, $1)=$CC 6899e35772b2Smrg_LT_TAGVAR(LD, $1)="$LD" 6900e35772b2Smrg_LT_CC_BASENAME([$compiler]) 690172b676d7Smrg 6902e35772b2Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 6903e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 690472b676d7Smrg 6905e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 690672b676d7Smrg 6907e35772b2Smrgif test -n "$compiler"; then 6908e35772b2Smrg _LT_COMPILER_NO_RTTI($1) 6909e35772b2Smrg _LT_COMPILER_PIC($1) 6910e35772b2Smrg _LT_COMPILER_C_O($1) 6911e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 6912e35772b2Smrg _LT_LINKER_SHLIBS($1) 6913e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 691472b676d7Smrg 6915e35772b2Smrg _LT_CONFIG($1) 6916e35772b2Smrgfi 691772b676d7Smrg 6918e35772b2SmrgAC_LANG_RESTORE 691972b676d7Smrg 6920e35772b2SmrgGCC=$lt_save_GCC 6921e35772b2SmrgCC="$lt_save_CC" 6922e35772b2Smrg])# _LT_LANG_GCJ_CONFIG 692372b676d7Smrg 69241fd23544Smrg 6925e35772b2Smrg# _LT_LANG_RC_CONFIG([TAG]) 6926e35772b2Smrg# ------------------------- 6927e35772b2Smrg# Ensure that the configuration variables for the Windows resource compiler 6928e35772b2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6929e35772b2Smrg# to write the compiler configuration to `libtool'. 6930e35772b2Smrgm4_defun([_LT_LANG_RC_CONFIG], 6931e35772b2Smrg[AC_REQUIRE([LT_PROG_RC])dnl 6932e35772b2SmrgAC_LANG_SAVE 6933e35772b2Smrg 6934e35772b2Smrg# Source file extension for RC test sources. 6935e35772b2Smrgac_ext=rc 6936e35772b2Smrg 6937e35772b2Smrg# Object file extension for compiled RC test sources. 6938e35772b2Smrgobjext=o 6939e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 6940e35772b2Smrg 6941e35772b2Smrg# Code to be used in simple compile tests 6942e35772b2Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 6943e35772b2Smrg 6944e35772b2Smrg# Code to be used in simple link tests 6945e35772b2Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 6946e35772b2Smrg 6947e35772b2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6948e35772b2Smrg_LT_TAG_COMPILER 6949e35772b2Smrg 6950e35772b2Smrg# save warnings/boilerplate of simple test code 6951e35772b2Smrg_LT_COMPILER_BOILERPLATE 6952e35772b2Smrg_LT_LINKER_BOILERPLATE 6953e35772b2Smrg 6954e35772b2Smrg# Allow CC to be a program name with arguments. 6955e35772b2Smrglt_save_CC="$CC" 6956e35772b2Smrglt_save_GCC=$GCC 6957e35772b2SmrgGCC= 6958e35772b2SmrgCC=${RC-"windres"} 6959e35772b2Smrgcompiler=$CC 6960e35772b2Smrg_LT_TAGVAR(compiler, $1)=$CC 6961e35772b2Smrg_LT_CC_BASENAME([$compiler]) 6962e35772b2Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6963e35772b2Smrg 6964e35772b2Smrgif test -n "$compiler"; then 6965e35772b2Smrg : 6966e35772b2Smrg _LT_CONFIG($1) 6967e35772b2Smrgfi 6968e35772b2Smrg 6969e35772b2SmrgGCC=$lt_save_GCC 6970e35772b2SmrgAC_LANG_RESTORE 6971e35772b2SmrgCC="$lt_save_CC" 6972e35772b2Smrg])# _LT_LANG_RC_CONFIG 6973e35772b2Smrg 6974e35772b2Smrg 6975e35772b2Smrg# LT_PROG_GCJ 6976e35772b2Smrg# ----------- 6977e35772b2SmrgAC_DEFUN([LT_PROG_GCJ], 6978e35772b2Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 6979e35772b2Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 6980e35772b2Smrg [AC_CHECK_TOOL(GCJ, gcj,) 6981e35772b2Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6982e35772b2Smrg AC_SUBST(GCJFLAGS)])])[]dnl 6983e35772b2Smrg]) 6984e35772b2Smrg 6985e35772b2Smrg# Old name: 6986e35772b2SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 6987e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 6988e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 6989e35772b2Smrg 6990e35772b2Smrg 6991e35772b2Smrg# LT_PROG_RC 6992e35772b2Smrg# ---------- 6993e35772b2SmrgAC_DEFUN([LT_PROG_RC], 6994e35772b2Smrg[AC_CHECK_TOOL(RC, windres,) 6995e35772b2Smrg]) 6996e35772b2Smrg 6997e35772b2Smrg# Old name: 6998e35772b2SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 6999e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 7000e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7001e35772b2Smrg 7002e35772b2Smrg 7003e35772b2Smrg# _LT_DECL_EGREP 7004e35772b2Smrg# -------------- 7005e35772b2Smrg# If we don't have a new enough Autoconf to choose the best grep 7006e35772b2Smrg# available, choose the one first in the user's PATH. 7007e35772b2Smrgm4_defun([_LT_DECL_EGREP], 7008e35772b2Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7009e35772b2SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7010e35772b2Smrgtest -z "$GREP" && GREP=grep 7011e35772b2Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7012e35772b2Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7013e35772b2Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7014e35772b2Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7015e35772b2SmrgAC_SUBST([GREP]) 7016e35772b2Smrg]) 7017e35772b2Smrg 7018e35772b2Smrg 7019e35772b2Smrg# _LT_DECL_OBJDUMP 7020e35772b2Smrg# -------------- 7021e35772b2Smrg# If we don't have a new enough Autoconf to choose the best objdump 7022e35772b2Smrg# available, choose the one first in the user's PATH. 7023e35772b2Smrgm4_defun([_LT_DECL_OBJDUMP], 7024e35772b2Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7025e35772b2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7026e35772b2Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7027e35772b2SmrgAC_SUBST([OBJDUMP]) 7028e35772b2Smrg]) 7029e35772b2Smrg 7030e35772b2Smrg 7031e35772b2Smrg# _LT_DECL_SED 7032e35772b2Smrg# ------------ 7033e35772b2Smrg# Check for a fully-functional sed program, that truncates 7034e35772b2Smrg# as few characters as possible. Prefer GNU sed if found. 7035e35772b2Smrgm4_defun([_LT_DECL_SED], 7036e35772b2Smrg[AC_PROG_SED 7037e35772b2Smrgtest -z "$SED" && SED=sed 7038e35772b2SmrgXsed="$SED -e 1s/^X//" 7039e35772b2Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7040e35772b2Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7041e35772b2Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7042e35772b2Smrg])# _LT_DECL_SED 7043e35772b2Smrg 7044e35772b2Smrgm4_ifndef([AC_PROG_SED], [ 7045e35772b2Smrg# NOTE: This macro has been submitted for inclusion into # 7046e35772b2Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7047e35772b2Smrg# a released version of Autoconf we should remove this # 7048e35772b2Smrg# macro and use it instead. # 7049e35772b2Smrg 7050e35772b2Smrgm4_defun([AC_PROG_SED], 7051e35772b2Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7052e35772b2SmrgAC_CACHE_VAL(lt_cv_path_SED, 7053e35772b2Smrg[# Loop through the user's path and test for sed and gsed. 7054e35772b2Smrg# Then use that list of sed's as ones to test for truncation. 7055e35772b2Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7056e35772b2Smrgfor as_dir in $PATH 7057e35772b2Smrgdo 7058e35772b2Smrg IFS=$as_save_IFS 7059e35772b2Smrg test -z "$as_dir" && as_dir=. 7060e35772b2Smrg for lt_ac_prog in sed gsed; do 7061e35772b2Smrg for ac_exec_ext in '' $ac_executable_extensions; do 7062e35772b2Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7063e35772b2Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7064e35772b2Smrg fi 7065e35772b2Smrg done 7066e35772b2Smrg done 7067e35772b2Smrgdone 7068e35772b2SmrgIFS=$as_save_IFS 7069e35772b2Smrglt_ac_max=0 7070e35772b2Smrglt_ac_count=0 7071e35772b2Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7072e35772b2Smrg# along with /bin/sed that truncates output. 7073e35772b2Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7074e35772b2Smrg test ! -f $lt_ac_sed && continue 7075e35772b2Smrg cat /dev/null > conftest.in 7076e35772b2Smrg lt_ac_count=0 7077e35772b2Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7078e35772b2Smrg # Check for GNU sed and select it if it is found. 7079e35772b2Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7080e35772b2Smrg lt_cv_path_SED=$lt_ac_sed 7081e35772b2Smrg break 7082e35772b2Smrg fi 7083e35772b2Smrg while true; do 7084e35772b2Smrg cat conftest.in conftest.in >conftest.tmp 7085e35772b2Smrg mv conftest.tmp conftest.in 7086e35772b2Smrg cp conftest.in conftest.nl 7087e35772b2Smrg echo >>conftest.nl 7088e35772b2Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7089e35772b2Smrg cmp -s conftest.out conftest.nl || break 7090e35772b2Smrg # 10000 chars as input seems more than enough 7091e35772b2Smrg test $lt_ac_count -gt 10 && break 7092e35772b2Smrg lt_ac_count=`expr $lt_ac_count + 1` 7093e35772b2Smrg if test $lt_ac_count -gt $lt_ac_max; then 7094e35772b2Smrg lt_ac_max=$lt_ac_count 7095e35772b2Smrg lt_cv_path_SED=$lt_ac_sed 7096e35772b2Smrg fi 7097e35772b2Smrg done 7098e35772b2Smrgdone 7099e35772b2Smrg]) 7100e35772b2SmrgSED=$lt_cv_path_SED 7101e35772b2SmrgAC_SUBST([SED]) 7102e35772b2SmrgAC_MSG_RESULT([$SED]) 7103e35772b2Smrg])#AC_PROG_SED 7104e35772b2Smrg])#m4_ifndef 7105e35772b2Smrg 7106e35772b2Smrg# Old name: 7107e35772b2SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7108e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 7109e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7110e35772b2Smrg 7111e35772b2Smrg 7112e35772b2Smrg# _LT_CHECK_SHELL_FEATURES 7113e35772b2Smrg# ------------------------ 7114e35772b2Smrg# Find out whether the shell is Bourne or XSI compatible, 7115e35772b2Smrg# or has some other useful features. 7116e35772b2Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7117e35772b2Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7118e35772b2Smrg# Try some XSI features 7119e35772b2Smrgxsi_shell=no 7120e35772b2Smrg( _lt_dummy="a/b/c" 7121e35772b2Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 7122e35772b2Smrg = c,a/b,, \ 7123e35772b2Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7124e35772b2Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7125e35772b2Smrg && xsi_shell=yes 7126e35772b2SmrgAC_MSG_RESULT([$xsi_shell]) 7127e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7128e35772b2Smrg 7129e35772b2SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7130e35772b2Smrglt_shell_append=no 7131e35772b2Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7132e35772b2Smrg >/dev/null 2>&1 \ 7133e35772b2Smrg && lt_shell_append=yes 7134e35772b2SmrgAC_MSG_RESULT([$lt_shell_append]) 7135e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7136e35772b2Smrg 7137e35772b2Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7138e35772b2Smrg lt_unset=unset 7139e35772b2Smrgelse 7140e35772b2Smrg lt_unset=false 7141e35772b2Smrgfi 7142e35772b2Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7143e35772b2Smrg 7144e35772b2Smrg# test EBCDIC or ASCII 7145e35772b2Smrgcase `echo X|tr X '\101'` in 7146e35772b2Smrg A) # ASCII based system 7147e35772b2Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7148e35772b2Smrg lt_SP2NL='tr \040 \012' 7149e35772b2Smrg lt_NL2SP='tr \015\012 \040\040' 7150e35772b2Smrg ;; 7151e35772b2Smrg *) # EBCDIC based system 7152e35772b2Smrg lt_SP2NL='tr \100 \n' 7153e35772b2Smrg lt_NL2SP='tr \r\n \100\100' 7154e35772b2Smrg ;; 7155e35772b2Smrgesac 7156e35772b2Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7157e35772b2Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7158e35772b2Smrg])# _LT_CHECK_SHELL_FEATURES 7159e35772b2Smrg 7160e35772b2Smrg 7161e35772b2Smrg# _LT_PROG_XSI_SHELLFNS 7162e35772b2Smrg# --------------------- 7163e35772b2Smrg# Bourne and XSI compatible variants of some useful shell functions. 7164e35772b2Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 7165e35772b2Smrg[case $xsi_shell in 7166e35772b2Smrg yes) 7167e35772b2Smrg cat << \_LT_EOF >> "$cfgfile" 7168e35772b2Smrg 7169e35772b2Smrg# func_dirname file append nondir_replacement 7170e35772b2Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7171e35772b2Smrg# otherwise set result to NONDIR_REPLACEMENT. 7172e35772b2Smrgfunc_dirname () 7173e35772b2Smrg{ 7174e35772b2Smrg case ${1} in 7175e35772b2Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7176e35772b2Smrg * ) func_dirname_result="${3}" ;; 7177e35772b2Smrg esac 7178e35772b2Smrg} 7179e35772b2Smrg 7180e35772b2Smrg# func_basename file 7181e35772b2Smrgfunc_basename () 7182e35772b2Smrg{ 7183e35772b2Smrg func_basename_result="${1##*/}" 7184e35772b2Smrg} 718572b676d7Smrg 7186e35772b2Smrg# func_dirname_and_basename file append nondir_replacement 7187e35772b2Smrg# perform func_basename and func_dirname in a single function 7188e35772b2Smrg# call: 7189e35772b2Smrg# dirname: Compute the dirname of FILE. If nonempty, 7190e35772b2Smrg# add APPEND to the result, otherwise set result 7191e35772b2Smrg# to NONDIR_REPLACEMENT. 7192e35772b2Smrg# value returned in "$func_dirname_result" 7193e35772b2Smrg# basename: Compute filename of FILE. 7194e35772b2Smrg# value retuned in "$func_basename_result" 7195e35772b2Smrg# Implementation must be kept synchronized with func_dirname 7196e35772b2Smrg# and func_basename. For efficiency, we do not delegate to 7197e35772b2Smrg# those functions but instead duplicate the functionality here. 7198e35772b2Smrgfunc_dirname_and_basename () 7199e35772b2Smrg{ 7200e35772b2Smrg case ${1} in 7201e35772b2Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7202e35772b2Smrg * ) func_dirname_result="${3}" ;; 7203e35772b2Smrg esac 7204e35772b2Smrg func_basename_result="${1##*/}" 7205e35772b2Smrg} 720672b676d7Smrg 7207e35772b2Smrg# func_stripname prefix suffix name 7208e35772b2Smrg# strip PREFIX and SUFFIX off of NAME. 7209e35772b2Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7210e35772b2Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7211e35772b2Smrg# dot (in which case that matches only a dot). 7212e35772b2Smrgfunc_stripname () 7213e35772b2Smrg{ 7214e35772b2Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7215e35772b2Smrg # positional parameters, so assign one to ordinary parameter first. 7216e35772b2Smrg func_stripname_result=${3} 7217e35772b2Smrg func_stripname_result=${func_stripname_result#"${1}"} 7218e35772b2Smrg func_stripname_result=${func_stripname_result%"${2}"} 7219e35772b2Smrg} 722072b676d7Smrg 7221e35772b2Smrg# func_opt_split 7222e35772b2Smrgfunc_opt_split () 7223e35772b2Smrg{ 7224e35772b2Smrg func_opt_split_opt=${1%%=*} 7225e35772b2Smrg func_opt_split_arg=${1#*=} 7226e35772b2Smrg} 722772b676d7Smrg 7228e35772b2Smrg# func_lo2o object 7229e35772b2Smrgfunc_lo2o () 7230e35772b2Smrg{ 7231e35772b2Smrg case ${1} in 7232e35772b2Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7233e35772b2Smrg *) func_lo2o_result=${1} ;; 7234e35772b2Smrg esac 7235e35772b2Smrg} 723672b676d7Smrg 7237e35772b2Smrg# func_xform libobj-or-source 7238e35772b2Smrgfunc_xform () 7239e35772b2Smrg{ 7240e35772b2Smrg func_xform_result=${1%.*}.lo 7241e35772b2Smrg} 724272b676d7Smrg 7243e35772b2Smrg# func_arith arithmetic-term... 7244e35772b2Smrgfunc_arith () 7245e35772b2Smrg{ 7246e35772b2Smrg func_arith_result=$(( $[*] )) 7247e35772b2Smrg} 724872b676d7Smrg 7249e35772b2Smrg# func_len string 7250e35772b2Smrg# STRING may not start with a hyphen. 7251e35772b2Smrgfunc_len () 7252e35772b2Smrg{ 7253e35772b2Smrg func_len_result=${#1} 7254e35772b2Smrg} 725572b676d7Smrg 7256e35772b2Smrg_LT_EOF 725772b676d7Smrg ;; 7258e35772b2Smrg *) # Bourne compatible functions. 7259e35772b2Smrg cat << \_LT_EOF >> "$cfgfile" 726072b676d7Smrg 7261e35772b2Smrg# func_dirname file append nondir_replacement 7262e35772b2Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7263e35772b2Smrg# otherwise set result to NONDIR_REPLACEMENT. 7264e35772b2Smrgfunc_dirname () 7265e35772b2Smrg{ 7266e35772b2Smrg # Extract subdirectory from the argument. 7267e35772b2Smrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 7268e35772b2Smrg if test "X$func_dirname_result" = "X${1}"; then 7269e35772b2Smrg func_dirname_result="${3}" 7270e35772b2Smrg else 7271e35772b2Smrg func_dirname_result="$func_dirname_result${2}" 7272e35772b2Smrg fi 7273e35772b2Smrg} 727472b676d7Smrg 7275e35772b2Smrg# func_basename file 7276e35772b2Smrgfunc_basename () 7277e35772b2Smrg{ 7278e35772b2Smrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 7279e35772b2Smrg} 728072b676d7Smrg 7281e35772b2Smrgdnl func_dirname_and_basename 7282e35772b2Smrgdnl A portable version of this function is already defined in general.m4sh 7283e35772b2Smrgdnl so there is no need for it here. 7284e35772b2Smrg 7285e35772b2Smrg# func_stripname prefix suffix name 7286e35772b2Smrg# strip PREFIX and SUFFIX off of NAME. 7287e35772b2Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7288e35772b2Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7289e35772b2Smrg# dot (in which case that matches only a dot). 7290e35772b2Smrg# func_strip_suffix prefix name 7291e35772b2Smrgfunc_stripname () 7292e35772b2Smrg{ 7293e35772b2Smrg case ${2} in 7294e35772b2Smrg .*) func_stripname_result=`$ECHO "X${3}" \ 7295e35772b2Smrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 7296e35772b2Smrg *) func_stripname_result=`$ECHO "X${3}" \ 7297e35772b2Smrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 729872b676d7Smrg esac 7299e35772b2Smrg} 730072b676d7Smrg 7301e35772b2Smrg# sed scripts: 7302e35772b2Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 7303e35772b2Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 730472b676d7Smrg 7305e35772b2Smrg# func_opt_split 7306e35772b2Smrgfunc_opt_split () 7307e35772b2Smrg{ 7308e35772b2Smrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 7309e35772b2Smrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 7310e35772b2Smrg} 731172b676d7Smrg 7312e35772b2Smrg# func_lo2o object 7313e35772b2Smrgfunc_lo2o () 7314e35772b2Smrg{ 7315e35772b2Smrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 7316e35772b2Smrg} 731772b676d7Smrg 7318e35772b2Smrg# func_xform libobj-or-source 7319e35772b2Smrgfunc_xform () 7320e35772b2Smrg{ 7321e35772b2Smrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 7322e35772b2Smrg} 732372b676d7Smrg 7324e35772b2Smrg# func_arith arithmetic-term... 7325e35772b2Smrgfunc_arith () 7326e35772b2Smrg{ 7327e35772b2Smrg func_arith_result=`expr "$[@]"` 7328e35772b2Smrg} 732972b676d7Smrg 7330e35772b2Smrg# func_len string 7331e35772b2Smrg# STRING may not start with a hyphen. 7332e35772b2Smrgfunc_len () 7333e35772b2Smrg{ 7334e35772b2Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 7335e35772b2Smrg} 733672b676d7Smrg 7337e35772b2Smrg_LT_EOF 7338e35772b2Smrgesac 733972b676d7Smrg 7340e35772b2Smrgcase $lt_shell_append in 7341e35772b2Smrg yes) 7342e35772b2Smrg cat << \_LT_EOF >> "$cfgfile" 734372b676d7Smrg 7344e35772b2Smrg# func_append var value 7345e35772b2Smrg# Append VALUE to the end of shell variable VAR. 7346e35772b2Smrgfunc_append () 7347e35772b2Smrg{ 7348e35772b2Smrg eval "$[1]+=\$[2]" 7349e35772b2Smrg} 7350e35772b2Smrg_LT_EOF 7351e35772b2Smrg ;; 7352e35772b2Smrg *) 7353e35772b2Smrg cat << \_LT_EOF >> "$cfgfile" 735472b676d7Smrg 7355e35772b2Smrg# func_append var value 7356e35772b2Smrg# Append VALUE to the end of shell variable VAR. 7357e35772b2Smrgfunc_append () 7358e35772b2Smrg{ 7359e35772b2Smrg eval "$[1]=\$$[1]\$[2]" 7360e35772b2Smrg} 736172b676d7Smrg 7362e35772b2Smrg_LT_EOF 7363e35772b2Smrg ;; 7364e35772b2Smrg esac 7365e35772b2Smrg]) 736672b676d7Smrg 7367e35772b2Smrg# Helper functions for option handling. -*- Autoconf -*- 7368e35772b2Smrg# 7369e35772b2Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7370e35772b2Smrg# Written by Gary V. Vaughan, 2004 7371e35772b2Smrg# 7372e35772b2Smrg# This file is free software; the Free Software Foundation gives 7373e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 7374e35772b2Smrg# modifications, as long as this notice is preserved. 737572b676d7Smrg 7376e35772b2Smrg# serial 6 ltoptions.m4 737772b676d7Smrg 7378e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7379e35772b2SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 738072b676d7Smrg 738172b676d7Smrg 7382e35772b2Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7383e35772b2Smrg# ------------------------------------------ 7384e35772b2Smrgm4_define([_LT_MANGLE_OPTION], 7385e35772b2Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 738672b676d7Smrg 738772b676d7Smrg 7388e35772b2Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7389e35772b2Smrg# --------------------------------------- 7390e35772b2Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7391e35772b2Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7392e35772b2Smrg# saved as a flag. 7393e35772b2Smrgm4_define([_LT_SET_OPTION], 7394e35772b2Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7395e35772b2Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7396e35772b2Smrg _LT_MANGLE_DEFUN([$1], [$2]), 7397e35772b2Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7398e35772b2Smrg]) 7399e35772b2Smrg 7400e35772b2Smrg 7401e35772b2Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7402e35772b2Smrg# ------------------------------------------------------------ 7403e35772b2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7404e35772b2Smrgm4_define([_LT_IF_OPTION], 7405e35772b2Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7406e35772b2Smrg 7407e35772b2Smrg 7408e35772b2Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7409e35772b2Smrg# ------------------------------------------------------- 7410e35772b2Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7411e35772b2Smrg# are set. 7412e35772b2Smrgm4_define([_LT_UNLESS_OPTIONS], 7413e35772b2Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7414e35772b2Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7415e35772b2Smrg [m4_define([$0_found])])])[]dnl 7416e35772b2Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7417e35772b2Smrg])[]dnl 7418e35772b2Smrg]) 7419e35772b2Smrg 742072b676d7Smrg 7421e35772b2Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7422e35772b2Smrg# ---------------------------------------- 7423e35772b2Smrg# OPTION-LIST is a space-separated list of Libtool options associated 7424e35772b2Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7425e35772b2Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7426e35772b2Smrg# the unknown option and exit. 7427e35772b2Smrgm4_defun([_LT_SET_OPTIONS], 7428e35772b2Smrg[# Set options 7429e35772b2Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7430e35772b2Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 7431e35772b2Smrg 7432e35772b2Smrgm4_if([$1],[LT_INIT],[ 7433e35772b2Smrg dnl 7434e35772b2Smrg dnl Simply set some default values (i.e off) if boolean options were not 7435e35772b2Smrg dnl specified: 7436e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7437e35772b2Smrg ]) 7438e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7439e35772b2Smrg ]) 7440e35772b2Smrg dnl 7441e35772b2Smrg dnl If no reference was made to various pairs of opposing options, then 7442e35772b2Smrg dnl we run the default mode handler for the pair. For example, if neither 7443e35772b2Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7444e35772b2Smrg dnl archives by default: 7445e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7446e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7447e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7448e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7449e35772b2Smrg [_LT_ENABLE_FAST_INSTALL]) 7450e35772b2Smrg ]) 7451e35772b2Smrg])# _LT_SET_OPTIONS 745272b676d7Smrg 745372b676d7Smrg 745472b676d7Smrg 7455e35772b2Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7456e35772b2Smrg# ----------------------------------------- 7457e35772b2Smrgm4_define([_LT_MANGLE_DEFUN], 7458e35772b2Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 745972b676d7Smrg 746072b676d7Smrg 7461e35772b2Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7462e35772b2Smrg# ----------------------------------------------- 7463e35772b2Smrgm4_define([LT_OPTION_DEFINE], 7464e35772b2Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7465e35772b2Smrg])# LT_OPTION_DEFINE 746672b676d7Smrg 746772b676d7Smrg 7468e35772b2Smrg# dlopen 7469e35772b2Smrg# ------ 7470e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7471e35772b2Smrg]) 747272b676d7Smrg 7473e35772b2SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7474e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7475e35772b2SmrgAC_DIAGNOSE([obsolete], 7476e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7477e35772b2Smrgput the `dlopen' option into LT_INIT's first parameter.]) 7478e35772b2Smrg]) 747972b676d7Smrg 7480e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 7481e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 748272b676d7Smrg 748372b676d7Smrg 7484e35772b2Smrg# win32-dll 7485e35772b2Smrg# --------- 7486e35772b2Smrg# Declare package support for building win32 dll's. 7487e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7488e35772b2Smrg[enable_win32_dll=yes 748972b676d7Smrg 7490e35772b2Smrgcase $host in 7491e35772b2Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 7492e35772b2Smrg AC_CHECK_TOOL(AS, as, false) 7493e35772b2Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7494e35772b2Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7495e35772b2Smrg ;; 7496e35772b2Smrgesac 749772b676d7Smrg 7498e35772b2Smrgtest -z "$AS" && AS=as 7499e35772b2Smrg_LT_DECL([], [AS], [0], [Assembler program])dnl 750072b676d7Smrg 7501e35772b2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7502e35772b2Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 750372b676d7Smrg 7504e35772b2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7505e35772b2Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 7506e35772b2Smrg])# win32-dll 750772b676d7Smrg 7508e35772b2SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7509e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7510e35772b2Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7511e35772b2SmrgAC_DIAGNOSE([obsolete], 7512e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7513e35772b2Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 7514e35772b2Smrg]) 751572b676d7Smrg 7516e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 7517e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 751872b676d7Smrg 7519e35772b2Smrg 7520e35772b2Smrg# _LT_ENABLE_SHARED([DEFAULT]) 7521e35772b2Smrg# ---------------------------- 7522e35772b2Smrg# implement the --enable-shared flag, and supports the `shared' and 7523e35772b2Smrg# `disable-shared' LT_INIT options. 7524e35772b2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7525e35772b2Smrgm4_define([_LT_ENABLE_SHARED], 7526e35772b2Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 7527e35772b2SmrgAC_ARG_ENABLE([shared], 7528e35772b2Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 7529e35772b2Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 7530e35772b2Smrg [p=${PACKAGE-default} 7531e35772b2Smrg case $enableval in 7532e35772b2Smrg yes) enable_shared=yes ;; 7533e35772b2Smrg no) enable_shared=no ;; 7534e35772b2Smrg *) 7535e35772b2Smrg enable_shared=no 7536e35772b2Smrg # Look at the argument we got. We use all the common list separators. 7537e35772b2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7538e35772b2Smrg for pkg in $enableval; do 7539e35772b2Smrg IFS="$lt_save_ifs" 7540e35772b2Smrg if test "X$pkg" = "X$p"; then 7541e35772b2Smrg enable_shared=yes 7542e35772b2Smrg fi 7543e35772b2Smrg done 7544e35772b2Smrg IFS="$lt_save_ifs" 754572b676d7Smrg ;; 7546e35772b2Smrg esac], 7547e35772b2Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 754872b676d7Smrg 7549e35772b2Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 7550e35772b2Smrg [Whether or not to build shared libraries]) 7551e35772b2Smrg])# _LT_ENABLE_SHARED 755272b676d7Smrg 7553e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 7554e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 755572b676d7Smrg 7556e35772b2Smrg# Old names: 7557e35772b2SmrgAC_DEFUN([AC_ENABLE_SHARED], 7558e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 7559e35772b2Smrg]) 7560e35772b2Smrg 7561e35772b2SmrgAC_DEFUN([AC_DISABLE_SHARED], 7562e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 7563e35772b2Smrg]) 756472b676d7Smrg 7565e35772b2SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7566e35772b2SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 756772b676d7Smrg 7568e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 7569e35772b2Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 7570e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 757172b676d7Smrg 757272b676d7Smrg 757372b676d7Smrg 7574e35772b2Smrg# _LT_ENABLE_STATIC([DEFAULT]) 7575e35772b2Smrg# ---------------------------- 7576e35772b2Smrg# implement the --enable-static flag, and support the `static' and 7577e35772b2Smrg# `disable-static' LT_INIT options. 7578e35772b2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7579e35772b2Smrgm4_define([_LT_ENABLE_STATIC], 7580e35772b2Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 7581e35772b2SmrgAC_ARG_ENABLE([static], 7582e35772b2Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 7583e35772b2Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 7584e35772b2Smrg [p=${PACKAGE-default} 7585e35772b2Smrg case $enableval in 7586e35772b2Smrg yes) enable_static=yes ;; 7587e35772b2Smrg no) enable_static=no ;; 7588e35772b2Smrg *) 7589e35772b2Smrg enable_static=no 7590e35772b2Smrg # Look at the argument we got. We use all the common list separators. 7591e35772b2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7592e35772b2Smrg for pkg in $enableval; do 7593e35772b2Smrg IFS="$lt_save_ifs" 7594e35772b2Smrg if test "X$pkg" = "X$p"; then 7595e35772b2Smrg enable_static=yes 7596e35772b2Smrg fi 7597e35772b2Smrg done 7598e35772b2Smrg IFS="$lt_save_ifs" 759972b676d7Smrg ;; 7600e35772b2Smrg esac], 7601e35772b2Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 760272b676d7Smrg 7603e35772b2Smrg _LT_DECL([build_old_libs], [enable_static], [0], 7604e35772b2Smrg [Whether or not to build static libraries]) 7605e35772b2Smrg])# _LT_ENABLE_STATIC 760672b676d7Smrg 7607e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 7608e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 760972b676d7Smrg 7610e35772b2Smrg# Old names: 7611e35772b2SmrgAC_DEFUN([AC_ENABLE_STATIC], 7612e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 7613e35772b2Smrg]) 761472b676d7Smrg 7615e35772b2SmrgAC_DEFUN([AC_DISABLE_STATIC], 7616e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 7617e35772b2Smrg]) 761872b676d7Smrg 7619e35772b2SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7620e35772b2SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 762172b676d7Smrg 7622e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 7623e35772b2Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 7624e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 762572b676d7Smrg 762672b676d7Smrg 762772b676d7Smrg 7628e35772b2Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 7629e35772b2Smrg# ---------------------------------- 7630e35772b2Smrg# implement the --enable-fast-install flag, and support the `fast-install' 7631e35772b2Smrg# and `disable-fast-install' LT_INIT options. 7632e35772b2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7633e35772b2Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 7634e35772b2Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 7635e35772b2SmrgAC_ARG_ENABLE([fast-install], 7636e35772b2Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 7637e35772b2Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 7638e35772b2Smrg [p=${PACKAGE-default} 7639e35772b2Smrg case $enableval in 7640e35772b2Smrg yes) enable_fast_install=yes ;; 7641e35772b2Smrg no) enable_fast_install=no ;; 7642e35772b2Smrg *) 7643e35772b2Smrg enable_fast_install=no 7644e35772b2Smrg # Look at the argument we got. We use all the common list separators. 7645e35772b2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7646e35772b2Smrg for pkg in $enableval; do 7647e35772b2Smrg IFS="$lt_save_ifs" 7648e35772b2Smrg if test "X$pkg" = "X$p"; then 7649e35772b2Smrg enable_fast_install=yes 76501fd23544Smrg fi 7651e35772b2Smrg done 7652e35772b2Smrg IFS="$lt_save_ifs" 765372b676d7Smrg ;; 7654e35772b2Smrg esac], 7655e35772b2Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 765672b676d7Smrg 7657e35772b2Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 7658e35772b2Smrg [Whether or not to optimize for fast installation])dnl 7659e35772b2Smrg])# _LT_ENABLE_FAST_INSTALL 766072b676d7Smrg 7661e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 7662e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 766372b676d7Smrg 7664e35772b2Smrg# Old names: 7665e35772b2SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 7666e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 7667e35772b2SmrgAC_DIAGNOSE([obsolete], 7668e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7669e35772b2Smrgthe `fast-install' option into LT_INIT's first parameter.]) 7670e35772b2Smrg]) 767172b676d7Smrg 7672e35772b2SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 7673e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 7674e35772b2SmrgAC_DIAGNOSE([obsolete], 7675e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7676e35772b2Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 7677e35772b2Smrg]) 767872b676d7Smrg 7679e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 7680e35772b2Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 7681e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 768272b676d7Smrg 768372b676d7Smrg 7684e35772b2Smrg# _LT_WITH_PIC([MODE]) 7685e35772b2Smrg# -------------------- 7686e35772b2Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 7687e35772b2Smrg# LT_INIT options. 7688e35772b2Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 7689e35772b2Smrgm4_define([_LT_WITH_PIC], 7690e35772b2Smrg[AC_ARG_WITH([pic], 7691e35772b2Smrg [AS_HELP_STRING([--with-pic], 7692e35772b2Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 7693e35772b2Smrg [pic_mode="$withval"], 7694e35772b2Smrg [pic_mode=default]) 769572b676d7Smrg 7696e35772b2Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 769772b676d7Smrg 7698e35772b2Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 7699e35772b2Smrg])# _LT_WITH_PIC 770072b676d7Smrg 7701e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 7702e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 7703e35772b2Smrg 7704e35772b2Smrg# Old name: 7705e35772b2SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 7706e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 7707e35772b2SmrgAC_DIAGNOSE([obsolete], 7708e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7709e35772b2Smrgput the `pic-only' option into LT_INIT's first parameter.]) 771072b676d7Smrg]) 771172b676d7Smrg 7712e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 7713e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 7714e35772b2Smrg 7715e35772b2Smrg 7716e35772b2Smrgm4_define([_LTDL_MODE], []) 7717e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 7718e35772b2Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 7719e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 7720e35772b2Smrg [m4_define([_LTDL_MODE], [recursive])]) 7721e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 7722e35772b2Smrg [m4_define([_LTDL_MODE], [subproject])]) 7723e35772b2Smrg 7724e35772b2Smrgm4_define([_LTDL_TYPE], []) 7725e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 7726e35772b2Smrg [m4_define([_LTDL_TYPE], [installable])]) 7727e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 7728e35772b2Smrg [m4_define([_LTDL_TYPE], [convenience])]) 7729e35772b2Smrg 7730e35772b2Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 773172b676d7Smrg# 7732e35772b2Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7733e35772b2Smrg# Written by Gary V. Vaughan, 2004 773472b676d7Smrg# 7735e35772b2Smrg# This file is free software; the Free Software Foundation gives 7736e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 7737e35772b2Smrg# modifications, as long as this notice is preserved. 773872b676d7Smrg 7739e35772b2Smrg# serial 6 ltsugar.m4 774072b676d7Smrg 7741e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7742e35772b2SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 774372b676d7Smrg 774472b676d7Smrg 7745e35772b2Smrg# lt_join(SEP, ARG1, [ARG2...]) 7746e35772b2Smrg# ----------------------------- 7747e35772b2Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 7748e35772b2Smrg# associated separator. 7749e35772b2Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 7750e35772b2Smrg# versions in m4sugar had bugs. 7751e35772b2Smrgm4_define([lt_join], 7752e35772b2Smrg[m4_if([$#], [1], [], 7753e35772b2Smrg [$#], [2], [[$2]], 7754e35772b2Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 7755e35772b2Smrgm4_define([_lt_join], 7756e35772b2Smrg[m4_if([$#$2], [2], [], 7757e35772b2Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 7758e35772b2Smrg 7759e35772b2Smrg 7760e35772b2Smrg# lt_car(LIST) 7761e35772b2Smrg# lt_cdr(LIST) 7762e35772b2Smrg# ------------ 7763e35772b2Smrg# Manipulate m4 lists. 7764e35772b2Smrg# These macros are necessary as long as will still need to support 7765e35772b2Smrg# Autoconf-2.59 which quotes differently. 7766e35772b2Smrgm4_define([lt_car], [[$1]]) 7767e35772b2Smrgm4_define([lt_cdr], 7768e35772b2Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 7769e35772b2Smrg [$#], 1, [], 7770e35772b2Smrg [m4_dquote(m4_shift($@))])]) 7771e35772b2Smrgm4_define([lt_unquote], $1) 7772e35772b2Smrg 7773e35772b2Smrg 7774e35772b2Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 7775e35772b2Smrg# ------------------------------------------ 7776e35772b2Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 7777e35772b2Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 7778e35772b2Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 7779e35772b2Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 7780e35772b2Smrg# than defined and empty). 7781e35772b2Smrg# 7782e35772b2Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 7783e35772b2Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 7784e35772b2Smrgm4_define([lt_append], 7785e35772b2Smrg[m4_define([$1], 7786e35772b2Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 7787e35772b2Smrg 7788e35772b2Smrg 7789e35772b2Smrg 7790e35772b2Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 7791e35772b2Smrg# ---------------------------------------------------------- 7792e35772b2Smrg# Produce a SEP delimited list of all paired combinations of elements of 7793e35772b2Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 7794e35772b2Smrg# has the form PREFIXmINFIXSUFFIXn. 7795e35772b2Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 7796e35772b2Smrgm4_define([lt_combine], 7797e35772b2Smrg[m4_if(m4_eval([$# > 3]), [1], 7798e35772b2Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 7799e35772b2Smrg[[m4_foreach([_Lt_prefix], [$2], 7800e35772b2Smrg [m4_foreach([_Lt_suffix], 7801e35772b2Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 7802e35772b2Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 7803e35772b2Smrg 7804e35772b2Smrg 7805e35772b2Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 7806e35772b2Smrg# ----------------------------------------------------------------------- 7807e35772b2Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 7808e35772b2Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 7809e35772b2Smrgm4_define([lt_if_append_uniq], 7810e35772b2Smrg[m4_ifdef([$1], 7811e35772b2Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 7812e35772b2Smrg [lt_append([$1], [$2], [$3])$4], 7813e35772b2Smrg [$5])], 7814e35772b2Smrg [lt_append([$1], [$2], [$3])$4])]) 7815e35772b2Smrg 7816e35772b2Smrg 7817e35772b2Smrg# lt_dict_add(DICT, KEY, VALUE) 7818e35772b2Smrg# ----------------------------- 7819e35772b2Smrgm4_define([lt_dict_add], 7820e35772b2Smrg[m4_define([$1($2)], [$3])]) 782172b676d7Smrg 782272b676d7Smrg 7823e35772b2Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 7824e35772b2Smrg# -------------------------------------------- 7825e35772b2Smrgm4_define([lt_dict_add_subkey], 7826e35772b2Smrg[m4_define([$1($2:$3)], [$4])]) 782772b676d7Smrg 782872b676d7Smrg 7829e35772b2Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 7830e35772b2Smrg# ---------------------------------- 7831e35772b2Smrgm4_define([lt_dict_fetch], 7832e35772b2Smrg[m4_ifval([$3], 7833e35772b2Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 7834e35772b2Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 7835e35772b2Smrg 783672b676d7Smrg 7837e35772b2Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 7838e35772b2Smrg# ----------------------------------------------------------------- 7839e35772b2Smrgm4_define([lt_if_dict_fetch], 7840e35772b2Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 7841e35772b2Smrg [$5], 7842e35772b2Smrg [$6])]) 7843e35772b2Smrg 7844e35772b2Smrg 7845e35772b2Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 7846e35772b2Smrg# -------------------------------------------------------------- 7847e35772b2Smrgm4_define([lt_dict_filter], 7848e35772b2Smrg[m4_if([$5], [], [], 7849e35772b2Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 7850e35772b2Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 7851e35772b2Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 785272b676d7Smrg]) 785372b676d7Smrg 7854e35772b2Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 7855e35772b2Smrg# 7856e35772b2Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 7857e35772b2Smrg# Written by Scott James Remnant, 2004 7858e35772b2Smrg# 7859e35772b2Smrg# This file is free software; the Free Software Foundation gives 7860e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 7861e35772b2Smrg# modifications, as long as this notice is preserved. 78621fd23544Smrg 7863e35772b2Smrg# Generated from ltversion.in. 78641fd23544Smrg 7865e35772b2Smrg# serial 3017 ltversion.m4 7866e35772b2Smrg# This file is part of GNU Libtool 78671fd23544Smrg 7868e35772b2Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6b]) 7869e35772b2Smrgm4_define([LT_PACKAGE_REVISION], [1.3017]) 78701fd23544Smrg 7871e35772b2SmrgAC_DEFUN([LTVERSION_VERSION], 7872e35772b2Smrg[macro_version='2.2.6b' 7873e35772b2Smrgmacro_revision='1.3017' 7874e35772b2Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 7875e35772b2Smrg_LT_DECL(, macro_revision, 0) 787672b676d7Smrg]) 787772b676d7Smrg 7878e35772b2Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 7879e35772b2Smrg# 7880e35772b2Smrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 7881e35772b2Smrg# Written by Scott James Remnant, 2004. 7882e35772b2Smrg# 7883e35772b2Smrg# This file is free software; the Free Software Foundation gives 7884e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 7885e35772b2Smrg# modifications, as long as this notice is preserved. 7886e35772b2Smrg 7887e35772b2Smrg# serial 4 lt~obsolete.m4 7888e35772b2Smrg 7889e35772b2Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 7890e35772b2Smrg# 7891e35772b2Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 7892e35772b2Smrg# which have later been changed to m4_define as they aren't part of the 7893e35772b2Smrg# exported API, or moved to Autoconf or Automake where they belong. 7894e35772b2Smrg# 7895e35772b2Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 7896e35772b2Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 7897e35772b2Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 7898e35772b2Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 7899e35772b2Smrg# and doesn't know about Autoconf macros at all.) 7900e35772b2Smrg# 7901e35772b2Smrg# So we provide this file, which has a silly filename so it's always 7902e35772b2Smrg# included after everything else. This provides aclocal with the 7903e35772b2Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 7904e35772b2Smrg# because those macros already exist, or will be overwritten later. 7905e35772b2Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 7906e35772b2Smrg# 7907e35772b2Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 7908e35772b2Smrg# Yes, that means every name once taken will need to remain here until 7909e35772b2Smrg# we give up compatibility with versions before 1.7, at which point 7910e35772b2Smrg# we need to keep only those names which we still refer to. 7911e35772b2Smrg 7912e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7913e35772b2SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 7914e35772b2Smrg 7915e35772b2Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 7916e35772b2Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 7917e35772b2Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 7918e35772b2Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 7919e35772b2Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 7920e35772b2Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 7921e35772b2Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 7922e35772b2Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 7923e35772b2Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 7924e35772b2Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 7925e35772b2Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 7926e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 7927e35772b2Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 7928e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 7929e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 7930e35772b2Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 7931e35772b2Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 7932e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 7933e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 7934e35772b2Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 7935e35772b2Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 7936e35772b2Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 7937e35772b2Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 7938e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 7939e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 7940e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 7941e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 7942e35772b2Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 7943e35772b2Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 7944e35772b2Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 7945e35772b2Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 7946e35772b2Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 7947e35772b2Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 7948e35772b2Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 7949e35772b2Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 7950e35772b2Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 7951e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 7952e35772b2Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 7953e35772b2Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 7954e35772b2Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 7955e35772b2Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 7956e35772b2Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 7957e35772b2Smrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 7958e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 7959e35772b2Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 7960e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 7961e35772b2Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 7962e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 7963e35772b2Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 7964e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 7965e35772b2Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 7966e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 7967e35772b2Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 7968e35772b2Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 7969e35772b2Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 7970e35772b2Smrg 797172b676d7Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 797272b676d7Smrg# 797372b676d7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 797472b676d7Smrg# 797572b676d7Smrg# This program is free software; you can redistribute it and/or modify 797672b676d7Smrg# it under the terms of the GNU General Public License as published by 797772b676d7Smrg# the Free Software Foundation; either version 2 of the License, or 797872b676d7Smrg# (at your option) any later version. 797972b676d7Smrg# 798072b676d7Smrg# This program is distributed in the hope that it will be useful, but 798172b676d7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 798272b676d7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 798372b676d7Smrg# General Public License for more details. 798472b676d7Smrg# 798572b676d7Smrg# You should have received a copy of the GNU General Public License 798672b676d7Smrg# along with this program; if not, write to the Free Software 798772b676d7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 798872b676d7Smrg# 798972b676d7Smrg# As a special exception to the GNU General Public License, if you 799072b676d7Smrg# distribute this file as part of a program that contains a 799172b676d7Smrg# configuration script generated by Autoconf, you may include it under 799272b676d7Smrg# the same distribution terms that you use for the rest of that program. 799372b676d7Smrg 799472b676d7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 799572b676d7Smrg# ---------------------------------- 799672b676d7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 799772b676d7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 799872b676d7Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 799972b676d7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 800072b676d7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 800172b676d7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 800272b676d7Smrgfi 800372b676d7Smrgif test -n "$PKG_CONFIG"; then 800472b676d7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 800572b676d7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 800672b676d7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 800772b676d7Smrg AC_MSG_RESULT([yes]) 800872b676d7Smrg else 800972b676d7Smrg AC_MSG_RESULT([no]) 801072b676d7Smrg PKG_CONFIG="" 801172b676d7Smrg fi 801272b676d7Smrg 801372b676d7Smrgfi[]dnl 801472b676d7Smrg])# PKG_PROG_PKG_CONFIG 801572b676d7Smrg 801672b676d7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 801772b676d7Smrg# 801872b676d7Smrg# Check to see whether a particular set of modules exists. Similar 801972b676d7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 802072b676d7Smrg# 802172b676d7Smrg# 802272b676d7Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 802372b676d7Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 802472b676d7Smrg# PKG_CHECK_EXISTS manually 802572b676d7Smrg# -------------------------------------------------------------- 802672b676d7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 802772b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 802872b676d7Smrgif test -n "$PKG_CONFIG" && \ 802972b676d7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 803072b676d7Smrg m4_ifval([$2], [$2], [:]) 803172b676d7Smrgm4_ifvaln([$3], [else 803272b676d7Smrg $3])dnl 803372b676d7Smrgfi]) 803472b676d7Smrg 803572b676d7Smrg 803672b676d7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 803772b676d7Smrg# --------------------------------------------- 803872b676d7Smrgm4_define([_PKG_CONFIG], 80391fd23544Smrg[if test -n "$$1"; then 80401fd23544Smrg pkg_cv_[]$1="$$1" 80411fd23544Smrg elif test -n "$PKG_CONFIG"; then 80421fd23544Smrg PKG_CHECK_EXISTS([$3], 80431fd23544Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 80441fd23544Smrg [pkg_failed=yes]) 80451fd23544Smrg else 80461fd23544Smrg pkg_failed=untried 804772b676d7Smrgfi[]dnl 804872b676d7Smrg])# _PKG_CONFIG 804972b676d7Smrg 805072b676d7Smrg# _PKG_SHORT_ERRORS_SUPPORTED 805172b676d7Smrg# ----------------------------- 805272b676d7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 805372b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 805472b676d7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 805572b676d7Smrg _pkg_short_errors_supported=yes 805672b676d7Smrgelse 805772b676d7Smrg _pkg_short_errors_supported=no 805872b676d7Smrgfi[]dnl 805972b676d7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 806072b676d7Smrg 806172b676d7Smrg 806272b676d7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 806372b676d7Smrg# [ACTION-IF-NOT-FOUND]) 806472b676d7Smrg# 806572b676d7Smrg# 806672b676d7Smrg# Note that if there is a possibility the first call to 806772b676d7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 806872b676d7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 806972b676d7Smrg# 807072b676d7Smrg# 807172b676d7Smrg# -------------------------------------------------------------- 807272b676d7SmrgAC_DEFUN([PKG_CHECK_MODULES], 807372b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 807472b676d7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 807572b676d7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 807672b676d7Smrg 807772b676d7Smrgpkg_failed=no 807872b676d7SmrgAC_MSG_CHECKING([for $1]) 807972b676d7Smrg 808072b676d7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 808172b676d7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 808272b676d7Smrg 808372b676d7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 808472b676d7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 808572b676d7SmrgSee the pkg-config man page for more details.]) 808672b676d7Smrg 808772b676d7Smrgif test $pkg_failed = yes; then 808872b676d7Smrg _PKG_SHORT_ERRORS_SUPPORTED 808972b676d7Smrg if test $_pkg_short_errors_supported = yes; then 80901fd23544Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 809172b676d7Smrg else 80921fd23544Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 809372b676d7Smrg fi 809472b676d7Smrg # Put the nasty error message in config.log where it belongs 809572b676d7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 809672b676d7Smrg 809772b676d7Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 809872b676d7Smrg[Package requirements ($2) were not met: 809972b676d7Smrg 810072b676d7Smrg$$1_PKG_ERRORS 810172b676d7Smrg 810272b676d7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 810372b676d7Smrginstalled software in a non-standard prefix. 810472b676d7Smrg 810572b676d7Smrg_PKG_TEXT 810672b676d7Smrg])], 81071fd23544Smrg [AC_MSG_RESULT([no]) 81081fd23544Smrg $4]) 810972b676d7Smrgelif test $pkg_failed = untried; then 811072b676d7Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 811172b676d7Smrg[The pkg-config script could not be found or is too old. Make sure it 811272b676d7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 811372b676d7Smrgpath to pkg-config. 811472b676d7Smrg 811572b676d7Smrg_PKG_TEXT 811672b676d7Smrg 81171fd23544SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 811872b676d7Smrg [$4]) 811972b676d7Smrgelse 812072b676d7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 812172b676d7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 812272b676d7Smrg AC_MSG_RESULT([yes]) 812372b676d7Smrg ifelse([$3], , :, [$3]) 812472b676d7Smrgfi[]dnl 812572b676d7Smrg])# PKG_CHECK_MODULES 812672b676d7Smrg 8127e47418d9Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 812872b676d7Smrgdnl 812972b676d7Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 813072b676d7Smrgdnl 813172b676d7Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 8132e35772b2Smrgdnl copy of this software and associated documentation files (the "Software"), 8133e35772b2Smrgdnl to deal in the Software without restriction, including without limitation 8134e35772b2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 8135e35772b2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 8136e35772b2Smrgdnl Software is furnished to do so, subject to the following conditions: 813772b676d7Smrgdnl 8138e35772b2Smrgdnl The above copyright notice and this permission notice (including the next 8139e35772b2Smrgdnl paragraph) shall be included in all copies or substantial portions of the 8140e35772b2Smrgdnl Software. 814172b676d7Smrgdnl 8142e35772b2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 8143e35772b2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 8144e35772b2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 8145e35772b2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 8146e35772b2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 8147e35772b2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 8148e35772b2Smrgdnl DEALINGS IN THE SOFTWARE. 814972b676d7Smrg 815072b676d7Smrg# XORG_MACROS_VERSION(required-version) 815172b676d7Smrg# ------------------------------------- 815272b676d7Smrg# Minimum version: 1.1.0 815372b676d7Smrg# 815472b676d7Smrg# If you're using a macro added in Version 1.1 or newer, include this in 815572b676d7Smrg# your configure.ac with the minimum required version, such as: 815672b676d7Smrg# XORG_MACROS_VERSION(1.1) 815772b676d7Smrg# 8158e35772b2Smrg# To ensure that this macro is defined, also add: 8159e35772b2Smrg# m4_ifndef([XORG_MACROS_VERSION], 8160e35772b2Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 816172b676d7Smrg# 816272b676d7Smrg# 816372b676d7Smrg# See the "minimum version" comment for each macro you use to see what 816472b676d7Smrg# version you require. 8165e35772b2Smrgm4_defun([XORG_MACROS_VERSION],[ 8166e35772b2Smrgm4_define([vers_have], [1.8.0]) 8167e35772b2Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 8168e35772b2Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 8169e35772b2Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 8170e35772b2Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 8171e35772b2Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 8172e35772b2Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 8173e35772b2Smrgm4_undefine([vers_have]) 8174e35772b2Smrgm4_undefine([maj_have]) 8175e35772b2Smrgm4_undefine([maj_needed]) 817672b676d7Smrg]) # XORG_MACROS_VERSION 817772b676d7Smrg 817872b676d7Smrg# XORG_PROG_RAWCPP() 817972b676d7Smrg# ------------------ 818072b676d7Smrg# Minimum version: 1.0.0 818172b676d7Smrg# 818272b676d7Smrg# Find cpp program and necessary flags for use in pre-processing text files 818372b676d7Smrg# such as man pages and config files 818472b676d7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 818572b676d7SmrgAC_REQUIRE([AC_PROG_CPP]) 818672b676d7SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 818772b676d7Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 818872b676d7Smrg 818972b676d7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 819072b676d7Smrg# which is not the best choice for supporting other OS'es, but covers most 819172b676d7Smrg# of the ones we need for now. 819272b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 819372b676d7SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 819472b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 819572b676d7Smrg AC_MSG_RESULT([no]) 819672b676d7Smrgelse 819772b676d7Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 819872b676d7Smrg RAWCPPFLAGS=-undef 819972b676d7Smrg AC_MSG_RESULT([yes]) 8200e47418d9Smrg # under Cygwin unix is still defined even with -undef 8201e47418d9Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8202e47418d9Smrg RAWCPPFLAGS="-undef -ansi" 8203e47418d9Smrg AC_MSG_RESULT([yes, with -ansi]) 820472b676d7Smrg else 820572b676d7Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 820672b676d7Smrg fi 820772b676d7Smrgfi 820872b676d7Smrgrm -f conftest.$ac_ext 820972b676d7Smrg 821072b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 821172b676d7SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 821272b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 821372b676d7Smrg AC_MSG_RESULT([no]) 821472b676d7Smrgelse 821572b676d7Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 821672b676d7Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 821772b676d7Smrg AC_MSG_RESULT([yes]) 821872b676d7Smrg else 821972b676d7Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 822072b676d7Smrg fi 822172b676d7Smrgfi 822272b676d7Smrgrm -f conftest.$ac_ext 822372b676d7SmrgAC_SUBST(RAWCPPFLAGS) 822472b676d7Smrg]) # XORG_PROG_RAWCPP 822572b676d7Smrg 822672b676d7Smrg# XORG_MANPAGE_SECTIONS() 822772b676d7Smrg# ----------------------- 822872b676d7Smrg# Minimum version: 1.0.0 822972b676d7Smrg# 823072b676d7Smrg# Determine which sections man pages go in for the different man page types 823172b676d7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 823272b676d7Smrg# Not sure if there's any better way than just hardcoding by OS name. 823372b676d7Smrg# Override default settings by setting environment variables 8234e35772b2Smrg# Added MAN_SUBSTS in version 1.8 8235e35772b2Smrg# Added AC_PROG_SED in version 1.8 823672b676d7Smrg 823772b676d7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 823872b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 8239e35772b2SmrgAC_REQUIRE([AC_PROG_SED]) 824072b676d7Smrg 824172b676d7Smrgif test x$APP_MAN_SUFFIX = x ; then 824272b676d7Smrg APP_MAN_SUFFIX=1 824372b676d7Smrgfi 824472b676d7Smrgif test x$APP_MAN_DIR = x ; then 824572b676d7Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 824672b676d7Smrgfi 824772b676d7Smrg 824872b676d7Smrgif test x$LIB_MAN_SUFFIX = x ; then 824972b676d7Smrg LIB_MAN_SUFFIX=3 825072b676d7Smrgfi 825172b676d7Smrgif test x$LIB_MAN_DIR = x ; then 825272b676d7Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 825372b676d7Smrgfi 825472b676d7Smrg 825572b676d7Smrgif test x$FILE_MAN_SUFFIX = x ; then 825672b676d7Smrg case $host_os in 825772b676d7Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 825872b676d7Smrg *) FILE_MAN_SUFFIX=5 ;; 825972b676d7Smrg esac 826072b676d7Smrgfi 826172b676d7Smrgif test x$FILE_MAN_DIR = x ; then 826272b676d7Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 826372b676d7Smrgfi 826472b676d7Smrg 826572b676d7Smrgif test x$MISC_MAN_SUFFIX = x ; then 826672b676d7Smrg case $host_os in 826772b676d7Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 826872b676d7Smrg *) MISC_MAN_SUFFIX=7 ;; 826972b676d7Smrg esac 827072b676d7Smrgfi 827172b676d7Smrgif test x$MISC_MAN_DIR = x ; then 827272b676d7Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 827372b676d7Smrgfi 827472b676d7Smrg 827572b676d7Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 827672b676d7Smrg case $host_os in 827772b676d7Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 827872b676d7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 827972b676d7Smrg esac 828072b676d7Smrgfi 828172b676d7Smrgif test x$DRIVER_MAN_DIR = x ; then 828272b676d7Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 828372b676d7Smrgfi 828472b676d7Smrg 828572b676d7Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 828672b676d7Smrg case $host_os in 828772b676d7Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 828872b676d7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 828972b676d7Smrg esac 829072b676d7Smrgfi 829172b676d7Smrgif test x$ADMIN_MAN_DIR = x ; then 829272b676d7Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 829372b676d7Smrgfi 829472b676d7Smrg 829572b676d7Smrg 829672b676d7SmrgAC_SUBST([APP_MAN_SUFFIX]) 829772b676d7SmrgAC_SUBST([LIB_MAN_SUFFIX]) 829872b676d7SmrgAC_SUBST([FILE_MAN_SUFFIX]) 829972b676d7SmrgAC_SUBST([MISC_MAN_SUFFIX]) 830072b676d7SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 830172b676d7SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 830272b676d7SmrgAC_SUBST([APP_MAN_DIR]) 830372b676d7SmrgAC_SUBST([LIB_MAN_DIR]) 830472b676d7SmrgAC_SUBST([FILE_MAN_DIR]) 830572b676d7SmrgAC_SUBST([MISC_MAN_DIR]) 830672b676d7SmrgAC_SUBST([DRIVER_MAN_DIR]) 830772b676d7SmrgAC_SUBST([ADMIN_MAN_DIR]) 8308e35772b2Smrg 8309e35772b2SmrgXORG_MAN_PAGE="X Version 11" 8310e35772b2SmrgAC_SUBST([XORG_MAN_PAGE]) 8311e35772b2SmrgMAN_SUBSTS="\ 8312e35772b2Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8313e35772b2Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8314e35772b2Smrg -e 's|__xservername__|Xorg|g' \ 8315e35772b2Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 8316e35772b2Smrg -e 's|__projectroot__|\$(prefix)|g' \ 8317e35772b2Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 8318e35772b2Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 8319e35772b2Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 8320e35772b2Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 8321e35772b2Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 8322e35772b2Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 8323e35772b2SmrgAC_SUBST([MAN_SUBSTS]) 8324e35772b2Smrg 832572b676d7Smrg]) # XORG_MANPAGE_SECTIONS 832672b676d7Smrg 8327e35772b2Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 8328e35772b2Smrg# ------------------------ 8329e35772b2Smrg# Minimum version: 1.7.0 8330e35772b2Smrg# 8331e35772b2Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 8332e35772b2Smrg# provided by xorg-sgml-doctools, if installed. 8333e35772b2SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 8334e35772b2SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 8335e35772b2SmrgXORG_SGML_PATH= 8336e35772b2SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 8337e35772b2Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 8338e35772b2Smrg [m4_ifval([$1],[:], 8339e35772b2Smrg [if test x"$cross_compiling" != x"yes" ; then 8340e35772b2Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 8341e35772b2Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 8342e35772b2Smrg fi]) 8343e35772b2Smrg ]) 8344e35772b2Smrg 8345e35772b2Smrgif test "x$XORG_SGML_PATH" != "x" ; then 8346e35772b2Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 8347e35772b2Smrgelse 8348e35772b2Smrg AC_MSG_RESULT([no]) 8349e35772b2Smrgfi 8350e35772b2Smrg 8351e35772b2SmrgAC_SUBST(XORG_SGML_PATH) 8352e35772b2Smrg]) # XORG_CHECK_SGML_DOCTOOLS 8353e35772b2Smrg 835472b676d7Smrg# XORG_CHECK_LINUXDOC 835572b676d7Smrg# ------------------- 835672b676d7Smrg# Minimum version: 1.0.0 835772b676d7Smrg# 835872b676d7Smrg# Defines the variable MAKE_TEXT if the necessary tools and 835972b676d7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 836072b676d7Smrg# Whether or not the necessary tools and files are found can be checked 836172b676d7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 836272b676d7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 8363e35772b2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 8364e35772b2SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 836572b676d7Smrg 836672b676d7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 836772b676d7Smrg 8368e35772b2SmrgAC_MSG_CHECKING([whether to build documentation]) 836972b676d7Smrg 8370e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 837172b676d7Smrg BUILDDOC=yes 837272b676d7Smrgelse 837372b676d7Smrg BUILDDOC=no 837472b676d7Smrgfi 837572b676d7Smrg 837672b676d7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 837772b676d7Smrg 837872b676d7SmrgAC_MSG_RESULT([$BUILDDOC]) 837972b676d7Smrg 8380e35772b2SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 838172b676d7Smrg 8382e35772b2Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 838372b676d7Smrg BUILDPDFDOC=yes 838472b676d7Smrgelse 838572b676d7Smrg BUILDPDFDOC=no 838672b676d7Smrgfi 838772b676d7Smrg 838872b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 838972b676d7Smrg 839072b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 839172b676d7Smrg 8392e35772b2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 839372b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 839472b676d7SmrgMAKE_PDF="$PS2PDF" 839572b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 839672b676d7Smrg 839772b676d7SmrgAC_SUBST(MAKE_TEXT) 839872b676d7SmrgAC_SUBST(MAKE_PS) 839972b676d7SmrgAC_SUBST(MAKE_PDF) 840072b676d7SmrgAC_SUBST(MAKE_HTML) 840172b676d7Smrg]) # XORG_CHECK_LINUXDOC 840272b676d7Smrg 840372b676d7Smrg# XORG_CHECK_DOCBOOK 840472b676d7Smrg# ------------------- 840572b676d7Smrg# Minimum version: 1.0.0 840672b676d7Smrg# 840772b676d7Smrg# Checks for the ability to build output formats from SGML DocBook source. 840872b676d7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 840972b676d7Smrg# indicates whether the necessary tools and files are found and, if set, 841072b676d7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 841172b676d7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 8412e35772b2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 8413e35772b2Smrg 841472b676d7SmrgBUILDTXTDOC=no 841572b676d7SmrgBUILDPDFDOC=no 841672b676d7SmrgBUILDPSDOC=no 841772b676d7SmrgBUILDHTMLDOC=no 841872b676d7Smrg 841972b676d7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 842072b676d7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 842172b676d7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 842272b676d7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 842372b676d7Smrg 8424e35772b2SmrgAC_MSG_CHECKING([whether to build text documentation]) 8425e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 842672b676d7Smrg test x$BUILD_TXTDOC != xno; then 842772b676d7Smrg BUILDTXTDOC=yes 842872b676d7Smrgfi 842972b676d7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 843072b676d7SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 843172b676d7Smrg 8432e35772b2SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 8433e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 843472b676d7Smrg test x$BUILD_PDFDOC != xno; then 843572b676d7Smrg BUILDPDFDOC=yes 843672b676d7Smrgfi 843772b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 843872b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 843972b676d7Smrg 8440e35772b2SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 8441e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 844272b676d7Smrg test x$BUILD_PSDOC != xno; then 844372b676d7Smrg BUILDPSDOC=yes 844472b676d7Smrgfi 844572b676d7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 844672b676d7SmrgAC_MSG_RESULT([$BUILDPSDOC]) 844772b676d7Smrg 8448e35772b2SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 8449e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 845072b676d7Smrg test x$BUILD_HTMLDOC != xno; then 845172b676d7Smrg BUILDHTMLDOC=yes 845272b676d7Smrgfi 845372b676d7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 845472b676d7SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 845572b676d7Smrg 845672b676d7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 845772b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 845872b676d7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 845972b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 846072b676d7Smrg 846172b676d7SmrgAC_SUBST(MAKE_TEXT) 846272b676d7SmrgAC_SUBST(MAKE_PS) 846372b676d7SmrgAC_SUBST(MAKE_PDF) 846472b676d7SmrgAC_SUBST(MAKE_HTML) 846572b676d7Smrg]) # XORG_CHECK_DOCBOOK 846672b676d7Smrg 8467e35772b2Smrg# XORG_WITH_XMLTO([MIN-VERSION]) 8468e35772b2Smrg# ---------------- 8469e35772b2Smrg# Minimum version: 1.5.0 8470e35772b2Smrg# 8471e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 8472e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 8473e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 8474e35772b2Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 8475e35772b2Smrg# as whether or not to use the xmlto package. 8476e35772b2Smrg# 8477e35772b2Smrg# Interface to module: 8478e35772b2Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 8479e35772b2Smrg# XMLTO: returns the path of the xmlto program found 8480e35772b2Smrg# returns the path set by the user in the environment 8481e35772b2Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 8482e35772b2Smrg# 'no' user instructs the module not to use xmlto 8483e35772b2Smrg# 8484e35772b2Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 8485e35772b2Smrg# 8486e35772b2SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 8487e35772b2SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 8488e35772b2SmrgAC_ARG_WITH(xmlto, 8489e35772b2Smrg AS_HELP_STRING([--with-xmlto], 8490e35772b2Smrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 8491e35772b2Smrg [use_xmlto=$withval], [use_xmlto=auto]) 8492e35772b2Smrg 8493e35772b2Smrgif test "x$use_xmlto" = x"auto"; then 8494e35772b2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 8495e35772b2Smrg if test "x$XMLTO" = "x"; then 8496e35772b2Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 8497e35772b2Smrg have_xmlto=no 8498e35772b2Smrg else 8499e35772b2Smrg have_xmlto=yes 8500e35772b2Smrg fi 8501e35772b2Smrgelif test "x$use_xmlto" = x"yes" ; then 8502e35772b2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 8503e35772b2Smrg if test "x$XMLTO" = "x"; then 8504e35772b2Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 8505e35772b2Smrg fi 8506e35772b2Smrg have_xmlto=yes 8507e35772b2Smrgelif test "x$use_xmlto" = x"no" ; then 8508e35772b2Smrg if test "x$XMLTO" != "x"; then 8509e35772b2Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 8510e35772b2Smrg fi 8511e35772b2Smrg have_xmlto=no 8512e35772b2Smrgelse 8513e35772b2Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 8514e35772b2Smrgfi 8515e35772b2Smrgm4_ifval([$1], 8516e35772b2Smrg[if test "$have_xmlto" = yes; then 8517e35772b2Smrg # scrape the xmlto version 8518e35772b2Smrg AC_MSG_CHECKING([the xmlto version]) 8519e35772b2Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 8520e35772b2Smrg AC_MSG_RESULT([$xmlto_version]) 8521e35772b2Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 8522e35772b2Smrg [if test "x$use_xmlto" = xauto; then 8523e35772b2Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 8524e35772b2Smrg have_xmlto=no 8525e35772b2Smrg else 8526e35772b2Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 8527e35772b2Smrg fi]) 8528e35772b2Smrgfi]) 8529e35772b2SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 8530e35772b2Smrg]) # XORG_WITH_XMLTO 8531e35772b2Smrg 8532e35772b2Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 8533e35772b2Smrg# ---------------- 8534e35772b2Smrg# Minimum version: 1.5.0 8535e35772b2Smrg# 8536e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 8537e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 8538e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 8539e35772b2Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 8540e35772b2Smrg# as whether or not to use the asciidoc package. 8541e35772b2Smrg# 8542e35772b2Smrg# Interface to module: 8543e35772b2Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 8544e35772b2Smrg# ASCIIDOC: returns the path of the asciidoc program found 8545e35772b2Smrg# returns the path set by the user in the environment 8546e35772b2Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 8547e35772b2Smrg# 'no' user instructs the module not to use asciidoc 8548e35772b2Smrg# 8549e35772b2Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 8550e35772b2Smrg# 8551e35772b2SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 8552e35772b2SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 8553e35772b2SmrgAC_ARG_WITH(asciidoc, 8554e35772b2Smrg AS_HELP_STRING([--with-asciidoc], 8555e35772b2Smrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 8556e35772b2Smrg [use_asciidoc=$withval], [use_asciidoc=auto]) 8557e35772b2Smrg 8558e35772b2Smrgif test "x$use_asciidoc" = x"auto"; then 8559e35772b2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 8560e35772b2Smrg if test "x$ASCIIDOC" = "x"; then 8561e35772b2Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 8562e35772b2Smrg have_asciidoc=no 8563e35772b2Smrg else 8564e35772b2Smrg have_asciidoc=yes 8565e35772b2Smrg fi 8566e35772b2Smrgelif test "x$use_asciidoc" = x"yes" ; then 8567e35772b2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 8568e35772b2Smrg if test "x$ASCIIDOC" = "x"; then 8569e35772b2Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 8570e35772b2Smrg fi 8571e35772b2Smrg have_asciidoc=yes 8572e35772b2Smrgelif test "x$use_asciidoc" = x"no" ; then 8573e35772b2Smrg if test "x$ASCIIDOC" != "x"; then 8574e35772b2Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 8575e35772b2Smrg fi 8576e35772b2Smrg have_asciidoc=no 8577e35772b2Smrgelse 8578e35772b2Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 8579e35772b2Smrgfi 8580e35772b2Smrgm4_ifval([$1], 8581e35772b2Smrg[if test "$have_asciidoc" = yes; then 8582e35772b2Smrg # scrape the asciidoc version 8583e35772b2Smrg AC_MSG_CHECKING([the asciidoc version]) 8584e35772b2Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 8585e35772b2Smrg AC_MSG_RESULT([$asciidoc_version]) 8586e35772b2Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 8587e35772b2Smrg [if test "x$use_asciidoc" = xauto; then 8588e35772b2Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 8589e35772b2Smrg have_asciidoc=no 8590e35772b2Smrg else 8591e35772b2Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 8592e35772b2Smrg fi]) 8593e35772b2Smrgfi]) 8594e35772b2SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 8595e35772b2Smrg]) # XORG_WITH_ASCIIDOC 8596e35772b2Smrg 8597e35772b2Smrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 8598e35772b2Smrg# -------------------------------- 8599e35772b2Smrg# Minimum version: 1.5.0 8600e35772b2Smrg# 8601e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 8602e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 8603e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 8604e35772b2Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 8605e35772b2Smrg# as whether or not to use the doxygen package. 8606e35772b2Smrg# 8607e35772b2Smrg# Interface to module: 8608e35772b2Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 8609e35772b2Smrg# DOXYGEN: returns the path of the doxygen program found 8610e35772b2Smrg# returns the path set by the user in the environment 8611e35772b2Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 8612e35772b2Smrg# 'no' user instructs the module not to use doxygen 8613e35772b2Smrg# 8614e35772b2Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 8615e35772b2Smrg# 8616e35772b2SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 8617e35772b2SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 8618e35772b2SmrgAC_ARG_WITH(doxygen, 8619e35772b2Smrg AS_HELP_STRING([--with-doxygen], 8620e35772b2Smrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 8621e35772b2Smrg [use_doxygen=$withval], [use_doxygen=auto]) 8622e35772b2Smrg 8623e35772b2Smrgif test "x$use_doxygen" = x"auto"; then 8624e35772b2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 8625e35772b2Smrg if test "x$DOXYGEN" = "x"; then 8626e35772b2Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 8627e35772b2Smrg have_doxygen=no 8628e35772b2Smrg else 8629e35772b2Smrg have_doxygen=yes 8630e35772b2Smrg fi 8631e35772b2Smrgelif test "x$use_doxygen" = x"yes" ; then 8632e35772b2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 8633e35772b2Smrg if test "x$DOXYGEN" = "x"; then 8634e35772b2Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 8635e35772b2Smrg fi 8636e35772b2Smrg have_doxygen=yes 8637e35772b2Smrgelif test "x$use_doxygen" = x"no" ; then 8638e35772b2Smrg if test "x$DOXYGEN" != "x"; then 8639e35772b2Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 8640e35772b2Smrg fi 8641e35772b2Smrg have_doxygen=no 8642e35772b2Smrgelse 8643e35772b2Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 8644e35772b2Smrgfi 8645e35772b2Smrgm4_ifval([$1], 8646e35772b2Smrg[if test "$have_doxygen" = yes; then 8647e35772b2Smrg # scrape the doxygen version 8648e35772b2Smrg AC_MSG_CHECKING([the doxygen version]) 8649e35772b2Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 8650e35772b2Smrg AC_MSG_RESULT([$doxygen_version]) 8651e35772b2Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 8652e35772b2Smrg [if test "x$use_doxygen" = xauto; then 8653e35772b2Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 8654e35772b2Smrg have_doxygen=no 8655e35772b2Smrg else 8656e35772b2Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 8657e35772b2Smrg fi]) 8658e35772b2Smrgfi]) 8659e35772b2SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 8660e35772b2Smrg]) # XORG_WITH_DOXYGEN 8661e35772b2Smrg 8662e35772b2Smrg# XORG_WITH_GROFF 8663e35772b2Smrg# ---------------- 8664e35772b2Smrg# Minimum version: 1.6.0 8665e35772b2Smrg# 8666e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 8667e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 8668e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 8669e35772b2Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 8670e35772b2Smrg# as whether or not to use the groff package. 8671e35772b2Smrg# 8672e35772b2Smrg# Interface to module: 8673e35772b2Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 8674e35772b2Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 8675e35772b2Smrg# HAVE_GROFF_MS: the -ms macros package 8676e35772b2Smrg# GROFF: returns the path of the groff program found 8677e35772b2Smrg# returns the path set by the user in the environment 8678e35772b2Smrg# --with-groff: 'yes' user instructs the module to use groff 8679e35772b2Smrg# 'no' user instructs the module not to use groff 8680e35772b2Smrg# 8681e35772b2Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 8682e35772b2Smrg# 8683e35772b2Smrg# OS and distros often splits groff in a basic and full package, the former 8684e35772b2Smrg# having the groff program and the later having devices, fonts and macros 8685e35772b2Smrg# Checking for the groff executable is not enough. 8686e35772b2Smrg# 8687e35772b2Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 8688e35772b2Smrg# unset HAVE_GROFF or GROFF env variables. 8689e35772b2Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 8690e35772b2Smrg# 8691e35772b2SmrgAC_DEFUN([XORG_WITH_GROFF],[ 8692e35772b2SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 8693e35772b2SmrgAC_ARG_WITH(groff, 8694e35772b2Smrg AS_HELP_STRING([--with-groff], 8695e35772b2Smrg [Use groff to regenerate documentation (default: yes, if installed)]), 8696e35772b2Smrg [use_groff=$withval], [use_groff=auto]) 8697e35772b2Smrg 8698e35772b2Smrgif test "x$use_groff" = x"auto"; then 8699e35772b2Smrg AC_PATH_PROG([GROFF], [groff]) 8700e35772b2Smrg if test "x$GROFF" = "x"; then 8701e35772b2Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 8702e35772b2Smrg have_groff=no 8703e35772b2Smrg else 8704e35772b2Smrg have_groff=yes 8705e35772b2Smrg fi 8706e35772b2Smrgelif test "x$use_groff" = x"yes" ; then 8707e35772b2Smrg AC_PATH_PROG([GROFF], [groff]) 8708e35772b2Smrg if test "x$GROFF" = "x"; then 8709e35772b2Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 8710e35772b2Smrg fi 8711e35772b2Smrg have_groff=yes 8712e35772b2Smrgelif test "x$use_groff" = x"no" ; then 8713e35772b2Smrg if test "x$GROFF" != "x"; then 8714e35772b2Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 8715e35772b2Smrg fi 8716e35772b2Smrg have_groff=no 8717e35772b2Smrgelse 8718e35772b2Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 8719e35772b2Smrgfi 8720e35772b2Smrg# We have groff, test for the presence of the macro packages 8721e35772b2Smrgif test "x$have_groff" = x"yes"; then 8722e35772b2Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 8723e35772b2Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 8724e35772b2Smrg groff_ms_works=yes 8725e35772b2Smrg else 8726e35772b2Smrg groff_ms_works=no 8727e35772b2Smrg fi 8728e35772b2Smrg AC_MSG_RESULT([$groff_ms_works]) 8729e35772b2Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 8730e35772b2Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 8731e35772b2Smrg groff_mm_works=yes 8732e35772b2Smrg else 8733e35772b2Smrg groff_mm_works=no 8734e35772b2Smrg fi 8735e35772b2Smrg AC_MSG_RESULT([$groff_mm_works]) 8736e35772b2Smrgfi 8737e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 8738e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 8739e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 8740e35772b2Smrg]) # XORG_WITH_GROFF 8741e35772b2Smrg 8742e35772b2Smrg# XORG_WITH_FOP 8743e35772b2Smrg# ---------------- 8744e35772b2Smrg# Minimum version: 1.6.0 8745e35772b2Smrg# 8746e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 8747e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 8748e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 8749e35772b2Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 8750e35772b2Smrg# as whether or not to use the fop package. 8751e35772b2Smrg# 8752e35772b2Smrg# Interface to module: 8753e35772b2Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 8754e35772b2Smrg# FOP: returns the path of the fop program found 8755e35772b2Smrg# returns the path set by the user in the environment 8756e35772b2Smrg# --with-fop: 'yes' user instructs the module to use fop 8757e35772b2Smrg# 'no' user instructs the module not to use fop 8758e35772b2Smrg# 8759e35772b2Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 8760e35772b2Smrg# 8761e35772b2SmrgAC_DEFUN([XORG_WITH_FOP],[ 8762e35772b2SmrgAC_ARG_VAR([FOP], [Path to fop command]) 8763e35772b2SmrgAC_ARG_WITH(fop, 8764e35772b2Smrg AS_HELP_STRING([--with-fop], 8765e35772b2Smrg [Use fop to regenerate documentation (default: yes, if installed)]), 8766e35772b2Smrg [use_fop=$withval], [use_fop=auto]) 8767e35772b2Smrg 8768e35772b2Smrgif test "x$use_fop" = x"auto"; then 8769e35772b2Smrg AC_PATH_PROG([FOP], [fop]) 8770e35772b2Smrg if test "x$FOP" = "x"; then 8771e35772b2Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 8772e35772b2Smrg have_fop=no 8773e35772b2Smrg else 8774e35772b2Smrg have_fop=yes 8775e35772b2Smrg fi 8776e35772b2Smrgelif test "x$use_fop" = x"yes" ; then 8777e35772b2Smrg AC_PATH_PROG([FOP], [fop]) 8778e35772b2Smrg if test "x$FOP" = "x"; then 8779e35772b2Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 8780e35772b2Smrg fi 8781e35772b2Smrg have_fop=yes 8782e35772b2Smrgelif test "x$use_fop" = x"no" ; then 8783e35772b2Smrg if test "x$FOP" != "x"; then 8784e35772b2Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 8785e35772b2Smrg fi 8786e35772b2Smrg have_fop=no 8787e35772b2Smrgelse 8788e35772b2Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 8789e35772b2Smrgfi 8790e35772b2SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 8791e35772b2Smrg]) # XORG_WITH_FOP 8792e35772b2Smrg 8793e35772b2Smrg# XORG_WITH_PS2PDF 8794e35772b2Smrg# ---------------- 8795e35772b2Smrg# Minimum version: 1.6.0 8796e35772b2Smrg# 8797e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 8798e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 8799e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 8800e35772b2Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 8801e35772b2Smrg# as whether or not to use the ps2pdf package. 8802e35772b2Smrg# 8803e35772b2Smrg# Interface to module: 8804e35772b2Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 8805e35772b2Smrg# PS2PDF: returns the path of the ps2pdf program found 8806e35772b2Smrg# returns the path set by the user in the environment 8807e35772b2Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 8808e35772b2Smrg# 'no' user instructs the module not to use ps2pdf 8809e35772b2Smrg# 8810e35772b2Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 8811e35772b2Smrg# 8812e35772b2SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 8813e35772b2SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 8814e35772b2SmrgAC_ARG_WITH(ps2pdf, 8815e35772b2Smrg AS_HELP_STRING([--with-ps2pdf], 8816e35772b2Smrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 8817e35772b2Smrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 8818e35772b2Smrg 8819e35772b2Smrgif test "x$use_ps2pdf" = x"auto"; then 8820e35772b2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 8821e35772b2Smrg if test "x$PS2PDF" = "x"; then 8822e35772b2Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 8823e35772b2Smrg have_ps2pdf=no 8824e35772b2Smrg else 8825e35772b2Smrg have_ps2pdf=yes 8826e35772b2Smrg fi 8827e35772b2Smrgelif test "x$use_ps2pdf" = x"yes" ; then 8828e35772b2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 8829e35772b2Smrg if test "x$PS2PDF" = "x"; then 8830e35772b2Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 8831e35772b2Smrg fi 8832e35772b2Smrg have_ps2pdf=yes 8833e35772b2Smrgelif test "x$use_ps2pdf" = x"no" ; then 8834e35772b2Smrg if test "x$PS2PDF" != "x"; then 8835e35772b2Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 8836e35772b2Smrg fi 8837e35772b2Smrg have_ps2pdf=no 8838e35772b2Smrgelse 8839e35772b2Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 8840e35772b2Smrgfi 8841e35772b2SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 8842e35772b2Smrg]) # XORG_WITH_PS2PDF 8843e35772b2Smrg 8844e35772b2Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 8845e35772b2Smrg# ---------------- 8846e35772b2Smrg# Minimum version: 1.6.0 8847e35772b2Smrg# 8848e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 8849e35772b2Smrg# not at the appropriate level. This macro enables a builder to skip all 8850e35772b2Smrg# documentation targets except traditional man pages. 8851e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 8852e35772b2Smrg# maximum flexibilty in controlling documentation building. 8853e35772b2Smrg# Refer to: 8854e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 8855e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 8856e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 8857e35772b2Smrg# XORG_WITH_FOP --with-fop 8858e35772b2Smrg# XORG_WITH_GROFF --with-groff 8859e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 8860e35772b2Smrg# 8861e35772b2Smrg# Interface to module: 8862e35772b2Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 8863e35772b2Smrg# --enable-docs: 'yes' user instructs the module to generate docs 8864e35772b2Smrg# 'no' user instructs the module not to generate docs 8865e35772b2Smrg# parm1: specify the default value, yes or no. 8866e35772b2Smrg# 8867e35772b2SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 8868e35772b2Smrgdefault=$1 8869e35772b2Smrgif test "x$default" = x ; then 8870e35772b2Smrg default="yes" 8871e35772b2Smrgfi 8872e35772b2SmrgAC_ARG_ENABLE(docs, 8873e35772b2Smrg AS_HELP_STRING([--enable-docs], 8874e35772b2Smrg [Enable building the documentation (default: yes)]), 8875e35772b2Smrg [build_docs=$enableval], [build_docs=$default]) 8876e35772b2SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 8877e35772b2SmrgAC_MSG_CHECKING([whether to build documentation]) 8878e35772b2SmrgAC_MSG_RESULT([$build_docs]) 8879e35772b2Smrg]) # XORG_ENABLE_DOCS 8880e35772b2Smrg 8881e35772b2Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 8882e35772b2Smrg# ---------------- 8883e35772b2Smrg# Minimum version: 1.6.0 8884e35772b2Smrg# 8885e35772b2Smrg# This macro enables a builder to skip all developer documentation. 8886e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 8887e35772b2Smrg# maximum flexibilty in controlling documentation building. 8888e35772b2Smrg# Refer to: 8889e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 8890e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 8891e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 8892e35772b2Smrg# XORG_WITH_FOP --with-fop 8893e35772b2Smrg# XORG_WITH_GROFF --with-groff 8894e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 8895e35772b2Smrg# 8896e35772b2Smrg# Interface to module: 8897e35772b2Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 8898e35772b2Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 8899e35772b2Smrg# 'no' user instructs the module not to generate developer docs 8900e35772b2Smrg# parm1: specify the default value, yes or no. 8901e35772b2Smrg# 8902e35772b2SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 8903e35772b2Smrgdevel_default=$1 8904e35772b2Smrgif test "x$devel_default" = x ; then 8905e35772b2Smrg devel_default="yes" 8906e35772b2Smrgfi 8907e35772b2SmrgAC_ARG_ENABLE(devel-docs, 8908e35772b2Smrg AS_HELP_STRING([--enable-devel-docs], 8909e35772b2Smrg [Enable building the developer documentation (default: yes)]), 8910e35772b2Smrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 8911e35772b2SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 8912e35772b2SmrgAC_MSG_CHECKING([whether to build developer documentation]) 8913e35772b2SmrgAC_MSG_RESULT([$build_devel_docs]) 8914e35772b2Smrg]) # XORG_ENABLE_DEVEL_DOCS 8915e35772b2Smrg 8916e35772b2Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 8917e35772b2Smrg# ---------------- 8918e35772b2Smrg# Minimum version: 1.6.0 8919e35772b2Smrg# 8920e35772b2Smrg# This macro enables a builder to skip all functional specification targets. 8921e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 8922e35772b2Smrg# maximum flexibilty in controlling documentation building. 8923e35772b2Smrg# Refer to: 8924e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 8925e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 8926e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 8927e35772b2Smrg# XORG_WITH_FOP --with-fop 8928e35772b2Smrg# XORG_WITH_GROFF --with-groff 8929e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 8930e35772b2Smrg# 8931e35772b2Smrg# Interface to module: 8932e35772b2Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 8933e35772b2Smrg# --enable-specs: 'yes' user instructs the module to generate specs 8934e35772b2Smrg# 'no' user instructs the module not to generate specs 8935e35772b2Smrg# parm1: specify the default value, yes or no. 8936e35772b2Smrg# 8937e35772b2SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 8938e35772b2Smrgspec_default=$1 8939e35772b2Smrgif test "x$spec_default" = x ; then 8940e35772b2Smrg spec_default="yes" 8941e35772b2Smrgfi 8942e35772b2SmrgAC_ARG_ENABLE(specs, 8943e35772b2Smrg AS_HELP_STRING([--enable-specs], 8944e35772b2Smrg [Enable building the specs (default: yes)]), 8945e35772b2Smrg [build_specs=$enableval], [build_specs=$spec_default]) 8946e35772b2SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 8947e35772b2SmrgAC_MSG_CHECKING([whether to build functional specifications]) 8948e35772b2SmrgAC_MSG_RESULT([$build_specs]) 8949e35772b2Smrg]) # XORG_ENABLE_SPECS 8950e35772b2Smrg 895172b676d7Smrg# XORG_CHECK_MALLOC_ZERO 895272b676d7Smrg# ---------------------- 895372b676d7Smrg# Minimum version: 1.0.0 895472b676d7Smrg# 895572b676d7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 895672b676d7Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 895772b676d7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 895872b676d7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 895972b676d7SmrgAC_ARG_ENABLE(malloc0returnsnull, 8960e35772b2Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 896172b676d7Smrg [malloc(0) returns NULL (default: auto)]), 896272b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 896372b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 896472b676d7Smrg 896572b676d7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 896672b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 896772b676d7Smrg AC_RUN_IFELSE([ 896872b676d7Smrgchar *malloc(); 896972b676d7Smrgchar *realloc(); 897072b676d7Smrgchar *calloc(); 897172b676d7Smrgmain() { 897272b676d7Smrg char *m0, *r0, *c0, *p; 897372b676d7Smrg m0 = malloc(0); 897472b676d7Smrg p = malloc(10); 897572b676d7Smrg r0 = realloc(p,0); 897672b676d7Smrg c0 = calloc(0); 897772b676d7Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 897872b676d7Smrg}], 897972b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 8980e35772b2Smrg [MALLOC_ZERO_RETURNS_NULL=no], 8981e35772b2Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 898272b676d7Smrgfi 898372b676d7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 898472b676d7Smrg 898572b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 898672b676d7Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 898772b676d7Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 898872b676d7Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 898972b676d7Smrgelse 899072b676d7Smrg MALLOC_ZERO_CFLAGS="" 899172b676d7Smrg XMALLOC_ZERO_CFLAGS="" 899272b676d7Smrg XTMALLOC_ZERO_CFLAGS="" 899372b676d7Smrgfi 899472b676d7Smrg 899572b676d7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 899672b676d7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 899772b676d7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 899872b676d7Smrg]) # XORG_CHECK_MALLOC_ZERO 899972b676d7Smrg 900072b676d7Smrg# XORG_WITH_LINT() 900172b676d7Smrg# ---------------- 900272b676d7Smrg# Minimum version: 1.1.0 900372b676d7Smrg# 9004e35772b2Smrg# This macro enables the use of a tool that flags some suspicious and 9005e35772b2Smrg# non-portable constructs (likely to be bugs) in C language source code. 9006e35772b2Smrg# It will attempt to locate the tool and use appropriate options. 9007e35772b2Smrg# There are various lint type tools on different platforms. 9008e35772b2Smrg# 9009e35772b2Smrg# Interface to module: 9010e35772b2Smrg# LINT: returns the path to the tool found on the platform 9011e35772b2Smrg# or the value set to LINT on the configure cmd line 9012e35772b2Smrg# also an Automake conditional 9013e35772b2Smrg# LINT_FLAGS: an Automake variable with appropriate flags 9014e35772b2Smrg# 9015e35772b2Smrg# --with-lint: 'yes' user instructs the module to use lint 9016e35772b2Smrg# 'no' user instructs the module not to use lint (default) 9017e35772b2Smrg# 9018e35772b2Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 9019e35772b2Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 902072b676d7Smrg# 902172b676d7SmrgAC_DEFUN([XORG_WITH_LINT],[ 902272b676d7Smrg 9023e35772b2SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 9024e35772b2SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 9025e35772b2SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 902672b676d7Smrg [Use a lint-style source code checker (default: disabled)])], 902772b676d7Smrg [use_lint=$withval], [use_lint=no]) 9028e35772b2Smrg 9029e35772b2Smrg# Obtain platform specific info like program name and options 9030e35772b2Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 9031e35772b2Smrgcase $host_os in 9032e35772b2Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 9033e35772b2Smrg lint_name=splint 9034e35772b2Smrg lint_options="-badflag" 9035e35772b2Smrg ;; 9036e35772b2Smrg *freebsd* | *netbsd*) 9037e35772b2Smrg lint_name=lint 9038e35772b2Smrg lint_options="-u -b" 9039e35772b2Smrg ;; 9040e35772b2Smrg *solaris*) 9041e35772b2Smrg lint_name=lint 9042e35772b2Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 9043e35772b2Smrg ;; 9044e35772b2Smrgesac 9045e35772b2Smrg 9046e35772b2Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 9047e35772b2Smrgif test "x$use_lint" = x"yes" ; then 9048e35772b2Smrg AC_PATH_PROG([LINT], [$lint_name]) 9049e35772b2Smrg if test "x$LINT" = "x"; then 9050e35772b2Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 9051e35772b2Smrg fi 9052e35772b2Smrgelif test "x$use_lint" = x"no" ; then 9053e35772b2Smrg if test "x$LINT" != "x"; then 9054e35772b2Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 9055e35772b2Smrg fi 905672b676d7Smrgelse 9057e35772b2Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 905872b676d7Smrgfi 9059e35772b2Smrg 9060e35772b2Smrg# User supplied flags override default flags 9061e35772b2Smrgif test "x$LINT_FLAGS" != "x"; then 9062e35772b2Smrg lint_options=$LINT_FLAGS 906372b676d7Smrgfi 906472b676d7Smrg 9065e35772b2SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 9066e35772b2SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 906772b676d7Smrg 906872b676d7Smrg]) # XORG_WITH_LINT 906972b676d7Smrg 907072b676d7Smrg# XORG_LINT_LIBRARY(LIBNAME) 907172b676d7Smrg# -------------------------- 907272b676d7Smrg# Minimum version: 1.1.0 907372b676d7Smrg# 907472b676d7Smrg# Sets up flags for building lint libraries for checking programs that call 907572b676d7Smrg# functions in the library. 907672b676d7Smrg# 9077e35772b2Smrg# Interface to module: 9078e35772b2Smrg# LINTLIB - Automake variable with the name of lint library file to make 9079e35772b2Smrg# MAKE_LINT_LIB - Automake conditional 9080e35772b2Smrg# 9081e35772b2Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 9082e35772b2Smrg# - 'no' user instructs the module not to create a lint library (default) 908372b676d7Smrg 908472b676d7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 908572b676d7SmrgAC_REQUIRE([XORG_WITH_LINT]) 9086e35772b2SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 908772b676d7Smrg [Create lint library (default: disabled)])], 908872b676d7Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 9089e35772b2Smrg 9090e35772b2Smrgif test "x$make_lint_lib" = x"yes" ; then 9091e35772b2Smrg LINTLIB=llib-l$1.ln 9092e35772b2Smrg if test "x$LINT" = "x"; then 9093e35772b2Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 9094e35772b2Smrg fi 9095e35772b2Smrgelif test "x$make_lint_lib" != x"no" ; then 9096e35772b2Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 909772b676d7Smrgfi 9098e35772b2Smrg 909972b676d7SmrgAC_SUBST(LINTLIB) 910072b676d7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 910172b676d7Smrg 910272b676d7Smrg]) # XORG_LINT_LIBRARY 910372b676d7Smrg 9104e47418d9Smrg# XORG_CWARNFLAGS 9105e47418d9Smrg# --------------- 9106e47418d9Smrg# Minimum version: 1.2.0 9107e47418d9Smrg# 9108e47418d9Smrg# Defines CWARNFLAGS to enable C compiler warnings. 9109e47418d9Smrg# 9110e47418d9SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 9111e35772b2SmrgAC_REQUIRE([AC_PROG_CC_C99]) 9112e47418d9Smrgif test "x$GCC" = xyes ; then 9113e47418d9Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 9114e47418d9Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 9115e35772b2Smrg-Wbad-function-cast -Wformat=2" 9116e35772b2Smrg case `$CC -dumpversion` in 9117e47418d9Smrg 3.4.* | 4.*) 9118e35772b2Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 9119e47418d9Smrg ;; 9120e47418d9Smrg esac 9121e47418d9Smrgelse 9122e47418d9Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 9123e47418d9Smrg if test "x$SUNCC" = "xyes"; then 9124e47418d9Smrg CWARNFLAGS="-v" 9125e47418d9Smrg fi 9126e47418d9Smrgfi 9127e47418d9SmrgAC_SUBST(CWARNFLAGS) 9128e47418d9Smrg]) # XORG_CWARNFLAGS 9129e35772b2Smrg 9130e35772b2Smrg# XORG_STRICT_OPTION 9131e35772b2Smrg# ----------------------- 9132e35772b2Smrg# Minimum version: 1.3.0 9133e35772b2Smrg# 9134e35772b2Smrg# Add configure option to enable strict compilation 9135e35772b2SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 9136e35772b2Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 9137e35772b2SmrgAC_REQUIRE([AC_PROG_CC_C99]) 9138e35772b2SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 9139e35772b2Smrg 9140e35772b2SmrgAC_ARG_ENABLE(strict-compilation, 9141e35772b2Smrg AS_HELP_STRING([--enable-strict-compilation], 9142e35772b2Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 9143e35772b2Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 9144e35772b2Smrgif test "x$STRICT_COMPILE" = "xyes"; then 9145e35772b2Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 9146e35772b2Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 9147e35772b2Smrg if test "x$GCC" = xyes ; then 9148e35772b2Smrg STRICT_CFLAGS="-pedantic -Werror" 9149e35772b2Smrg elif test "x$SUNCC" = "xyes"; then 9150e35772b2Smrg STRICT_CFLAGS="-errwarn" 9151e35772b2Smrg elif test "x$INTELCC" = "xyes"; then 9152e35772b2Smrg STRICT_CFLAGS="-Werror" 9153e35772b2Smrg fi 9154e35772b2Smrgfi 9155e35772b2SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 9156e35772b2SmrgAC_SUBST([CWARNFLAGS]) 9157e35772b2Smrg]) # XORG_STRICT_OPTION 9158e35772b2Smrg 9159e35772b2Smrg# XORG_DEFAULT_OPTIONS 9160e35772b2Smrg# -------------------- 9161e35772b2Smrg# Minimum version: 1.3.0 9162e35772b2Smrg# 9163e35772b2Smrg# Defines default options for X.Org modules. 9164e35772b2Smrg# 9165e35772b2SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 9166e35772b2SmrgAC_REQUIRE([AC_PROG_INSTALL]) 9167e35772b2SmrgXORG_CWARNFLAGS 9168e35772b2SmrgXORG_STRICT_OPTION 9169e35772b2SmrgXORG_RELEASE_VERSION 9170e35772b2SmrgXORG_CHANGELOG 9171e35772b2SmrgXORG_INSTALL 9172e35772b2SmrgXORG_MANPAGE_SECTIONS 9173e35772b2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 9174e35772b2Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 9175e35772b2Smrg]) # XORG_DEFAULT_OPTIONS 9176e35772b2Smrg 9177e35772b2Smrg# XORG_INSTALL() 9178e35772b2Smrg# ---------------- 9179e35772b2Smrg# Minimum version: 1.4.0 9180e35772b2Smrg# 9181e35772b2Smrg# Defines the variable INSTALL_CMD as the command to copy 9182e35772b2Smrg# INSTALL from $prefix/share/util-macros. 9183e35772b2Smrg# 9184e35772b2SmrgAC_DEFUN([XORG_INSTALL], [ 9185e35772b2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9186e35772b2Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 9187e35772b2SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 9188e35772b2Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 9189e35772b2Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 9190e35772b2Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 9191e35772b2SmrgAC_SUBST([INSTALL_CMD]) 9192e35772b2Smrg]) # XORG_INSTALL 919372b676d7Smrgdnl Copyright 2005 Red Hat, Inc 919472b676d7Smrgdnl 919572b676d7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 919672b676d7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 919772b676d7Smrgdnl the above copyright notice appear in all copies and that both that 919872b676d7Smrgdnl copyright notice and this permission notice appear in supporting 919972b676d7Smrgdnl documentation. 920072b676d7Smrgdnl 920172b676d7Smrgdnl The above copyright notice and this permission notice shall be included 920272b676d7Smrgdnl in all copies or substantial portions of the Software. 920372b676d7Smrgdnl 920472b676d7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 920572b676d7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 920672b676d7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 920772b676d7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 920872b676d7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 920972b676d7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 921072b676d7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 921172b676d7Smrgdnl 921272b676d7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 921372b676d7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 921472b676d7Smrgdnl other dealings in this Software without prior written authorization 921572b676d7Smrgdnl from the copyright holders. 921672b676d7Smrgdnl 921772b676d7Smrg 921872b676d7Smrg# XORG_RELEASE_VERSION 921972b676d7Smrg# -------------------- 9220e35772b2Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 922172b676d7Smrg 922272b676d7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 92231fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 92241fd23544Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 92251fd23544Smrg [Major version of this package]) 92261fd23544Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 92271fd23544Smrg if test "x$PVM" = "x"; then 92281fd23544Smrg PVM="0" 92291fd23544Smrg fi 92301fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 92311fd23544Smrg [$PVM], 92321fd23544Smrg [Minor version of this package]) 92331fd23544Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 92341fd23544Smrg if test "x$PVP" = "x"; then 92351fd23544Smrg PVP="0" 92361fd23544Smrg fi 92371fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 92381fd23544Smrg [$PVP], 92391fd23544Smrg [Patch version of this package]) 924072b676d7Smrg]) 924172b676d7Smrg 9242e47418d9Smrg# XORG_CHANGELOG() 9243e47418d9Smrg# ---------------- 9244e47418d9Smrg# Minimum version: 1.2.0 9245e47418d9Smrg# 9246e47418d9Smrg# Defines the variable CHANGELOG_CMD as the command to generate 9247e47418d9Smrg# ChangeLog from git. 9248e47418d9Smrg# 9249e47418d9Smrg# 9250e47418d9SmrgAC_DEFUN([XORG_CHANGELOG], [ 9251e35772b2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 9252e35772b2Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 9253e35772b2Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 9254e47418d9Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 9255e47418d9SmrgAC_SUBST([CHANGELOG_CMD]) 9256e47418d9Smrg]) # XORG_CHANGELOG 9257e47418d9Smrg 9258e35772b2Smrgdnl Copyright 2005 Red Hat, Inc 9259e35772b2Smrgdnl 9260e35772b2Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 9261e35772b2Smrgdnl documentation for any purpose is hereby granted without fee, provided that 9262e35772b2Smrgdnl the above copyright notice appear in all copies and that both that 9263e35772b2Smrgdnl copyright notice and this permission notice appear in supporting 9264e35772b2Smrgdnl documentation. 9265e35772b2Smrgdnl 9266e35772b2Smrgdnl The above copyright notice and this permission notice shall be included 9267e35772b2Smrgdnl in all copies or substantial portions of the Software. 9268e35772b2Smrgdnl 9269e35772b2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9270e35772b2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9271e35772b2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 9272e35772b2Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 9273e35772b2Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 9274e35772b2Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 9275e35772b2Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 9276e35772b2Smrgdnl 9277e35772b2Smrgdnl Except as contained in this notice, the name of the copyright holders shall 9278e35772b2Smrgdnl not be used in advertising or otherwise to promote the sale, use or 9279e35772b2Smrgdnl other dealings in this Software without prior written authorization 9280e35772b2Smrgdnl from the copyright holders. 9281e35772b2Smrgdnl 9282e35772b2Smrg 9283e35772b2Smrg# XORG_DRIVER_CHECK_EXT() 9284e35772b2Smrg# -------------------------- 9285e35772b2Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 9286e35772b2Smrg# is defined, then add $1 to $REQUIRED_MODULES. 9287e35772b2Smrg 9288e35772b2SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 9289e35772b2Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9290e35772b2Smrg SAVE_CFLAGS="$CFLAGS" 9291e35772b2Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 9292e35772b2Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 9293e35772b2Smrg#include "xorg-server.h" 9294e35772b2Smrg#if !defined $1 9295e35772b2Smrg#error $1 not defined 9296e35772b2Smrg#endif 9297e35772b2Smrg ]])], 9298e35772b2Smrg [_EXT_CHECK=yes], 9299e35772b2Smrg [_EXT_CHECK=no]) 9300e35772b2Smrg CFLAGS="$SAVE_CFLAGS" 9301e35772b2Smrg AC_MSG_CHECKING([if $1 is defined]) 9302e35772b2Smrg AC_MSG_RESULT([$_EXT_CHECK]) 9303e35772b2Smrg if test "$_EXT_CHECK" != no; then 9304e35772b2Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 9305e35772b2Smrg fi 9306e35772b2Smrg]) 9307e35772b2Smrg 9308e47418d9Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 930972b676d7Smrg# 931072b676d7Smrg# This file is free software; the Free Software Foundation 931172b676d7Smrg# gives unlimited permission to copy and/or distribute it, 931272b676d7Smrg# with or without modifications, as long as this notice is preserved. 931372b676d7Smrg 931472b676d7Smrg# AM_AUTOMAKE_VERSION(VERSION) 931572b676d7Smrg# ---------------------------- 931672b676d7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 931772b676d7Smrg# generated from the m4 files accompanying Automake X.Y. 93181fd23544Smrg# (This private macro should not be called outside this file.) 93191fd23544SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 9320e47418d9Smrg[am__api_version='1.11' 93211fd23544Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 93221fd23544Smrgdnl require some minimum version. Point them to the right macro. 9323e35772b2Smrgm4_if([$1], [1.11.1], [], 93241fd23544Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 93251fd23544Smrg]) 93261fd23544Smrg 93271fd23544Smrg# _AM_AUTOCONF_VERSION(VERSION) 93281fd23544Smrg# ----------------------------- 93291fd23544Smrg# aclocal traces this macro to find the Autoconf version. 93301fd23544Smrg# This is a private macro too. Using m4_define simplifies 93311fd23544Smrg# the logic in aclocal, which can simply ignore this definition. 93321fd23544Smrgm4_define([_AM_AUTOCONF_VERSION], []) 933372b676d7Smrg 933472b676d7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 933572b676d7Smrg# ------------------------------- 93361fd23544Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 9337e47418d9Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 933872b676d7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 9339e35772b2Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 93401fd23544Smrgm4_ifndef([AC_AUTOCONF_VERSION], 93411fd23544Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 9342e47418d9Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 934372b676d7Smrg 934472b676d7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 934572b676d7Smrg 934672b676d7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 934772b676d7Smrg# 934872b676d7Smrg# This file is free software; the Free Software Foundation 934972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 935072b676d7Smrg# with or without modifications, as long as this notice is preserved. 935172b676d7Smrg 935272b676d7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 935372b676d7Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 935472b676d7Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 935572b676d7Smrg# 935672b676d7Smrg# Of course, Automake must honor this variable whenever it calls a 935772b676d7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 935872b676d7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 935972b676d7Smrg# depending on how configure is run. This is pretty annoying, since 936072b676d7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 936172b676d7Smrg# source directory, any form will work fine, but in subdirectories a 936272b676d7Smrg# relative path needs to be adjusted first. 936372b676d7Smrg# 936472b676d7Smrg# $ac_aux_dir/missing 936572b676d7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 936672b676d7Smrg# $top_srcdir/$ac_aux_dir/missing 936772b676d7Smrg# fails if $ac_aux_dir is absolute, 936872b676d7Smrg# fails when called from a subdirectory in a VPATH build with 936972b676d7Smrg# a relative $ac_aux_dir 937072b676d7Smrg# 937172b676d7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 937272b676d7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 937372b676d7Smrg# harmless because $srcdir is `.', but things will broke when you 937472b676d7Smrg# start a VPATH build or use an absolute $srcdir. 937572b676d7Smrg# 937672b676d7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 937772b676d7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 937872b676d7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 937972b676d7Smrg# and then we would define $MISSING as 938072b676d7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 938172b676d7Smrg# This will work as long as MISSING is not called from configure, because 938272b676d7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 938372b676d7Smrg# However there are other variables, like CC, which are often used in 938472b676d7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 938572b676d7Smrg# 938672b676d7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 938772b676d7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 938872b676d7Smrg# configured tree to be moved without reconfiguration. 938972b676d7Smrg 939072b676d7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 939172b676d7Smrg[dnl Rely on autoconf to set up CDPATH properly. 939272b676d7SmrgAC_PREREQ([2.50])dnl 939372b676d7Smrg# expand $ac_aux_dir to an absolute path 939472b676d7Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 939572b676d7Smrg]) 939672b676d7Smrg 939772b676d7Smrg# AM_CONDITIONAL -*- Autoconf -*- 939872b676d7Smrg 9399e47418d9Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 940072b676d7Smrg# Free Software Foundation, Inc. 940172b676d7Smrg# 940272b676d7Smrg# This file is free software; the Free Software Foundation 940372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 940472b676d7Smrg# with or without modifications, as long as this notice is preserved. 940572b676d7Smrg 9406e47418d9Smrg# serial 9 940772b676d7Smrg 940872b676d7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 940972b676d7Smrg# ------------------------------------- 941072b676d7Smrg# Define a conditional. 941172b676d7SmrgAC_DEFUN([AM_CONDITIONAL], 941272b676d7Smrg[AC_PREREQ(2.52)dnl 941372b676d7Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 941472b676d7Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 94151fd23544SmrgAC_SUBST([$1_TRUE])dnl 94161fd23544SmrgAC_SUBST([$1_FALSE])dnl 94171fd23544Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 94181fd23544Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 9419e47418d9Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 942072b676d7Smrgif $2; then 942172b676d7Smrg $1_TRUE= 942272b676d7Smrg $1_FALSE='#' 942372b676d7Smrgelse 942472b676d7Smrg $1_TRUE='#' 942572b676d7Smrg $1_FALSE= 942672b676d7Smrgfi 942772b676d7SmrgAC_CONFIG_COMMANDS_PRE( 942872b676d7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 942972b676d7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 943072b676d7SmrgUsually this means the macro was only invoked conditionally.]]) 943172b676d7Smrgfi])]) 943272b676d7Smrg 9433e47418d9Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 943472b676d7Smrg# Free Software Foundation, Inc. 943572b676d7Smrg# 943672b676d7Smrg# This file is free software; the Free Software Foundation 943772b676d7Smrg# gives unlimited permission to copy and/or distribute it, 943872b676d7Smrg# with or without modifications, as long as this notice is preserved. 943972b676d7Smrg 9440e47418d9Smrg# serial 10 944172b676d7Smrg 944272b676d7Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 944372b676d7Smrg# written in clear, in which case automake, when reading aclocal.m4, 944472b676d7Smrg# will think it sees a *use*, and therefore will trigger all it's 944572b676d7Smrg# C support machinery. Also note that it means that autoscan, seeing 944672b676d7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 944772b676d7Smrg 944872b676d7Smrg 944972b676d7Smrg# _AM_DEPENDENCIES(NAME) 945072b676d7Smrg# ---------------------- 945172b676d7Smrg# See how the compiler implements dependency checking. 945272b676d7Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 945372b676d7Smrg# We try a few techniques and use that to set a single cache variable. 945472b676d7Smrg# 945572b676d7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 945672b676d7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 945772b676d7Smrg# dependency, and given that the user is not expected to run this macro, 945872b676d7Smrg# just rely on AC_PROG_CC. 945972b676d7SmrgAC_DEFUN([_AM_DEPENDENCIES], 946072b676d7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 946172b676d7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 946272b676d7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 946372b676d7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 946472b676d7Smrg 946572b676d7Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 946672b676d7Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 946772b676d7Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 94681fd23544Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 946972b676d7Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 947072b676d7Smrg [depcc="$$1" am_compiler_list=]) 947172b676d7Smrg 947272b676d7SmrgAC_CACHE_CHECK([dependency style of $depcc], 947372b676d7Smrg [am_cv_$1_dependencies_compiler_type], 947472b676d7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 947572b676d7Smrg # We make a subdir and do the tests there. Otherwise we can end up 947672b676d7Smrg # making bogus files that we don't know about and never remove. For 947772b676d7Smrg # instance it was reported that on HP-UX the gcc test will end up 947872b676d7Smrg # making a dummy file named `D' -- because `-MD' means `put the output 947972b676d7Smrg # in D'. 948072b676d7Smrg mkdir conftest.dir 948172b676d7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 948272b676d7Smrg # using a relative directory. 948372b676d7Smrg cp "$am_depcomp" conftest.dir 948472b676d7Smrg cd conftest.dir 948572b676d7Smrg # We will build objects and dependencies in a subdirectory because 948672b676d7Smrg # it helps to detect inapplicable dependency modes. For instance 948772b676d7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 948872b676d7Smrg # side effect of compilation, but ICC will put the dependencies in 948972b676d7Smrg # the current directory while Tru64 will put them in the object 949072b676d7Smrg # directory. 949172b676d7Smrg mkdir sub 949272b676d7Smrg 949372b676d7Smrg am_cv_$1_dependencies_compiler_type=none 949472b676d7Smrg if test "$am_compiler_list" = ""; then 949572b676d7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 949672b676d7Smrg fi 9497e47418d9Smrg am__universal=false 9498e47418d9Smrg m4_case([$1], [CC], 9499e47418d9Smrg [case " $depcc " in #( 9500e47418d9Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 9501e47418d9Smrg esac], 9502e47418d9Smrg [CXX], 9503e47418d9Smrg [case " $depcc " in #( 9504e47418d9Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 9505e47418d9Smrg esac]) 9506e47418d9Smrg 950772b676d7Smrg for depmode in $am_compiler_list; do 950872b676d7Smrg # Setup a source with many dependencies, because some compilers 950972b676d7Smrg # like to wrap large dependency lists on column 80 (with \), and 951072b676d7Smrg # we should not choose a depcomp mode which is confused by this. 951172b676d7Smrg # 951272b676d7Smrg # We need to recreate these files for each test, as the compiler may 951372b676d7Smrg # overwrite some of them when testing with obscure command lines. 951472b676d7Smrg # This happens at least with the AIX C compiler. 951572b676d7Smrg : > sub/conftest.c 951672b676d7Smrg for i in 1 2 3 4 5 6; do 951772b676d7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 951872b676d7Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 951972b676d7Smrg # Solaris 8's {/usr,}/bin/sh. 952072b676d7Smrg touch sub/conftst$i.h 952172b676d7Smrg done 952272b676d7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 952372b676d7Smrg 9524e47418d9Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 9525e47418d9Smrg # mode. It turns out that the SunPro C++ compiler does not properly 9526e47418d9Smrg # handle `-M -o', and we need to detect this. Also, some Intel 9527e47418d9Smrg # versions had trouble with output in subdirs 9528e47418d9Smrg am__obj=sub/conftest.${OBJEXT-o} 9529e47418d9Smrg am__minus_obj="-o $am__obj" 953072b676d7Smrg case $depmode in 9531e47418d9Smrg gcc) 9532e47418d9Smrg # This depmode causes a compiler race in universal mode. 9533e47418d9Smrg test "$am__universal" = false || continue 9534e47418d9Smrg ;; 953572b676d7Smrg nosideeffect) 953672b676d7Smrg # after this tag, mechanisms are not by side-effect, so they'll 953772b676d7Smrg # only be used when explicitly requested 953872b676d7Smrg if test "x$enable_dependency_tracking" = xyes; then 953972b676d7Smrg continue 954072b676d7Smrg else 954172b676d7Smrg break 954272b676d7Smrg fi 954372b676d7Smrg ;; 9544e47418d9Smrg msvisualcpp | msvcmsys) 9545e47418d9Smrg # This compiler won't grok `-c -o', but also, the minuso test has 9546e47418d9Smrg # not run yet. These depmodes are late enough in the game, and 9547e47418d9Smrg # so weak that their functioning should not be impacted. 9548e47418d9Smrg am__obj=conftest.${OBJEXT-o} 9549e47418d9Smrg am__minus_obj= 9550e47418d9Smrg ;; 955172b676d7Smrg none) break ;; 955272b676d7Smrg esac 955372b676d7Smrg if depmode=$depmode \ 9554e47418d9Smrg source=sub/conftest.c object=$am__obj \ 955572b676d7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 9556e47418d9Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 955772b676d7Smrg >/dev/null 2>conftest.err && 95581fd23544Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 955972b676d7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 9560e47418d9Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 956172b676d7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 956272b676d7Smrg # icc doesn't choke on unknown options, it will just issue warnings 956372b676d7Smrg # or remarks (even with -Werror). So we grep stderr for any message 956472b676d7Smrg # that says an option was ignored or not supported. 956572b676d7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 956672b676d7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 956772b676d7Smrg # The diagnosis changed in icc 8.0: 956872b676d7Smrg # icc: Command line remark: option '-MP' not supported 956972b676d7Smrg if (grep 'ignoring option' conftest.err || 957072b676d7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 957172b676d7Smrg am_cv_$1_dependencies_compiler_type=$depmode 957272b676d7Smrg break 957372b676d7Smrg fi 957472b676d7Smrg fi 957572b676d7Smrg done 957672b676d7Smrg 957772b676d7Smrg cd .. 957872b676d7Smrg rm -rf conftest.dir 957972b676d7Smrgelse 958072b676d7Smrg am_cv_$1_dependencies_compiler_type=none 958172b676d7Smrgfi 958272b676d7Smrg]) 958372b676d7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 958472b676d7SmrgAM_CONDITIONAL([am__fastdep$1], [ 958572b676d7Smrg test "x$enable_dependency_tracking" != xno \ 958672b676d7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 958772b676d7Smrg]) 958872b676d7Smrg 958972b676d7Smrg 959072b676d7Smrg# AM_SET_DEPDIR 959172b676d7Smrg# ------------- 959272b676d7Smrg# Choose a directory name for dependency files. 959372b676d7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 959472b676d7SmrgAC_DEFUN([AM_SET_DEPDIR], 959572b676d7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 959672b676d7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 959772b676d7Smrg]) 959872b676d7Smrg 959972b676d7Smrg 960072b676d7Smrg# AM_DEP_TRACK 960172b676d7Smrg# ------------ 960272b676d7SmrgAC_DEFUN([AM_DEP_TRACK], 960372b676d7Smrg[AC_ARG_ENABLE(dependency-tracking, 960472b676d7Smrg[ --disable-dependency-tracking speeds up one-time build 960572b676d7Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 960672b676d7Smrgif test "x$enable_dependency_tracking" != xno; then 960772b676d7Smrg am_depcomp="$ac_aux_dir/depcomp" 960872b676d7Smrg AMDEPBACKSLASH='\' 960972b676d7Smrgfi 961072b676d7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 96111fd23544SmrgAC_SUBST([AMDEPBACKSLASH])dnl 96121fd23544Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 961372b676d7Smrg]) 961472b676d7Smrg 961572b676d7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 961672b676d7Smrg 9617e47418d9Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 961872b676d7Smrg# Free Software Foundation, Inc. 961972b676d7Smrg# 962072b676d7Smrg# This file is free software; the Free Software Foundation 962172b676d7Smrg# gives unlimited permission to copy and/or distribute it, 962272b676d7Smrg# with or without modifications, as long as this notice is preserved. 962372b676d7Smrg 9624e47418d9Smrg#serial 5 962572b676d7Smrg 962672b676d7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 962772b676d7Smrg# ------------------------------ 962872b676d7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 9629e47418d9Smrg[{ 9630e47418d9Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 9631e47418d9Smrg # are listed without --file. Let's play safe and only enable the eval 9632e47418d9Smrg # if we detect the quoting. 9633e47418d9Smrg case $CONFIG_FILES in 9634e47418d9Smrg *\'*) eval set x "$CONFIG_FILES" ;; 9635e47418d9Smrg *) set x $CONFIG_FILES ;; 9636e47418d9Smrg esac 9637e47418d9Smrg shift 9638e47418d9Smrg for mf 9639e47418d9Smrg do 9640e47418d9Smrg # Strip MF so we end up with the name of the file. 9641e47418d9Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 9642e47418d9Smrg # Check whether this is an Automake generated Makefile or not. 9643e47418d9Smrg # We used to match only the files named `Makefile.in', but 9644e47418d9Smrg # some people rename them; so instead we look at the file content. 9645e47418d9Smrg # Grep'ing the first line is not enough: some people post-process 9646e47418d9Smrg # each Makefile.in and add a new line on top of each file to say so. 9647e47418d9Smrg # Grep'ing the whole file is not good either: AIX grep has a line 9648e47418d9Smrg # limit of 2048, but all sed's we know have understand at least 4000. 9649e47418d9Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 9650e47418d9Smrg dirpart=`AS_DIRNAME("$mf")` 9651e47418d9Smrg else 9652e47418d9Smrg continue 9653e47418d9Smrg fi 9654e47418d9Smrg # Extract the definition of DEPDIR, am__include, and am__quote 9655e47418d9Smrg # from the Makefile without running `make'. 9656e47418d9Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 9657e47418d9Smrg test -z "$DEPDIR" && continue 9658e47418d9Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 9659e47418d9Smrg test -z "am__include" && continue 9660e47418d9Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 9661e47418d9Smrg # When using ansi2knr, U may be empty or an underscore; expand it 9662e47418d9Smrg U=`sed -n 's/^U = //p' < "$mf"` 9663e47418d9Smrg # Find all dependency output files, they are included files with 9664e47418d9Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 9665e47418d9Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 9666e47418d9Smrg # expansion. 9667e47418d9Smrg for file in `sed -n " 9668e47418d9Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 9669e47418d9Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 9670e47418d9Smrg # Make sure the directory exists. 9671e47418d9Smrg test -f "$dirpart/$file" && continue 9672e47418d9Smrg fdir=`AS_DIRNAME(["$file"])` 9673e47418d9Smrg AS_MKDIR_P([$dirpart/$fdir]) 9674e47418d9Smrg # echo "creating $dirpart/$file" 9675e47418d9Smrg echo '# dummy' > "$dirpart/$file" 9676e47418d9Smrg done 967772b676d7Smrg done 9678e47418d9Smrg} 967972b676d7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 968072b676d7Smrg 968172b676d7Smrg 968272b676d7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 968372b676d7Smrg# ----------------------------- 968472b676d7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 968572b676d7Smrg# 968672b676d7Smrg# This code is only required when automatic dependency tracking 968772b676d7Smrg# is enabled. FIXME. This creates each `.P' file that we will 968872b676d7Smrg# need in order to bootstrap the dependency handling code. 968972b676d7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 969072b676d7Smrg[AC_CONFIG_COMMANDS([depfiles], 969172b676d7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 969272b676d7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 969372b676d7Smrg]) 969472b676d7Smrg 969572b676d7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 969672b676d7Smrg# Free Software Foundation, Inc. 969772b676d7Smrg# 969872b676d7Smrg# This file is free software; the Free Software Foundation 969972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 970072b676d7Smrg# with or without modifications, as long as this notice is preserved. 970172b676d7Smrg 970272b676d7Smrg# serial 8 970372b676d7Smrg 970472b676d7Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 970572b676d7SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 970672b676d7Smrg 970772b676d7Smrg# Do all the work for Automake. -*- Autoconf -*- 970872b676d7Smrg 97091fd23544Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 9710e47418d9Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 971172b676d7Smrg# 971272b676d7Smrg# This file is free software; the Free Software Foundation 971372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 971472b676d7Smrg# with or without modifications, as long as this notice is preserved. 971572b676d7Smrg 9716e47418d9Smrg# serial 16 971772b676d7Smrg 971872b676d7Smrg# This macro actually does too much. Some checks are only needed if 971972b676d7Smrg# your package does certain things. But this isn't really a big deal. 972072b676d7Smrg 972172b676d7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 972272b676d7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 972372b676d7Smrg# ----------------------------------------------- 972472b676d7Smrg# The call with PACKAGE and VERSION arguments is the old style 972572b676d7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 972672b676d7Smrg# and VERSION should now be passed to AC_INIT and removed from 972772b676d7Smrg# the call to AM_INIT_AUTOMAKE. 972872b676d7Smrg# We support both call styles for the transition. After 972972b676d7Smrg# the next Automake release, Autoconf can make the AC_INIT 973072b676d7Smrg# arguments mandatory, and then we can depend on a new Autoconf 973172b676d7Smrg# release and drop the old call support. 973272b676d7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 9733e47418d9Smrg[AC_PREREQ([2.62])dnl 973472b676d7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 973572b676d7Smrgdnl the ones we care about. 973672b676d7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 973772b676d7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 973872b676d7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 97391fd23544Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 97401fd23544Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 97411fd23544Smrg # is not polluted with repeated "-I." 97421fd23544Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 97431fd23544Smrg # test to see if srcdir already configured 97441fd23544Smrg if test -f $srcdir/config.status; then 97451fd23544Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 97461fd23544Smrg fi 974772b676d7Smrgfi 974872b676d7Smrg 974972b676d7Smrg# test whether we have cygpath 975072b676d7Smrgif test -z "$CYGPATH_W"; then 975172b676d7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 975272b676d7Smrg CYGPATH_W='cygpath -w' 975372b676d7Smrg else 975472b676d7Smrg CYGPATH_W=echo 975572b676d7Smrg fi 975672b676d7Smrgfi 975772b676d7SmrgAC_SUBST([CYGPATH_W]) 975872b676d7Smrg 975972b676d7Smrg# Define the identity of the package. 976072b676d7Smrgdnl Distinguish between old-style and new-style calls. 976172b676d7Smrgm4_ifval([$2], 976272b676d7Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 976372b676d7Smrg AC_SUBST([PACKAGE], [$1])dnl 976472b676d7Smrg AC_SUBST([VERSION], [$2])], 976572b676d7Smrg[_AM_SET_OPTIONS([$1])dnl 97661fd23544Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 97671fd23544Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 97681fd23544Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 976972b676d7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 977072b676d7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 977172b676d7Smrg 977272b676d7Smrg_AM_IF_OPTION([no-define],, 977372b676d7Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 977472b676d7Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 977572b676d7Smrg 977672b676d7Smrg# Some tools Automake needs. 977772b676d7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 977872b676d7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 977972b676d7SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 978072b676d7SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 978172b676d7SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 978272b676d7SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 978372b676d7SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 9784e47418d9SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9785e47418d9SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 978672b676d7SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 978772b676d7Smrg# We need awk for the "check" target. The system "awk" is bad on 978872b676d7Smrg# some platforms. 978972b676d7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 979072b676d7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 979172b676d7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 979272b676d7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9793e47418d9Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9794e47418d9Smrg [_AM_PROG_TAR([v7])])]) 979572b676d7Smrg_AM_IF_OPTION([no-dependencies],, 979672b676d7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 9797e47418d9Smrg [_AM_DEPENDENCIES(CC)], 9798e47418d9Smrg [define([AC_PROG_CC], 9799e47418d9Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 980072b676d7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 9801e47418d9Smrg [_AM_DEPENDENCIES(CXX)], 9802e47418d9Smrg [define([AC_PROG_CXX], 9803e47418d9Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 98041fd23544SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 9805e47418d9Smrg [_AM_DEPENDENCIES(OBJC)], 9806e47418d9Smrg [define([AC_PROG_OBJC], 9807e47418d9Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 980872b676d7Smrg]) 9809e47418d9Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 9810e47418d9Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 9811e47418d9Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 9812e47418d9Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 9813e47418d9SmrgAC_CONFIG_COMMANDS_PRE(dnl 9814e47418d9Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 9815e47418d9Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 981672b676d7Smrg]) 981772b676d7Smrg 9818e47418d9Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 9819e47418d9Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 9820e47418d9Smrgdnl mangled by Autoconf and run in a shell conditional statement. 9821e47418d9Smrgm4_define([_AC_COMPILER_EXEEXT], 9822e47418d9Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 9823e47418d9Smrg 982472b676d7Smrg 982572b676d7Smrg# When config.status generates a header, we must update the stamp-h file. 982672b676d7Smrg# This file resides in the same directory as the config header 982772b676d7Smrg# that is generated. The stamp files are numbered to have different names. 982872b676d7Smrg 982972b676d7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 983072b676d7Smrg# loop where config.status creates the headers, so we can generate 983172b676d7Smrg# our stamp files there. 983272b676d7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 983372b676d7Smrg[# Compute $1's index in $config_headers. 98341fd23544Smrg_am_arg=$1 983572b676d7Smrg_am_stamp_count=1 983672b676d7Smrgfor _am_header in $config_headers :; do 983772b676d7Smrg case $_am_header in 98381fd23544Smrg $_am_arg | $_am_arg:* ) 983972b676d7Smrg break ;; 984072b676d7Smrg * ) 984172b676d7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 984272b676d7Smrg esac 984372b676d7Smrgdone 98441fd23544Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 984572b676d7Smrg 9846e47418d9Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 984772b676d7Smrg# 984872b676d7Smrg# This file is free software; the Free Software Foundation 984972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 985072b676d7Smrg# with or without modifications, as long as this notice is preserved. 985172b676d7Smrg 985272b676d7Smrg# AM_PROG_INSTALL_SH 985372b676d7Smrg# ------------------ 985472b676d7Smrg# Define $install_sh. 985572b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 985672b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9857e47418d9Smrgif test x"${install_sh}" != xset; then 9858e47418d9Smrg case $am_aux_dir in 9859e47418d9Smrg *\ * | *\ *) 9860e47418d9Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 9861e47418d9Smrg *) 9862e47418d9Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 9863e47418d9Smrg esac 9864e47418d9Smrgfi 986572b676d7SmrgAC_SUBST(install_sh)]) 986672b676d7Smrg 986772b676d7Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 986872b676d7Smrg# 986972b676d7Smrg# This file is free software; the Free Software Foundation 987072b676d7Smrg# gives unlimited permission to copy and/or distribute it, 987172b676d7Smrg# with or without modifications, as long as this notice is preserved. 987272b676d7Smrg 987372b676d7Smrg# serial 2 987472b676d7Smrg 987572b676d7Smrg# Check whether the underlying file-system supports filenames 987672b676d7Smrg# with a leading dot. For instance MS-DOS doesn't. 987772b676d7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 987872b676d7Smrg[rm -rf .tst 2>/dev/null 987972b676d7Smrgmkdir .tst 2>/dev/null 988072b676d7Smrgif test -d .tst; then 988172b676d7Smrg am__leading_dot=. 988272b676d7Smrgelse 988372b676d7Smrg am__leading_dot=_ 988472b676d7Smrgfi 988572b676d7Smrgrmdir .tst 2>/dev/null 988672b676d7SmrgAC_SUBST([am__leading_dot])]) 988772b676d7Smrg 988872b676d7Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 988972b676d7Smrg# From Jim Meyering 989072b676d7Smrg 9891e47418d9Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 989272b676d7Smrg# Free Software Foundation, Inc. 989372b676d7Smrg# 989472b676d7Smrg# This file is free software; the Free Software Foundation 989572b676d7Smrg# gives unlimited permission to copy and/or distribute it, 989672b676d7Smrg# with or without modifications, as long as this notice is preserved. 989772b676d7Smrg 9898e47418d9Smrg# serial 5 989972b676d7Smrg 9900e47418d9Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 9901e47418d9Smrg# ---------------------------------- 9902e47418d9Smrg# Control maintainer-specific portions of Makefiles. 9903e47418d9Smrg# Default is to disable them, unless `enable' is passed literally. 9904e47418d9Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 9905e47418d9Smrg# can override the default with the --enable/--disable switch. 990672b676d7SmrgAC_DEFUN([AM_MAINTAINER_MODE], 9907e47418d9Smrg[m4_case(m4_default([$1], [disable]), 9908e47418d9Smrg [enable], [m4_define([am_maintainer_other], [disable])], 9909e47418d9Smrg [disable], [m4_define([am_maintainer_other], [enable])], 9910e47418d9Smrg [m4_define([am_maintainer_other], [enable]) 9911e47418d9Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 9912e47418d9SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 9913e47418d9Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 9914e47418d9Smrg AC_ARG_ENABLE([maintainer-mode], 9915e47418d9Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 991672b676d7Smrg (and sometimes confusing) to the casual installer], 9917e47418d9Smrg [USE_MAINTAINER_MODE=$enableval], 9918e47418d9Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 991972b676d7Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 9920e47418d9Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 992172b676d7Smrg MAINT=$MAINTAINER_MODE_TRUE 9922e47418d9Smrg AC_SUBST([MAINT])dnl 992372b676d7Smrg] 992472b676d7Smrg) 992572b676d7Smrg 992672b676d7SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 992772b676d7Smrg 992872b676d7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 992972b676d7Smrg 9930e47418d9Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 993172b676d7Smrg# 993272b676d7Smrg# This file is free software; the Free Software Foundation 993372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 993472b676d7Smrg# with or without modifications, as long as this notice is preserved. 993572b676d7Smrg 9936e47418d9Smrg# serial 4 993772b676d7Smrg 993872b676d7Smrg# AM_MAKE_INCLUDE() 993972b676d7Smrg# ----------------- 994072b676d7Smrg# Check to see how make treats includes. 994172b676d7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 994272b676d7Smrg[am_make=${MAKE-make} 994372b676d7Smrgcat > confinc << 'END' 994472b676d7Smrgam__doit: 9945e47418d9Smrg @echo this is the am__doit target 994672b676d7Smrg.PHONY: am__doit 994772b676d7SmrgEND 994872b676d7Smrg# If we don't find an include directive, just comment out the code. 994972b676d7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 995072b676d7Smrgam__include="#" 995172b676d7Smrgam__quote= 995272b676d7Smrg_am_result=none 995372b676d7Smrg# First try GNU make style include. 995472b676d7Smrgecho "include confinc" > confmf 9955e47418d9Smrg# Ignore all kinds of additional output from `make'. 9956e47418d9Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 9957e47418d9Smrg*the\ am__doit\ target*) 9958e47418d9Smrg am__include=include 9959e47418d9Smrg am__quote= 9960e47418d9Smrg _am_result=GNU 9961e47418d9Smrg ;; 9962e47418d9Smrgesac 996372b676d7Smrg# Now try BSD make style include. 996472b676d7Smrgif test "$am__include" = "#"; then 996572b676d7Smrg echo '.include "confinc"' > confmf 9966e47418d9Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 9967e47418d9Smrg *the\ am__doit\ target*) 9968e47418d9Smrg am__include=.include 9969e47418d9Smrg am__quote="\"" 9970e47418d9Smrg _am_result=BSD 9971e47418d9Smrg ;; 9972e47418d9Smrg esac 997372b676d7Smrgfi 997472b676d7SmrgAC_SUBST([am__include]) 997572b676d7SmrgAC_SUBST([am__quote]) 997672b676d7SmrgAC_MSG_RESULT([$_am_result]) 997772b676d7Smrgrm -f confinc confmf 997872b676d7Smrg]) 997972b676d7Smrg 998072b676d7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 998172b676d7Smrg 9982e47418d9Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 998372b676d7Smrg# Free Software Foundation, Inc. 998472b676d7Smrg# 998572b676d7Smrg# This file is free software; the Free Software Foundation 998672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 998772b676d7Smrg# with or without modifications, as long as this notice is preserved. 998872b676d7Smrg 9989e47418d9Smrg# serial 6 999072b676d7Smrg 999172b676d7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 999272b676d7Smrg# ------------------------------ 999372b676d7SmrgAC_DEFUN([AM_MISSING_PROG], 999472b676d7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 999572b676d7Smrg$1=${$1-"${am_missing_run}$2"} 999672b676d7SmrgAC_SUBST($1)]) 999772b676d7Smrg 999872b676d7Smrg 999972b676d7Smrg# AM_MISSING_HAS_RUN 1000072b676d7Smrg# ------------------ 1000172b676d7Smrg# Define MISSING if not defined so far and test if it supports --run. 1000272b676d7Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 1000372b676d7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 1000472b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 100051fd23544SmrgAC_REQUIRE_AUX_FILE([missing])dnl 10006e47418d9Smrgif test x"${MISSING+set}" != xset; then 10007e47418d9Smrg case $am_aux_dir in 10008e47418d9Smrg *\ * | *\ *) 10009e47418d9Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 10010e47418d9Smrg *) 10011e47418d9Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 10012e47418d9Smrg esac 10013e47418d9Smrgfi 1001472b676d7Smrg# Use eval to expand $SHELL 1001572b676d7Smrgif eval "$MISSING --run true"; then 1001672b676d7Smrg am_missing_run="$MISSING --run " 1001772b676d7Smrgelse 1001872b676d7Smrg am_missing_run= 1001972b676d7Smrg AC_MSG_WARN([`missing' script is too old or missing]) 1002072b676d7Smrgfi 1002172b676d7Smrg]) 1002272b676d7Smrg 100231fd23544Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 1002472b676d7Smrg# 1002572b676d7Smrg# This file is free software; the Free Software Foundation 1002672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1002772b676d7Smrg# with or without modifications, as long as this notice is preserved. 1002872b676d7Smrg 1002972b676d7Smrg# AM_PROG_MKDIR_P 1003072b676d7Smrg# --------------- 100311fd23544Smrg# Check for `mkdir -p'. 1003272b676d7SmrgAC_DEFUN([AM_PROG_MKDIR_P], 100331fd23544Smrg[AC_PREREQ([2.60])dnl 100341fd23544SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 100351fd23544Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 100361fd23544Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 100371fd23544Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 100381fd23544Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 100391fd23544Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 100401fd23544Smrgdnl adjustment using top_builddir (which is defined more often than 100411fd23544Smrgdnl MKDIR_P). 100421fd23544SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 100431fd23544Smrgcase $mkdir_p in 100441fd23544Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 100451fd23544Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 100461fd23544Smrgesac 100471fd23544Smrg]) 1004872b676d7Smrg 1004972b676d7Smrg# Helper functions for option handling. -*- Autoconf -*- 1005072b676d7Smrg 10051e47418d9Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 1005272b676d7Smrg# 1005372b676d7Smrg# This file is free software; the Free Software Foundation 1005472b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1005572b676d7Smrg# with or without modifications, as long as this notice is preserved. 1005672b676d7Smrg 10057e47418d9Smrg# serial 4 1005872b676d7Smrg 1005972b676d7Smrg# _AM_MANGLE_OPTION(NAME) 1006072b676d7Smrg# ----------------------- 1006172b676d7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1006272b676d7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1006372b676d7Smrg 1006472b676d7Smrg# _AM_SET_OPTION(NAME) 1006572b676d7Smrg# ------------------------------ 1006672b676d7Smrg# Set option NAME. Presently that only means defining a flag for this option. 1006772b676d7SmrgAC_DEFUN([_AM_SET_OPTION], 1006872b676d7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1006972b676d7Smrg 1007072b676d7Smrg# _AM_SET_OPTIONS(OPTIONS) 1007172b676d7Smrg# ---------------------------------- 1007272b676d7Smrg# OPTIONS is a space-separated list of Automake options. 1007372b676d7SmrgAC_DEFUN([_AM_SET_OPTIONS], 10074e47418d9Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1007572b676d7Smrg 1007672b676d7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1007772b676d7Smrg# ------------------------------------------- 1007872b676d7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1007972b676d7SmrgAC_DEFUN([_AM_IF_OPTION], 1008072b676d7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1008172b676d7Smrg 1008272b676d7Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1008372b676d7Smrg 10084e47418d9Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 1008572b676d7Smrg# Free Software Foundation, Inc. 1008672b676d7Smrg# 1008772b676d7Smrg# This file is free software; the Free Software Foundation 1008872b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1008972b676d7Smrg# with or without modifications, as long as this notice is preserved. 1009072b676d7Smrg 10091e47418d9Smrg# serial 5 1009272b676d7Smrg 1009372b676d7Smrg# AM_SANITY_CHECK 1009472b676d7Smrg# --------------- 1009572b676d7SmrgAC_DEFUN([AM_SANITY_CHECK], 1009672b676d7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 1009772b676d7Smrg# Just in case 1009872b676d7Smrgsleep 1 1009972b676d7Smrgecho timestamp > conftest.file 10100e47418d9Smrg# Reject unsafe characters in $srcdir or the absolute working directory 10101e47418d9Smrg# name. Accept space and tab only in the latter. 10102e47418d9Smrgam_lf=' 10103e47418d9Smrg' 10104e47418d9Smrgcase `pwd` in 10105e47418d9Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 10106e47418d9Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 10107e47418d9Smrgesac 10108e47418d9Smrgcase $srcdir in 10109e47418d9Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 10110e47418d9Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 10111e47418d9Smrgesac 10112e47418d9Smrg 1011372b676d7Smrg# Do `set' in a subshell so we don't clobber the current shell's 1011472b676d7Smrg# arguments. Must try -L first in case configure is actually a 1011572b676d7Smrg# symlink; some systems play weird games with the mod time of symlinks 1011672b676d7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 1011772b676d7Smrg# directory). 1011872b676d7Smrgif ( 10119e47418d9Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1012072b676d7Smrg if test "$[*]" = "X"; then 1012172b676d7Smrg # -L didn't work. 10122e47418d9Smrg set X `ls -t "$srcdir/configure" conftest.file` 1012372b676d7Smrg fi 1012472b676d7Smrg rm -f conftest.file 1012572b676d7Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1012672b676d7Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1012772b676d7Smrg 1012872b676d7Smrg # If neither matched, then we have a broken ls. This can happen 1012972b676d7Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1013072b676d7Smrg # broken ls alias from the environment. This has actually 1013172b676d7Smrg # happened. Such a system could not be considered "sane". 1013272b676d7Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1013372b676d7Smrgalias in your environment]) 1013472b676d7Smrg fi 1013572b676d7Smrg 1013672b676d7Smrg test "$[2]" = conftest.file 1013772b676d7Smrg ) 1013872b676d7Smrgthen 1013972b676d7Smrg # Ok. 1014072b676d7Smrg : 1014172b676d7Smrgelse 1014272b676d7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 1014372b676d7SmrgCheck your system clock]) 1014472b676d7Smrgfi 1014572b676d7SmrgAC_MSG_RESULT(yes)]) 1014672b676d7Smrg 10147e35772b2Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 10148e35772b2Smrg# 10149e35772b2Smrg# This file is free software; the Free Software Foundation 10150e35772b2Smrg# gives unlimited permission to copy and/or distribute it, 10151e35772b2Smrg# with or without modifications, as long as this notice is preserved. 10152e35772b2Smrg 10153e35772b2Smrg# serial 1 10154e35772b2Smrg 10155e35772b2Smrg# AM_SILENT_RULES([DEFAULT]) 10156e35772b2Smrg# -------------------------- 10157e35772b2Smrg# Enable less verbose build rules; with the default set to DEFAULT 10158e35772b2Smrg# (`yes' being less verbose, `no' or empty being verbose). 10159e35772b2SmrgAC_DEFUN([AM_SILENT_RULES], 10160e35772b2Smrg[AC_ARG_ENABLE([silent-rules], 10161e35772b2Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 10162e35772b2Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 10163e35772b2Smrgcase $enable_silent_rules in 10164e35772b2Smrgyes) AM_DEFAULT_VERBOSITY=0;; 10165e35772b2Smrgno) AM_DEFAULT_VERBOSITY=1;; 10166e35772b2Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 10167e35772b2Smrgesac 10168e35772b2SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 10169e35772b2SmrgAM_BACKSLASH='\' 10170e35772b2SmrgAC_SUBST([AM_BACKSLASH])dnl 10171e35772b2Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 10172e35772b2Smrg]) 10173e35772b2Smrg 1017472b676d7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1017572b676d7Smrg# 1017672b676d7Smrg# This file is free software; the Free Software Foundation 1017772b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1017872b676d7Smrg# with or without modifications, as long as this notice is preserved. 1017972b676d7Smrg 1018072b676d7Smrg# AM_PROG_INSTALL_STRIP 1018172b676d7Smrg# --------------------- 1018272b676d7Smrg# One issue with vendor `install' (even GNU) is that you can't 1018372b676d7Smrg# specify the program used to strip binaries. This is especially 1018472b676d7Smrg# annoying in cross-compiling environments, where the build's strip 1018572b676d7Smrg# is unlikely to handle the host's binaries. 1018672b676d7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1018772b676d7Smrg# always use install-sh in `make install-strip', and initialize 1018872b676d7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 1018972b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1019072b676d7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1019172b676d7Smrg# Installed binaries are usually stripped using `strip' when the user 1019272b676d7Smrg# run `make install-strip'. However `strip' might not be the right 1019372b676d7Smrg# tool to use in cross-compilation environments, therefore Automake 1019472b676d7Smrg# will honor the `STRIP' environment variable to overrule this program. 1019572b676d7Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1019672b676d7Smrgif test "$cross_compiling" != no; then 1019772b676d7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1019872b676d7Smrgfi 101991fd23544SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1020072b676d7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1020172b676d7Smrg 10202e47418d9Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 102031fd23544Smrg# 102041fd23544Smrg# This file is free software; the Free Software Foundation 102051fd23544Smrg# gives unlimited permission to copy and/or distribute it, 102061fd23544Smrg# with or without modifications, as long as this notice is preserved. 102071fd23544Smrg 10208e47418d9Smrg# serial 2 10209e47418d9Smrg 102101fd23544Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 102111fd23544Smrg# --------------------------- 102121fd23544Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 102131fd23544Smrg# This macro is traced by Automake. 102141fd23544SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 102151fd23544Smrg 10216e47418d9Smrg# AM_SUBST_NOTMAKE(VARIABLE) 10217e47418d9Smrg# --------------------------- 10218e47418d9Smrg# Public sister of _AM_SUBST_NOTMAKE. 10219e47418d9SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10220e47418d9Smrg 1022172b676d7Smrg# Check how to create a tarball. -*- Autoconf -*- 1022272b676d7Smrg 1022372b676d7Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 1022472b676d7Smrg# 1022572b676d7Smrg# This file is free software; the Free Software Foundation 1022672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1022772b676d7Smrg# with or without modifications, as long as this notice is preserved. 1022872b676d7Smrg 1022972b676d7Smrg# serial 2 1023072b676d7Smrg 1023172b676d7Smrg# _AM_PROG_TAR(FORMAT) 1023272b676d7Smrg# -------------------- 1023372b676d7Smrg# Check how to create a tarball in format FORMAT. 1023472b676d7Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 1023572b676d7Smrg# 1023672b676d7Smrg# Substitute a variable $(am__tar) that is a command 1023772b676d7Smrg# writing to stdout a FORMAT-tarball containing the directory 1023872b676d7Smrg# $tardir. 1023972b676d7Smrg# tardir=directory && $(am__tar) > result.tar 1024072b676d7Smrg# 1024172b676d7Smrg# Substitute a variable $(am__untar) that extract such 1024272b676d7Smrg# a tarball read from stdin. 1024372b676d7Smrg# $(am__untar) < result.tar 1024472b676d7SmrgAC_DEFUN([_AM_PROG_TAR], 1024572b676d7Smrg[# Always define AMTAR for backward compatibility. 1024672b676d7SmrgAM_MISSING_PROG([AMTAR], [tar]) 1024772b676d7Smrgm4_if([$1], [v7], 1024872b676d7Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 1024972b676d7Smrg [m4_case([$1], [ustar],, [pax],, 1025072b676d7Smrg [m4_fatal([Unknown tar format])]) 1025172b676d7SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 1025272b676d7Smrg# Loop over all known methods to create a tar archive until one works. 1025372b676d7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1025472b676d7Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1025572b676d7Smrg# Do not fold the above two line into one, because Tru64 sh and 1025672b676d7Smrg# Solaris sh will not grok spaces in the rhs of `-'. 1025772b676d7Smrgfor _am_tool in $_am_tools 1025872b676d7Smrgdo 1025972b676d7Smrg case $_am_tool in 1026072b676d7Smrg gnutar) 1026172b676d7Smrg for _am_tar in tar gnutar gtar; 1026272b676d7Smrg do 1026372b676d7Smrg AM_RUN_LOG([$_am_tar --version]) && break 1026472b676d7Smrg done 1026572b676d7Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1026672b676d7Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1026772b676d7Smrg am__untar="$_am_tar -xf -" 1026872b676d7Smrg ;; 1026972b676d7Smrg plaintar) 1027072b676d7Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1027172b676d7Smrg # ustar tarball either. 1027272b676d7Smrg (tar --version) >/dev/null 2>&1 && continue 1027372b676d7Smrg am__tar='tar chf - "$$tardir"' 1027472b676d7Smrg am__tar_='tar chf - "$tardir"' 1027572b676d7Smrg am__untar='tar xf -' 1027672b676d7Smrg ;; 1027772b676d7Smrg pax) 1027872b676d7Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1027972b676d7Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1028072b676d7Smrg am__untar='pax -r' 1028172b676d7Smrg ;; 1028272b676d7Smrg cpio) 1028372b676d7Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1028472b676d7Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1028572b676d7Smrg am__untar='cpio -i -H $1 -d' 1028672b676d7Smrg ;; 1028772b676d7Smrg none) 1028872b676d7Smrg am__tar=false 1028972b676d7Smrg am__tar_=false 1029072b676d7Smrg am__untar=false 1029172b676d7Smrg ;; 1029272b676d7Smrg esac 1029372b676d7Smrg 1029472b676d7Smrg # If the value was cached, stop now. We just wanted to have am__tar 1029572b676d7Smrg # and am__untar set. 1029672b676d7Smrg test -n "${am_cv_prog_tar_$1}" && break 1029772b676d7Smrg 1029872b676d7Smrg # tar/untar a dummy directory, and stop if the command works 1029972b676d7Smrg rm -rf conftest.dir 1030072b676d7Smrg mkdir conftest.dir 1030172b676d7Smrg echo GrepMe > conftest.dir/file 1030272b676d7Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1030372b676d7Smrg rm -rf conftest.dir 1030472b676d7Smrg if test -s conftest.tar; then 1030572b676d7Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1030672b676d7Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1030772b676d7Smrg fi 1030872b676d7Smrgdone 1030972b676d7Smrgrm -rf conftest.dir 1031072b676d7Smrg 1031172b676d7SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1031272b676d7SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1031372b676d7SmrgAC_SUBST([am__tar]) 1031472b676d7SmrgAC_SUBST([am__untar]) 1031572b676d7Smrg]) # _AM_PROG_TAR 1031672b676d7Smrg 10317