aclocal.m4 revision e169010a
1e169010aSmrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 27914d74bSmrg 37914d74bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4e169010aSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 57914d74bSmrg# This file is free software; the Free Software Foundation 67914d74bSmrg# gives unlimited permission to copy and/or distribute it, 77914d74bSmrg# with or without modifications, as long as this notice is preserved. 87914d74bSmrg 97914d74bSmrg# This program is distributed in the hope that it will be useful, 107914d74bSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 117914d74bSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 127914d74bSmrg# PARTICULAR PURPOSE. 137914d74bSmrg 14e169010aSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15e169010aSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16e169010aSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 17e169010aSmrg[m4_warning([this file was generated for autoconf 2.63. 18e169010aSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19e169010aSmrgIf you have problems, you may need to regenerate the build system entirely. 20e169010aSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 217914d74bSmrg 22e169010aSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 237914d74bSmrg# 24e169010aSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 25e169010aSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 26e169010aSmrg# Written by Gordon Matzigkeit, 1996 277914d74bSmrg# 28e169010aSmrg# This file is free software; the Free Software Foundation gives 29e169010aSmrg# unlimited permission to copy and/or distribute it, with or without 30e169010aSmrg# modifications, as long as this notice is preserved. 31e169010aSmrg 32e169010aSmrgm4_define([_LT_COPYING], [dnl 33e169010aSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 34e169010aSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 35e169010aSmrg# Written by Gordon Matzigkeit, 1996 367914d74bSmrg# 37e169010aSmrg# This file is part of GNU Libtool. 387914d74bSmrg# 39e169010aSmrg# GNU Libtool is free software; you can redistribute it and/or 40e169010aSmrg# modify it under the terms of the GNU General Public License as 41e169010aSmrg# published by the Free Software Foundation; either version 2 of 42e169010aSmrg# the License, or (at your option) any later version. 437914d74bSmrg# 44e169010aSmrg# As a special exception to the GNU General Public License, 45e169010aSmrg# if you distribute this file as part of a program or library that 46e169010aSmrg# is built using GNU Libtool, you may include this file under the 47e169010aSmrg# same distribution terms that you use for the rest of that program. 487914d74bSmrg# 49e169010aSmrg# GNU Libtool is distributed in the hope that it will be useful, 50e169010aSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 51e169010aSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 52e169010aSmrg# GNU General Public License for more details. 537914d74bSmrg# 54e169010aSmrg# You should have received a copy of the GNU General Public License 55e169010aSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 56e169010aSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 57e169010aSmrg# obtained by writing to the Free Software Foundation, Inc., 58e169010aSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 597914d74bSmrg]) 607914d74bSmrg 61e169010aSmrg# serial 56 LT_INIT 627914d74bSmrg 637914d74bSmrg 64e169010aSmrg# LT_PREREQ(VERSION) 65e169010aSmrg# ------------------ 66e169010aSmrg# Complain and exit if this libtool version is less that VERSION. 67e169010aSmrgm4_defun([LT_PREREQ], 68e169010aSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 69e169010aSmrg [m4_default([$3], 70e169010aSmrg [m4_fatal([Libtool version $1 or higher is required], 71e169010aSmrg 63)])], 72e169010aSmrg [$2])]) 737914d74bSmrg 747914d74bSmrg 75e169010aSmrg# _LT_CHECK_BUILDDIR 76e169010aSmrg# ------------------ 77e169010aSmrg# Complain if the absolute build directory name contains unusual characters 78e169010aSmrgm4_defun([_LT_CHECK_BUILDDIR], 79e169010aSmrg[case `pwd` in 80e169010aSmrg *\ * | *\ *) 81e169010aSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 82e169010aSmrgesac 83e169010aSmrg]) 847914d74bSmrg 857914d74bSmrg 86e169010aSmrg# LT_INIT([OPTIONS]) 87e169010aSmrg# ------------------ 88e169010aSmrgAC_DEFUN([LT_INIT], 89e169010aSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 90e169010aSmrgAC_BEFORE([$0], [LT_LANG])dnl 91e169010aSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 92e169010aSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 93e169010aSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 94e169010aSmrg 95e169010aSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 96e169010aSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 97e169010aSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 98e169010aSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 99e169010aSmrgdnl unless we require an AC_DEFUNed macro: 100e169010aSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 101e169010aSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 102e169010aSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 103e169010aSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 104e169010aSmrgm4_require([_LT_PROG_LTMAIN])dnl 105e169010aSmrg 106e169010aSmrgdnl Parse OPTIONS 107e169010aSmrg_LT_SET_OPTIONS([$0], [$1]) 1087914d74bSmrg 109e169010aSmrg# This can be used to rebuild libtool when needed 110e169010aSmrgLIBTOOL_DEPS="$ltmain" 1117914d74bSmrg 112e169010aSmrg# Always use our own libtool. 113e169010aSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 114e169010aSmrgAC_SUBST(LIBTOOL)dnl 1157914d74bSmrg 116e169010aSmrg_LT_SETUP 1177914d74bSmrg 118e169010aSmrg# Only expand once: 119e169010aSmrgm4_define([LT_INIT]) 120e169010aSmrg])# LT_INIT 1217914d74bSmrg 122e169010aSmrg# Old names: 123e169010aSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 124e169010aSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 125e169010aSmrgdnl aclocal-1.4 backwards compatibility: 126e169010aSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 127e169010aSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1287914d74bSmrg 1297914d74bSmrg 130e169010aSmrg# _LT_CC_BASENAME(CC) 131e169010aSmrg# ------------------- 132e169010aSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 133e169010aSmrgm4_defun([_LT_CC_BASENAME], 134e169010aSmrg[for cc_temp in $1""; do 135e169010aSmrg case $cc_temp in 136e169010aSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137e169010aSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138e169010aSmrg \-*) ;; 139e169010aSmrg *) break;; 140e169010aSmrg esac 141e169010aSmrgdone 142e169010aSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 1437914d74bSmrg]) 144e169010aSmrg 145e169010aSmrg 146e169010aSmrg# _LT_FILEUTILS_DEFAULTS 147e169010aSmrg# ---------------------- 148e169010aSmrg# It is okay to use these file commands and assume they have been set 149e169010aSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 150e169010aSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 151e169010aSmrg[: ${CP="cp -f"} 152e169010aSmrg: ${MV="mv -f"} 153e169010aSmrg: ${RM="rm -f"} 154e169010aSmrg])# _LT_FILEUTILS_DEFAULTS 155e169010aSmrg 156e169010aSmrg 157e169010aSmrg# _LT_SETUP 158e169010aSmrg# --------- 159e169010aSmrgm4_defun([_LT_SETUP], 160e169010aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 161e169010aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 162e169010aSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 163e169010aSmrg_LT_DECL([], [host], [0])dnl 164e169010aSmrg_LT_DECL([], [host_os], [0])dnl 165e169010aSmrgdnl 166e169010aSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 167e169010aSmrg_LT_DECL([], [build], [0])dnl 168e169010aSmrg_LT_DECL([], [build_os], [0])dnl 169e169010aSmrgdnl 170e169010aSmrgAC_REQUIRE([AC_PROG_CC])dnl 171e169010aSmrgAC_REQUIRE([LT_PATH_LD])dnl 172e169010aSmrgAC_REQUIRE([LT_PATH_NM])dnl 173e169010aSmrgdnl 174e169010aSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 175e169010aSmrgtest -z "$LN_S" && LN_S="ln -s" 176e169010aSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 177e169010aSmrgdnl 178e169010aSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 179e169010aSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 180e169010aSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 181e169010aSmrgdnl 182e169010aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 183e169010aSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 184e169010aSmrgm4_require([_LT_CMD_RELOAD])dnl 185e169010aSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 186e169010aSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 187e169010aSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 188e169010aSmrg 189e169010aSmrg_LT_CONFIG_LIBTOOL_INIT([ 190e169010aSmrg# See if we are running on zsh, and set the options which allow our 191e169010aSmrg# commands through without removal of \ escapes INIT. 192e169010aSmrgif test -n "\${ZSH_VERSION+set}" ; then 193e169010aSmrg setopt NO_GLOB_SUBST 194e169010aSmrgfi 1957914d74bSmrg]) 196e169010aSmrgif test -n "${ZSH_VERSION+set}" ; then 197e169010aSmrg setopt NO_GLOB_SUBST 198e169010aSmrgfi 1997914d74bSmrg 200e169010aSmrg_LT_CHECK_OBJDIR 2017914d74bSmrg 202e169010aSmrgm4_require([_LT_TAG_COMPILER])dnl 203e169010aSmrg_LT_PROG_ECHO_BACKSLASH 2047914d74bSmrg 205e169010aSmrgcase $host_os in 206e169010aSmrgaix3*) 207e169010aSmrg # AIX sometimes has problems with the GCC collect2 program. For some 208e169010aSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 209e169010aSmrg # vanish in a puff of smoke. 210e169010aSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 211e169010aSmrg COLLECT_NAMES= 212e169010aSmrg export COLLECT_NAMES 213e169010aSmrg fi 214e169010aSmrg ;; 215e169010aSmrgesac 2167914d74bSmrg 217e169010aSmrg# Sed substitution that helps us do robust quoting. It backslashifies 218e169010aSmrg# metacharacters that are still active within double-quoted strings. 219e169010aSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2207914d74bSmrg 221e169010aSmrg# Same as above, but do not quote variable references. 222e169010aSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2237914d74bSmrg 224e169010aSmrg# Sed substitution to delay expansion of an escaped shell variable in a 225e169010aSmrg# double_quote_subst'ed string. 226e169010aSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2277914d74bSmrg 228e169010aSmrg# Sed substitution to delay expansion of an escaped single quote. 229e169010aSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2307914d74bSmrg 231e169010aSmrg# Sed substitution to avoid accidental globbing in evaled expressions 232e169010aSmrgno_glob_subst='s/\*/\\\*/g' 2337914d74bSmrg 234e169010aSmrg# Global variables: 235e169010aSmrgofile=libtool 236e169010aSmrgcan_build_shared=yes 2377914d74bSmrg 238e169010aSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 239e169010aSmrg# which needs '.lib'). 240e169010aSmrglibext=a 2417914d74bSmrg 242e169010aSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2437914d74bSmrg 244e169010aSmrgold_CC="$CC" 245e169010aSmrgold_CFLAGS="$CFLAGS" 2467914d74bSmrg 247e169010aSmrg# Set sane defaults for various variables 248e169010aSmrgtest -z "$CC" && CC=cc 249e169010aSmrgtest -z "$LTCC" && LTCC=$CC 250e169010aSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 251e169010aSmrgtest -z "$LD" && LD=ld 252e169010aSmrgtest -z "$ac_objext" && ac_objext=o 2537914d74bSmrg 254e169010aSmrg_LT_CC_BASENAME([$compiler]) 2557914d74bSmrg 256e169010aSmrg# Only perform the check for file, if the check method requires it 257e169010aSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 258e169010aSmrgcase $deplibs_check_method in 259e169010aSmrgfile_magic*) 260e169010aSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 261e169010aSmrg _LT_PATH_MAGIC 262e169010aSmrg fi 263e169010aSmrg ;; 264e169010aSmrgesac 2657914d74bSmrg 266e169010aSmrg# Use C for the default configuration in the libtool script 267e169010aSmrgLT_SUPPORTED_TAG([CC]) 268e169010aSmrg_LT_LANG_C_CONFIG 269e169010aSmrg_LT_LANG_DEFAULT_CONFIG 270e169010aSmrg_LT_CONFIG_COMMANDS 271e169010aSmrg])# _LT_SETUP 2727914d74bSmrg 2737914d74bSmrg 274e169010aSmrg# _LT_PROG_LTMAIN 275e169010aSmrg# --------------- 276e169010aSmrg# Note that this code is called both from `configure', and `config.status' 277e169010aSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 278e169010aSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 279e169010aSmrg# so we pass a copy along to make sure it has a sensible value anyway. 280e169010aSmrgm4_defun([_LT_PROG_LTMAIN], 281e169010aSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 282e169010aSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 283e169010aSmrgltmain="$ac_aux_dir/ltmain.sh" 284e169010aSmrg])# _LT_PROG_LTMAIN 2857914d74bSmrg 2867914d74bSmrg 2877914d74bSmrg 288e169010aSmrg# So that we can recreate a full libtool script including additional 289e169010aSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 290e169010aSmrg# in macros and then make a single call at the end using the `libtool' 291e169010aSmrg# label. 2927914d74bSmrg 293e169010aSmrg 294e169010aSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 295e169010aSmrg# ---------------------------------------- 296e169010aSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 297e169010aSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 298e169010aSmrg[m4_ifval([$1], 299e169010aSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 300e169010aSmrg [$1 301e169010aSmrg])])]) 302e169010aSmrg 303e169010aSmrg# Initialize. 304e169010aSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 305e169010aSmrg 306e169010aSmrg 307e169010aSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 308e169010aSmrg# ------------------------------ 309e169010aSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 310e169010aSmrgm4_define([_LT_CONFIG_LIBTOOL], 311e169010aSmrg[m4_ifval([$1], 312e169010aSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 313e169010aSmrg [$1 314e169010aSmrg])])]) 315e169010aSmrg 316e169010aSmrg# Initialize. 317e169010aSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 318e169010aSmrg 319e169010aSmrg 320e169010aSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 321e169010aSmrg# ----------------------------------------------------- 322e169010aSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 323e169010aSmrg[_LT_CONFIG_LIBTOOL([$1]) 324e169010aSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3257914d74bSmrg]) 326e169010aSmrg 327e169010aSmrg 328e169010aSmrg# _LT_FORMAT_COMMENT([COMMENT]) 329e169010aSmrg# ----------------------------- 330e169010aSmrg# Add leading comment marks to the start of each line, and a trailing 331e169010aSmrg# full-stop to the whole comment if one is not present already. 332e169010aSmrgm4_define([_LT_FORMAT_COMMENT], 333e169010aSmrg[m4_ifval([$1], [ 334e169010aSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 335e169010aSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 336e169010aSmrg)]) 337e169010aSmrg 338e169010aSmrg 339e169010aSmrg 340e169010aSmrg 341e169010aSmrg 342e169010aSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 343e169010aSmrg# ------------------------------------------------------------------- 344e169010aSmrg# CONFIGNAME is the name given to the value in the libtool script. 345e169010aSmrg# VARNAME is the (base) name used in the configure script. 346e169010aSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 347e169010aSmrg# VARNAME. Any other value will be used directly. 348e169010aSmrgm4_define([_LT_DECL], 349e169010aSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 350e169010aSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 351e169010aSmrg [m4_ifval([$1], [$1], [$2])]) 352e169010aSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 353e169010aSmrg m4_ifval([$4], 354e169010aSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 355e169010aSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 356e169010aSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3577914d74bSmrg]) 3587914d74bSmrg 3597914d74bSmrg 360e169010aSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 361e169010aSmrg# -------------------------------------------------------- 362e169010aSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3637914d74bSmrg 3647914d74bSmrg 365e169010aSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 366e169010aSmrg# ------------------------------------------------ 367e169010aSmrgm4_define([lt_decl_tag_varnames], 368e169010aSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3697914d74bSmrg 3707914d74bSmrg 371e169010aSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 372e169010aSmrg# --------------------------------------------------------- 373e169010aSmrgm4_define([_lt_decl_filter], 374e169010aSmrg[m4_case([$#], 375e169010aSmrg [0], [m4_fatal([$0: too few arguments: $#])], 376e169010aSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 377e169010aSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 378e169010aSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 379e169010aSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 380e169010aSmrg]) 3817914d74bSmrg 3827914d74bSmrg 383e169010aSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 384e169010aSmrg# -------------------------------------------------- 385e169010aSmrgm4_define([lt_decl_quote_varnames], 386e169010aSmrg[_lt_decl_filter([value], [1], $@)]) 3877914d74bSmrg 3887914d74bSmrg 389e169010aSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 390e169010aSmrg# --------------------------------------------------- 391e169010aSmrgm4_define([lt_decl_dquote_varnames], 392e169010aSmrg[_lt_decl_filter([value], [2], $@)]) 3937914d74bSmrg 3947914d74bSmrg 395e169010aSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 396e169010aSmrg# --------------------------------------------------- 397e169010aSmrgm4_define([lt_decl_varnames_tagged], 398e169010aSmrg[m4_assert([$# <= 2])dnl 399e169010aSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 400e169010aSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 401e169010aSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 402e169010aSmrgm4_define([_lt_decl_varnames_tagged], 403e169010aSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4047914d74bSmrg 4057914d74bSmrg 406e169010aSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 407e169010aSmrg# ------------------------------------------------ 408e169010aSmrgm4_define([lt_decl_all_varnames], 409e169010aSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 410e169010aSmrg m4_if([$2], [], 411e169010aSmrg m4_quote(lt_decl_varnames), 412e169010aSmrg m4_quote(m4_shift($@))))[]dnl 413e169010aSmrg]) 414e169010aSmrgm4_define([_lt_decl_all_varnames], 415e169010aSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 416e169010aSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 417e169010aSmrg]) 4187914d74bSmrg 4197914d74bSmrg 420e169010aSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 421e169010aSmrg# ------------------------------------ 422e169010aSmrg# Quote a variable value, and forward it to `config.status' so that its 423e169010aSmrg# declaration there will have the same value as in `configure'. VARNAME 424e169010aSmrg# must have a single quote delimited value for this to work. 425e169010aSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 426e169010aSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 4277914d74bSmrg 428e169010aSmrg 429e169010aSmrg# _LT_CONFIG_STATUS_DECLARATIONS 430e169010aSmrg# ------------------------------ 431e169010aSmrg# We delimit libtool config variables with single quotes, so when 432e169010aSmrg# we write them to config.status, we have to be sure to quote all 433e169010aSmrg# embedded single quotes properly. In configure, this macro expands 434e169010aSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 435e169010aSmrg# 436e169010aSmrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 437e169010aSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 438e169010aSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 439e169010aSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 440e169010aSmrg 441e169010aSmrg 442e169010aSmrg# _LT_LIBTOOL_TAGS 443e169010aSmrg# ---------------- 444e169010aSmrg# Output comment and list of tags supported by the script 445e169010aSmrgm4_defun([_LT_LIBTOOL_TAGS], 446e169010aSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 447e169010aSmrgavailable_tags="_LT_TAGS"dnl 4487914d74bSmrg]) 4497914d74bSmrg 4507914d74bSmrg 451e169010aSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 452e169010aSmrg# ----------------------------------- 453e169010aSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 454e169010aSmrg# expand to a commented shell variable setting: 4557914d74bSmrg# 456e169010aSmrg# # Some comment about what VAR is for. 457e169010aSmrg# visible_name=$lt_internal_name 458e169010aSmrgm4_define([_LT_LIBTOOL_DECLARE], 459e169010aSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 460e169010aSmrg [description])))[]dnl 461e169010aSmrgm4_pushdef([_libtool_name], 462e169010aSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 463e169010aSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 464e169010aSmrg [0], [_libtool_name=[$]$1], 465e169010aSmrg [1], [_libtool_name=$lt_[]$1], 466e169010aSmrg [2], [_libtool_name=$lt_[]$1], 467e169010aSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 468e169010aSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 469e169010aSmrg]) 4707914d74bSmrg 4717914d74bSmrg 472e169010aSmrg# _LT_LIBTOOL_CONFIG_VARS 473e169010aSmrg# ----------------------- 474e169010aSmrg# Produce commented declarations of non-tagged libtool config variables 475e169010aSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 476e169010aSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 477e169010aSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 478e169010aSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 479e169010aSmrg[m4_foreach([_lt_var], 480e169010aSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 481e169010aSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 482e169010aSmrg 483e169010aSmrg 484e169010aSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 485e169010aSmrg# ------------------------- 486e169010aSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 487e169010aSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 488e169010aSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 489e169010aSmrg 490e169010aSmrg 491e169010aSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 4927914d74bSmrg# ------------------------------ 493e169010aSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 4947914d74bSmrg 4957914d74bSmrg 496e169010aSmrg# _LT_CONFIG_COMMANDS 497e169010aSmrg# ------------------- 498e169010aSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 499e169010aSmrg# variables for single and double quote escaping we saved from calls 500e169010aSmrg# to _LT_DECL, we can put quote escaped variables declarations 501e169010aSmrg# into `config.status', and then the shell code to quote escape them in 502e169010aSmrg# for loops in `config.status'. Finally, any additional code accumulated 503e169010aSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 504e169010aSmrgm4_defun([_LT_CONFIG_COMMANDS], 505e169010aSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 506e169010aSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 507e169010aSmrg dnl instead of duplicating it all over again into config.status, 508e169010aSmrg dnl then we will have config.status run $CONFIG_LT later, so it 509e169010aSmrg dnl needs to know what name is stored there: 510e169010aSmrg [AC_CONFIG_COMMANDS([libtool], 511e169010aSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 512e169010aSmrg dnl If the libtool generation code is destined for config.status, 513e169010aSmrg dnl expand the accumulated commands and init code now: 514e169010aSmrg [AC_CONFIG_COMMANDS([libtool], 515e169010aSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 516e169010aSmrg])#_LT_CONFIG_COMMANDS 517e169010aSmrg 518e169010aSmrg 519e169010aSmrg# Initialize. 520e169010aSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 521e169010aSmrg[ 5227914d74bSmrg 523e169010aSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 524e169010aSmrg# if CDPATH is set. 525e169010aSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5267914d74bSmrg 527e169010aSmrgsed_quote_subst='$sed_quote_subst' 528e169010aSmrgdouble_quote_subst='$double_quote_subst' 529e169010aSmrgdelay_variable_subst='$delay_variable_subst' 530e169010aSmrg_LT_CONFIG_STATUS_DECLARATIONS 531e169010aSmrgLTCC='$LTCC' 532e169010aSmrgLTCFLAGS='$LTCFLAGS' 533e169010aSmrgcompiler='$compiler_DEFAULT' 534e169010aSmrg 535e169010aSmrg# Quote evaled strings. 536e169010aSmrgfor var in lt_decl_all_varnames([[ \ 537e169010aSmrg]], lt_decl_quote_varnames); do 538e169010aSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 539e169010aSmrg *[[\\\\\\\`\\"\\\$]]*) 540e169010aSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 541e169010aSmrg ;; 542e169010aSmrg *) 543e169010aSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 544e169010aSmrg ;; 545e169010aSmrg esac 546e169010aSmrgdone 547e169010aSmrg 548e169010aSmrg# Double-quote double-evaled strings. 549e169010aSmrgfor var in lt_decl_all_varnames([[ \ 550e169010aSmrg]], lt_decl_dquote_varnames); do 551e169010aSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 552e169010aSmrg *[[\\\\\\\`\\"\\\$]]*) 553e169010aSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 554e169010aSmrg ;; 555e169010aSmrg *) 556e169010aSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 557e169010aSmrg ;; 558e169010aSmrg esac 559e169010aSmrgdone 560e169010aSmrg 561e169010aSmrg# Fix-up fallback echo if it was mangled by the above quoting rules. 562e169010aSmrgcase \$lt_ECHO in 563e169010aSmrg*'\\\[$]0 --fallback-echo"')dnl " 564e169010aSmrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 565e169010aSmrg ;; 5667914d74bSmrgesac 567e169010aSmrg 568e169010aSmrg_LT_OUTPUT_LIBTOOL_INIT 5697914d74bSmrg]) 5707914d74bSmrg 5717914d74bSmrg 572e169010aSmrg# LT_OUTPUT 573e169010aSmrg# --------- 574e169010aSmrg# This macro allows early generation of the libtool script (before 575e169010aSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 576e169010aSmrg# tests. 577e169010aSmrgAC_DEFUN([LT_OUTPUT], 578e169010aSmrg[: ${CONFIG_LT=./config.lt} 579e169010aSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 580e169010aSmrgcat >"$CONFIG_LT" <<_LTEOF 581e169010aSmrg#! $SHELL 582e169010aSmrg# Generated by $as_me. 583e169010aSmrg# Run this file to recreate a libtool stub with the current configuration. 584e169010aSmrg 585e169010aSmrglt_cl_silent=false 586e169010aSmrgSHELL=\${CONFIG_SHELL-$SHELL} 587e169010aSmrg_LTEOF 588e169010aSmrg 589e169010aSmrgcat >>"$CONFIG_LT" <<\_LTEOF 590e169010aSmrgAS_SHELL_SANITIZE 591e169010aSmrg_AS_PREPARE 592e169010aSmrg 593e169010aSmrgexec AS_MESSAGE_FD>&1 594e169010aSmrgexec AS_MESSAGE_LOG_FD>>config.log 595e169010aSmrg{ 596e169010aSmrg echo 597e169010aSmrg AS_BOX([Running $as_me.]) 598e169010aSmrg} >&AS_MESSAGE_LOG_FD 5997914d74bSmrg 600e169010aSmrglt_cl_help="\ 601e169010aSmrg\`$as_me' creates a local libtool stub from the current configuration, 602e169010aSmrgfor use in further configure time tests before the real libtool is 603e169010aSmrggenerated. 6047914d74bSmrg 605e169010aSmrgUsage: $[0] [[OPTIONS]] 6067914d74bSmrg 607e169010aSmrg -h, --help print this help, then exit 608e169010aSmrg -V, --version print version number, then exit 609e169010aSmrg -q, --quiet do not print progress messages 610e169010aSmrg -d, --debug don't remove temporary files 6117914d74bSmrg 612e169010aSmrgReport bugs to <bug-libtool@gnu.org>." 6137914d74bSmrg 614e169010aSmrglt_cl_version="\ 615e169010aSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 616e169010aSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 617e169010aSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6187914d74bSmrg 619e169010aSmrgCopyright (C) 2008 Free Software Foundation, Inc. 620e169010aSmrgThis config.lt script is free software; the Free Software Foundation 621e169010aSmrggives unlimited permision to copy, distribute and modify it." 6227914d74bSmrg 623e169010aSmrgwhile test $[#] != 0 624e169010aSmrgdo 625e169010aSmrg case $[1] in 626e169010aSmrg --version | --v* | -V ) 627e169010aSmrg echo "$lt_cl_version"; exit 0 ;; 628e169010aSmrg --help | --h* | -h ) 629e169010aSmrg echo "$lt_cl_help"; exit 0 ;; 630e169010aSmrg --debug | --d* | -d ) 631e169010aSmrg debug=: ;; 632e169010aSmrg --quiet | --q* | --silent | --s* | -q ) 633e169010aSmrg lt_cl_silent=: ;; 634e169010aSmrg 635e169010aSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 636e169010aSmrgTry \`$[0] --help' for more information.]) ;; 637e169010aSmrg 638e169010aSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 639e169010aSmrgTry \`$[0] --help' for more information.]) ;; 640e169010aSmrg esac 641e169010aSmrg shift 642e169010aSmrgdone 6437914d74bSmrg 644e169010aSmrgif $lt_cl_silent; then 645e169010aSmrg exec AS_MESSAGE_FD>/dev/null 646e169010aSmrgfi 647e169010aSmrg_LTEOF 648e169010aSmrg 649e169010aSmrgcat >>"$CONFIG_LT" <<_LTEOF 650e169010aSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 651e169010aSmrg_LTEOF 652e169010aSmrg 653e169010aSmrgcat >>"$CONFIG_LT" <<\_LTEOF 654e169010aSmrgAC_MSG_NOTICE([creating $ofile]) 655e169010aSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 656e169010aSmrgAS_EXIT(0) 657e169010aSmrg_LTEOF 658e169010aSmrgchmod +x "$CONFIG_LT" 659e169010aSmrg 660e169010aSmrg# configure is writing to config.log, but config.lt does its own redirection, 661e169010aSmrg# appending to config.log, which fails on DOS, as config.log is still kept 662e169010aSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 663e169010aSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 664e169010aSmrgif test "$no_create" != yes; then 665e169010aSmrg lt_cl_success=: 666e169010aSmrg test "$silent" = yes && 667e169010aSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 668e169010aSmrg exec AS_MESSAGE_LOG_FD>/dev/null 669e169010aSmrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 670e169010aSmrg exec AS_MESSAGE_LOG_FD>>config.log 671e169010aSmrg $lt_cl_success || AS_EXIT(1) 672e169010aSmrgfi 673e169010aSmrg])# LT_OUTPUT 6747914d74bSmrg 675e169010aSmrg 676e169010aSmrg# _LT_CONFIG(TAG) 6777914d74bSmrg# --------------- 678e169010aSmrg# If TAG is the built-in tag, create an initial libtool script with a 679e169010aSmrg# default configuration from the untagged config vars. Otherwise add code 680e169010aSmrg# to config.status for appending the configuration named by TAG from the 681e169010aSmrg# matching tagged config vars. 682e169010aSmrgm4_defun([_LT_CONFIG], 683e169010aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 684e169010aSmrg_LT_CONFIG_SAVE_COMMANDS([ 685e169010aSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 686e169010aSmrg m4_if(_LT_TAG, [C], [ 687e169010aSmrg # See if we are running on zsh, and set the options which allow our 688e169010aSmrg # commands through without removal of \ escapes. 689e169010aSmrg if test -n "${ZSH_VERSION+set}" ; then 690e169010aSmrg setopt NO_GLOB_SUBST 691e169010aSmrg fi 6927914d74bSmrg 693e169010aSmrg cfgfile="${ofile}T" 694e169010aSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 695e169010aSmrg $RM "$cfgfile" 6967914d74bSmrg 697e169010aSmrg cat <<_LT_EOF >> "$cfgfile" 698e169010aSmrg#! $SHELL 6997914d74bSmrg 700e169010aSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 701e169010aSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 702e169010aSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 703e169010aSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7047914d74bSmrg# 705e169010aSmrg_LT_COPYING 706e169010aSmrg_LT_LIBTOOL_TAGS 7077914d74bSmrg 708e169010aSmrg# ### BEGIN LIBTOOL CONFIG 709e169010aSmrg_LT_LIBTOOL_CONFIG_VARS 710e169010aSmrg_LT_LIBTOOL_TAG_VARS 711e169010aSmrg# ### END LIBTOOL CONFIG 712e169010aSmrg 713e169010aSmrg_LT_EOF 714e169010aSmrg 715e169010aSmrg case $host_os in 716e169010aSmrg aix3*) 717e169010aSmrg cat <<\_LT_EOF >> "$cfgfile" 718e169010aSmrg# AIX sometimes has problems with the GCC collect2 program. For some 719e169010aSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 720e169010aSmrg# vanish in a puff of smoke. 721e169010aSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 722e169010aSmrg COLLECT_NAMES= 723e169010aSmrg export COLLECT_NAMES 7247914d74bSmrgfi 725e169010aSmrg_LT_EOF 726e169010aSmrg ;; 727e169010aSmrg esac 7287914d74bSmrg 729e169010aSmrg _LT_PROG_LTMAIN 7307914d74bSmrg 731e169010aSmrg # We use sed instead of cat because bash on DJGPP gets confused if 732e169010aSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 733e169010aSmrg # text mode, it properly converts lines to CR/LF. This bash problem 734e169010aSmrg # is reportedly fixed, but why not run on old versions too? 735e169010aSmrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 736e169010aSmrg || (rm -f "$cfgfile"; exit 1) 7377914d74bSmrg 738e169010aSmrg _LT_PROG_XSI_SHELLFNS 7397914d74bSmrg 740e169010aSmrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 741e169010aSmrg || (rm -f "$cfgfile"; exit 1) 7427914d74bSmrg 743e169010aSmrg mv -f "$cfgfile" "$ofile" || 744e169010aSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 745e169010aSmrg chmod +x "$ofile" 746e169010aSmrg], 747e169010aSmrg[cat <<_LT_EOF >> "$ofile" 7487914d74bSmrg 749e169010aSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 750e169010aSmrgdnl in a comment (ie after a #). 751e169010aSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 752e169010aSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 753e169010aSmrg# ### END LIBTOOL TAG CONFIG: $1 754e169010aSmrg_LT_EOF 755e169010aSmrg])dnl /m4_if 756e169010aSmrg], 757e169010aSmrg[m4_if([$1], [], [ 758e169010aSmrg PACKAGE='$PACKAGE' 759e169010aSmrg VERSION='$VERSION' 760e169010aSmrg TIMESTAMP='$TIMESTAMP' 761e169010aSmrg RM='$RM' 762e169010aSmrg ofile='$ofile'], []) 763e169010aSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 764e169010aSmrg])# _LT_CONFIG 7657914d74bSmrg 7667914d74bSmrg 767e169010aSmrg# LT_SUPPORTED_TAG(TAG) 768e169010aSmrg# --------------------- 769e169010aSmrg# Trace this macro to discover what tags are supported by the libtool 770e169010aSmrg# --tag option, using: 771e169010aSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 772e169010aSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 7737914d74bSmrg 7747914d74bSmrg 775e169010aSmrg# C support is built-in for now 776e169010aSmrgm4_define([_LT_LANG_C_enabled], []) 777e169010aSmrgm4_define([_LT_TAGS], []) 7787914d74bSmrg 7797914d74bSmrg 780e169010aSmrg# LT_LANG(LANG) 781e169010aSmrg# ------------- 782e169010aSmrg# Enable libtool support for the given language if not already enabled. 783e169010aSmrgAC_DEFUN([LT_LANG], 784e169010aSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 785e169010aSmrgm4_case([$1], 786e169010aSmrg [C], [_LT_LANG(C)], 787e169010aSmrg [C++], [_LT_LANG(CXX)], 788e169010aSmrg [Java], [_LT_LANG(GCJ)], 789e169010aSmrg [Fortran 77], [_LT_LANG(F77)], 790e169010aSmrg [Fortran], [_LT_LANG(FC)], 791e169010aSmrg [Windows Resource], [_LT_LANG(RC)], 792e169010aSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 793e169010aSmrg [_LT_LANG($1)], 794e169010aSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 795e169010aSmrg])# LT_LANG 796e169010aSmrg 797e169010aSmrg 798e169010aSmrg# _LT_LANG(LANGNAME) 7997914d74bSmrg# ------------------ 800e169010aSmrgm4_defun([_LT_LANG], 801e169010aSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 802e169010aSmrg [LT_SUPPORTED_TAG([$1])dnl 803e169010aSmrg m4_append([_LT_TAGS], [$1 ])dnl 804e169010aSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 805e169010aSmrg _LT_LANG_$1_CONFIG($1)])dnl 806e169010aSmrg])# _LT_LANG 8077914d74bSmrg 8087914d74bSmrg 809e169010aSmrg# _LT_LANG_DEFAULT_CONFIG 8107914d74bSmrg# ----------------------- 811e169010aSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 812e169010aSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 813e169010aSmrg [LT_LANG(CXX)], 814e169010aSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 815e169010aSmrg 816e169010aSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 817e169010aSmrg [LT_LANG(F77)], 818e169010aSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 819e169010aSmrg 820e169010aSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 821e169010aSmrg [LT_LANG(FC)], 822e169010aSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 823e169010aSmrg 824e169010aSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 825e169010aSmrgdnl pulling things in needlessly. 826e169010aSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 827e169010aSmrg [LT_LANG(GCJ)], 828e169010aSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 829e169010aSmrg [LT_LANG(GCJ)], 830e169010aSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 831e169010aSmrg [LT_LANG(GCJ)], 832e169010aSmrg [m4_ifdef([AC_PROG_GCJ], 833e169010aSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 834e169010aSmrg m4_ifdef([A][M_PROG_GCJ], 835e169010aSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 836e169010aSmrg m4_ifdef([LT_PROG_GCJ], 837e169010aSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 838e169010aSmrg 839e169010aSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 840e169010aSmrg [LT_LANG(RC)], 841e169010aSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 842e169010aSmrg])# _LT_LANG_DEFAULT_CONFIG 843e169010aSmrg 844e169010aSmrg# Obsolete macros: 845e169010aSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 846e169010aSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 847e169010aSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 848e169010aSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 849e169010aSmrgdnl aclocal-1.4 backwards compatibility: 850e169010aSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 851e169010aSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 852e169010aSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 853e169010aSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 854e169010aSmrg 855e169010aSmrg 856e169010aSmrg# _LT_TAG_COMPILER 857e169010aSmrg# ---------------- 858e169010aSmrgm4_defun([_LT_TAG_COMPILER], 859e169010aSmrg[AC_REQUIRE([AC_PROG_CC])dnl 8607914d74bSmrg 861e169010aSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 862e169010aSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 863e169010aSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 864e169010aSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 8657914d74bSmrg 866e169010aSmrg# If no C compiler was specified, use CC. 867e169010aSmrgLTCC=${LTCC-"$CC"} 8687914d74bSmrg 869e169010aSmrg# If no C compiler flags were specified, use CFLAGS. 870e169010aSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 8717914d74bSmrg 872e169010aSmrg# Allow CC to be a program name with arguments. 873e169010aSmrgcompiler=$CC 874e169010aSmrg])# _LT_TAG_COMPILER 8757914d74bSmrg 8767914d74bSmrg 877e169010aSmrg# _LT_COMPILER_BOILERPLATE 878e169010aSmrg# ------------------------ 879e169010aSmrg# Check for compiler boilerplate output or warnings with 880e169010aSmrg# the simple compiler test code. 881e169010aSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 882e169010aSmrg[m4_require([_LT_DECL_SED])dnl 883e169010aSmrgac_outfile=conftest.$ac_objext 884e169010aSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 885e169010aSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 886e169010aSmrg_lt_compiler_boilerplate=`cat conftest.err` 887e169010aSmrg$RM conftest* 888e169010aSmrg])# _LT_COMPILER_BOILERPLATE 8897914d74bSmrg 890e169010aSmrg 891e169010aSmrg# _LT_LINKER_BOILERPLATE 892e169010aSmrg# ---------------------- 893e169010aSmrg# Check for linker boilerplate output or warnings with 894e169010aSmrg# the simple link test code. 895e169010aSmrgm4_defun([_LT_LINKER_BOILERPLATE], 896e169010aSmrg[m4_require([_LT_DECL_SED])dnl 897e169010aSmrgac_outfile=conftest.$ac_objext 898e169010aSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 899e169010aSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 900e169010aSmrg_lt_linker_boilerplate=`cat conftest.err` 901e169010aSmrg$RM -r conftest* 902e169010aSmrg])# _LT_LINKER_BOILERPLATE 903e169010aSmrg 904e169010aSmrg# _LT_REQUIRED_DARWIN_CHECKS 905e169010aSmrg# ------------------------- 906e169010aSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 907e169010aSmrg case $host_os in 908e169010aSmrg rhapsody* | darwin*) 909e169010aSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 910e169010aSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 911e169010aSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 912e169010aSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 913e169010aSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 914e169010aSmrg _LT_DECL([], [DSYMUTIL], [1], 915e169010aSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 916e169010aSmrg _LT_DECL([], [NMEDIT], [1], 917e169010aSmrg [Tool to change global to local symbols on Mac OS X]) 918e169010aSmrg _LT_DECL([], [LIPO], [1], 919e169010aSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 920e169010aSmrg _LT_DECL([], [OTOOL], [1], 921e169010aSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 922e169010aSmrg _LT_DECL([], [OTOOL64], [1], 923e169010aSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 924e169010aSmrg 925e169010aSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 926e169010aSmrg [lt_cv_apple_cc_single_mod=no 927e169010aSmrg if test -z "${LT_MULTI_MODULE}"; then 928e169010aSmrg # By default we will add the -single_module flag. You can override 929e169010aSmrg # by either setting the environment variable LT_MULTI_MODULE 930e169010aSmrg # non-empty at configure time, or by adding -multi_module to the 931e169010aSmrg # link flags. 932e169010aSmrg rm -rf libconftest.dylib* 933e169010aSmrg echo "int foo(void){return 1;}" > conftest.c 934e169010aSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 935e169010aSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 936e169010aSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 937e169010aSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 938e169010aSmrg _lt_result=$? 939e169010aSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 940e169010aSmrg lt_cv_apple_cc_single_mod=yes 941e169010aSmrg else 942e169010aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 943e169010aSmrg fi 944e169010aSmrg rm -rf libconftest.dylib* 945e169010aSmrg rm -f conftest.* 946e169010aSmrg fi]) 947e169010aSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 948e169010aSmrg [lt_cv_ld_exported_symbols_list], 949e169010aSmrg [lt_cv_ld_exported_symbols_list=no 950e169010aSmrg save_LDFLAGS=$LDFLAGS 951e169010aSmrg echo "_main" > conftest.sym 952e169010aSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 953e169010aSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 954e169010aSmrg [lt_cv_ld_exported_symbols_list=yes], 955e169010aSmrg [lt_cv_ld_exported_symbols_list=no]) 956e169010aSmrg LDFLAGS="$save_LDFLAGS" 957e169010aSmrg ]) 9587914d74bSmrg case $host_os in 959e169010aSmrg rhapsody* | darwin1.[[012]]) 960e169010aSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 961e169010aSmrg darwin1.*) 962e169010aSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 963e169010aSmrg darwin*) # darwin 5.x on 964e169010aSmrg # if running on 10.5 or later, the deployment target defaults 965e169010aSmrg # to the OS version, if on x86, and 10.4, the deployment 966e169010aSmrg # target defaults to 10.4. Don't you love it? 967e169010aSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 968e169010aSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 969e169010aSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 970e169010aSmrg 10.[[012]]*) 971e169010aSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 972e169010aSmrg 10.*) 973e169010aSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 974e169010aSmrg esac 975e169010aSmrg ;; 976e169010aSmrg esac 977e169010aSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 978e169010aSmrg _lt_dar_single_mod='$single_module' 979e169010aSmrg fi 980e169010aSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 981e169010aSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 982e169010aSmrg else 983e169010aSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 984e169010aSmrg fi 985e169010aSmrg if test "$DSYMUTIL" != ":"; then 986e169010aSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 987e169010aSmrg else 988e169010aSmrg _lt_dsymutil= 989e169010aSmrg fi 990e169010aSmrg ;; 991e169010aSmrg esac 992e169010aSmrg]) 9937914d74bSmrg 9947914d74bSmrg 995e169010aSmrg# _LT_DARWIN_LINKER_FEATURES 996e169010aSmrg# -------------------------- 997e169010aSmrg# Checks for linker and compiler features on darwin 998e169010aSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 999e169010aSmrg[ 1000e169010aSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1001e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1002e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1003e169010aSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1004e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1005e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1006e169010aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1007e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1008e169010aSmrg case $cc_basename in 1009e169010aSmrg ifort*) _lt_dar_can_shared=yes ;; 1010e169010aSmrg *) _lt_dar_can_shared=$GCC ;; 1011e169010aSmrg esac 1012e169010aSmrg if test "$_lt_dar_can_shared" = "yes"; then 1013e169010aSmrg output_verbose_link_cmd=echo 1014e169010aSmrg _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}" 1015e169010aSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1016e169010aSmrg _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}" 1017e169010aSmrg _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}" 1018e169010aSmrg m4_if([$1], [CXX], 1019e169010aSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1020e169010aSmrg _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}" 1021e169010aSmrg _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}" 1022e169010aSmrg fi 1023e169010aSmrg],[]) 1024e169010aSmrg else 1025e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1026e169010aSmrg fi 1027e169010aSmrg]) 10287914d74bSmrg 1029e169010aSmrg# _LT_SYS_MODULE_PATH_AIX 1030e169010aSmrg# ----------------------- 1031e169010aSmrg# Links a minimal program and checks the executable 1032e169010aSmrg# for the system default hardcoded library path. In most cases, 1033e169010aSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1034e169010aSmrg# the location of the communication and MPI libs are included too. 1035e169010aSmrg# If we don't find anything, use the default library path according 1036e169010aSmrg# to the aix ld manual. 1037e169010aSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1038e169010aSmrg[m4_require([_LT_DECL_SED])dnl 1039e169010aSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 1040e169010aSmrglt_aix_libpath_sed=' 1041e169010aSmrg /Import File Strings/,/^$/ { 1042e169010aSmrg /^0/ { 1043e169010aSmrg s/^0 *\(.*\)$/\1/ 1044e169010aSmrg p 1045e169010aSmrg } 1046e169010aSmrg }' 1047e169010aSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1048e169010aSmrg# Check for a 64-bit object if we didn't find anything. 1049e169010aSmrgif test -z "$aix_libpath"; then 1050e169010aSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1051e169010aSmrgfi],[]) 1052e169010aSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1053e169010aSmrg])# _LT_SYS_MODULE_PATH_AIX 10547914d74bSmrg 10557914d74bSmrg 1056e169010aSmrg# _LT_SHELL_INIT(ARG) 1057e169010aSmrg# ------------------- 1058e169010aSmrgm4_define([_LT_SHELL_INIT], 1059e169010aSmrg[ifdef([AC_DIVERSION_NOTICE], 1060e169010aSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 1061e169010aSmrg [AC_DIVERT_PUSH(NOTICE)]) 1062e169010aSmrg$1 1063e169010aSmrgAC_DIVERT_POP 1064e169010aSmrg])# _LT_SHELL_INIT 10657914d74bSmrg 10667914d74bSmrg 1067e169010aSmrg# _LT_PROG_ECHO_BACKSLASH 1068e169010aSmrg# ----------------------- 1069e169010aSmrg# Add some code to the start of the generated configure script which 1070e169010aSmrg# will find an echo command which doesn't interpret backslashes. 1071e169010aSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1072e169010aSmrg[_LT_SHELL_INIT([ 1073e169010aSmrg# Check that we are running under the correct shell. 1074e169010aSmrgSHELL=${CONFIG_SHELL-/bin/sh} 10757914d74bSmrg 1076e169010aSmrgcase X$lt_ECHO in 1077e169010aSmrgX*--fallback-echo) 1078e169010aSmrg # Remove one level of quotation (which was required for Make). 1079e169010aSmrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1080e169010aSmrg ;; 1081e169010aSmrgesac 10827914d74bSmrg 1083e169010aSmrgECHO=${lt_ECHO-echo} 1084e169010aSmrgif test "X[$]1" = X--no-reexec; then 1085e169010aSmrg # Discard the --no-reexec flag, and continue. 1086e169010aSmrg shift 1087e169010aSmrgelif test "X[$]1" = X--fallback-echo; then 1088e169010aSmrg # Avoid inline document here, it may be left over 1089e169010aSmrg : 1090e169010aSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 1091e169010aSmrg # Yippee, $ECHO works! 1092e169010aSmrg : 10937914d74bSmrgelse 1094e169010aSmrg # Restart under the correct shell. 1095e169010aSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 10967914d74bSmrgfi 10977914d74bSmrg 1098e169010aSmrgif test "X[$]1" = X--fallback-echo; then 1099e169010aSmrg # used as fallback echo 1100e169010aSmrg shift 1101e169010aSmrg cat <<_LT_EOF 1102e169010aSmrg[$]* 1103e169010aSmrg_LT_EOF 1104e169010aSmrg exit 0 1105e169010aSmrgfi 11067914d74bSmrg 1107e169010aSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1108e169010aSmrg# if CDPATH is set. 1109e169010aSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 11107914d74bSmrg 1111e169010aSmrgif test -z "$lt_ECHO"; then 1112e169010aSmrg if test "X${echo_test_string+set}" != Xset; then 1113e169010aSmrg # find a string as large as possible, as long as the shell can cope with it 1114e169010aSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1115e169010aSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1116e169010aSmrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 1117e169010aSmrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 1118e169010aSmrg then 1119e169010aSmrg break 1120e169010aSmrg fi 1121e169010aSmrg done 1122e169010aSmrg fi 11237914d74bSmrg 1124e169010aSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1125e169010aSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1126e169010aSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1127e169010aSmrg : 1128e169010aSmrg else 1129e169010aSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 1130e169010aSmrg # backslashes. This makes it impossible to quote backslashes using 1131e169010aSmrg # echo "$something" | sed 's/\\/\\\\/g' 1132e169010aSmrg # 1133e169010aSmrg # So, first we look for a working echo in the user's PATH. 11347914d74bSmrg 1135e169010aSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1136e169010aSmrg for dir in $PATH /usr/ucb; do 1137e169010aSmrg IFS="$lt_save_ifs" 1138e169010aSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1139e169010aSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1140e169010aSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1141e169010aSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1142e169010aSmrg ECHO="$dir/echo" 1143e169010aSmrg break 1144e169010aSmrg fi 1145e169010aSmrg done 1146e169010aSmrg IFS="$lt_save_ifs" 11477914d74bSmrg 1148e169010aSmrg if test "X$ECHO" = Xecho; then 1149e169010aSmrg # We didn't find a better echo, so look for alternatives. 1150e169010aSmrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 1151e169010aSmrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 1152e169010aSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1153e169010aSmrg # This shell has a builtin print -r that does the trick. 1154e169010aSmrg ECHO='print -r' 1155e169010aSmrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 1156e169010aSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 1157e169010aSmrg # If we have ksh, try running configure again with it. 1158e169010aSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1159e169010aSmrg export ORIGINAL_CONFIG_SHELL 1160e169010aSmrg CONFIG_SHELL=/bin/ksh 1161e169010aSmrg export CONFIG_SHELL 1162e169010aSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 1163e169010aSmrg else 1164e169010aSmrg # Try using printf. 1165e169010aSmrg ECHO='printf %s\n' 1166e169010aSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1167e169010aSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1168e169010aSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1169e169010aSmrg # Cool, printf works 1170e169010aSmrg : 1171e169010aSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1172e169010aSmrg test "X$echo_testing_string" = 'X\t' && 1173e169010aSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1174e169010aSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1175e169010aSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1176e169010aSmrg export CONFIG_SHELL 1177e169010aSmrg SHELL="$CONFIG_SHELL" 1178e169010aSmrg export SHELL 1179e169010aSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1180e169010aSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1181e169010aSmrg test "X$echo_testing_string" = 'X\t' && 1182e169010aSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1183e169010aSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1184e169010aSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1185e169010aSmrg else 1186e169010aSmrg # maybe with a smaller string... 1187e169010aSmrg prev=: 11887914d74bSmrg 1189e169010aSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1190e169010aSmrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 1191e169010aSmrg then 1192e169010aSmrg break 1193e169010aSmrg fi 1194e169010aSmrg prev="$cmd" 1195e169010aSmrg done 11967914d74bSmrg 1197e169010aSmrg if test "$prev" != 'sed 50q "[$]0"'; then 1198e169010aSmrg echo_test_string=`eval $prev` 1199e169010aSmrg export echo_test_string 1200e169010aSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1201e169010aSmrg else 1202e169010aSmrg # Oops. We lost completely, so just stick with echo. 1203e169010aSmrg ECHO=echo 1204e169010aSmrg fi 1205e169010aSmrg fi 1206e169010aSmrg fi 1207e169010aSmrg fi 1208e169010aSmrg fi 12097914d74bSmrgfi 12107914d74bSmrg 1211e169010aSmrg# Copy echo and quote the copy suitably for passing to libtool from 1212e169010aSmrg# the Makefile, instead of quoting the original, which is used later. 1213e169010aSmrglt_ECHO=$ECHO 1214e169010aSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1215e169010aSmrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 12167914d74bSmrgfi 12177914d74bSmrg 1218e169010aSmrgAC_SUBST(lt_ECHO) 1219e169010aSmrg]) 1220e169010aSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1221e169010aSmrg_LT_DECL([], [ECHO], [1], 1222e169010aSmrg [An echo program that does not interpret backslashes]) 1223e169010aSmrg])# _LT_PROG_ECHO_BACKSLASH 12247914d74bSmrg 12257914d74bSmrg 1226e169010aSmrg# _LT_ENABLE_LOCK 1227e169010aSmrg# --------------- 1228e169010aSmrgm4_defun([_LT_ENABLE_LOCK], 1229e169010aSmrg[AC_ARG_ENABLE([libtool-lock], 1230e169010aSmrg [AS_HELP_STRING([--disable-libtool-lock], 1231e169010aSmrg [avoid locking (might break parallel builds)])]) 1232e169010aSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 12337914d74bSmrg 1234e169010aSmrg# Some flags need to be propagated to the compiler or linker for good 1235e169010aSmrg# libtool support. 1236e169010aSmrgcase $host in 1237e169010aSmrgia64-*-hpux*) 1238e169010aSmrg # Find out which ABI we are using. 1239e169010aSmrg echo 'int i;' > conftest.$ac_ext 1240e169010aSmrg if AC_TRY_EVAL(ac_compile); then 1241e169010aSmrg case `/usr/bin/file conftest.$ac_objext` in 1242e169010aSmrg *ELF-32*) 1243e169010aSmrg HPUX_IA64_MODE="32" 1244e169010aSmrg ;; 1245e169010aSmrg *ELF-64*) 1246e169010aSmrg HPUX_IA64_MODE="64" 1247e169010aSmrg ;; 1248e169010aSmrg esac 1249e169010aSmrg fi 1250e169010aSmrg rm -rf conftest* 1251e169010aSmrg ;; 1252e169010aSmrg*-*-irix6*) 1253e169010aSmrg # Find out which ABI we are using. 1254e169010aSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1255e169010aSmrg if AC_TRY_EVAL(ac_compile); then 1256e169010aSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1257e169010aSmrg case `/usr/bin/file conftest.$ac_objext` in 1258e169010aSmrg *32-bit*) 1259e169010aSmrg LD="${LD-ld} -melf32bsmip" 1260e169010aSmrg ;; 1261e169010aSmrg *N32*) 1262e169010aSmrg LD="${LD-ld} -melf32bmipn32" 1263e169010aSmrg ;; 1264e169010aSmrg *64-bit*) 1265e169010aSmrg LD="${LD-ld} -melf64bmip" 1266e169010aSmrg ;; 1267e169010aSmrg esac 1268e169010aSmrg else 1269e169010aSmrg case `/usr/bin/file conftest.$ac_objext` in 1270e169010aSmrg *32-bit*) 1271e169010aSmrg LD="${LD-ld} -32" 1272e169010aSmrg ;; 1273e169010aSmrg *N32*) 1274e169010aSmrg LD="${LD-ld} -n32" 1275e169010aSmrg ;; 1276e169010aSmrg *64-bit*) 1277e169010aSmrg LD="${LD-ld} -64" 1278e169010aSmrg ;; 1279e169010aSmrg esac 1280e169010aSmrg fi 1281e169010aSmrg fi 1282e169010aSmrg rm -rf conftest* 1283e169010aSmrg ;; 12847914d74bSmrg 1285e169010aSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1286e169010aSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1287e169010aSmrg # Find out which ABI we are using. 1288e169010aSmrg echo 'int i;' > conftest.$ac_ext 1289e169010aSmrg if AC_TRY_EVAL(ac_compile); then 1290e169010aSmrg case `/usr/bin/file conftest.o` in 1291e169010aSmrg *32-bit*) 1292e169010aSmrg case $host in 1293e169010aSmrg x86_64-*kfreebsd*-gnu) 1294e169010aSmrg LD="${LD-ld} -m elf_i386_fbsd" 1295e169010aSmrg ;; 1296e169010aSmrg x86_64-*linux*) 1297e169010aSmrg LD="${LD-ld} -m elf_i386" 1298e169010aSmrg ;; 1299e169010aSmrg ppc64-*linux*|powerpc64-*linux*) 1300e169010aSmrg LD="${LD-ld} -m elf32ppclinux" 1301e169010aSmrg ;; 1302e169010aSmrg s390x-*linux*) 1303e169010aSmrg LD="${LD-ld} -m elf_s390" 1304e169010aSmrg ;; 1305e169010aSmrg sparc64-*linux*) 1306e169010aSmrg LD="${LD-ld} -m elf32_sparc" 1307e169010aSmrg ;; 1308e169010aSmrg esac 1309e169010aSmrg ;; 1310e169010aSmrg *64-bit*) 1311e169010aSmrg case $host in 1312e169010aSmrg x86_64-*kfreebsd*-gnu) 1313e169010aSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1314e169010aSmrg ;; 1315e169010aSmrg x86_64-*linux*) 1316e169010aSmrg LD="${LD-ld} -m elf_x86_64" 1317e169010aSmrg ;; 1318e169010aSmrg ppc*-*linux*|powerpc*-*linux*) 1319e169010aSmrg LD="${LD-ld} -m elf64ppc" 1320e169010aSmrg ;; 1321e169010aSmrg s390*-*linux*|s390*-*tpf*) 1322e169010aSmrg LD="${LD-ld} -m elf64_s390" 1323e169010aSmrg ;; 1324e169010aSmrg sparc*-*linux*) 1325e169010aSmrg LD="${LD-ld} -m elf64_sparc" 1326e169010aSmrg ;; 1327e169010aSmrg esac 1328e169010aSmrg ;; 1329e169010aSmrg esac 1330e169010aSmrg fi 1331e169010aSmrg rm -rf conftest* 1332e169010aSmrg ;; 13337914d74bSmrg 1334e169010aSmrg*-*-sco3.2v5*) 1335e169010aSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1336e169010aSmrg SAVE_CFLAGS="$CFLAGS" 1337e169010aSmrg CFLAGS="$CFLAGS -belf" 1338e169010aSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1339e169010aSmrg [AC_LANG_PUSH(C) 1340e169010aSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1341e169010aSmrg AC_LANG_POP]) 1342e169010aSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1343e169010aSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1344e169010aSmrg CFLAGS="$SAVE_CFLAGS" 1345e169010aSmrg fi 1346e169010aSmrg ;; 1347e169010aSmrgsparc*-*solaris*) 1348e169010aSmrg # Find out which ABI we are using. 1349e169010aSmrg echo 'int i;' > conftest.$ac_ext 1350e169010aSmrg if AC_TRY_EVAL(ac_compile); then 1351e169010aSmrg case `/usr/bin/file conftest.o` in 1352e169010aSmrg *64-bit*) 1353e169010aSmrg case $lt_cv_prog_gnu_ld in 1354e169010aSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1355e169010aSmrg *) 1356e169010aSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1357e169010aSmrg LD="${LD-ld} -64" 1358e169010aSmrg fi 1359e169010aSmrg ;; 1360e169010aSmrg esac 1361e169010aSmrg ;; 1362e169010aSmrg esac 1363e169010aSmrg fi 1364e169010aSmrg rm -rf conftest* 1365e169010aSmrg ;; 1366e169010aSmrgesac 13677914d74bSmrg 1368e169010aSmrgneed_locks="$enable_libtool_lock" 1369e169010aSmrg])# _LT_ENABLE_LOCK 13707914d74bSmrg 13717914d74bSmrg 1372e169010aSmrg# _LT_CMD_OLD_ARCHIVE 1373e169010aSmrg# ------------------- 1374e169010aSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1375e169010aSmrg[AC_CHECK_TOOL(AR, ar, false) 1376e169010aSmrgtest -z "$AR" && AR=ar 1377e169010aSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1378e169010aSmrg_LT_DECL([], [AR], [1], [The archiver]) 1379e169010aSmrg_LT_DECL([], [AR_FLAGS], [1]) 13807914d74bSmrg 1381e169010aSmrgAC_CHECK_TOOL(STRIP, strip, :) 1382e169010aSmrgtest -z "$STRIP" && STRIP=: 1383e169010aSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 13847914d74bSmrg 1385e169010aSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1386e169010aSmrgtest -z "$RANLIB" && RANLIB=: 1387e169010aSmrg_LT_DECL([], [RANLIB], [1], 1388e169010aSmrg [Commands used to install an old-style archive]) 13897914d74bSmrg 1390e169010aSmrg# Determine commands to create old-style static archives. 1391e169010aSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1392e169010aSmrgold_postinstall_cmds='chmod 644 $oldlib' 1393e169010aSmrgold_postuninstall_cmds= 13947914d74bSmrg 1395e169010aSmrgif test -n "$RANLIB"; then 1396e169010aSmrg case $host_os in 1397e169010aSmrg openbsd*) 1398e169010aSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1399e169010aSmrg ;; 1400e169010aSmrg *) 1401e169010aSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1402e169010aSmrg ;; 1403e169010aSmrg esac 1404e169010aSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 14057914d74bSmrgfi 1406e169010aSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1407e169010aSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1408e169010aSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1409e169010aSmrg [Commands used to build an old-style archive]) 1410e169010aSmrg])# _LT_CMD_OLD_ARCHIVE 14117914d74bSmrg 14127914d74bSmrg 1413e169010aSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1414e169010aSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1415e169010aSmrg# ---------------------------------------------------------------- 1416e169010aSmrg# Check whether the given compiler option works 1417e169010aSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1418e169010aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1419e169010aSmrgm4_require([_LT_DECL_SED])dnl 1420e169010aSmrgAC_CACHE_CHECK([$1], [$2], 1421e169010aSmrg [$2=no 1422e169010aSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1423e169010aSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1424e169010aSmrg lt_compiler_flag="$3" 1425e169010aSmrg # Insert the option either (1) after the last *FLAGS variable, or 1426e169010aSmrg # (2) before a word containing "conftest.", or (3) at the end. 1427e169010aSmrg # Note that $ac_compile itself does not contain backslashes and begins 1428e169010aSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1429e169010aSmrg # The option is referenced via a variable to avoid confusing sed. 1430e169010aSmrg lt_compile=`echo "$ac_compile" | $SED \ 1431e169010aSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1432e169010aSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1433e169010aSmrg -e 's:$: $lt_compiler_flag:'` 1434e169010aSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1435e169010aSmrg (eval "$lt_compile" 2>conftest.err) 1436e169010aSmrg ac_status=$? 1437e169010aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1438e169010aSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1439e169010aSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1440e169010aSmrg # The compiler can only warn and ignore the option if not recognized 1441e169010aSmrg # So say no if there are warnings other than the usual output. 1442e169010aSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 1443e169010aSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1444e169010aSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1445e169010aSmrg $2=yes 1446e169010aSmrg fi 1447e169010aSmrg fi 1448e169010aSmrg $RM conftest* 14497914d74bSmrg]) 14507914d74bSmrg 1451e169010aSmrgif test x"[$]$2" = xyes; then 1452e169010aSmrg m4_if([$5], , :, [$5]) 1453e169010aSmrgelse 1454e169010aSmrg m4_if([$6], , :, [$6]) 1455e169010aSmrgfi 1456e169010aSmrg])# _LT_COMPILER_OPTION 14577914d74bSmrg 1458e169010aSmrg# Old name: 1459e169010aSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1460e169010aSmrgdnl aclocal-1.4 backwards compatibility: 1461e169010aSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 14627914d74bSmrg 14637914d74bSmrg 1464e169010aSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1465e169010aSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1466e169010aSmrg# ---------------------------------------------------- 1467e169010aSmrg# Check whether the given linker option works 1468e169010aSmrgAC_DEFUN([_LT_LINKER_OPTION], 1469e169010aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1470e169010aSmrgm4_require([_LT_DECL_SED])dnl 1471e169010aSmrgAC_CACHE_CHECK([$1], [$2], 1472e169010aSmrg [$2=no 1473e169010aSmrg save_LDFLAGS="$LDFLAGS" 1474e169010aSmrg LDFLAGS="$LDFLAGS $3" 1475e169010aSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1476e169010aSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1477e169010aSmrg # The linker can only warn and ignore the option if not recognized 1478e169010aSmrg # So say no if there are warnings 1479e169010aSmrg if test -s conftest.err; then 1480e169010aSmrg # Append any errors to the config.log. 1481e169010aSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1482e169010aSmrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 1483e169010aSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1484e169010aSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1485e169010aSmrg $2=yes 1486e169010aSmrg fi 1487e169010aSmrg else 1488e169010aSmrg $2=yes 1489e169010aSmrg fi 1490e169010aSmrg fi 1491e169010aSmrg $RM -r conftest* 1492e169010aSmrg LDFLAGS="$save_LDFLAGS" 1493e169010aSmrg]) 14947914d74bSmrg 1495e169010aSmrgif test x"[$]$2" = xyes; then 1496e169010aSmrg m4_if([$4], , :, [$4]) 1497e169010aSmrgelse 1498e169010aSmrg m4_if([$5], , :, [$5]) 1499e169010aSmrgfi 1500e169010aSmrg])# _LT_LINKER_OPTION 15017914d74bSmrg 1502e169010aSmrg# Old name: 1503e169010aSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1504e169010aSmrgdnl aclocal-1.4 backwards compatibility: 1505e169010aSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 15067914d74bSmrg 15077914d74bSmrg 1508e169010aSmrg# LT_CMD_MAX_LEN 1509e169010aSmrg#--------------- 1510e169010aSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1511e169010aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1512e169010aSmrg# find the maximum length of command line arguments 1513e169010aSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1514e169010aSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1515e169010aSmrg i=0 1516e169010aSmrg teststring="ABCD" 15177914d74bSmrg 1518e169010aSmrg case $build_os in 1519e169010aSmrg msdosdjgpp*) 1520e169010aSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1521e169010aSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1522e169010aSmrg # during glob expansion). Even if it were fixed, the result of this 1523e169010aSmrg # check would be larger than it should be. 1524e169010aSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1525e169010aSmrg ;; 15267914d74bSmrg 1527e169010aSmrg gnu*) 1528e169010aSmrg # Under GNU Hurd, this test is not required because there is 1529e169010aSmrg # no limit to the length of command line arguments. 1530e169010aSmrg # Libtool will interpret -1 as no limit whatsoever 1531e169010aSmrg lt_cv_sys_max_cmd_len=-1; 1532e169010aSmrg ;; 15337914d74bSmrg 1534e169010aSmrg cygwin* | mingw* | cegcc*) 1535e169010aSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1536e169010aSmrg # about 5 minutes as the teststring grows exponentially. 1537e169010aSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1538e169010aSmrg # you end up with a "frozen" computer, even though with patience 1539e169010aSmrg # the test eventually succeeds (with a max line length of 256k). 1540e169010aSmrg # Instead, let's just punt: use the minimum linelength reported by 1541e169010aSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1542e169010aSmrg lt_cv_sys_max_cmd_len=8192; 1543e169010aSmrg ;; 15447914d74bSmrg 1545e169010aSmrg amigaos*) 1546e169010aSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1547e169010aSmrg # So we just punt and use a minimum line length of 8192. 1548e169010aSmrg lt_cv_sys_max_cmd_len=8192; 1549e169010aSmrg ;; 15507914d74bSmrg 1551e169010aSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1552e169010aSmrg # This has been around since 386BSD, at least. Likely further. 1553e169010aSmrg if test -x /sbin/sysctl; then 1554e169010aSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1555e169010aSmrg elif test -x /usr/sbin/sysctl; then 1556e169010aSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1557e169010aSmrg else 1558e169010aSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1559e169010aSmrg fi 1560e169010aSmrg # And add a safety zone 1561e169010aSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1562e169010aSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1563e169010aSmrg ;; 15647914d74bSmrg 1565e169010aSmrg interix*) 1566e169010aSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1567e169010aSmrg lt_cv_sys_max_cmd_len=196608 1568e169010aSmrg ;; 15697914d74bSmrg 1570e169010aSmrg osf*) 1571e169010aSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1572e169010aSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1573e169010aSmrg # nice to cause kernel panics so lets avoid the loop below. 1574e169010aSmrg # First set a reasonable default. 1575e169010aSmrg lt_cv_sys_max_cmd_len=16384 1576e169010aSmrg # 1577e169010aSmrg if test -x /sbin/sysconfig; then 1578e169010aSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1579e169010aSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1580e169010aSmrg esac 1581e169010aSmrg fi 1582e169010aSmrg ;; 1583e169010aSmrg sco3.2v5*) 1584e169010aSmrg lt_cv_sys_max_cmd_len=102400 1585e169010aSmrg ;; 1586e169010aSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1587e169010aSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1588e169010aSmrg if test -n "$kargmax"; then 1589e169010aSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1590e169010aSmrg else 1591e169010aSmrg lt_cv_sys_max_cmd_len=32768 1592e169010aSmrg fi 15937914d74bSmrg ;; 15947914d74bSmrg *) 1595e169010aSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1596e169010aSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 1597e169010aSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1598e169010aSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1599e169010aSmrg else 1600e169010aSmrg # Make teststring a little bigger before we do anything with it. 1601e169010aSmrg # a 1K string should be a reasonable start. 1602e169010aSmrg for i in 1 2 3 4 5 6 7 8 ; do 1603e169010aSmrg teststring=$teststring$teststring 1604e169010aSmrg done 1605e169010aSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1606e169010aSmrg # If test is not a shell built-in, we'll probably end up computing a 1607e169010aSmrg # maximum length that is only half of the actual maximum length, but 1608e169010aSmrg # we can't tell. 1609e169010aSmrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 1610e169010aSmrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 1611e169010aSmrg test $i != 17 # 1/2 MB should be enough 1612e169010aSmrg do 1613e169010aSmrg i=`expr $i + 1` 1614e169010aSmrg teststring=$teststring$teststring 1615e169010aSmrg done 1616e169010aSmrg # Only check the string length outside the loop. 1617e169010aSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1618e169010aSmrg teststring= 1619e169010aSmrg # Add a significant safety factor because C++ compilers can tack on 1620e169010aSmrg # massive amounts of additional arguments before passing them to the 1621e169010aSmrg # linker. It appears as though 1/2 is a usable value. 1622e169010aSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1623e169010aSmrg fi 16247914d74bSmrg ;; 16257914d74bSmrg esac 1626e169010aSmrg]) 1627e169010aSmrgif test -n $lt_cv_sys_max_cmd_len ; then 1628e169010aSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1629e169010aSmrgelse 1630e169010aSmrg AC_MSG_RESULT(none) 16317914d74bSmrgfi 1632e169010aSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1633e169010aSmrg_LT_DECL([], [max_cmd_len], [0], 1634e169010aSmrg [What is the maximum length of a command?]) 1635e169010aSmrg])# LT_CMD_MAX_LEN 16367914d74bSmrg 1637e169010aSmrg# Old name: 1638e169010aSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1639e169010aSmrgdnl aclocal-1.4 backwards compatibility: 1640e169010aSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 16417914d74bSmrg 16427914d74bSmrg 1643e169010aSmrg# _LT_HEADER_DLFCN 1644e169010aSmrg# ---------------- 1645e169010aSmrgm4_defun([_LT_HEADER_DLFCN], 1646e169010aSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1647e169010aSmrg])# _LT_HEADER_DLFCN 16487914d74bSmrg 16497914d74bSmrg 1650e169010aSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1651e169010aSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1652e169010aSmrg# ---------------------------------------------------------------- 1653e169010aSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1654e169010aSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1655e169010aSmrgif test "$cross_compiling" = yes; then : 1656e169010aSmrg [$4] 1657e169010aSmrgelse 1658e169010aSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1659e169010aSmrg lt_status=$lt_dlunknown 1660e169010aSmrg cat > conftest.$ac_ext <<_LT_EOF 1661e169010aSmrg[#line __oline__ "configure" 1662e169010aSmrg#include "confdefs.h" 16637914d74bSmrg 1664e169010aSmrg#if HAVE_DLFCN_H 1665e169010aSmrg#include <dlfcn.h> 1666e169010aSmrg#endif 16677914d74bSmrg 1668e169010aSmrg#include <stdio.h> 16697914d74bSmrg 1670e169010aSmrg#ifdef RTLD_GLOBAL 1671e169010aSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1672e169010aSmrg#else 1673e169010aSmrg# ifdef DL_GLOBAL 1674e169010aSmrg# define LT_DLGLOBAL DL_GLOBAL 1675e169010aSmrg# else 1676e169010aSmrg# define LT_DLGLOBAL 0 1677e169010aSmrg# endif 1678e169010aSmrg#endif 16797914d74bSmrg 1680e169010aSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1681e169010aSmrg find out it does not work in some platform. */ 1682e169010aSmrg#ifndef LT_DLLAZY_OR_NOW 1683e169010aSmrg# ifdef RTLD_LAZY 1684e169010aSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1685e169010aSmrg# else 1686e169010aSmrg# ifdef DL_LAZY 1687e169010aSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1688e169010aSmrg# else 1689e169010aSmrg# ifdef RTLD_NOW 1690e169010aSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1691e169010aSmrg# else 1692e169010aSmrg# ifdef DL_NOW 1693e169010aSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1694e169010aSmrg# else 1695e169010aSmrg# define LT_DLLAZY_OR_NOW 0 1696e169010aSmrg# endif 1697e169010aSmrg# endif 1698e169010aSmrg# endif 1699e169010aSmrg# endif 1700e169010aSmrg#endif 17017914d74bSmrg 1702e169010aSmrgvoid fnord() { int i=42;} 1703e169010aSmrgint main () 1704e169010aSmrg{ 1705e169010aSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1706e169010aSmrg int status = $lt_dlunknown; 17077914d74bSmrg 1708e169010aSmrg if (self) 1709e169010aSmrg { 1710e169010aSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1711e169010aSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1712e169010aSmrg /* dlclose (self); */ 1713e169010aSmrg } 1714e169010aSmrg else 1715e169010aSmrg puts (dlerror ()); 17167914d74bSmrg 1717e169010aSmrg return status; 1718e169010aSmrg}] 1719e169010aSmrg_LT_EOF 1720e169010aSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1721e169010aSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1722e169010aSmrg lt_status=$? 1723e169010aSmrg case x$lt_status in 1724e169010aSmrg x$lt_dlno_uscore) $1 ;; 1725e169010aSmrg x$lt_dlneed_uscore) $2 ;; 1726e169010aSmrg x$lt_dlunknown|x*) $3 ;; 1727e169010aSmrg esac 1728e169010aSmrg else : 1729e169010aSmrg # compilation failed 1730e169010aSmrg $3 1731e169010aSmrg fi 1732e169010aSmrgfi 1733e169010aSmrgrm -fr conftest* 1734e169010aSmrg])# _LT_TRY_DLOPEN_SELF 17357914d74bSmrg 17367914d74bSmrg 1737e169010aSmrg# LT_SYS_DLOPEN_SELF 1738e169010aSmrg# ------------------ 1739e169010aSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1740e169010aSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1741e169010aSmrgif test "x$enable_dlopen" != xyes; then 1742e169010aSmrg enable_dlopen=unknown 1743e169010aSmrg enable_dlopen_self=unknown 1744e169010aSmrg enable_dlopen_self_static=unknown 1745e169010aSmrgelse 1746e169010aSmrg lt_cv_dlopen=no 1747e169010aSmrg lt_cv_dlopen_libs= 17487914d74bSmrg 1749e169010aSmrg case $host_os in 1750e169010aSmrg beos*) 1751e169010aSmrg lt_cv_dlopen="load_add_on" 1752e169010aSmrg lt_cv_dlopen_libs= 1753e169010aSmrg lt_cv_dlopen_self=yes 1754e169010aSmrg ;; 17557914d74bSmrg 1756e169010aSmrg mingw* | pw32* | cegcc*) 1757e169010aSmrg lt_cv_dlopen="LoadLibrary" 1758e169010aSmrg lt_cv_dlopen_libs= 1759e169010aSmrg ;; 17607914d74bSmrg 1761e169010aSmrg cygwin*) 1762e169010aSmrg lt_cv_dlopen="dlopen" 1763e169010aSmrg lt_cv_dlopen_libs= 1764e169010aSmrg ;; 17657914d74bSmrg 1766e169010aSmrg darwin*) 1767e169010aSmrg # if libdl is installed we need to link against it 1768e169010aSmrg AC_CHECK_LIB([dl], [dlopen], 1769e169010aSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1770e169010aSmrg lt_cv_dlopen="dyld" 1771e169010aSmrg lt_cv_dlopen_libs= 1772e169010aSmrg lt_cv_dlopen_self=yes 1773e169010aSmrg ]) 1774e169010aSmrg ;; 17757914d74bSmrg 1776e169010aSmrg *) 1777e169010aSmrg AC_CHECK_FUNC([shl_load], 1778e169010aSmrg [lt_cv_dlopen="shl_load"], 1779e169010aSmrg [AC_CHECK_LIB([dld], [shl_load], 1780e169010aSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1781e169010aSmrg [AC_CHECK_FUNC([dlopen], 1782e169010aSmrg [lt_cv_dlopen="dlopen"], 1783e169010aSmrg [AC_CHECK_LIB([dl], [dlopen], 1784e169010aSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1785e169010aSmrg [AC_CHECK_LIB([svld], [dlopen], 1786e169010aSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1787e169010aSmrg [AC_CHECK_LIB([dld], [dld_link], 1788e169010aSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1789e169010aSmrg ]) 1790e169010aSmrg ]) 1791e169010aSmrg ]) 1792e169010aSmrg ]) 1793e169010aSmrg ]) 1794e169010aSmrg ;; 1795e169010aSmrg esac 17967914d74bSmrg 1797e169010aSmrg if test "x$lt_cv_dlopen" != xno; then 1798e169010aSmrg enable_dlopen=yes 1799e169010aSmrg else 1800e169010aSmrg enable_dlopen=no 1801e169010aSmrg fi 18027914d74bSmrg 1803e169010aSmrg case $lt_cv_dlopen in 1804e169010aSmrg dlopen) 1805e169010aSmrg save_CPPFLAGS="$CPPFLAGS" 1806e169010aSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 18077914d74bSmrg 1808e169010aSmrg save_LDFLAGS="$LDFLAGS" 1809e169010aSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 18107914d74bSmrg 1811e169010aSmrg save_LIBS="$LIBS" 1812e169010aSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 18137914d74bSmrg 1814e169010aSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1815e169010aSmrg lt_cv_dlopen_self, [dnl 1816e169010aSmrg _LT_TRY_DLOPEN_SELF( 1817e169010aSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1818e169010aSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1819e169010aSmrg ]) 18207914d74bSmrg 1821e169010aSmrg if test "x$lt_cv_dlopen_self" = xyes; then 1822e169010aSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1823e169010aSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1824e169010aSmrg lt_cv_dlopen_self_static, [dnl 1825e169010aSmrg _LT_TRY_DLOPEN_SELF( 1826e169010aSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1827e169010aSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1828e169010aSmrg ]) 1829e169010aSmrg fi 18307914d74bSmrg 1831e169010aSmrg CPPFLAGS="$save_CPPFLAGS" 1832e169010aSmrg LDFLAGS="$save_LDFLAGS" 1833e169010aSmrg LIBS="$save_LIBS" 1834e169010aSmrg ;; 1835e169010aSmrg esac 18367914d74bSmrg 1837e169010aSmrg case $lt_cv_dlopen_self in 1838e169010aSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1839e169010aSmrg *) enable_dlopen_self=unknown ;; 1840e169010aSmrg esac 18417914d74bSmrg 1842e169010aSmrg case $lt_cv_dlopen_self_static in 1843e169010aSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1844e169010aSmrg *) enable_dlopen_self_static=unknown ;; 1845e169010aSmrg esac 18467914d74bSmrgfi 1847e169010aSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1848e169010aSmrg [Whether dlopen is supported]) 1849e169010aSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1850e169010aSmrg [Whether dlopen of programs is supported]) 1851e169010aSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1852e169010aSmrg [Whether dlopen of statically linked programs is supported]) 1853e169010aSmrg])# LT_SYS_DLOPEN_SELF 18547914d74bSmrg 1855e169010aSmrg# Old name: 1856e169010aSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1857e169010aSmrgdnl aclocal-1.4 backwards compatibility: 1858e169010aSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 18597914d74bSmrg 18607914d74bSmrg 1861e169010aSmrg# _LT_COMPILER_C_O([TAGNAME]) 1862e169010aSmrg# --------------------------- 1863e169010aSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 1864e169010aSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1865e169010aSmrgm4_defun([_LT_COMPILER_C_O], 1866e169010aSmrg[m4_require([_LT_DECL_SED])dnl 1867e169010aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1868e169010aSmrgm4_require([_LT_TAG_COMPILER])dnl 1869e169010aSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1870e169010aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1871e169010aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1872e169010aSmrg $RM -r conftest 2>/dev/null 1873e169010aSmrg mkdir conftest 1874e169010aSmrg cd conftest 1875e169010aSmrg mkdir out 1876e169010aSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 18777914d74bSmrg 1878e169010aSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1879e169010aSmrg # Insert the option either (1) after the last *FLAGS variable, or 1880e169010aSmrg # (2) before a word containing "conftest.", or (3) at the end. 1881e169010aSmrg # Note that $ac_compile itself does not contain backslashes and begins 1882e169010aSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1883e169010aSmrg lt_compile=`echo "$ac_compile" | $SED \ 1884e169010aSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1885e169010aSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1886e169010aSmrg -e 's:$: $lt_compiler_flag:'` 1887e169010aSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1888e169010aSmrg (eval "$lt_compile" 2>out/conftest.err) 1889e169010aSmrg ac_status=$? 1890e169010aSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1891e169010aSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1892e169010aSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1893e169010aSmrg then 1894e169010aSmrg # The compiler can only warn and ignore the option if not recognized 1895e169010aSmrg # So say no if there are warnings 1896e169010aSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1897e169010aSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1898e169010aSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1899e169010aSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1900e169010aSmrg fi 1901e169010aSmrg fi 1902e169010aSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1903e169010aSmrg $RM conftest* 1904e169010aSmrg # SGI C++ compiler will create directory out/ii_files/ for 1905e169010aSmrg # template instantiation 1906e169010aSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1907e169010aSmrg $RM out/* && rmdir out 1908e169010aSmrg cd .. 1909e169010aSmrg $RM -r conftest 1910e169010aSmrg $RM conftest* 1911e169010aSmrg]) 1912e169010aSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1913e169010aSmrg [Does compiler simultaneously support -c and -o options?]) 1914e169010aSmrg])# _LT_COMPILER_C_O 19157914d74bSmrg 1916e169010aSmrg 1917e169010aSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1918e169010aSmrg# ---------------------------------- 1919e169010aSmrg# Check to see if we can do hard links to lock some files if needed 1920e169010aSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1921e169010aSmrg[m4_require([_LT_ENABLE_LOCK])dnl 1922e169010aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1923e169010aSmrg_LT_COMPILER_C_O([$1]) 1924e169010aSmrg 1925e169010aSmrghard_links="nottested" 1926e169010aSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1927e169010aSmrg # do not overwrite the value of need_locks provided by the user 1928e169010aSmrg AC_MSG_CHECKING([if we can lock with hard links]) 1929e169010aSmrg hard_links=yes 1930e169010aSmrg $RM conftest* 1931e169010aSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1932e169010aSmrg touch conftest.a 1933e169010aSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 1934e169010aSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1935e169010aSmrg AC_MSG_RESULT([$hard_links]) 1936e169010aSmrg if test "$hard_links" = no; then 1937e169010aSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1938e169010aSmrg need_locks=warn 19397914d74bSmrg fi 1940e169010aSmrgelse 1941e169010aSmrg need_locks=no 19427914d74bSmrgfi 1943e169010aSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 1944e169010aSmrg])# _LT_COMPILER_FILE_LOCKS 19457914d74bSmrg 19467914d74bSmrg 1947e169010aSmrg# _LT_CHECK_OBJDIR 1948e169010aSmrg# ---------------- 1949e169010aSmrgm4_defun([_LT_CHECK_OBJDIR], 1950e169010aSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1951e169010aSmrg[rm -f .libs 2>/dev/null 1952e169010aSmrgmkdir .libs 2>/dev/null 1953e169010aSmrgif test -d .libs; then 1954e169010aSmrg lt_cv_objdir=.libs 1955e169010aSmrgelse 1956e169010aSmrg # MS-DOS does not allow filenames that begin with a dot. 1957e169010aSmrg lt_cv_objdir=_libs 1958e169010aSmrgfi 1959e169010aSmrgrmdir .libs 2>/dev/null]) 1960e169010aSmrgobjdir=$lt_cv_objdir 1961e169010aSmrg_LT_DECL([], [objdir], [0], 1962e169010aSmrg [The name of the directory that contains temporary libtool files])dnl 1963e169010aSmrgm4_pattern_allow([LT_OBJDIR])dnl 1964e169010aSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 1965e169010aSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 1966e169010aSmrg])# _LT_CHECK_OBJDIR 19677914d74bSmrg 19687914d74bSmrg 1969e169010aSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 1970e169010aSmrg# -------------------------------------- 1971e169010aSmrg# Check hardcoding attributes. 1972e169010aSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 1973e169010aSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1974e169010aSmrg_LT_TAGVAR(hardcode_action, $1)= 1975e169010aSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 1976e169010aSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 1977e169010aSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 19787914d74bSmrg 1979e169010aSmrg # We can hardcode non-existent directories. 1980e169010aSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 1981e169010aSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1982e169010aSmrg # have to relink, otherwise we might link with an installed library 1983e169010aSmrg # when we should be linking with a yet-to-be-installed one 1984e169010aSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1985e169010aSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 1986e169010aSmrg # Linking always hardcodes the temporary library directory. 1987e169010aSmrg _LT_TAGVAR(hardcode_action, $1)=relink 1988e169010aSmrg else 1989e169010aSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1990e169010aSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 19917914d74bSmrg fi 1992e169010aSmrgelse 1993e169010aSmrg # We cannot hardcode anything, or else we can only hardcode existing 1994e169010aSmrg # directories. 1995e169010aSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 1996e169010aSmrgfi 1997e169010aSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 1998e169010aSmrg 1999e169010aSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2000e169010aSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2001e169010aSmrg # Fast installation is not supported 2002e169010aSmrg enable_fast_install=no 2003e169010aSmrgelif test "$shlibpath_overrides_runpath" = yes || 2004e169010aSmrg test "$enable_shared" = no; then 2005e169010aSmrg # Fast installation is not necessary 2006e169010aSmrg enable_fast_install=needless 2007e169010aSmrgfi 2008e169010aSmrg_LT_TAGDECL([], [hardcode_action], [0], 2009e169010aSmrg [How to hardcode a shared library path into an executable]) 2010e169010aSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2011e169010aSmrg 2012e169010aSmrg 2013e169010aSmrg# _LT_CMD_STRIPLIB 2014e169010aSmrg# ---------------- 2015e169010aSmrgm4_defun([_LT_CMD_STRIPLIB], 2016e169010aSmrg[m4_require([_LT_DECL_EGREP]) 2017e169010aSmrgstriplib= 2018e169010aSmrgold_striplib= 2019e169010aSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2020e169010aSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2021e169010aSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2022e169010aSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2023e169010aSmrg AC_MSG_RESULT([yes]) 2024e169010aSmrgelse 2025e169010aSmrg# FIXME - insert some real tests, host_os isn't really good enough 2026e169010aSmrg case $host_os in 2027e169010aSmrg darwin*) 2028e169010aSmrg if test -n "$STRIP" ; then 2029e169010aSmrg striplib="$STRIP -x" 2030e169010aSmrg old_striplib="$STRIP -S" 2031e169010aSmrg AC_MSG_RESULT([yes]) 2032e169010aSmrg else 2033e169010aSmrg AC_MSG_RESULT([no]) 2034e169010aSmrg fi 2035e169010aSmrg ;; 2036e169010aSmrg *) 2037e169010aSmrg AC_MSG_RESULT([no]) 2038e169010aSmrg ;; 2039e169010aSmrg esac 2040e169010aSmrgfi 2041e169010aSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2042e169010aSmrg_LT_DECL([], [striplib], [1]) 2043e169010aSmrg])# _LT_CMD_STRIPLIB 2044e169010aSmrg 2045e169010aSmrg 2046e169010aSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2047e169010aSmrg# ----------------------------- 2048e169010aSmrg# PORTME Fill in your ld.so characteristics 2049e169010aSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2050e169010aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2051e169010aSmrgm4_require([_LT_DECL_EGREP])dnl 2052e169010aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2053e169010aSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2054e169010aSmrgm4_require([_LT_DECL_SED])dnl 2055e169010aSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2056e169010aSmrgm4_if([$1], 2057e169010aSmrg [], [ 2058e169010aSmrgif test "$GCC" = yes; then 2059e169010aSmrg case $host_os in 2060e169010aSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2061e169010aSmrg *) lt_awk_arg="/^libraries:/" ;; 2062e169010aSmrg esac 2063e169010aSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2064e169010aSmrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 2065e169010aSmrg # if the path contains ";" then we assume it to be the separator 2066e169010aSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2067e169010aSmrg # assumed that no part of a normal pathname contains ";" but that should 2068e169010aSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2069e169010aSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 2070e169010aSmrg else 2071e169010aSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 20727914d74bSmrg fi 2073e169010aSmrg # Ok, now we have the path, separated by spaces, we can step through it 2074e169010aSmrg # and add multilib dir if necessary. 2075e169010aSmrg lt_tmp_lt_search_path_spec= 2076e169010aSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2077e169010aSmrg for lt_sys_path in $lt_search_path_spec; do 2078e169010aSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2079e169010aSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2080e169010aSmrg else 2081e169010aSmrg test -d "$lt_sys_path" && \ 2082e169010aSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2083e169010aSmrg fi 2084e169010aSmrg done 2085e169010aSmrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 2086e169010aSmrgBEGIN {RS=" "; FS="/|\n";} { 2087e169010aSmrg lt_foo=""; 2088e169010aSmrg lt_count=0; 2089e169010aSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2090e169010aSmrg if ($lt_i != "" && $lt_i != ".") { 2091e169010aSmrg if ($lt_i == "..") { 2092e169010aSmrg lt_count++; 2093e169010aSmrg } else { 2094e169010aSmrg if (lt_count == 0) { 2095e169010aSmrg lt_foo="/" $lt_i lt_foo; 2096e169010aSmrg } else { 2097e169010aSmrg lt_count--; 2098e169010aSmrg } 2099e169010aSmrg } 2100e169010aSmrg } 2101e169010aSmrg } 2102e169010aSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2103e169010aSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2104e169010aSmrg}'` 2105e169010aSmrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 2106e169010aSmrgelse 2107e169010aSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2108e169010aSmrgfi]) 2109e169010aSmrglibrary_names_spec= 2110e169010aSmrglibname_spec='lib$name' 2111e169010aSmrgsoname_spec= 2112e169010aSmrgshrext_cmds=".so" 2113e169010aSmrgpostinstall_cmds= 2114e169010aSmrgpostuninstall_cmds= 2115e169010aSmrgfinish_cmds= 2116e169010aSmrgfinish_eval= 2117e169010aSmrgshlibpath_var= 2118e169010aSmrgshlibpath_overrides_runpath=unknown 2119e169010aSmrgversion_type=none 2120e169010aSmrgdynamic_linker="$host_os ld.so" 2121e169010aSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2122e169010aSmrgneed_lib_prefix=unknown 2123e169010aSmrghardcode_into_libs=no 2124e169010aSmrg 2125e169010aSmrg# when you set need_version to no, make sure it does not cause -set_version 2126e169010aSmrg# flags to be left without arguments 2127e169010aSmrgneed_version=unknown 2128e169010aSmrg 2129e169010aSmrgcase $host_os in 2130e169010aSmrgaix3*) 2131e169010aSmrg version_type=linux 2132e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2133e169010aSmrg shlibpath_var=LIBPATH 2134e169010aSmrg 2135e169010aSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2136e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 21377914d74bSmrg ;; 21387914d74bSmrg 2139e169010aSmrgaix[[4-9]]*) 2140e169010aSmrg version_type=linux 2141e169010aSmrg need_lib_prefix=no 2142e169010aSmrg need_version=no 2143e169010aSmrg hardcode_into_libs=yes 2144e169010aSmrg if test "$host_cpu" = ia64; then 2145e169010aSmrg # AIX 5 supports IA64 2146e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2147e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2148e169010aSmrg else 2149e169010aSmrg # With GCC up to 2.95.x, collect2 would create an import file 2150e169010aSmrg # for dependence libraries. The import file would start with 2151e169010aSmrg # the line `#! .'. This would cause the generated library to 2152e169010aSmrg # depend on `.', always an invalid library. This was fixed in 2153e169010aSmrg # development snapshots of GCC prior to 3.0. 2154e169010aSmrg case $host_os in 2155e169010aSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2156e169010aSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2157e169010aSmrg echo ' yes ' 2158e169010aSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2159e169010aSmrg : 2160e169010aSmrg else 2161e169010aSmrg can_build_shared=no 2162e169010aSmrg fi 21637914d74bSmrg ;; 21647914d74bSmrg esac 2165e169010aSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2166e169010aSmrg # soname into executable. Probably we can add versioning support to 2167e169010aSmrg # collect2, so additional links can be useful in future. 2168e169010aSmrg if test "$aix_use_runtimelinking" = yes; then 2169e169010aSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2170e169010aSmrg # instead of lib<name>.a to let people know that these are not 2171e169010aSmrg # typical AIX shared libraries. 2172e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2173e169010aSmrg else 2174e169010aSmrg # We preserve .a as extension for shared libraries through AIX4.2 2175e169010aSmrg # and later when we are not doing run time linking. 2176e169010aSmrg library_names_spec='${libname}${release}.a $libname.a' 2177e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2178e169010aSmrg fi 2179e169010aSmrg shlibpath_var=LIBPATH 21807914d74bSmrg fi 21817914d74bSmrg ;; 21827914d74bSmrg 2183e169010aSmrgamigaos*) 2184e169010aSmrg case $host_cpu in 2185e169010aSmrg powerpc) 2186e169010aSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2187e169010aSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2188e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2189e169010aSmrg ;; 2190e169010aSmrg m68k) 2191e169010aSmrg library_names_spec='$libname.ixlibrary $libname.a' 2192e169010aSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2193e169010aSmrg 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' 2194e169010aSmrg ;; 2195e169010aSmrg esac 21967914d74bSmrg ;; 2197e169010aSmrg 2198e169010aSmrgbeos*) 2199e169010aSmrg library_names_spec='${libname}${shared_ext}' 2200e169010aSmrg dynamic_linker="$host_os ld.so" 2201e169010aSmrg shlibpath_var=LIBRARY_PATH 22027914d74bSmrg ;; 22037914d74bSmrg 2204e169010aSmrgbsdi[[45]]*) 2205e169010aSmrg version_type=linux 2206e169010aSmrg need_version=no 2207e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2208e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2209e169010aSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2210e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2211e169010aSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2212e169010aSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2213e169010aSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2214e169010aSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2215e169010aSmrg # libtool to hard-code these into programs 22167914d74bSmrg ;; 22177914d74bSmrg 2218e169010aSmrgcygwin* | mingw* | pw32* | cegcc*) 2219e169010aSmrg version_type=windows 2220e169010aSmrg shrext_cmds=".dll" 2221e169010aSmrg need_version=no 2222e169010aSmrg need_lib_prefix=no 22237914d74bSmrg 2224e169010aSmrg case $GCC,$host_os in 2225e169010aSmrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 2226e169010aSmrg library_names_spec='$libname.dll.a' 2227e169010aSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2228e169010aSmrg postinstall_cmds='base_file=`basename \${file}`~ 2229e169010aSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2230e169010aSmrg dldir=$destdir/`dirname \$dlpath`~ 2231e169010aSmrg test -d \$dldir || mkdir -p \$dldir~ 2232e169010aSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2233e169010aSmrg chmod a+x \$dldir/$dlname~ 2234e169010aSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2235e169010aSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2236e169010aSmrg fi' 2237e169010aSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2238e169010aSmrg dlpath=$dir/\$dldll~ 2239e169010aSmrg $RM \$dlpath' 2240e169010aSmrg shlibpath_overrides_runpath=yes 22417914d74bSmrg 2242e169010aSmrg case $host_os in 2243e169010aSmrg cygwin*) 2244e169010aSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2245e169010aSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2246e169010aSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2247e169010aSmrg ;; 2248e169010aSmrg mingw* | cegcc*) 2249e169010aSmrg # MinGW DLLs use traditional 'lib' prefix 2250e169010aSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2251e169010aSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2252e169010aSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2253e169010aSmrg # It is most probably a Windows format PATH printed by 2254e169010aSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 2255e169010aSmrg # path with ; separators, and with drive letters. We can handle the 2256e169010aSmrg # drive letters (cygwin fileutils understands them), so leave them, 2257e169010aSmrg # especially as we might pass files found there to a mingw objdump, 2258e169010aSmrg # which wouldn't understand a cygwinified path. Ahh. 2259e169010aSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2260e169010aSmrg else 2261e169010aSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2262e169010aSmrg fi 2263e169010aSmrg ;; 2264e169010aSmrg pw32*) 2265e169010aSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2266e169010aSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2267e169010aSmrg ;; 2268e169010aSmrg esac 2269e169010aSmrg ;; 22707914d74bSmrg 2271e169010aSmrg *) 2272e169010aSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2273e169010aSmrg ;; 2274e169010aSmrg esac 2275e169010aSmrg dynamic_linker='Win32 ld.exe' 2276e169010aSmrg # FIXME: first we should search . and the directory the executable is in 2277e169010aSmrg shlibpath_var=PATH 2278e169010aSmrg ;; 22797914d74bSmrg 2280e169010aSmrgdarwin* | rhapsody*) 2281e169010aSmrg dynamic_linker="$host_os dyld" 2282e169010aSmrg version_type=darwin 2283e169010aSmrg need_lib_prefix=no 2284e169010aSmrg need_version=no 2285e169010aSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2286e169010aSmrg soname_spec='${libname}${release}${major}$shared_ext' 2287e169010aSmrg shlibpath_overrides_runpath=yes 2288e169010aSmrg shlibpath_var=DYLD_LIBRARY_PATH 2289e169010aSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2290e169010aSmrgm4_if([$1], [],[ 2291e169010aSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2292e169010aSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2293e169010aSmrg ;; 22947914d74bSmrg 2295e169010aSmrgdgux*) 2296e169010aSmrg version_type=linux 2297e169010aSmrg need_lib_prefix=no 2298e169010aSmrg need_version=no 2299e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2300e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2301e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2302e169010aSmrg ;; 23037914d74bSmrg 2304e169010aSmrgfreebsd1*) 2305e169010aSmrg dynamic_linker=no 2306e169010aSmrg ;; 23077914d74bSmrg 2308e169010aSmrgfreebsd* | dragonfly*) 2309e169010aSmrg # DragonFly does not have aout. When/if they implement a new 2310e169010aSmrg # versioning mechanism, adjust this. 2311e169010aSmrg if test -x /usr/bin/objformat; then 2312e169010aSmrg objformat=`/usr/bin/objformat` 2313e169010aSmrg else 2314e169010aSmrg case $host_os in 2315e169010aSmrg freebsd[[123]]*) objformat=aout ;; 2316e169010aSmrg *) objformat=elf ;; 2317e169010aSmrg esac 2318e169010aSmrg fi 2319e169010aSmrg version_type=freebsd-$objformat 2320e169010aSmrg case $version_type in 2321e169010aSmrg freebsd-elf*) 2322e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2323e169010aSmrg need_version=no 2324e169010aSmrg need_lib_prefix=no 2325e169010aSmrg ;; 2326e169010aSmrg freebsd-*) 2327e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2328e169010aSmrg need_version=yes 2329e169010aSmrg ;; 2330e169010aSmrg esac 2331e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2332e169010aSmrg case $host_os in 2333e169010aSmrg freebsd2*) 2334e169010aSmrg shlibpath_overrides_runpath=yes 23357914d74bSmrg ;; 2336e169010aSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2337e169010aSmrg shlibpath_overrides_runpath=yes 2338e169010aSmrg hardcode_into_libs=yes 23397914d74bSmrg ;; 2340e169010aSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2341e169010aSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2342e169010aSmrg shlibpath_overrides_runpath=no 2343e169010aSmrg hardcode_into_libs=yes 23447914d74bSmrg ;; 2345e169010aSmrg *) # from 4.6 on, and DragonFly 2346e169010aSmrg shlibpath_overrides_runpath=yes 2347e169010aSmrg hardcode_into_libs=yes 23487914d74bSmrg ;; 2349e169010aSmrg esac 2350e169010aSmrg ;; 23517914d74bSmrg 2352e169010aSmrggnu*) 2353e169010aSmrg version_type=linux 2354e169010aSmrg need_lib_prefix=no 2355e169010aSmrg need_version=no 2356e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2357e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2358e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2359e169010aSmrg hardcode_into_libs=yes 2360e169010aSmrg ;; 23617914d74bSmrg 2362e169010aSmrghpux9* | hpux10* | hpux11*) 2363e169010aSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2364e169010aSmrg # link against other versions. 2365e169010aSmrg version_type=sunos 2366e169010aSmrg need_lib_prefix=no 2367e169010aSmrg need_version=no 2368e169010aSmrg case $host_cpu in 2369e169010aSmrg ia64*) 2370e169010aSmrg shrext_cmds='.so' 2371e169010aSmrg hardcode_into_libs=yes 2372e169010aSmrg dynamic_linker="$host_os dld.so" 2373e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2374e169010aSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2375e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2376e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2377e169010aSmrg if test "X$HPUX_IA64_MODE" = X32; then 2378e169010aSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 23797914d74bSmrg else 2380e169010aSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 23817914d74bSmrg fi 2382e169010aSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2383e169010aSmrg ;; 2384e169010aSmrg hppa*64*) 2385e169010aSmrg shrext_cmds='.sl' 2386e169010aSmrg hardcode_into_libs=yes 2387e169010aSmrg dynamic_linker="$host_os dld.sl" 2388e169010aSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2389e169010aSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2390e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2391e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2392e169010aSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2393e169010aSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 23947914d74bSmrg ;; 23957914d74bSmrg *) 2396e169010aSmrg shrext_cmds='.sl' 2397e169010aSmrg dynamic_linker="$host_os dld.sl" 2398e169010aSmrg shlibpath_var=SHLIB_PATH 2399e169010aSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2400e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2401e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 24027914d74bSmrg ;; 24037914d74bSmrg esac 2404e169010aSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 2405e169010aSmrg postinstall_cmds='chmod 555 $lib' 2406e169010aSmrg ;; 24077914d74bSmrg 2408e169010aSmrginterix[[3-9]]*) 2409e169010aSmrg version_type=linux 2410e169010aSmrg need_lib_prefix=no 2411e169010aSmrg need_version=no 2412e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2413e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2414e169010aSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2415e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2416e169010aSmrg shlibpath_overrides_runpath=no 2417e169010aSmrg hardcode_into_libs=yes 2418e169010aSmrg ;; 24197914d74bSmrg 2420e169010aSmrgirix5* | irix6* | nonstopux*) 2421e169010aSmrg case $host_os in 2422e169010aSmrg nonstopux*) version_type=nonstopux ;; 2423e169010aSmrg *) 2424e169010aSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2425e169010aSmrg version_type=linux 2426e169010aSmrg else 2427e169010aSmrg version_type=irix 2428e169010aSmrg fi ;; 2429e169010aSmrg esac 2430e169010aSmrg need_lib_prefix=no 2431e169010aSmrg need_version=no 2432e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2433e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2434e169010aSmrg case $host_os in 2435e169010aSmrg irix5* | nonstopux*) 2436e169010aSmrg libsuff= shlibsuff= 2437e169010aSmrg ;; 2438e169010aSmrg *) 2439e169010aSmrg case $LD in # libtool.m4 will add one of these switches to LD 2440e169010aSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2441e169010aSmrg libsuff= shlibsuff= libmagic=32-bit;; 2442e169010aSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2443e169010aSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2444e169010aSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2445e169010aSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2446e169010aSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2447e169010aSmrg esac 2448e169010aSmrg ;; 2449e169010aSmrg esac 2450e169010aSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2451e169010aSmrg shlibpath_overrides_runpath=no 2452e169010aSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2453e169010aSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2454e169010aSmrg hardcode_into_libs=yes 2455e169010aSmrg ;; 24567914d74bSmrg 2457e169010aSmrg# No shared lib support for Linux oldld, aout, or coff. 2458e169010aSmrglinux*oldld* | linux*aout* | linux*coff*) 2459e169010aSmrg dynamic_linker=no 2460e169010aSmrg ;; 24617914d74bSmrg 2462e169010aSmrg# This must be Linux ELF. 2463e169010aSmrglinux* | k*bsd*-gnu) 2464e169010aSmrg version_type=linux 2465e169010aSmrg need_lib_prefix=no 2466e169010aSmrg need_version=no 2467e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2468e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2469e169010aSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2470e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2471e169010aSmrg shlibpath_overrides_runpath=no 2472e169010aSmrg # Some binutils ld are patched to set DT_RUNPATH 2473e169010aSmrg save_LDFLAGS=$LDFLAGS 2474e169010aSmrg save_libdir=$libdir 2475e169010aSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2476e169010aSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2477e169010aSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2478e169010aSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2479e169010aSmrg [shlibpath_overrides_runpath=yes])]) 2480e169010aSmrg LDFLAGS=$save_LDFLAGS 2481e169010aSmrg libdir=$save_libdir 24827914d74bSmrg 2483e169010aSmrg # This implies no fast_install, which is unacceptable. 2484e169010aSmrg # Some rework will be needed to allow for fast_install 2485e169010aSmrg # before this can be enabled. 2486e169010aSmrg hardcode_into_libs=yes 24877914d74bSmrg 2488e169010aSmrg # Add ABI-specific directories to the system library path. 2489e169010aSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 24907914d74bSmrg 2491e169010aSmrg # Append ld.so.conf contents to the search path 2492e169010aSmrg if test -f /etc/ld.so.conf; then 2493e169010aSmrg 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' ' '` 2494e169010aSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2495e169010aSmrg fi 24967914d74bSmrg 2497e169010aSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2498e169010aSmrg # powerpc, because MkLinux only supported shared libraries with the 2499e169010aSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2500e169010aSmrg # most powerpc-linux boxes support dynamic linking these days and 2501e169010aSmrg # people can always --disable-shared, the test was removed, and we 2502e169010aSmrg # assume the GNU/Linux dynamic linker is in use. 2503e169010aSmrg dynamic_linker='GNU/Linux ld.so' 2504e169010aSmrg ;; 25057914d74bSmrg 2506e169010aSmrgnetbsd*) 2507e169010aSmrg version_type=sunos 2508e169010aSmrg need_lib_prefix=no 2509e169010aSmrg need_version=no 2510e169010aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2511e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2512e169010aSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2513e169010aSmrg dynamic_linker='NetBSD (a.out) ld.so' 25147914d74bSmrg else 2515e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2516e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2517e169010aSmrg dynamic_linker='NetBSD ld.elf_so' 25187914d74bSmrg fi 2519e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2520e169010aSmrg shlibpath_overrides_runpath=yes 2521e169010aSmrg hardcode_into_libs=yes 2522e169010aSmrg ;; 25237914d74bSmrg 2524e169010aSmrgnewsos6) 2525e169010aSmrg version_type=linux 2526e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2527e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2528e169010aSmrg shlibpath_overrides_runpath=yes 2529e169010aSmrg ;; 25307914d74bSmrg 2531e169010aSmrg*nto* | *qnx*) 2532e169010aSmrg version_type=qnx 2533e169010aSmrg need_lib_prefix=no 2534e169010aSmrg need_version=no 2535e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2536e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2537e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2538e169010aSmrg shlibpath_overrides_runpath=no 2539e169010aSmrg hardcode_into_libs=yes 2540e169010aSmrg dynamic_linker='ldqnx.so' 2541e169010aSmrg ;; 25427914d74bSmrg 2543e169010aSmrgopenbsd*) 2544e169010aSmrg version_type=sunos 2545e169010aSmrg sys_lib_dlsearch_path_spec="/usr/lib" 2546e169010aSmrg need_lib_prefix=no 2547e169010aSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 25487914d74bSmrg case $host_os in 2549e169010aSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2550e169010aSmrg *) need_version=no ;; 25517914d74bSmrg esac 2552e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2553e169010aSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2554e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2555e169010aSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2556e169010aSmrg case $host_os in 2557e169010aSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 2558e169010aSmrg shlibpath_overrides_runpath=no 2559e169010aSmrg ;; 2560e169010aSmrg *) 2561e169010aSmrg shlibpath_overrides_runpath=yes 2562e169010aSmrg ;; 2563e169010aSmrg esac 25647914d74bSmrg else 2565e169010aSmrg shlibpath_overrides_runpath=yes 25667914d74bSmrg fi 2567e169010aSmrg ;; 25687914d74bSmrg 2569e169010aSmrgos2*) 2570e169010aSmrg libname_spec='$name' 2571e169010aSmrg shrext_cmds=".dll" 2572e169010aSmrg need_lib_prefix=no 2573e169010aSmrg library_names_spec='$libname${shared_ext} $libname.a' 2574e169010aSmrg dynamic_linker='OS/2 ld.exe' 2575e169010aSmrg shlibpath_var=LIBPATH 2576e169010aSmrg ;; 25777914d74bSmrg 2578e169010aSmrgosf3* | osf4* | osf5*) 2579e169010aSmrg version_type=osf 2580e169010aSmrg need_lib_prefix=no 2581e169010aSmrg need_version=no 2582e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2583e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2584e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2585e169010aSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2586e169010aSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2587e169010aSmrg ;; 25887914d74bSmrg 2589e169010aSmrgrdos*) 2590e169010aSmrg dynamic_linker=no 2591e169010aSmrg ;; 25927914d74bSmrg 2593e169010aSmrgsolaris*) 2594e169010aSmrg version_type=linux 2595e169010aSmrg need_lib_prefix=no 2596e169010aSmrg need_version=no 2597e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2598e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2599e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2600e169010aSmrg shlibpath_overrides_runpath=yes 2601e169010aSmrg hardcode_into_libs=yes 2602e169010aSmrg # ldd complains unless libraries are executable 2603e169010aSmrg postinstall_cmds='chmod +x $lib' 2604e169010aSmrg ;; 26057914d74bSmrg 2606e169010aSmrgsunos4*) 2607e169010aSmrg version_type=sunos 2608e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2609e169010aSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2610e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2611e169010aSmrg shlibpath_overrides_runpath=yes 2612e169010aSmrg if test "$with_gnu_ld" = yes; then 2613e169010aSmrg need_lib_prefix=no 2614e169010aSmrg fi 2615e169010aSmrg need_version=yes 2616e169010aSmrg ;; 26177914d74bSmrg 2618e169010aSmrgsysv4 | sysv4.3*) 2619e169010aSmrg version_type=linux 2620e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2621e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2622e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2623e169010aSmrg case $host_vendor in 2624e169010aSmrg sni) 2625e169010aSmrg shlibpath_overrides_runpath=no 2626e169010aSmrg need_lib_prefix=no 2627e169010aSmrg runpath_var=LD_RUN_PATH 2628e169010aSmrg ;; 2629e169010aSmrg siemens) 2630e169010aSmrg need_lib_prefix=no 2631e169010aSmrg ;; 2632e169010aSmrg motorola) 2633e169010aSmrg need_lib_prefix=no 2634e169010aSmrg need_version=no 2635e169010aSmrg shlibpath_overrides_runpath=no 2636e169010aSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2637e169010aSmrg ;; 26387914d74bSmrg esac 2639e169010aSmrg ;; 26407914d74bSmrg 2641e169010aSmrgsysv4*MP*) 2642e169010aSmrg if test -d /usr/nec ;then 2643e169010aSmrg version_type=linux 2644e169010aSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2645e169010aSmrg soname_spec='$libname${shared_ext}.$major' 2646e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2647e169010aSmrg fi 2648e169010aSmrg ;; 26497914d74bSmrg 2650e169010aSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2651e169010aSmrg version_type=freebsd-elf 2652e169010aSmrg need_lib_prefix=no 2653e169010aSmrg need_version=no 2654e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2655e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2656e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2657e169010aSmrg shlibpath_overrides_runpath=yes 2658e169010aSmrg hardcode_into_libs=yes 2659e169010aSmrg if test "$with_gnu_ld" = yes; then 2660e169010aSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2661e169010aSmrg else 2662e169010aSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2663e169010aSmrg case $host_os in 2664e169010aSmrg sco3.2v5*) 2665e169010aSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2666e169010aSmrg ;; 2667e169010aSmrg esac 2668e169010aSmrg fi 2669e169010aSmrg sys_lib_dlsearch_path_spec='/usr/lib' 2670e169010aSmrg ;; 26717914d74bSmrg 2672e169010aSmrgtpf*) 2673e169010aSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2674e169010aSmrg version_type=linux 2675e169010aSmrg need_lib_prefix=no 2676e169010aSmrg need_version=no 2677e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2678e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2679e169010aSmrg shlibpath_overrides_runpath=no 2680e169010aSmrg hardcode_into_libs=yes 2681e169010aSmrg ;; 26827914d74bSmrg 2683e169010aSmrguts4*) 2684e169010aSmrg version_type=linux 2685e169010aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2686e169010aSmrg soname_spec='${libname}${release}${shared_ext}$major' 2687e169010aSmrg shlibpath_var=LD_LIBRARY_PATH 2688e169010aSmrg ;; 26897914d74bSmrg 2690e169010aSmrg*) 2691e169010aSmrg dynamic_linker=no 2692e169010aSmrg ;; 2693e169010aSmrgesac 2694e169010aSmrgAC_MSG_RESULT([$dynamic_linker]) 2695e169010aSmrgtest "$dynamic_linker" = no && can_build_shared=no 26967914d74bSmrg 2697e169010aSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2698e169010aSmrgif test "$GCC" = yes; then 2699e169010aSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2700e169010aSmrgfi 27017914d74bSmrg 2702e169010aSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2703e169010aSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 27047914d74bSmrgfi 2705e169010aSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2706e169010aSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2707e169010aSmrgfi 2708e169010aSmrg 2709e169010aSmrg_LT_DECL([], [variables_saved_for_relink], [1], 2710e169010aSmrg [Variables whose values should be saved in libtool wrapper scripts and 2711e169010aSmrg restored at link time]) 2712e169010aSmrg_LT_DECL([], [need_lib_prefix], [0], 2713e169010aSmrg [Do we need the "lib" prefix for modules?]) 2714e169010aSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2715e169010aSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2716e169010aSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2717e169010aSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2718e169010aSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2719e169010aSmrg [Is shlibpath searched before the hard-coded library search path?]) 2720e169010aSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2721e169010aSmrg_LT_DECL([], [library_names_spec], [1], 2722e169010aSmrg [[List of archive names. First name is the real one, the rest are links. 2723e169010aSmrg The last name is the one that the linker finds with -lNAME]]) 2724e169010aSmrg_LT_DECL([], [soname_spec], [1], 2725e169010aSmrg [[The coded name of the library, if different from the real name]]) 2726e169010aSmrg_LT_DECL([], [postinstall_cmds], [2], 2727e169010aSmrg [Command to use after installation of a shared archive]) 2728e169010aSmrg_LT_DECL([], [postuninstall_cmds], [2], 2729e169010aSmrg [Command to use after uninstallation of a shared archive]) 2730e169010aSmrg_LT_DECL([], [finish_cmds], [2], 2731e169010aSmrg [Commands used to finish a libtool library installation in a directory]) 2732e169010aSmrg_LT_DECL([], [finish_eval], [1], 2733e169010aSmrg [[As "finish_cmds", except a single script fragment to be evaled but 2734e169010aSmrg not shown]]) 2735e169010aSmrg_LT_DECL([], [hardcode_into_libs], [0], 2736e169010aSmrg [Whether we should hardcode library paths into libraries]) 2737e169010aSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2738e169010aSmrg [Compile-time system search path for libraries]) 2739e169010aSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2740e169010aSmrg [Run-time system search path for libraries]) 2741e169010aSmrg])# _LT_SYS_DYNAMIC_LINKER 2742e169010aSmrg 2743e169010aSmrg 2744e169010aSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 2745e169010aSmrg# -------------------------- 2746e169010aSmrg# find a file program which can recognize shared library 2747e169010aSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2748e169010aSmrg[m4_require([_LT_DECL_EGREP])dnl 2749e169010aSmrgAC_MSG_CHECKING([for $1]) 2750e169010aSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2751e169010aSmrg[case $MAGIC_CMD in 2752e169010aSmrg[[\\/*] | ?:[\\/]*]) 2753e169010aSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2754e169010aSmrg ;; 2755e169010aSmrg*) 2756e169010aSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2757e169010aSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2758e169010aSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2759e169010aSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2760e169010aSmrgdnl not every word. This closes a longstanding sh security hole. 2761e169010aSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2762e169010aSmrg for ac_dir in $ac_dummy; do 2763e169010aSmrg IFS="$lt_save_ifs" 2764e169010aSmrg test -z "$ac_dir" && ac_dir=. 2765e169010aSmrg if test -f $ac_dir/$1; then 2766e169010aSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2767e169010aSmrg if test -n "$file_magic_test_file"; then 2768e169010aSmrg case $deplibs_check_method in 2769e169010aSmrg "file_magic "*) 2770e169010aSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2771e169010aSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2772e169010aSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2773e169010aSmrg $EGREP "$file_magic_regex" > /dev/null; then 2774e169010aSmrg : 2775e169010aSmrg else 2776e169010aSmrg cat <<_LT_EOF 1>&2 27777914d74bSmrg 2778e169010aSmrg*** Warning: the command libtool uses to detect shared libraries, 2779e169010aSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2780e169010aSmrg*** The result is that libtool may fail to recognize shared libraries 2781e169010aSmrg*** as such. This will affect the creation of libtool libraries that 2782e169010aSmrg*** depend on shared libraries, but programs linked with such libtool 2783e169010aSmrg*** libraries will work regardless of this problem. Nevertheless, you 2784e169010aSmrg*** may want to report the problem to your system manager and/or to 2785e169010aSmrg*** bug-libtool@gnu.org 27867914d74bSmrg 2787e169010aSmrg_LT_EOF 2788e169010aSmrg fi ;; 2789e169010aSmrg esac 2790e169010aSmrg fi 2791e169010aSmrg break 2792e169010aSmrg fi 2793e169010aSmrg done 2794e169010aSmrg IFS="$lt_save_ifs" 2795e169010aSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2796e169010aSmrg ;; 2797e169010aSmrgesac]) 2798e169010aSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2799e169010aSmrgif test -n "$MAGIC_CMD"; then 2800e169010aSmrg AC_MSG_RESULT($MAGIC_CMD) 28017914d74bSmrgelse 2802e169010aSmrg AC_MSG_RESULT(no) 28037914d74bSmrgfi 2804e169010aSmrg_LT_DECL([], [MAGIC_CMD], [0], 2805e169010aSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2806e169010aSmrg])# _LT_PATH_TOOL_PREFIX 28077914d74bSmrg 2808e169010aSmrg# Old name: 2809e169010aSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2810e169010aSmrgdnl aclocal-1.4 backwards compatibility: 2811e169010aSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 28127914d74bSmrg 28137914d74bSmrg 2814e169010aSmrg# _LT_PATH_MAGIC 2815e169010aSmrg# -------------- 2816e169010aSmrg# find a file program which can recognize a shared library 2817e169010aSmrgm4_defun([_LT_PATH_MAGIC], 2818e169010aSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2819e169010aSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2820e169010aSmrg if test -n "$ac_tool_prefix"; then 2821e169010aSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 28227914d74bSmrg else 2823e169010aSmrg MAGIC_CMD=: 28247914d74bSmrg fi 28257914d74bSmrgfi 2826e169010aSmrg])# _LT_PATH_MAGIC 28277914d74bSmrg 28287914d74bSmrg 2829e169010aSmrg# LT_PATH_LD 2830e169010aSmrg# ---------- 2831e169010aSmrg# find the pathname to the GNU or non-GNU linker 2832e169010aSmrgAC_DEFUN([LT_PATH_LD], 2833e169010aSmrg[AC_REQUIRE([AC_PROG_CC])dnl 2834e169010aSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2835e169010aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2836e169010aSmrgm4_require([_LT_DECL_SED])dnl 2837e169010aSmrgm4_require([_LT_DECL_EGREP])dnl 28387914d74bSmrg 2839e169010aSmrgAC_ARG_WITH([gnu-ld], 2840e169010aSmrg [AS_HELP_STRING([--with-gnu-ld], 2841e169010aSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2842e169010aSmrg [test "$withval" = no || with_gnu_ld=yes], 2843e169010aSmrg [with_gnu_ld=no])dnl 2844e169010aSmrg 2845e169010aSmrgac_prog=ld 2846e169010aSmrgif test "$GCC" = yes; then 2847e169010aSmrg # Check if gcc -print-prog-name=ld gives a path. 2848e169010aSmrg AC_MSG_CHECKING([for ld used by $CC]) 2849e169010aSmrg case $host in 2850e169010aSmrg *-*-mingw*) 2851e169010aSmrg # gcc leaves a trailing carriage return which upsets mingw 2852e169010aSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2853e169010aSmrg *) 2854e169010aSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2855e169010aSmrg esac 2856e169010aSmrg case $ac_prog in 2857e169010aSmrg # Accept absolute paths. 2858e169010aSmrg [[\\/]]* | ?:[[\\/]]*) 2859e169010aSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 2860e169010aSmrg # Canonicalize the pathname of ld 2861e169010aSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 2862e169010aSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 2863e169010aSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 2864e169010aSmrg done 2865e169010aSmrg test -z "$LD" && LD="$ac_prog" 2866e169010aSmrg ;; 2867e169010aSmrg "") 2868e169010aSmrg # If it fails, then pretend we aren't using GCC. 2869e169010aSmrg ac_prog=ld 2870e169010aSmrg ;; 2871e169010aSmrg *) 2872e169010aSmrg # If it is relative, then search for the first ld in PATH. 2873e169010aSmrg with_gnu_ld=unknown 28747914d74bSmrg ;; 28757914d74bSmrg esac 2876e169010aSmrgelif test "$with_gnu_ld" = yes; then 2877e169010aSmrg AC_MSG_CHECKING([for GNU ld]) 2878e169010aSmrgelse 2879e169010aSmrg AC_MSG_CHECKING([for non-GNU ld]) 28807914d74bSmrgfi 2881e169010aSmrgAC_CACHE_VAL(lt_cv_path_LD, 2882e169010aSmrg[if test -z "$LD"; then 2883e169010aSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2884e169010aSmrg for ac_dir in $PATH; do 2885e169010aSmrg IFS="$lt_save_ifs" 2886e169010aSmrg test -z "$ac_dir" && ac_dir=. 2887e169010aSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2888e169010aSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 2889e169010aSmrg # Check to see if the program is GNU ld. I'd rather use --version, 2890e169010aSmrg # but apparently some variants of GNU ld only accept -v. 2891e169010aSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 2892e169010aSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2893e169010aSmrg *GNU* | *'with BFD'*) 2894e169010aSmrg test "$with_gnu_ld" != no && break 2895e169010aSmrg ;; 2896e169010aSmrg *) 2897e169010aSmrg test "$with_gnu_ld" != yes && break 2898e169010aSmrg ;; 2899e169010aSmrg esac 2900e169010aSmrg fi 2901e169010aSmrg done 2902e169010aSmrg IFS="$lt_save_ifs" 29037914d74bSmrgelse 2904e169010aSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2905e169010aSmrgfi]) 2906e169010aSmrgLD="$lt_cv_path_LD" 2907e169010aSmrgif test -n "$LD"; then 2908e169010aSmrg AC_MSG_RESULT($LD) 2909e169010aSmrgelse 2910e169010aSmrg AC_MSG_RESULT(no) 29117914d74bSmrgfi 2912e169010aSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2913e169010aSmrg_LT_PATH_LD_GNU 2914e169010aSmrgAC_SUBST([LD]) 29157914d74bSmrg 2916e169010aSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 2917e169010aSmrg])# LT_PATH_LD 29187914d74bSmrg 2919e169010aSmrg# Old names: 2920e169010aSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 2921e169010aSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 2922e169010aSmrgdnl aclocal-1.4 backwards compatibility: 2923e169010aSmrgdnl AC_DEFUN([AM_PROG_LD], []) 2924e169010aSmrgdnl AC_DEFUN([AC_PROG_LD], []) 29257914d74bSmrg 2926e169010aSmrg 2927e169010aSmrg# _LT_PATH_LD_GNU 2928e169010aSmrg#- -------------- 2929e169010aSmrgm4_defun([_LT_PATH_LD_GNU], 2930e169010aSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2931e169010aSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2932e169010aSmrgcase `$LD -v 2>&1 </dev/null` in 2933e169010aSmrg*GNU* | *'with BFD'*) 2934e169010aSmrg lt_cv_prog_gnu_ld=yes 2935e169010aSmrg ;; 2936e169010aSmrg*) 2937e169010aSmrg lt_cv_prog_gnu_ld=no 29387914d74bSmrg ;; 2939e169010aSmrgesac]) 2940e169010aSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2941e169010aSmrg])# _LT_PATH_LD_GNU 29427914d74bSmrg 2943e169010aSmrg 2944e169010aSmrg# _LT_CMD_RELOAD 2945e169010aSmrg# -------------- 2946e169010aSmrg# find reload flag for linker 2947e169010aSmrg# -- PORTME Some linkers may need a different reload flag. 2948e169010aSmrgm4_defun([_LT_CMD_RELOAD], 2949e169010aSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 2950e169010aSmrg lt_cv_ld_reload_flag, 2951e169010aSmrg [lt_cv_ld_reload_flag='-r']) 2952e169010aSmrgreload_flag=$lt_cv_ld_reload_flag 2953e169010aSmrgcase $reload_flag in 2954e169010aSmrg"" | " "*) ;; 2955e169010aSmrg*) reload_flag=" $reload_flag" ;; 2956e169010aSmrgesac 2957e169010aSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2958e169010aSmrgcase $host_os in 2959e169010aSmrg darwin*) 2960e169010aSmrg if test "$GCC" = yes; then 2961e169010aSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 29627914d74bSmrg else 2963e169010aSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 29647914d74bSmrg fi 2965e169010aSmrg ;; 2966e169010aSmrgesac 2967e169010aSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 2968e169010aSmrg_LT_DECL([], [reload_cmds], [2])dnl 2969e169010aSmrg])# _LT_CMD_RELOAD 29707914d74bSmrg 2971e169010aSmrg 2972e169010aSmrg# _LT_CHECK_MAGIC_METHOD 2973e169010aSmrg# ---------------------- 2974e169010aSmrg# how to check for library dependencies 2975e169010aSmrg# -- PORTME fill in with the dynamic library characteristics 2976e169010aSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 2977e169010aSmrg[m4_require([_LT_DECL_EGREP]) 2978e169010aSmrgm4_require([_LT_DECL_OBJDUMP]) 2979e169010aSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 2980e169010aSmrglt_cv_deplibs_check_method, 2981e169010aSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2982e169010aSmrglt_cv_file_magic_test_file= 2983e169010aSmrglt_cv_deplibs_check_method='unknown' 2984e169010aSmrg# Need to set the preceding variable on all platforms that support 2985e169010aSmrg# interlibrary dependencies. 2986e169010aSmrg# 'none' -- dependencies not supported. 2987e169010aSmrg# `unknown' -- same as none, but documents that we really don't know. 2988e169010aSmrg# 'pass_all' -- all dependencies passed with no checks. 2989e169010aSmrg# 'test_compile' -- check by making test program. 2990e169010aSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 2991e169010aSmrg# which responds to the $file_magic_cmd with a given extended regex. 2992e169010aSmrg# If you have `file' or equivalent on your system and you're not sure 2993e169010aSmrg# whether `pass_all' will *always* work, you probably want this one. 2994e169010aSmrg 2995e169010aSmrgcase $host_os in 2996e169010aSmrgaix[[4-9]]*) 2997e169010aSmrg lt_cv_deplibs_check_method=pass_all 29987914d74bSmrg ;; 29997914d74bSmrg 30007914d74bSmrgbeos*) 3001e169010aSmrg lt_cv_deplibs_check_method=pass_all 30027914d74bSmrg ;; 30037914d74bSmrg 30047914d74bSmrgbsdi[[45]]*) 3005e169010aSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3006e169010aSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3007e169010aSmrg lt_cv_file_magic_test_file=/shlib/libc.so 30087914d74bSmrg ;; 30097914d74bSmrg 3010e169010aSmrgcygwin*) 3011e169010aSmrg # func_win32_libid is a shell function defined in ltmain.sh 3012e169010aSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3013e169010aSmrg lt_cv_file_magic_cmd='func_win32_libid' 3014e169010aSmrg ;; 30157914d74bSmrg 3016e169010aSmrgmingw* | pw32*) 3017e169010aSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3018e169010aSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3019e169010aSmrg # unless we find 'file', for example because we are cross-compiling. 3020e169010aSmrg if ( file / ) >/dev/null 2>&1; then 3021e169010aSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3022e169010aSmrg lt_cv_file_magic_cmd='func_win32_libid' 3023e169010aSmrg else 3024e169010aSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 3025e169010aSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3026e169010aSmrg fi 3027e169010aSmrg ;; 30287914d74bSmrg 3029e169010aSmrgcegcc) 3030e169010aSmrg # use the weaker test based on 'objdump'. See mingw*. 3031e169010aSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3032e169010aSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 30337914d74bSmrg ;; 30347914d74bSmrg 30357914d74bSmrgdarwin* | rhapsody*) 3036e169010aSmrg lt_cv_deplibs_check_method=pass_all 30377914d74bSmrg ;; 30387914d74bSmrg 30397914d74bSmrgfreebsd* | dragonfly*) 3040e169010aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3041e169010aSmrg case $host_cpu in 3042e169010aSmrg i*86 ) 3043e169010aSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3044e169010aSmrg # Let's accept both of them until this is cleared up. 3045e169010aSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3046e169010aSmrg lt_cv_file_magic_cmd=/usr/bin/file 3047e169010aSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3048e169010aSmrg ;; 30497914d74bSmrg esac 3050e169010aSmrg else 3051e169010aSmrg lt_cv_deplibs_check_method=pass_all 30527914d74bSmrg fi 30537914d74bSmrg ;; 30547914d74bSmrg 30557914d74bSmrggnu*) 3056e169010aSmrg lt_cv_deplibs_check_method=pass_all 30577914d74bSmrg ;; 30587914d74bSmrg 3059e169010aSmrghpux10.20* | hpux11*) 3060e169010aSmrg lt_cv_file_magic_cmd=/usr/bin/file 30617914d74bSmrg case $host_cpu in 30627914d74bSmrg ia64*) 3063e169010aSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3064e169010aSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 30657914d74bSmrg ;; 3066e169010aSmrg hppa*64*) 3067e169010aSmrg [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]'] 3068e169010aSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3069e169010aSmrg ;; 3070e169010aSmrg *) 3071e169010aSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 3072e169010aSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 30737914d74bSmrg ;; 30747914d74bSmrg esac 30757914d74bSmrg ;; 30767914d74bSmrg 3077e169010aSmrginterix[[3-9]]*) 3078e169010aSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3079e169010aSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 30807914d74bSmrg ;; 30817914d74bSmrg 30827914d74bSmrgirix5* | irix6* | nonstopux*) 3083e169010aSmrg case $LD in 3084e169010aSmrg *-32|*"-32 ") libmagic=32-bit;; 3085e169010aSmrg *-n32|*"-n32 ") libmagic=N32;; 3086e169010aSmrg *-64|*"-64 ") libmagic=64-bit;; 3087e169010aSmrg *) libmagic=never-match;; 30887914d74bSmrg esac 3089e169010aSmrg lt_cv_deplibs_check_method=pass_all 30907914d74bSmrg ;; 30917914d74bSmrg 30927914d74bSmrg# This must be Linux ELF. 3093e169010aSmrglinux* | k*bsd*-gnu) 3094e169010aSmrg lt_cv_deplibs_check_method=pass_all 3095e169010aSmrg ;; 30967914d74bSmrg 3097e169010aSmrgnetbsd*) 3098e169010aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3099e169010aSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3100e169010aSmrg else 3101e169010aSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 31027914d74bSmrg fi 31037914d74bSmrg ;; 31047914d74bSmrg 3105e169010aSmrgnewos6*) 3106e169010aSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3107e169010aSmrg lt_cv_file_magic_cmd=/usr/bin/file 3108e169010aSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 31097914d74bSmrg ;; 31107914d74bSmrg 3111e169010aSmrg*nto* | *qnx*) 3112e169010aSmrg lt_cv_deplibs_check_method=pass_all 31137914d74bSmrg ;; 31147914d74bSmrg 31157914d74bSmrgopenbsd*) 3116e169010aSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3117e169010aSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 31187914d74bSmrg else 3119e169010aSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 31207914d74bSmrg fi 31217914d74bSmrg ;; 31227914d74bSmrg 3123e169010aSmrgosf3* | osf4* | osf5*) 3124e169010aSmrg lt_cv_deplibs_check_method=pass_all 31257914d74bSmrg ;; 31267914d74bSmrg 3127e169010aSmrgrdos*) 3128e169010aSmrg lt_cv_deplibs_check_method=pass_all 31297914d74bSmrg ;; 31307914d74bSmrg 31317914d74bSmrgsolaris*) 3132e169010aSmrg lt_cv_deplibs_check_method=pass_all 31337914d74bSmrg ;; 31347914d74bSmrg 3135e169010aSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3136e169010aSmrg lt_cv_deplibs_check_method=pass_all 31377914d74bSmrg ;; 31387914d74bSmrg 31397914d74bSmrgsysv4 | sysv4.3*) 31407914d74bSmrg case $host_vendor in 3141e169010aSmrg motorola) 3142e169010aSmrg 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]]' 3143e169010aSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3144e169010aSmrg ;; 3145e169010aSmrg ncr) 3146e169010aSmrg lt_cv_deplibs_check_method=pass_all 3147e169010aSmrg ;; 3148e169010aSmrg sequent) 3149e169010aSmrg lt_cv_file_magic_cmd='/bin/file' 3150e169010aSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3151e169010aSmrg ;; 3152e169010aSmrg sni) 3153e169010aSmrg lt_cv_file_magic_cmd='/bin/file' 3154e169010aSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3155e169010aSmrg lt_cv_file_magic_test_file=/lib/libc.so 3156e169010aSmrg ;; 3157e169010aSmrg siemens) 3158e169010aSmrg lt_cv_deplibs_check_method=pass_all 3159e169010aSmrg ;; 3160e169010aSmrg pc) 3161e169010aSmrg lt_cv_deplibs_check_method=pass_all 3162e169010aSmrg ;; 31637914d74bSmrg esac 31647914d74bSmrg ;; 31657914d74bSmrg 3166e169010aSmrgtpf*) 3167e169010aSmrg lt_cv_deplibs_check_method=pass_all 31687914d74bSmrg ;; 3169e169010aSmrgesac 3170e169010aSmrg]) 3171e169010aSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3172e169010aSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3173e169010aSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 31747914d74bSmrg 3175e169010aSmrg_LT_DECL([], [deplibs_check_method], [1], 3176e169010aSmrg [Method to check whether dependent libraries are shared objects]) 3177e169010aSmrg_LT_DECL([], [file_magic_cmd], [1], 3178e169010aSmrg [Command to use when deplibs_check_method == "file_magic"]) 3179e169010aSmrg])# _LT_CHECK_MAGIC_METHOD 3180e169010aSmrg 3181e169010aSmrg 3182e169010aSmrg# LT_PATH_NM 3183e169010aSmrg# ---------- 3184e169010aSmrg# find the pathname to a BSD- or MS-compatible name lister 3185e169010aSmrgAC_DEFUN([LT_PATH_NM], 3186e169010aSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3187e169010aSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3188e169010aSmrg[if test -n "$NM"; then 3189e169010aSmrg # Let the user override the test. 3190e169010aSmrg lt_cv_path_NM="$NM" 3191e169010aSmrgelse 3192e169010aSmrg lt_nm_to_check="${ac_tool_prefix}nm" 3193e169010aSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3194e169010aSmrg lt_nm_to_check="$lt_nm_to_check nm" 31957914d74bSmrg fi 3196e169010aSmrg for lt_tmp_nm in $lt_nm_to_check; do 3197e169010aSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3198e169010aSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3199e169010aSmrg IFS="$lt_save_ifs" 3200e169010aSmrg test -z "$ac_dir" && ac_dir=. 3201e169010aSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3202e169010aSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3203e169010aSmrg # Check to see if the nm accepts a BSD-compat flag. 3204e169010aSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3205e169010aSmrg # nm: unknown option "B" ignored 3206e169010aSmrg # Tru64's nm complains that /dev/null is an invalid object file 3207e169010aSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3208e169010aSmrg */dev/null* | *'Invalid file or object type'*) 3209e169010aSmrg lt_cv_path_NM="$tmp_nm -B" 3210e169010aSmrg break 3211e169010aSmrg ;; 3212e169010aSmrg *) 3213e169010aSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3214e169010aSmrg */dev/null*) 3215e169010aSmrg lt_cv_path_NM="$tmp_nm -p" 3216e169010aSmrg break 3217e169010aSmrg ;; 3218e169010aSmrg *) 3219e169010aSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3220e169010aSmrg continue # so that we can try to find one that supports BSD flags 3221e169010aSmrg ;; 3222e169010aSmrg esac 3223e169010aSmrg ;; 3224e169010aSmrg esac 3225e169010aSmrg fi 3226e169010aSmrg done 3227e169010aSmrg IFS="$lt_save_ifs" 3228e169010aSmrg done 3229e169010aSmrg : ${lt_cv_path_NM=no} 3230e169010aSmrgfi]) 3231e169010aSmrgif test "$lt_cv_path_NM" != "no"; then 3232e169010aSmrg NM="$lt_cv_path_NM" 3233e169010aSmrgelse 3234e169010aSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3235e169010aSmrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 3236e169010aSmrg AC_SUBST([DUMPBIN]) 3237e169010aSmrg if test "$DUMPBIN" != ":"; then 3238e169010aSmrg NM="$DUMPBIN" 3239e169010aSmrg fi 3240e169010aSmrgfi 3241e169010aSmrgtest -z "$NM" && NM=nm 3242e169010aSmrgAC_SUBST([NM]) 3243e169010aSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3244e169010aSmrg 3245e169010aSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3246e169010aSmrg [lt_cv_nm_interface="BSD nm" 3247e169010aSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3248e169010aSmrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3249e169010aSmrg (eval "$ac_compile" 2>conftest.err) 3250e169010aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3251e169010aSmrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3252e169010aSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3253e169010aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3254e169010aSmrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 3255e169010aSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3256e169010aSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3257e169010aSmrg lt_cv_nm_interface="MS dumpbin" 3258e169010aSmrg fi 3259e169010aSmrg rm -f conftest*]) 3260e169010aSmrg])# LT_PATH_NM 3261e169010aSmrg 3262e169010aSmrg# Old names: 3263e169010aSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3264e169010aSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3265e169010aSmrgdnl aclocal-1.4 backwards compatibility: 3266e169010aSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3267e169010aSmrgdnl AC_DEFUN([AC_PROG_NM], []) 32687914d74bSmrg 32697914d74bSmrg 3270e169010aSmrg# LT_LIB_M 3271e169010aSmrg# -------- 3272e169010aSmrg# check for math library 3273e169010aSmrgAC_DEFUN([LT_LIB_M], 3274e169010aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3275e169010aSmrgLIBM= 3276e169010aSmrgcase $host in 3277e169010aSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3278e169010aSmrg # These system don't have libm, or don't need it 3279e169010aSmrg ;; 3280e169010aSmrg*-ncr-sysv4.3*) 3281e169010aSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3282e169010aSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3283e169010aSmrg ;; 32847914d74bSmrg*) 3285e169010aSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 32867914d74bSmrg ;; 32877914d74bSmrgesac 3288e169010aSmrgAC_SUBST([LIBM]) 3289e169010aSmrg])# LT_LIB_M 32907914d74bSmrg 3291e169010aSmrg# Old name: 3292e169010aSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3293e169010aSmrgdnl aclocal-1.4 backwards compatibility: 3294e169010aSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 32957914d74bSmrg 32967914d74bSmrg 3297e169010aSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3298e169010aSmrg# ------------------------------- 3299e169010aSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3300e169010aSmrg[m4_require([_LT_TAG_COMPILER])dnl 33017914d74bSmrg 3302e169010aSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 33037914d74bSmrg 3304e169010aSmrgif test "$GCC" = yes; then 3305e169010aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 33067914d74bSmrg 3307e169010aSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3308e169010aSmrg lt_cv_prog_compiler_rtti_exceptions, 3309e169010aSmrg [-fno-rtti -fno-exceptions], [], 3310e169010aSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3311e169010aSmrgfi 3312e169010aSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3313e169010aSmrg [Compiler flag to turn off builtin functions]) 3314e169010aSmrg])# _LT_COMPILER_NO_RTTI 33157914d74bSmrg 33167914d74bSmrg 3317e169010aSmrg# _LT_CMD_GLOBAL_SYMBOLS 3318e169010aSmrg# ---------------------- 3319e169010aSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3320e169010aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3321e169010aSmrgAC_REQUIRE([AC_PROG_CC])dnl 3322e169010aSmrgAC_REQUIRE([LT_PATH_NM])dnl 3323e169010aSmrgAC_REQUIRE([LT_PATH_LD])dnl 3324e169010aSmrgm4_require([_LT_DECL_SED])dnl 3325e169010aSmrgm4_require([_LT_DECL_EGREP])dnl 3326e169010aSmrgm4_require([_LT_TAG_COMPILER])dnl 33277914d74bSmrg 3328e169010aSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3329e169010aSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3330e169010aSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3331e169010aSmrg[ 3332e169010aSmrg# These are sane defaults that work on at least a few old systems. 3333e169010aSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 33347914d74bSmrg 3335e169010aSmrg# Character class describing NM global symbol codes. 3336e169010aSmrgsymcode='[[BCDEGRST]]' 33377914d74bSmrg 3338e169010aSmrg# Regexp to match symbols that can be accessed directly from C. 3339e169010aSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 33407914d74bSmrg 3341e169010aSmrg# Define system-specific variables. 3342e169010aSmrgcase $host_os in 3343e169010aSmrgaix*) 3344e169010aSmrg symcode='[[BCDT]]' 3345e169010aSmrg ;; 3346e169010aSmrgcygwin* | mingw* | pw32* | cegcc*) 3347e169010aSmrg symcode='[[ABCDGISTW]]' 3348e169010aSmrg ;; 3349e169010aSmrghpux*) 3350e169010aSmrg if test "$host_cpu" = ia64; then 3351e169010aSmrg symcode='[[ABCDEGRST]]' 3352e169010aSmrg fi 3353e169010aSmrg ;; 3354e169010aSmrgirix* | nonstopux*) 3355e169010aSmrg symcode='[[BCDEGRST]]' 3356e169010aSmrg ;; 3357e169010aSmrgosf*) 3358e169010aSmrg symcode='[[BCDEGQRST]]' 3359e169010aSmrg ;; 3360e169010aSmrgsolaris*) 3361e169010aSmrg symcode='[[BDRT]]' 3362e169010aSmrg ;; 3363e169010aSmrgsco3.2v5*) 3364e169010aSmrg symcode='[[DT]]' 3365e169010aSmrg ;; 3366e169010aSmrgsysv4.2uw2*) 3367e169010aSmrg symcode='[[DT]]' 3368e169010aSmrg ;; 3369e169010aSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3370e169010aSmrg symcode='[[ABDT]]' 3371e169010aSmrg ;; 3372e169010aSmrgsysv4) 3373e169010aSmrg symcode='[[DFNSTU]]' 3374e169010aSmrg ;; 3375e169010aSmrgesac 33767914d74bSmrg 3377e169010aSmrg# If we're using GNU nm, then use its standard symbol codes. 3378e169010aSmrgcase `$NM -V 2>&1` in 3379e169010aSmrg*GNU* | *'with BFD'*) 3380e169010aSmrg symcode='[[ABCDGIRSTW]]' ;; 3381e169010aSmrgesac 33827914d74bSmrg 3383e169010aSmrg# Transform an extracted symbol line into a proper C declaration. 3384e169010aSmrg# Some systems (esp. on ia64) link data and code symbols differently, 3385e169010aSmrg# so use this general approach. 3386e169010aSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 33877914d74bSmrg 3388e169010aSmrg# Transform an extracted symbol line into symbol name and symbol address 3389e169010aSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3390e169010aSmrglt_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'" 33917914d74bSmrg 3392e169010aSmrg# Handle CRLF in mingw tool chain 3393e169010aSmrgopt_cr= 3394e169010aSmrgcase $build_os in 3395e169010aSmrgmingw*) 3396e169010aSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3397e169010aSmrg ;; 3398e169010aSmrgesac 33997914d74bSmrg 3400e169010aSmrg# Try without a prefix underscore, then with it. 3401e169010aSmrgfor ac_symprfx in "" "_"; do 34027914d74bSmrg 3403e169010aSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3404e169010aSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 34057914d74bSmrg 3406e169010aSmrg # Write the raw and C identifiers. 3407e169010aSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3408e169010aSmrg # Fake it for dumpbin and say T for any non-static function 3409e169010aSmrg # and D for any global variable. 3410e169010aSmrg # Also find C++ and __fastcall symbols from MSVC++, 3411e169010aSmrg # which start with @ or ?. 3412e169010aSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3413e169010aSmrg" {last_section=section; section=\$ 3};"\ 3414e169010aSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3415e169010aSmrg" \$ 0!~/External *\|/{next};"\ 3416e169010aSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3417e169010aSmrg" {if(hide[section]) next};"\ 3418e169010aSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3419e169010aSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3420e169010aSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3421e169010aSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3422e169010aSmrg" ' prfx=^$ac_symprfx]" 3423e169010aSmrg else 3424e169010aSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3425e169010aSmrg fi 34267914d74bSmrg 3427e169010aSmrg # Check to see that the pipe works correctly. 3428e169010aSmrg pipe_works=no 34297914d74bSmrg 3430e169010aSmrg rm -f conftest* 3431e169010aSmrg cat > conftest.$ac_ext <<_LT_EOF 3432e169010aSmrg#ifdef __cplusplus 3433e169010aSmrgextern "C" { 3434e169010aSmrg#endif 3435e169010aSmrgchar nm_test_var; 3436e169010aSmrgvoid nm_test_func(void); 3437e169010aSmrgvoid nm_test_func(void){} 3438e169010aSmrg#ifdef __cplusplus 3439e169010aSmrg} 3440e169010aSmrg#endif 3441e169010aSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 3442e169010aSmrg_LT_EOF 34437914d74bSmrg 3444e169010aSmrg if AC_TRY_EVAL(ac_compile); then 3445e169010aSmrg # Now try to grab the symbols. 3446e169010aSmrg nlist=conftest.nm 3447e169010aSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 3448e169010aSmrg # Try sorting and uniquifying the output. 3449e169010aSmrg if sort "$nlist" | uniq > "$nlist"T; then 3450e169010aSmrg mv -f "$nlist"T "$nlist" 3451e169010aSmrg else 3452e169010aSmrg rm -f "$nlist"T 3453e169010aSmrg fi 34547914d74bSmrg 3455e169010aSmrg # Make sure that we snagged all the symbols we need. 3456e169010aSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3457e169010aSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3458e169010aSmrg cat <<_LT_EOF > conftest.$ac_ext 3459e169010aSmrg#ifdef __cplusplus 3460e169010aSmrgextern "C" { 3461e169010aSmrg#endif 34627914d74bSmrg 3463e169010aSmrg_LT_EOF 3464e169010aSmrg # Now generate the symbol file. 3465e169010aSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 34667914d74bSmrg 3467e169010aSmrg cat <<_LT_EOF >> conftest.$ac_ext 34687914d74bSmrg 3469e169010aSmrg/* The mapping between symbol names and symbols. */ 3470e169010aSmrgconst struct { 3471e169010aSmrg const char *name; 3472e169010aSmrg void *address; 3473e169010aSmrg} 3474e169010aSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3475e169010aSmrg{ 3476e169010aSmrg { "@PROGRAM@", (void *) 0 }, 3477e169010aSmrg_LT_EOF 3478e169010aSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3479e169010aSmrg cat <<\_LT_EOF >> conftest.$ac_ext 3480e169010aSmrg {0, (void *) 0} 3481e169010aSmrg}; 34827914d74bSmrg 3483e169010aSmrg/* This works around a problem in FreeBSD linker */ 3484e169010aSmrg#ifdef FREEBSD_WORKAROUND 3485e169010aSmrgstatic const void *lt_preloaded_setup() { 3486e169010aSmrg return lt__PROGRAM__LTX_preloaded_symbols; 3487e169010aSmrg} 3488e169010aSmrg#endif 34897914d74bSmrg 3490e169010aSmrg#ifdef __cplusplus 3491e169010aSmrg} 3492e169010aSmrg#endif 3493e169010aSmrg_LT_EOF 3494e169010aSmrg # Now try linking the two files. 3495e169010aSmrg mv conftest.$ac_objext conftstm.$ac_objext 3496e169010aSmrg lt_save_LIBS="$LIBS" 3497e169010aSmrg lt_save_CFLAGS="$CFLAGS" 3498e169010aSmrg LIBS="conftstm.$ac_objext" 3499e169010aSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3500e169010aSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3501e169010aSmrg pipe_works=yes 3502e169010aSmrg fi 3503e169010aSmrg LIBS="$lt_save_LIBS" 3504e169010aSmrg CFLAGS="$lt_save_CFLAGS" 3505e169010aSmrg else 3506e169010aSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 35077914d74bSmrg fi 3508e169010aSmrg else 3509e169010aSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3510e169010aSmrg fi 3511e169010aSmrg else 3512e169010aSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3513e169010aSmrg fi 3514e169010aSmrg else 3515e169010aSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3516e169010aSmrg cat conftest.$ac_ext >&5 3517e169010aSmrg fi 3518e169010aSmrg rm -rf conftest* conftst* 35197914d74bSmrg 3520e169010aSmrg # Do not use the global_symbol_pipe unless it works. 3521e169010aSmrg if test "$pipe_works" = yes; then 3522e169010aSmrg break 3523e169010aSmrg else 3524e169010aSmrg lt_cv_sys_global_symbol_pipe= 3525e169010aSmrg fi 3526e169010aSmrgdone 3527e169010aSmrg]) 3528e169010aSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3529e169010aSmrg lt_cv_sys_global_symbol_to_cdecl= 3530e169010aSmrgfi 3531e169010aSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3532e169010aSmrg AC_MSG_RESULT(failed) 3533e169010aSmrgelse 3534e169010aSmrg AC_MSG_RESULT(ok) 3535e169010aSmrgfi 35367914d74bSmrg 3537e169010aSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3538e169010aSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 3539e169010aSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3540e169010aSmrg [Transform the output of nm in a proper C declaration]) 3541e169010aSmrg_LT_DECL([global_symbol_to_c_name_address], 3542e169010aSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3543e169010aSmrg [Transform the output of nm in a C name address pair]) 3544e169010aSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3545e169010aSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3546e169010aSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3547e169010aSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 35487914d74bSmrg 35497914d74bSmrg 3550e169010aSmrg# _LT_COMPILER_PIC([TAGNAME]) 3551e169010aSmrg# --------------------------- 3552e169010aSmrgm4_defun([_LT_COMPILER_PIC], 3553e169010aSmrg[m4_require([_LT_TAG_COMPILER])dnl 3554e169010aSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3555e169010aSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3556e169010aSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 35577914d74bSmrg 3558e169010aSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 3559e169010aSmrgm4_if([$1], [CXX], [ 3560e169010aSmrg # C++ specific cases for pic, static, wl, etc. 3561e169010aSmrg if test "$GXX" = yes; then 3562e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3563e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 35647914d74bSmrg 3565e169010aSmrg case $host_os in 3566e169010aSmrg aix*) 3567e169010aSmrg # All AIX code is PIC. 3568e169010aSmrg if test "$host_cpu" = ia64; then 3569e169010aSmrg # AIX 5 now supports IA64 processor 3570e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 35717914d74bSmrg fi 3572e169010aSmrg ;; 35737914d74bSmrg 3574e169010aSmrg amigaos*) 3575e169010aSmrg case $host_cpu in 3576e169010aSmrg powerpc) 3577e169010aSmrg # see comment about AmigaOS4 .so support 3578e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3579e169010aSmrg ;; 3580e169010aSmrg m68k) 3581e169010aSmrg # FIXME: we need at least 68020 code to build shared libraries, but 3582e169010aSmrg # adding the `-m68020' flag to GCC prevents building anything better, 3583e169010aSmrg # like `-m68040'. 3584e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3585e169010aSmrg ;; 3586e169010aSmrg esac 3587e169010aSmrg ;; 35887914d74bSmrg 3589e169010aSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3590e169010aSmrg # PIC is the default for these OSes. 35917914d74bSmrg ;; 3592e169010aSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3593e169010aSmrg # This hack is so that the source file can tell whether it is being 3594e169010aSmrg # built for inclusion in a dll (and should export symbols for example). 3595e169010aSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3596e169010aSmrg # (--disable-auto-import) libraries 3597e169010aSmrg m4_if([$1], [GCJ], [], 3598e169010aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3599e169010aSmrg ;; 3600e169010aSmrg darwin* | rhapsody*) 3601e169010aSmrg # PIC is the default on this platform 3602e169010aSmrg # Common symbols not allowed in MH_DYLIB files 3603e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3604e169010aSmrg ;; 3605e169010aSmrg *djgpp*) 3606e169010aSmrg # DJGPP does not support shared libraries at all 3607e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3608e169010aSmrg ;; 3609e169010aSmrg interix[[3-9]]*) 3610e169010aSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3611e169010aSmrg # Instead, we relocate shared libraries at runtime. 3612e169010aSmrg ;; 3613e169010aSmrg sysv4*MP*) 3614e169010aSmrg if test -d /usr/nec; then 3615e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3616e169010aSmrg fi 3617e169010aSmrg ;; 3618e169010aSmrg hpux*) 3619e169010aSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3620e169010aSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3621e169010aSmrg # sets the default TLS model and affects inlining. 3622e169010aSmrg case $host_cpu in 3623e169010aSmrg hppa*64*) 36247914d74bSmrg ;; 36257914d74bSmrg *) 3626e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 36277914d74bSmrg ;; 36287914d74bSmrg esac 3629e169010aSmrg ;; 3630e169010aSmrg *qnx* | *nto*) 3631e169010aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3632e169010aSmrg # it will coredump. 3633e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3634e169010aSmrg ;; 3635e169010aSmrg *) 3636e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 36377914d74bSmrg ;; 36387914d74bSmrg esac 36397914d74bSmrg else 3640e169010aSmrg case $host_os in 3641e169010aSmrg aix[[4-9]]*) 3642e169010aSmrg # All AIX code is PIC. 3643e169010aSmrg if test "$host_cpu" = ia64; then 3644e169010aSmrg # AIX 5 now supports IA64 processor 3645e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3646e169010aSmrg else 3647e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3648e169010aSmrg fi 3649e169010aSmrg ;; 3650e169010aSmrg chorus*) 3651e169010aSmrg case $cc_basename in 3652e169010aSmrg cxch68*) 3653e169010aSmrg # Green Hills C++ Compiler 3654e169010aSmrg # _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" 3655e169010aSmrg ;; 3656e169010aSmrg esac 3657e169010aSmrg ;; 3658e169010aSmrg dgux*) 3659e169010aSmrg case $cc_basename in 3660e169010aSmrg ec++*) 3661e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3662e169010aSmrg ;; 3663e169010aSmrg ghcx*) 3664e169010aSmrg # Green Hills C++ Compiler 3665e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3666e169010aSmrg ;; 3667e169010aSmrg *) 3668e169010aSmrg ;; 3669e169010aSmrg esac 3670e169010aSmrg ;; 3671e169010aSmrg freebsd* | dragonfly*) 3672e169010aSmrg # FreeBSD uses GNU C++ 3673e169010aSmrg ;; 3674e169010aSmrg hpux9* | hpux10* | hpux11*) 3675e169010aSmrg case $cc_basename in 3676e169010aSmrg CC*) 3677e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3678e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3679e169010aSmrg if test "$host_cpu" != ia64; then 3680e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3681e169010aSmrg fi 3682e169010aSmrg ;; 3683e169010aSmrg aCC*) 3684e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3685e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3686e169010aSmrg case $host_cpu in 3687e169010aSmrg hppa*64*|ia64*) 3688e169010aSmrg # +Z the default 3689e169010aSmrg ;; 3690e169010aSmrg *) 3691e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3692e169010aSmrg ;; 3693e169010aSmrg esac 3694e169010aSmrg ;; 3695e169010aSmrg *) 3696e169010aSmrg ;; 3697e169010aSmrg esac 3698e169010aSmrg ;; 3699e169010aSmrg interix*) 3700e169010aSmrg # This is c89, which is MS Visual C++ (no shared libs) 3701e169010aSmrg # Anyone wants to do a port? 3702e169010aSmrg ;; 3703e169010aSmrg irix5* | irix6* | nonstopux*) 3704e169010aSmrg case $cc_basename in 3705e169010aSmrg CC*) 3706e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3707e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3708e169010aSmrg # CC pic flag -KPIC is the default. 3709e169010aSmrg ;; 3710e169010aSmrg *) 3711e169010aSmrg ;; 3712e169010aSmrg esac 3713e169010aSmrg ;; 3714e169010aSmrg linux* | k*bsd*-gnu) 3715e169010aSmrg case $cc_basename in 3716e169010aSmrg KCC*) 3717e169010aSmrg # KAI C++ Compiler 3718e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3719e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3720e169010aSmrg ;; 3721e169010aSmrg ecpc* ) 3722e169010aSmrg # old Intel C++ for x86_64 which still supported -KPIC. 3723e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3724e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3725e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3726e169010aSmrg ;; 3727e169010aSmrg icpc* ) 3728e169010aSmrg # Intel C++, used to be incompatible with GCC. 3729e169010aSmrg # ICC 10 doesn't accept -KPIC any more. 3730e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3731e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3732e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3733e169010aSmrg ;; 3734e169010aSmrg pgCC* | pgcpp*) 3735e169010aSmrg # Portland Group C++ compiler 3736e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3737e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 3738e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3739e169010aSmrg ;; 3740e169010aSmrg cxx*) 3741e169010aSmrg # Compaq C++ 3742e169010aSmrg # Make sure the PIC flag is empty. It appears that all Alpha 3743e169010aSmrg # Linux and Compaq Tru64 Unix objects are PIC. 3744e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3745e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3746e169010aSmrg ;; 3747e169010aSmrg xlc* | xlC*) 3748e169010aSmrg # IBM XL 8.0 on PPC 3749e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3750e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 3751e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 3752e169010aSmrg ;; 3753e169010aSmrg *) 3754e169010aSmrg case `$CC -V 2>&1 | sed 5q` in 3755e169010aSmrg *Sun\ C*) 3756e169010aSmrg # Sun C++ 5.9 3757e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3758e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3759e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3760e169010aSmrg ;; 3761e169010aSmrg esac 3762e169010aSmrg ;; 3763e169010aSmrg esac 3764e169010aSmrg ;; 3765e169010aSmrg lynxos*) 3766e169010aSmrg ;; 3767e169010aSmrg m88k*) 3768e169010aSmrg ;; 3769e169010aSmrg mvs*) 3770e169010aSmrg case $cc_basename in 3771e169010aSmrg cxx*) 3772e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 3773e169010aSmrg ;; 3774e169010aSmrg *) 3775e169010aSmrg ;; 3776e169010aSmrg esac 3777e169010aSmrg ;; 3778e169010aSmrg netbsd*) 3779e169010aSmrg ;; 3780e169010aSmrg *qnx* | *nto*) 3781e169010aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3782e169010aSmrg # it will coredump. 3783e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3784e169010aSmrg ;; 3785e169010aSmrg osf3* | osf4* | osf5*) 3786e169010aSmrg case $cc_basename in 3787e169010aSmrg KCC*) 3788e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3789e169010aSmrg ;; 3790e169010aSmrg RCC*) 3791e169010aSmrg # Rational C++ 2.4.1 3792e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3793e169010aSmrg ;; 3794e169010aSmrg cxx*) 3795e169010aSmrg # Digital/Compaq C++ 3796e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3797e169010aSmrg # Make sure the PIC flag is empty. It appears that all Alpha 3798e169010aSmrg # Linux and Compaq Tru64 Unix objects are PIC. 3799e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3800e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3801e169010aSmrg ;; 3802e169010aSmrg *) 3803e169010aSmrg ;; 3804e169010aSmrg esac 3805e169010aSmrg ;; 3806e169010aSmrg psos*) 3807e169010aSmrg ;; 3808e169010aSmrg solaris*) 3809e169010aSmrg case $cc_basename in 3810e169010aSmrg CC*) 3811e169010aSmrg # Sun C++ 4.2, 5.x and Centerline C++ 3812e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3813e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3814e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3815e169010aSmrg ;; 3816e169010aSmrg gcx*) 3817e169010aSmrg # Green Hills C++ Compiler 3818e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 3819e169010aSmrg ;; 3820e169010aSmrg *) 3821e169010aSmrg ;; 3822e169010aSmrg esac 3823e169010aSmrg ;; 3824e169010aSmrg sunos4*) 3825e169010aSmrg case $cc_basename in 3826e169010aSmrg CC*) 3827e169010aSmrg # Sun C++ 4.x 3828e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3829e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3830e169010aSmrg ;; 3831e169010aSmrg lcc*) 3832e169010aSmrg # Lucid 3833e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3834e169010aSmrg ;; 3835e169010aSmrg *) 3836e169010aSmrg ;; 3837e169010aSmrg esac 3838e169010aSmrg ;; 3839e169010aSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 3840e169010aSmrg case $cc_basename in 3841e169010aSmrg CC*) 3842e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3843e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3844e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3845e169010aSmrg ;; 3846e169010aSmrg esac 3847e169010aSmrg ;; 3848e169010aSmrg tandem*) 3849e169010aSmrg case $cc_basename in 3850e169010aSmrg NCC*) 3851e169010aSmrg # NonStop-UX NCC 3.20 3852e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3853e169010aSmrg ;; 3854e169010aSmrg *) 3855e169010aSmrg ;; 3856e169010aSmrg esac 3857e169010aSmrg ;; 3858e169010aSmrg vxworks*) 3859e169010aSmrg ;; 3860e169010aSmrg *) 3861e169010aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3862e169010aSmrg ;; 3863e169010aSmrg esac 3864e169010aSmrg fi 3865e169010aSmrg], 3866e169010aSmrg[ 3867e169010aSmrg if test "$GCC" = yes; then 3868e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3869e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 38707914d74bSmrg 3871e169010aSmrg case $host_os in 3872e169010aSmrg aix*) 3873e169010aSmrg # All AIX code is PIC. 3874e169010aSmrg if test "$host_cpu" = ia64; then 3875e169010aSmrg # AIX 5 now supports IA64 processor 3876e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3877e169010aSmrg fi 3878e169010aSmrg ;; 38797914d74bSmrg 3880e169010aSmrg amigaos*) 3881e169010aSmrg case $host_cpu in 3882e169010aSmrg powerpc) 3883e169010aSmrg # see comment about AmigaOS4 .so support 3884e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3885e169010aSmrg ;; 3886e169010aSmrg m68k) 3887e169010aSmrg # FIXME: we need at least 68020 code to build shared libraries, but 3888e169010aSmrg # adding the `-m68020' flag to GCC prevents building anything better, 3889e169010aSmrg # like `-m68040'. 3890e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3891e169010aSmrg ;; 3892e169010aSmrg esac 3893e169010aSmrg ;; 38947914d74bSmrg 3895e169010aSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3896e169010aSmrg # PIC is the default for these OSes. 3897e169010aSmrg ;; 38987914d74bSmrg 3899e169010aSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3900e169010aSmrg # This hack is so that the source file can tell whether it is being 3901e169010aSmrg # built for inclusion in a dll (and should export symbols for example). 3902e169010aSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3903e169010aSmrg # (--disable-auto-import) libraries 3904e169010aSmrg m4_if([$1], [GCJ], [], 3905e169010aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3906e169010aSmrg ;; 39077914d74bSmrg 3908e169010aSmrg darwin* | rhapsody*) 3909e169010aSmrg # PIC is the default on this platform 3910e169010aSmrg # Common symbols not allowed in MH_DYLIB files 3911e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3912e169010aSmrg ;; 39137914d74bSmrg 3914e169010aSmrg hpux*) 3915e169010aSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3916e169010aSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3917e169010aSmrg # sets the default TLS model and affects inlining. 3918e169010aSmrg case $host_cpu in 3919e169010aSmrg hppa*64*) 3920e169010aSmrg # +Z the default 3921e169010aSmrg ;; 3922e169010aSmrg *) 3923e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3924e169010aSmrg ;; 3925e169010aSmrg esac 3926e169010aSmrg ;; 39277914d74bSmrg 3928e169010aSmrg interix[[3-9]]*) 3929e169010aSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3930e169010aSmrg # Instead, we relocate shared libraries at runtime. 3931e169010aSmrg ;; 39327914d74bSmrg 3933e169010aSmrg msdosdjgpp*) 3934e169010aSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 3935e169010aSmrg # on systems that don't support them. 3936e169010aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3937e169010aSmrg enable_shared=no 3938e169010aSmrg ;; 39397914d74bSmrg 3940e169010aSmrg *nto* | *qnx*) 3941e169010aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3942e169010aSmrg # it will coredump. 3943e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3944e169010aSmrg ;; 39457914d74bSmrg 3946e169010aSmrg sysv4*MP*) 3947e169010aSmrg if test -d /usr/nec; then 3948e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39497914d74bSmrg fi 3950e169010aSmrg ;; 39517914d74bSmrg 3952e169010aSmrg *) 3953e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3954e169010aSmrg ;; 3955e169010aSmrg esac 39567914d74bSmrg else 3957e169010aSmrg # PORTME Check for flag to pass linker flags through the system compiler. 3958e169010aSmrg case $host_os in 3959e169010aSmrg aix*) 3960e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3961e169010aSmrg if test "$host_cpu" = ia64; then 3962e169010aSmrg # AIX 5 now supports IA64 processor 3963e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3964e169010aSmrg else 3965e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3966e169010aSmrg fi 3967e169010aSmrg ;; 39687914d74bSmrg 3969e169010aSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3970e169010aSmrg # This hack is so that the source file can tell whether it is being 3971e169010aSmrg # built for inclusion in a dll (and should export symbols for example). 3972e169010aSmrg m4_if([$1], [GCJ], [], 3973e169010aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3974e169010aSmrg ;; 39757914d74bSmrg 3976e169010aSmrg hpux9* | hpux10* | hpux11*) 3977e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3978e169010aSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 3979e169010aSmrg # not for PA HP-UX. 3980e169010aSmrg case $host_cpu in 3981e169010aSmrg hppa*64*|ia64*) 3982e169010aSmrg # +Z the default 3983e169010aSmrg ;; 3984e169010aSmrg *) 3985e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3986e169010aSmrg ;; 3987e169010aSmrg esac 3988e169010aSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 3989e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3990e169010aSmrg ;; 39917914d74bSmrg 3992e169010aSmrg irix5* | irix6* | nonstopux*) 3993e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3994e169010aSmrg # PIC (with -KPIC) is the default. 3995e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3996e169010aSmrg ;; 39977914d74bSmrg 3998e169010aSmrg linux* | k*bsd*-gnu) 3999e169010aSmrg case $cc_basename in 4000e169010aSmrg # old Intel for x86_64 which still supported -KPIC. 4001e169010aSmrg ecc*) 4002e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4003e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4004e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4005e169010aSmrg ;; 4006e169010aSmrg # icc used to be incompatible with GCC. 4007e169010aSmrg # ICC 10 doesn't accept -KPIC any more. 4008e169010aSmrg icc* | ifort*) 4009e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4010e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4011e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4012e169010aSmrg ;; 4013e169010aSmrg # Lahey Fortran 8.1. 4014e169010aSmrg lf95*) 4015e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4016e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4017e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4018e169010aSmrg ;; 4019e169010aSmrg pgcc* | pgf77* | pgf90* | pgf95*) 4020e169010aSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 4021e169010aSmrg # which looks to be a dead project) 4022e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4023e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4024e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4025e169010aSmrg ;; 4026e169010aSmrg ccc*) 4027e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4028e169010aSmrg # All Alpha code is PIC. 4029e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4030e169010aSmrg ;; 4031e169010aSmrg xl*) 4032e169010aSmrg # IBM XL C 8.0/Fortran 10.1 on PPC 4033e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4034e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4035e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4036e169010aSmrg ;; 4037e169010aSmrg *) 4038e169010aSmrg case `$CC -V 2>&1 | sed 5q` in 4039e169010aSmrg *Sun\ C*) 4040e169010aSmrg # Sun C 5.9 4041e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4042e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4043e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4044e169010aSmrg ;; 4045e169010aSmrg *Sun\ F*) 4046e169010aSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4047e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4048e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4049e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4050e169010aSmrg ;; 4051e169010aSmrg esac 4052e169010aSmrg ;; 4053e169010aSmrg esac 4054e169010aSmrg ;; 40557914d74bSmrg 4056e169010aSmrg newsos6) 4057e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4058e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4059e169010aSmrg ;; 40607914d74bSmrg 4061e169010aSmrg *nto* | *qnx*) 4062e169010aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4063e169010aSmrg # it will coredump. 4064e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4065e169010aSmrg ;; 40667914d74bSmrg 4067e169010aSmrg osf3* | osf4* | osf5*) 4068e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4069e169010aSmrg # All OSF/1 code is PIC. 4070e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4071e169010aSmrg ;; 40727914d74bSmrg 4073e169010aSmrg rdos*) 4074e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4075e169010aSmrg ;; 40767914d74bSmrg 4077e169010aSmrg solaris*) 4078e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4079e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4080e169010aSmrg case $cc_basename in 4081e169010aSmrg f77* | f90* | f95*) 4082e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4083e169010aSmrg *) 4084e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4085e169010aSmrg esac 4086e169010aSmrg ;; 40877914d74bSmrg 4088e169010aSmrg sunos4*) 4089e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4090e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4091e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4092e169010aSmrg ;; 40937914d74bSmrg 4094e169010aSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4095e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4096e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4097e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4098e169010aSmrg ;; 40997914d74bSmrg 4100e169010aSmrg sysv4*MP*) 4101e169010aSmrg if test -d /usr/nec ;then 4102e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4103e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4104e169010aSmrg fi 4105e169010aSmrg ;; 41067914d74bSmrg 4107e169010aSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4108e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4109e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4110e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4111e169010aSmrg ;; 41127914d74bSmrg 4113e169010aSmrg unicos*) 4114e169010aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4115e169010aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4116e169010aSmrg ;; 41177914d74bSmrg 4118e169010aSmrg uts4*) 4119e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4120e169010aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4121e169010aSmrg ;; 41227914d74bSmrg 4123e169010aSmrg *) 4124e169010aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4125e169010aSmrg ;; 4126e169010aSmrg esac 41277914d74bSmrg fi 4128e169010aSmrg]) 4129e169010aSmrgcase $host_os in 4130e169010aSmrg # For platforms which do not support PIC, -DPIC is meaningless: 4131e169010aSmrg *djgpp*) 4132e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4133e169010aSmrg ;; 4134e169010aSmrg *) 4135e169010aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 41367914d74bSmrg ;; 41377914d74bSmrgesac 4138e169010aSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4139e169010aSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4140e169010aSmrg [How to pass a linker flag through the compiler]) 41417914d74bSmrg 4142e169010aSmrg# 4143e169010aSmrg# Check to make sure the PIC flag actually works. 4144e169010aSmrg# 4145e169010aSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4146e169010aSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4147e169010aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4148e169010aSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4149e169010aSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4150e169010aSmrg "" | " "*) ;; 4151e169010aSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4152e169010aSmrg esac], 4153e169010aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4154e169010aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4155e169010aSmrgfi 4156e169010aSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4157e169010aSmrg [Additional compiler flags for building library objects]) 41587914d74bSmrg 4159e169010aSmrg# 4160e169010aSmrg# Check to make sure the static flag actually works. 4161e169010aSmrg# 4162e169010aSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4163e169010aSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4164e169010aSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4165e169010aSmrg $lt_tmp_static_flag, 4166e169010aSmrg [], 4167e169010aSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4168e169010aSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4169e169010aSmrg [Compiler flag to prevent dynamic linking]) 4170e169010aSmrg])# _LT_COMPILER_PIC 41717914d74bSmrg 41727914d74bSmrg 4173e169010aSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4174e169010aSmrg# ---------------------------- 4175e169010aSmrg# See if the linker supports building shared libraries. 4176e169010aSmrgm4_defun([_LT_LINKER_SHLIBS], 4177e169010aSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4178e169010aSmrgAC_REQUIRE([LT_PATH_NM])dnl 4179e169010aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4180e169010aSmrgm4_require([_LT_DECL_EGREP])dnl 4181e169010aSmrgm4_require([_LT_DECL_SED])dnl 4182e169010aSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4183e169010aSmrgm4_require([_LT_TAG_COMPILER])dnl 4184e169010aSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4185e169010aSmrgm4_if([$1], [CXX], [ 4186e169010aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4187e169010aSmrg case $host_os in 4188e169010aSmrg aix[[4-9]]*) 4189e169010aSmrg # If we're using GNU nm, then we don't want the "-C" option. 4190e169010aSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4191e169010aSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4192e169010aSmrg _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' 4193e169010aSmrg else 4194e169010aSmrg _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' 4195e169010aSmrg fi 4196e169010aSmrg ;; 4197e169010aSmrg pw32*) 4198e169010aSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4199e169010aSmrg ;; 4200e169010aSmrg cygwin* | mingw* | cegcc*) 4201e169010aSmrg _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' 4202e169010aSmrg ;; 4203e169010aSmrg *) 4204e169010aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4205e169010aSmrg ;; 4206e169010aSmrg esac 4207e169010aSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4208e169010aSmrg], [ 4209e169010aSmrg runpath_var= 4210e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4211e169010aSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4212e169010aSmrg _LT_TAGVAR(archive_cmds, $1)= 4213e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4214e169010aSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4215e169010aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4216e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4217e169010aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4218e169010aSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4219e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4220e169010aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4221e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4222e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4223e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4224e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4225e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4226e169010aSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4227e169010aSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4228e169010aSmrg _LT_TAGVAR(module_cmds, $1)= 4229e169010aSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 4230e169010aSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4231e169010aSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4232e169010aSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4233e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4234e169010aSmrg # include_expsyms should be a list of space-separated symbols to be *always* 4235e169010aSmrg # included in the symbol list 4236e169010aSmrg _LT_TAGVAR(include_expsyms, $1)= 4237e169010aSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 4238e169010aSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4239e169010aSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4240e169010aSmrg # as well as any symbol that contains `d'. 4241e169010aSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4242e169010aSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4243e169010aSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 4244e169010aSmrg # the symbol is explicitly referenced. Since portable code cannot 4245e169010aSmrg # rely on this symbol name, it's probably fine to never include it in 4246e169010aSmrg # preloaded symbol tables. 4247e169010aSmrg # Exclude shared library initialization/finalization symbols. 4248e169010aSmrgdnl Note also adjust exclude_expsyms for C++ above. 4249e169010aSmrg extract_expsyms_cmds= 42507914d74bSmrg 4251e169010aSmrg case $host_os in 4252e169010aSmrg cygwin* | mingw* | pw32* | cegcc*) 4253e169010aSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4254e169010aSmrg # When not using gcc, we currently assume that we are using 4255e169010aSmrg # Microsoft Visual C++. 4256e169010aSmrg if test "$GCC" != yes; then 4257e169010aSmrg with_gnu_ld=no 4258e169010aSmrg fi 4259e169010aSmrg ;; 4260e169010aSmrg interix*) 4261e169010aSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4262e169010aSmrg with_gnu_ld=yes 4263e169010aSmrg ;; 4264e169010aSmrg openbsd*) 4265e169010aSmrg with_gnu_ld=no 4266e169010aSmrg ;; 4267e169010aSmrg esac 42687914d74bSmrg 4269e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 42707914d74bSmrg if test "$with_gnu_ld" = yes; then 42717914d74bSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 42727914d74bSmrg wlarc='${wl}' 42737914d74bSmrg 4274e169010aSmrg # Set some defaults for GNU ld with shared library support. These 4275e169010aSmrg # are reset later if shared libraries are not supported. Putting them 4276e169010aSmrg # here allows them to be overridden if necessary. 4277e169010aSmrg runpath_var=LD_RUN_PATH 4278e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4279e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 42807914d74bSmrg # ancient GNU ld didn't support --whole-archive et. al. 4281e169010aSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4282e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 42837914d74bSmrg else 4284e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 42857914d74bSmrg fi 4286e169010aSmrg supports_anon_versioning=no 4287e169010aSmrg case `$LD -v 2>&1` in 4288e169010aSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4289e169010aSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4290e169010aSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4291e169010aSmrg *\ 2.11.*) ;; # other 2.11 versions 4292e169010aSmrg *) supports_anon_versioning=yes ;; 4293e169010aSmrg esac 42947914d74bSmrg 4295e169010aSmrg # See if GNU ld supports shared libraries. 4296e169010aSmrg case $host_os in 4297e169010aSmrg aix[[3-9]]*) 4298e169010aSmrg # On AIX/PPC, the GNU linker is very broken 4299e169010aSmrg if test "$host_cpu" != ia64; then 4300e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4301e169010aSmrg cat <<_LT_EOF 1>&2 43027914d74bSmrg 4303e169010aSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 4304e169010aSmrg*** to be unable to reliably create shared libraries on AIX. 4305e169010aSmrg*** Therefore, libtool is disabling shared libraries support. If you 4306e169010aSmrg*** really care for shared libraries, you may want to modify your PATH 4307e169010aSmrg*** so that a non-GNU linker is found, and then restart. 43087914d74bSmrg 4309e169010aSmrg_LT_EOF 4310e169010aSmrg fi 4311e169010aSmrg ;; 4312e169010aSmrg 4313e169010aSmrg amigaos*) 4314e169010aSmrg case $host_cpu in 4315e169010aSmrg powerpc) 4316e169010aSmrg # see comment about AmigaOS4 .so support 4317e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4318e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4319e169010aSmrg ;; 4320e169010aSmrg m68k) 4321e169010aSmrg _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)' 4322e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4323e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4324e169010aSmrg ;; 43257914d74bSmrg esac 4326e169010aSmrg ;; 43277914d74bSmrg 4328e169010aSmrg beos*) 4329e169010aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4330e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4331e169010aSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4332e169010aSmrg # support --undefined. This deserves some investigation. FIXME 4333e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4334e169010aSmrg else 4335e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4336e169010aSmrg fi 4337e169010aSmrg ;; 43387914d74bSmrg 4339e169010aSmrg cygwin* | mingw* | pw32* | cegcc*) 4340e169010aSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4341e169010aSmrg # as there is no search path for DLLs. 4342e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4343e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4344e169010aSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4345e169010aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4346e169010aSmrg _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' 4347e169010aSmrg 4348e169010aSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4349e169010aSmrg _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' 4350e169010aSmrg # If the export-symbols file already is a .def file (1st line 4351e169010aSmrg # is EXPORTS), use it as is; otherwise, prepend... 4352e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4353e169010aSmrg cp $export_symbols $output_objdir/$soname.def; 4354e169010aSmrg else 4355e169010aSmrg echo EXPORTS > $output_objdir/$soname.def; 4356e169010aSmrg cat $export_symbols >> $output_objdir/$soname.def; 4357e169010aSmrg fi~ 4358e169010aSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4359e169010aSmrg else 4360e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4361e169010aSmrg fi 4362e169010aSmrg ;; 43637914d74bSmrg 4364e169010aSmrg interix[[3-9]]*) 4365e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4366e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4367e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4368e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4369e169010aSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4370e169010aSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4371e169010aSmrg # default) and relocated if they conflict, which is a slow very memory 4372e169010aSmrg # consuming and fragmenting process. To avoid this, we pick a random, 4373e169010aSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4374e169010aSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4375e169010aSmrg _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' 4376e169010aSmrg _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' 4377e169010aSmrg ;; 43787914d74bSmrg 4379e169010aSmrg gnu* | linux* | tpf* | k*bsd*-gnu) 4380e169010aSmrg tmp_diet=no 4381e169010aSmrg if test "$host_os" = linux-dietlibc; then 4382e169010aSmrg case $cc_basename in 4383e169010aSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4384e169010aSmrg esac 43857914d74bSmrg fi 4386e169010aSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4387e169010aSmrg && test "$tmp_diet" = no 4388e169010aSmrg then 4389e169010aSmrg tmp_addflag= 4390e169010aSmrg tmp_sharedflag='-shared' 4391e169010aSmrg case $cc_basename,$host_cpu in 4392e169010aSmrg pgcc*) # Portland Group C compiler 4393e169010aSmrg _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' 4394e169010aSmrg tmp_addflag=' $pic_flag' 4395e169010aSmrg ;; 4396e169010aSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 4397e169010aSmrg _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' 4398e169010aSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 4399e169010aSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4400e169010aSmrg tmp_addflag=' -i_dynamic' ;; 4401e169010aSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4402e169010aSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4403e169010aSmrg ifc* | ifort*) # Intel Fortran compiler 4404e169010aSmrg tmp_addflag=' -nofor_main' ;; 4405e169010aSmrg lf95*) # Lahey Fortran 8.1 4406e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4407e169010aSmrg tmp_sharedflag='--shared' ;; 4408e169010aSmrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4409e169010aSmrg tmp_sharedflag='-qmkshrobj' 4410e169010aSmrg tmp_addflag= ;; 4411e169010aSmrg esac 4412e169010aSmrg case `$CC -V 2>&1 | sed 5q` in 4413e169010aSmrg *Sun\ C*) # Sun C 5.9 4414e169010aSmrg _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' 4415e169010aSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4416e169010aSmrg tmp_sharedflag='-G' ;; 4417e169010aSmrg *Sun\ F*) # Sun Fortran 8.3 4418e169010aSmrg tmp_sharedflag='-G' ;; 4419e169010aSmrg esac 4420e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4421e169010aSmrg 4422e169010aSmrg if test "x$supports_anon_versioning" = xyes; then 4423e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4424e169010aSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4425e169010aSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4426e169010aSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4427e169010aSmrg fi 4428e169010aSmrg 4429e169010aSmrg case $cc_basename in 4430e169010aSmrg xlf*) 4431e169010aSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4432e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4433e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4434e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4435e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 4436e169010aSmrg if test "x$supports_anon_versioning" = xyes; then 4437e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4438e169010aSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4439e169010aSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4440e169010aSmrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4441e169010aSmrg fi 4442e169010aSmrg ;; 4443e169010aSmrg esac 44447914d74bSmrg else 4445e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 44467914d74bSmrg fi 4447e169010aSmrg ;; 44487914d74bSmrg 4449e169010aSmrg netbsd*) 4450e169010aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4451e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4452e169010aSmrg wlarc= 44537914d74bSmrg else 4454e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4455e169010aSmrg _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' 44567914d74bSmrg fi 4457e169010aSmrg ;; 44587914d74bSmrg 4459e169010aSmrg solaris*) 4460e169010aSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4461e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4462e169010aSmrg cat <<_LT_EOF 1>&2 44637914d74bSmrg 4464e169010aSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4465e169010aSmrg*** create shared libraries on Solaris systems. Therefore, libtool 4466e169010aSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4467e169010aSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 4468e169010aSmrg*** your PATH or compiler configuration so that the native linker is 4469e169010aSmrg*** used, and then restart. 44707914d74bSmrg 4471e169010aSmrg_LT_EOF 4472e169010aSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4473e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4474e169010aSmrg _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' 44757914d74bSmrg else 4476e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 44777914d74bSmrg fi 4478e169010aSmrg ;; 44797914d74bSmrg 4480e169010aSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4481e169010aSmrg case `$LD -v 2>&1` in 4482e169010aSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4483e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4484e169010aSmrg cat <<_LT_EOF 1>&2 4485e169010aSmrg 4486e169010aSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4487e169010aSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4488e169010aSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4489e169010aSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4490e169010aSmrg*** your PATH or compiler configuration so that the native linker is 4491e169010aSmrg*** used, and then restart. 4492e169010aSmrg 4493e169010aSmrg_LT_EOF 44947914d74bSmrg ;; 4495e169010aSmrg *) 4496e169010aSmrg # For security reasons, it is highly recommended that you always 4497e169010aSmrg # use absolute paths for naming shared libraries, and exclude the 4498e169010aSmrg # DT_RUNPATH tag from executables and libraries. But doing so 4499e169010aSmrg # requires that you compile everything twice, which is a pain. 4500e169010aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4501e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4502e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4503e169010aSmrg _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' 4504e169010aSmrg else 4505e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4506e169010aSmrg fi 45077914d74bSmrg ;; 4508e169010aSmrg esac 45097914d74bSmrg ;; 4510e169010aSmrg 4511e169010aSmrg sunos4*) 4512e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4513e169010aSmrg wlarc= 4514e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4515e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 45167914d74bSmrg ;; 4517e169010aSmrg 45187914d74bSmrg *) 4519e169010aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4520e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4521e169010aSmrg _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' 45227914d74bSmrg else 4523e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 45247914d74bSmrg fi 45257914d74bSmrg ;; 45267914d74bSmrg esac 45277914d74bSmrg 4528e169010aSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4529e169010aSmrg runpath_var= 4530e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4531e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4532e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 45337914d74bSmrg fi 4534e169010aSmrg else 4535e169010aSmrg # PORTME fill in a description of your system's linker (not GNU ld) 4536e169010aSmrg case $host_os in 4537e169010aSmrg aix3*) 4538e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4539e169010aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4540e169010aSmrg _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' 4541e169010aSmrg # Note: this linker hardcodes the directories in LIBPATH if there 4542e169010aSmrg # are no directories specified by -L. 4543e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4544e169010aSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4545e169010aSmrg # Neither direct hardcoding nor static linking is supported with a 4546e169010aSmrg # broken collect2. 4547e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4548e169010aSmrg fi 4549e169010aSmrg ;; 45507914d74bSmrg 4551e169010aSmrg aix[[4-9]]*) 4552e169010aSmrg if test "$host_cpu" = ia64; then 4553e169010aSmrg # On IA64, the linker does run time linking by default, so we don't 4554e169010aSmrg # have to do anything special. 4555e169010aSmrg aix_use_runtimelinking=no 4556e169010aSmrg exp_sym_flag='-Bexport' 4557e169010aSmrg no_entry_flag="" 4558e169010aSmrg else 4559e169010aSmrg # If we're using GNU nm, then we don't want the "-C" option. 4560e169010aSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4561e169010aSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4562e169010aSmrg _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' 45637914d74bSmrg else 4564e169010aSmrg _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' 45657914d74bSmrg fi 4566e169010aSmrg aix_use_runtimelinking=no 4567e169010aSmrg 4568e169010aSmrg # Test if we are trying to use run time linking or normal 4569e169010aSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4570e169010aSmrg # need to do runtime linking. 4571e169010aSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4572e169010aSmrg for ld_flag in $LDFLAGS; do 4573e169010aSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4574e169010aSmrg aix_use_runtimelinking=yes 4575e169010aSmrg break 45767914d74bSmrg fi 4577e169010aSmrg done 45787914d74bSmrg ;; 45797914d74bSmrg esac 45807914d74bSmrg 4581e169010aSmrg exp_sym_flag='-bexport' 4582e169010aSmrg no_entry_flag='-bnoentry' 4583e169010aSmrg fi 45847914d74bSmrg 4585e169010aSmrg # When large executables or shared objects are built, AIX ld can 4586e169010aSmrg # have problems creating the table of contents. If linking a library 4587e169010aSmrg # or program results in "error TOC overflow" add -mminimal-toc to 4588e169010aSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4589e169010aSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 45907914d74bSmrg 4591e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='' 4592e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4593e169010aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4594e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4595e169010aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4596e169010aSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 45977914d74bSmrg 4598e169010aSmrg if test "$GCC" = yes; then 4599e169010aSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4600e169010aSmrg # We only want to do this on AIX 4.2 and lower, the check 4601e169010aSmrg # below for broken collect2 doesn't work under 4.3+ 4602e169010aSmrg collect2name=`${CC} -print-prog-name=collect2` 4603e169010aSmrg if test -f "$collect2name" && 4604e169010aSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4605e169010aSmrg then 4606e169010aSmrg # We have reworked collect2 4607e169010aSmrg : 4608e169010aSmrg else 4609e169010aSmrg # We have old collect2 4610e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4611e169010aSmrg # It fails to find uninstalled libraries when the uninstalled 4612e169010aSmrg # path is not listed in the libpath. Setting hardcode_minus_L 4613e169010aSmrg # to unsupported forces relinking 4614e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4615e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4616e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4617e169010aSmrg fi 4618e169010aSmrg ;; 4619e169010aSmrg esac 4620e169010aSmrg shared_flag='-shared' 4621e169010aSmrg if test "$aix_use_runtimelinking" = yes; then 4622e169010aSmrg shared_flag="$shared_flag "'${wl}-G' 4623e169010aSmrg fi 4624e169010aSmrg else 4625e169010aSmrg # not using gcc 4626e169010aSmrg if test "$host_cpu" = ia64; then 4627e169010aSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4628e169010aSmrg # chokes on -Wl,-G. The following line is correct: 4629e169010aSmrg shared_flag='-G' 4630e169010aSmrg else 4631e169010aSmrg if test "$aix_use_runtimelinking" = yes; then 4632e169010aSmrg shared_flag='${wl}-G' 4633e169010aSmrg else 4634e169010aSmrg shared_flag='${wl}-bM:SRE' 4635e169010aSmrg fi 4636e169010aSmrg fi 4637e169010aSmrg fi 46387914d74bSmrg 4639e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4640e169010aSmrg # It seems that -bexpall does not export symbols beginning with 4641e169010aSmrg # underscore (_), so it is better to generate a list of symbols to export. 4642e169010aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4643e169010aSmrg if test "$aix_use_runtimelinking" = yes; then 4644e169010aSmrg # Warning - without using the other runtime loading flags (-brtl), 4645e169010aSmrg # -berok will link without error, but may produce a broken library. 4646e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 4647e169010aSmrg # Determine the default libpath from the value encoded in an 4648e169010aSmrg # empty executable. 4649e169010aSmrg _LT_SYS_MODULE_PATH_AIX 4650e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4651e169010aSmrg _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" 4652e169010aSmrg else 4653e169010aSmrg if test "$host_cpu" = ia64; then 4654e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4655e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4656e169010aSmrg _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" 46577914d74bSmrg else 4658e169010aSmrg # Determine the default libpath from the value encoded in an 4659e169010aSmrg # empty executable. 4660e169010aSmrg _LT_SYS_MODULE_PATH_AIX 4661e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4662e169010aSmrg # Warning - without using the other run time loading flags, 4663e169010aSmrg # -berok will link without error, but may produce a broken library. 4664e169010aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4665e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 4666e169010aSmrg # Exported symbols can be pulled into shared objects from archives 4667e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 4668e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 4669e169010aSmrg # This is similar to how AIX traditionally builds its shared libraries. 4670e169010aSmrg _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' 46717914d74bSmrg fi 4672e169010aSmrg fi 4673e169010aSmrg ;; 46747914d74bSmrg 4675e169010aSmrg amigaos*) 4676e169010aSmrg case $host_cpu in 4677e169010aSmrg powerpc) 4678e169010aSmrg # see comment about AmigaOS4 .so support 4679e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4680e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4681e169010aSmrg ;; 4682e169010aSmrg m68k) 4683e169010aSmrg _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)' 4684e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4685e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4686e169010aSmrg ;; 4687e169010aSmrg esac 4688e169010aSmrg ;; 46897914d74bSmrg 4690e169010aSmrg bsdi[[45]]*) 4691e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 4692e169010aSmrg ;; 46937914d74bSmrg 4694e169010aSmrg cygwin* | mingw* | pw32* | cegcc*) 4695e169010aSmrg # When not using gcc, we currently assume that we are using 4696e169010aSmrg # Microsoft Visual C++. 4697e169010aSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 4698e169010aSmrg # no search path for DLLs. 4699e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 4700e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4701e169010aSmrg # Tell ltmain to make .lib files, not .a files. 4702e169010aSmrg libext=lib 4703e169010aSmrg # Tell ltmain to make .dll files, not .so files. 4704e169010aSmrg shrext_cmds=".dll" 4705e169010aSmrg # FIXME: Setting linknames here is a bad hack. 4706e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 4707e169010aSmrg # The linker will automatically build a .lib file if we build a DLL. 4708e169010aSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 4709e169010aSmrg # FIXME: Should let the user specify the lib program. 4710e169010aSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 4711e169010aSmrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 4712e169010aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4713e169010aSmrg ;; 47147914d74bSmrg 4715e169010aSmrg darwin* | rhapsody*) 4716e169010aSmrg _LT_DARWIN_LINKER_FEATURES($1) 4717e169010aSmrg ;; 47187914d74bSmrg 4719e169010aSmrg dgux*) 4720e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4721e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4722e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4723e169010aSmrg ;; 47247914d74bSmrg 4725e169010aSmrg freebsd1*) 4726e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4727e169010aSmrg ;; 47287914d74bSmrg 4729e169010aSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 4730e169010aSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 4731e169010aSmrg # does not break anything, and helps significantly (at the cost of a little 4732e169010aSmrg # extra space). 4733e169010aSmrg freebsd2.2*) 4734e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 4735e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4736e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4737e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4738e169010aSmrg ;; 47397914d74bSmrg 4740e169010aSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 4741e169010aSmrg freebsd2*) 4742e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4743e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4744e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4745e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4746e169010aSmrg ;; 47477914d74bSmrg 4748e169010aSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 4749e169010aSmrg freebsd* | dragonfly*) 4750e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 4751e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4752e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4753e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4754e169010aSmrg ;; 47557914d74bSmrg 4756e169010aSmrg hpux9*) 4757e169010aSmrg if test "$GCC" = yes; then 4758e169010aSmrg _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' 4759e169010aSmrg else 4760e169010aSmrg _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' 4761e169010aSmrg fi 4762e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4763e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4764e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 47657914d74bSmrg 4766e169010aSmrg # hardcode_minus_L: Not really in the search PATH, 4767e169010aSmrg # but as the default location of the library. 4768e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4769e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4770e169010aSmrg ;; 47717914d74bSmrg 4772e169010aSmrg hpux10*) 4773e169010aSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4774e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4775e169010aSmrg else 4776e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 4777e169010aSmrg fi 4778e169010aSmrg if test "$with_gnu_ld" = no; then 4779e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4780e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4781e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4782e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4783e169010aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4784e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4785e169010aSmrg # hardcode_minus_L: Not really in the search PATH, 4786e169010aSmrg # but as the default location of the library. 4787e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4788e169010aSmrg fi 4789e169010aSmrg ;; 47907914d74bSmrg 4791e169010aSmrg hpux11*) 4792e169010aSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4793e169010aSmrg case $host_cpu in 4794e169010aSmrg hppa*64*) 4795e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4796e169010aSmrg ;; 4797e169010aSmrg ia64*) 4798e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4799e169010aSmrg ;; 4800e169010aSmrg *) 4801e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4802e169010aSmrg ;; 4803e169010aSmrg esac 4804e169010aSmrg else 4805e169010aSmrg case $host_cpu in 4806e169010aSmrg hppa*64*) 4807e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4808e169010aSmrg ;; 4809e169010aSmrg ia64*) 4810e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4811e169010aSmrg ;; 4812e169010aSmrg *) 4813e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4814e169010aSmrg ;; 4815e169010aSmrg esac 4816e169010aSmrg fi 4817e169010aSmrg if test "$with_gnu_ld" = no; then 4818e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4819e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 48207914d74bSmrg 4821e169010aSmrg case $host_cpu in 4822e169010aSmrg hppa*64*|ia64*) 4823e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4824e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4825e169010aSmrg ;; 4826e169010aSmrg *) 4827e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4828e169010aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4829e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48307914d74bSmrg 4831e169010aSmrg # hardcode_minus_L: Not really in the search PATH, 4832e169010aSmrg # but as the default location of the library. 4833e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4834e169010aSmrg ;; 4835e169010aSmrg esac 4836e169010aSmrg fi 4837e169010aSmrg ;; 48387914d74bSmrg 4839e169010aSmrg irix5* | irix6* | nonstopux*) 4840e169010aSmrg if test "$GCC" = yes; then 4841e169010aSmrg _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' 4842e169010aSmrg # Try to use the -exported_symbol ld option, if it does not 4843e169010aSmrg # work, assume that -exports_file does not work either and 4844e169010aSmrg # implicitly export all symbols. 4845e169010aSmrg save_LDFLAGS="$LDFLAGS" 4846e169010aSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 4847e169010aSmrg AC_LINK_IFELSE(int foo(void) {}, 4848e169010aSmrg _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' 4849e169010aSmrg ) 4850e169010aSmrg LDFLAGS="$save_LDFLAGS" 4851e169010aSmrg else 4852e169010aSmrg _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' 4853e169010aSmrg _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' 4854e169010aSmrg fi 4855e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4856e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4857e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4858e169010aSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 4859e169010aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4860e169010aSmrg ;; 48617914d74bSmrg 4862e169010aSmrg netbsd*) 4863e169010aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4864e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 4865e169010aSmrg else 4866e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 4867e169010aSmrg fi 4868e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4869e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4870e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4871e169010aSmrg ;; 48727914d74bSmrg 4873e169010aSmrg newsos6) 4874e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4875e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4876e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4877e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4878e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4879e169010aSmrg ;; 48807914d74bSmrg 4881e169010aSmrg *nto* | *qnx*) 4882e169010aSmrg ;; 48837914d74bSmrg 4884e169010aSmrg openbsd*) 4885e169010aSmrg if test -f /usr/libexec/ld.so; then 4886e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4887e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4888e169010aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4889e169010aSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4890e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4891e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 4892e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4893e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4894e169010aSmrg else 4895e169010aSmrg case $host_os in 4896e169010aSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 4897e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4898e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4899e169010aSmrg ;; 4900e169010aSmrg *) 4901e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4902e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4903e169010aSmrg ;; 4904e169010aSmrg esac 4905e169010aSmrg fi 4906e169010aSmrg else 4907e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4908e169010aSmrg fi 4909e169010aSmrg ;; 49107914d74bSmrg 4911e169010aSmrg os2*) 4912e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4913e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4914e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4915e169010aSmrg _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' 4916e169010aSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 4917e169010aSmrg ;; 49187914d74bSmrg 4919e169010aSmrg osf3*) 4920e169010aSmrg if test "$GCC" = yes; then 4921e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4922e169010aSmrg _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' 4923e169010aSmrg else 4924e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4925e169010aSmrg _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' 4926e169010aSmrg fi 4927e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4928e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4929e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4930e169010aSmrg ;; 49317914d74bSmrg 4932e169010aSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 4933e169010aSmrg if test "$GCC" = yes; then 4934e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4935e169010aSmrg _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' 4936e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4937e169010aSmrg else 4938e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4939e169010aSmrg _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' 4940e169010aSmrg _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~ 4941e169010aSmrg $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' 49427914d74bSmrg 4943e169010aSmrg # Both c and cxx compiler support -rpath directly 4944e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4945e169010aSmrg fi 4946e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4947e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4948e169010aSmrg ;; 49497914d74bSmrg 4950e169010aSmrg solaris*) 4951e169010aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 4952e169010aSmrg if test "$GCC" = yes; then 4953e169010aSmrg wlarc='${wl}' 4954e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4955e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4956e169010aSmrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4957e169010aSmrg else 4958e169010aSmrg case `$CC -V 2>&1` in 4959e169010aSmrg *"Compilers 5.0"*) 4960e169010aSmrg wlarc='' 4961e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 4962e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4963e169010aSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 4964e169010aSmrg ;; 4965e169010aSmrg *) 4966e169010aSmrg wlarc='${wl}' 4967e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 4968e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4969e169010aSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4970e169010aSmrg ;; 4971e169010aSmrg esac 4972e169010aSmrg fi 4973e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4974e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4975e169010aSmrg case $host_os in 4976e169010aSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 4977e169010aSmrg *) 4978e169010aSmrg # The compiler driver will combine and reorder linker options, 4979e169010aSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 4980e169010aSmrg # but is careful enough not to reorder. 4981e169010aSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 4982e169010aSmrg if test "$GCC" = yes; then 4983e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 4984e169010aSmrg else 4985e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 4986e169010aSmrg fi 4987e169010aSmrg ;; 4988e169010aSmrg esac 4989e169010aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4990e169010aSmrg ;; 49917914d74bSmrg 4992e169010aSmrg sunos4*) 4993e169010aSmrg if test "x$host_vendor" = xsequent; then 4994e169010aSmrg # Use $CC to link under sequent, because it throws in some extra .o 4995e169010aSmrg # files that make .init and .fini sections work. 4996e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 4997e169010aSmrg else 4998e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 4999e169010aSmrg fi 5000e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5001e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5002e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5003e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5004e169010aSmrg ;; 50057914d74bSmrg 5006e169010aSmrg sysv4) 5007e169010aSmrg case $host_vendor in 5008e169010aSmrg sni) 5009e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5010e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5011e169010aSmrg ;; 5012e169010aSmrg siemens) 5013e169010aSmrg ## LD is ld it makes a PLAMLIB 5014e169010aSmrg ## CC just makes a GrossModule. 5015e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5016e169010aSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5017e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5018e169010aSmrg ;; 5019e169010aSmrg motorola) 5020e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5021e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5022e169010aSmrg ;; 5023e169010aSmrg esac 5024e169010aSmrg runpath_var='LD_RUN_PATH' 5025e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5026e169010aSmrg ;; 50277914d74bSmrg 5028e169010aSmrg sysv4.3*) 5029e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5030e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5031e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5032e169010aSmrg ;; 50337914d74bSmrg 5034e169010aSmrg sysv4*MP*) 5035e169010aSmrg if test -d /usr/nec; then 5036e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5037e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5038e169010aSmrg runpath_var=LD_RUN_PATH 5039e169010aSmrg hardcode_runpath_var=yes 5040e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5041e169010aSmrg fi 5042e169010aSmrg ;; 50437914d74bSmrg 5044e169010aSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5045e169010aSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5046e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5047e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5048e169010aSmrg runpath_var='LD_RUN_PATH' 50497914d74bSmrg 5050e169010aSmrg if test "$GCC" = yes; then 5051e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5052e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5053e169010aSmrg else 5054e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5055e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5056e169010aSmrg fi 5057e169010aSmrg ;; 50587914d74bSmrg 5059e169010aSmrg sysv5* | sco3.2v5* | sco5v6*) 5060e169010aSmrg # Note: We can NOT use -z defs as we might desire, because we do not 5061e169010aSmrg # link with -lc, and that would cause any symbols used from libc to 5062e169010aSmrg # always be unresolved, which means just about no library would 5063e169010aSmrg # ever link correctly. If we're not using GNU ld we use -z text 5064e169010aSmrg # though, which does catch some bad symbols but isn't as heavy-handed 5065e169010aSmrg # as -z defs. 5066e169010aSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5067e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5068e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5069e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5070e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5071e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5072e169010aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5073e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5074e169010aSmrg runpath_var='LD_RUN_PATH' 50757914d74bSmrg 5076e169010aSmrg if test "$GCC" = yes; then 5077e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5078e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5079e169010aSmrg else 5080e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5081e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5082e169010aSmrg fi 5083e169010aSmrg ;; 50847914d74bSmrg 5085e169010aSmrg uts4*) 5086e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5087e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5088e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5089e169010aSmrg ;; 50907914d74bSmrg 5091e169010aSmrg *) 5092e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5093e169010aSmrg ;; 5094e169010aSmrg esac 50957914d74bSmrg 5096e169010aSmrg if test x$host_vendor = xsni; then 5097e169010aSmrg case $host in 5098e169010aSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5099e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5100e169010aSmrg ;; 5101e169010aSmrg esac 5102e169010aSmrg fi 51037914d74bSmrg fi 5104e169010aSmrg]) 5105e169010aSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5106e169010aSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 51077914d74bSmrg 5108e169010aSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 51097914d74bSmrg 5110e169010aSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5111e169010aSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5112e169010aSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 5113e169010aSmrg [The commands to extract the exported symbol list from a shared archive]) 51147914d74bSmrg 5115e169010aSmrg# 5116e169010aSmrg# Do we need to explicitly link libc? 5117e169010aSmrg# 5118e169010aSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5119e169010aSmrgx|xyes) 5120e169010aSmrg # Assume -lc should be added 5121e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51227914d74bSmrg 5123e169010aSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5124e169010aSmrg case $_LT_TAGVAR(archive_cmds, $1) in 5125e169010aSmrg *'~'*) 5126e169010aSmrg # FIXME: we may have to deal with multi-command sequences. 5127e169010aSmrg ;; 5128e169010aSmrg '$CC '*) 5129e169010aSmrg # Test whether the compiler implicitly links with -lc since on some 5130e169010aSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5131e169010aSmrg # to ld, don't add -lc before -lgcc. 5132e169010aSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 5133e169010aSmrg $RM conftest* 5134e169010aSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 51357914d74bSmrg 5136e169010aSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5137e169010aSmrg soname=conftest 5138e169010aSmrg lib=conftest 5139e169010aSmrg libobjs=conftest.$ac_objext 5140e169010aSmrg deplibs= 5141e169010aSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5142e169010aSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5143e169010aSmrg compiler_flags=-v 5144e169010aSmrg linker_flags=-v 5145e169010aSmrg verstring= 5146e169010aSmrg output_objdir=. 5147e169010aSmrg libname=conftest 5148e169010aSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5149e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5150e169010aSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5151e169010aSmrg then 5152e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5153e169010aSmrg else 5154e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5155e169010aSmrg fi 5156e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5157e169010aSmrg else 5158e169010aSmrg cat conftest.err 1>&5 5159e169010aSmrg fi 5160e169010aSmrg $RM conftest* 5161e169010aSmrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 5162e169010aSmrg ;; 5163e169010aSmrg esac 5164e169010aSmrg fi 5165e169010aSmrg ;; 5166e169010aSmrgesac 51677914d74bSmrg 5168e169010aSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5169e169010aSmrg [Whether or not to add -lc for building shared libraries]) 5170e169010aSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5171e169010aSmrg [enable_shared_with_static_runtimes], [0], 5172e169010aSmrg [Whether or not to disallow shared libs when runtime libs are static]) 5173e169010aSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5174e169010aSmrg [Compiler flag to allow reflexive dlopens]) 5175e169010aSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5176e169010aSmrg [Compiler flag to generate shared objects directly from archives]) 5177e169010aSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 5178e169010aSmrg [Whether the compiler copes with passing no objects directly]) 5179e169010aSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5180e169010aSmrg [Create an old-style archive from a shared archive]) 5181e169010aSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5182e169010aSmrg [Create a temporary old-style archive to link instead of a shared archive]) 5183e169010aSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5184e169010aSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5185e169010aSmrg_LT_TAGDECL([], [module_cmds], [2], 5186e169010aSmrg [Commands used to build a loadable module if different from building 5187e169010aSmrg a shared archive.]) 5188e169010aSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5189e169010aSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 5190e169010aSmrg [Whether we are building with GNU ld or not]) 5191e169010aSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5192e169010aSmrg [Flag that allows shared libraries with undefined symbols to be built]) 5193e169010aSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 5194e169010aSmrg [Flag that enforces no undefined symbols]) 5195e169010aSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5196e169010aSmrg [Flag to hardcode $libdir into a binary during linking. 5197e169010aSmrg This must work even if $libdir does not exist]) 5198e169010aSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5199e169010aSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5200e169010aSmrg during linking. This must work even if $libdir does not exist]]) 5201e169010aSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5202e169010aSmrg [Whether we need a single "-rpath" flag with a separated argument]) 5203e169010aSmrg_LT_TAGDECL([], [hardcode_direct], [0], 5204e169010aSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5205e169010aSmrg DIR into the resulting binary]) 5206e169010aSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5207e169010aSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5208e169010aSmrg DIR into the resulting binary and the resulting library dependency is 5209e169010aSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5210e169010aSmrg library is relocated]) 5211e169010aSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5212e169010aSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5213e169010aSmrg into the resulting binary]) 5214e169010aSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5215e169010aSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5216e169010aSmrg into the resulting binary]) 5217e169010aSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 5218e169010aSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 5219e169010aSmrg into the library and all subsequent libraries and executables linked 5220e169010aSmrg against it]) 5221e169010aSmrg_LT_TAGDECL([], [inherit_rpath], [0], 5222e169010aSmrg [Set to yes if linker adds runtime paths of dependent libraries 5223e169010aSmrg to runtime path list]) 5224e169010aSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 5225e169010aSmrg [Whether libtool must link a program against all its dependency libraries]) 5226e169010aSmrg_LT_TAGDECL([], [fix_srcfile_path], [1], 5227e169010aSmrg [Fix the shell variable $srcfile for the compiler]) 5228e169010aSmrg_LT_TAGDECL([], [always_export_symbols], [0], 5229e169010aSmrg [Set to "yes" if exported symbols are required]) 5230e169010aSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5231e169010aSmrg [The commands to list exported symbols]) 5232e169010aSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 5233e169010aSmrg [Symbols that should not be listed in the preloaded symbols]) 5234e169010aSmrg_LT_TAGDECL([], [include_expsyms], [1], 5235e169010aSmrg [Symbols that must always be exported]) 5236e169010aSmrg_LT_TAGDECL([], [prelink_cmds], [2], 5237e169010aSmrg [Commands necessary for linking programs (against libraries) with templates]) 5238e169010aSmrg_LT_TAGDECL([], [file_list_spec], [1], 5239e169010aSmrg [Specify filename containing input files]) 5240e169010aSmrgdnl FIXME: Not yet implemented 5241e169010aSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5242e169010aSmrgdnl [Compiler flag to generate thread safe objects]) 5243e169010aSmrg])# _LT_LINKER_SHLIBS 5244e169010aSmrg 5245e169010aSmrg 5246e169010aSmrg# _LT_LANG_C_CONFIG([TAG]) 5247e169010aSmrg# ------------------------ 5248e169010aSmrg# Ensure that the configuration variables for a C compiler are suitably 5249e169010aSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5250e169010aSmrg# the compiler configuration to `libtool'. 5251e169010aSmrgm4_defun([_LT_LANG_C_CONFIG], 5252e169010aSmrg[m4_require([_LT_DECL_EGREP])dnl 5253e169010aSmrglt_save_CC="$CC" 5254e169010aSmrgAC_LANG_PUSH(C) 52557914d74bSmrg 5256e169010aSmrg# Source file extension for C test sources. 5257e169010aSmrgac_ext=c 52587914d74bSmrg 5259e169010aSmrg# Object file extension for compiled C test sources. 52607914d74bSmrgobjext=o 5261e169010aSmrg_LT_TAGVAR(objext, $1)=$objext 52627914d74bSmrg 52637914d74bSmrg# Code to be used in simple compile tests 5264e169010aSmrglt_simple_compile_test_code="int some_variable = 0;" 52657914d74bSmrg 52667914d74bSmrg# Code to be used in simple link tests 5267e169010aSmrglt_simple_link_test_code='int main(){return(0);}' 52687914d74bSmrg 5269e169010aSmrg_LT_TAG_COMPILER 5270e169010aSmrg# Save the default compiler, since it gets overwritten when the other 5271e169010aSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5272e169010aSmrgcompiler_DEFAULT=$CC 52737914d74bSmrg 52747914d74bSmrg# save warnings/boilerplate of simple test code 52757914d74bSmrg_LT_COMPILER_BOILERPLATE 52767914d74bSmrg_LT_LINKER_BOILERPLATE 52777914d74bSmrg 5278e169010aSmrgif test -n "$compiler"; then 5279e169010aSmrg _LT_COMPILER_NO_RTTI($1) 5280e169010aSmrg _LT_COMPILER_PIC($1) 5281e169010aSmrg _LT_COMPILER_C_O($1) 5282e169010aSmrg _LT_COMPILER_FILE_LOCKS($1) 5283e169010aSmrg _LT_LINKER_SHLIBS($1) 5284e169010aSmrg _LT_SYS_DYNAMIC_LINKER($1) 5285e169010aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 5286e169010aSmrg LT_SYS_DLOPEN_SELF 5287e169010aSmrg _LT_CMD_STRIPLIB 5288e169010aSmrg 5289e169010aSmrg # Report which library types will actually be built 5290e169010aSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5291e169010aSmrg AC_MSG_RESULT([$can_build_shared]) 5292e169010aSmrg 5293e169010aSmrg AC_MSG_CHECKING([whether to build shared libraries]) 5294e169010aSmrg test "$can_build_shared" = "no" && enable_shared=no 5295e169010aSmrg 5296e169010aSmrg # On AIX, shared libraries and static libraries use the same namespace, and 5297e169010aSmrg # are all built from PIC. 5298e169010aSmrg case $host_os in 5299e169010aSmrg aix3*) 5300e169010aSmrg test "$enable_shared" = yes && enable_static=no 5301e169010aSmrg if test -n "$RANLIB"; then 5302e169010aSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5303e169010aSmrg postinstall_cmds='$RANLIB $lib' 5304e169010aSmrg fi 5305e169010aSmrg ;; 53067914d74bSmrg 5307e169010aSmrg aix[[4-9]]*) 5308e169010aSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5309e169010aSmrg test "$enable_shared" = yes && enable_static=no 5310e169010aSmrg fi 5311e169010aSmrg ;; 5312e169010aSmrg esac 5313e169010aSmrg AC_MSG_RESULT([$enable_shared]) 53147914d74bSmrg 5315e169010aSmrg AC_MSG_CHECKING([whether to build static libraries]) 5316e169010aSmrg # Make sure either enable_shared or enable_static is yes. 5317e169010aSmrg test "$enable_shared" = yes || enable_static=yes 5318e169010aSmrg AC_MSG_RESULT([$enable_static]) 53197914d74bSmrg 5320e169010aSmrg _LT_CONFIG($1) 5321e169010aSmrgfi 5322e169010aSmrgAC_LANG_POP 53237914d74bSmrgCC="$lt_save_CC" 5324e169010aSmrg])# _LT_LANG_C_CONFIG 53257914d74bSmrg 53267914d74bSmrg 5327e169010aSmrg# _LT_PROG_CXX 5328e169010aSmrg# ------------ 5329e169010aSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 5330e169010aSmrg# compiler, we have our own version here. 5331e169010aSmrgm4_defun([_LT_PROG_CXX], 5332e169010aSmrg[ 5333e169010aSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 5334e169010aSmrgAC_PROG_CXX 5335e169010aSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5336e169010aSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5337e169010aSmrg (test "X$CXX" != "Xg++"))) ; then 5338e169010aSmrg AC_PROG_CXXCPP 5339e169010aSmrgelse 5340e169010aSmrg _lt_caught_CXX_error=yes 5341e169010aSmrgfi 5342e169010aSmrgpopdef([AC_MSG_ERROR]) 5343e169010aSmrg])# _LT_PROG_CXX 53447914d74bSmrg 5345e169010aSmrgdnl aclocal-1.4 backwards compatibility: 5346e169010aSmrgdnl AC_DEFUN([_LT_PROG_CXX], []) 53477914d74bSmrg 53487914d74bSmrg 5349e169010aSmrg# _LT_LANG_CXX_CONFIG([TAG]) 5350e169010aSmrg# -------------------------- 5351e169010aSmrg# Ensure that the configuration variables for a C++ compiler are suitably 5352e169010aSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5353e169010aSmrg# the compiler configuration to `libtool'. 5354e169010aSmrgm4_defun([_LT_LANG_CXX_CONFIG], 5355e169010aSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl 5356e169010aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5357e169010aSmrgm4_require([_LT_DECL_EGREP])dnl 5358e169010aSmrg 5359e169010aSmrgAC_LANG_PUSH(C++) 5360e169010aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5361e169010aSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 5362e169010aSmrg_LT_TAGVAR(always_export_symbols, $1)=no 5363e169010aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5364e169010aSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 5365e169010aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5366e169010aSmrg_LT_TAGVAR(hardcode_direct, $1)=no 5367e169010aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5368e169010aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5369e169010aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5370e169010aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5371e169010aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5372e169010aSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5373e169010aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 5374e169010aSmrg_LT_TAGVAR(inherit_rpath, $1)=no 5375e169010aSmrg_LT_TAGVAR(module_cmds, $1)= 5376e169010aSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 5377e169010aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5378e169010aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5379e169010aSmrg_LT_TAGVAR(no_undefined_flag, $1)= 5380e169010aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5381e169010aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 53827914d74bSmrg 5383e169010aSmrg# Source file extension for C++ test sources. 5384e169010aSmrgac_ext=cpp 53857914d74bSmrg 5386e169010aSmrg# Object file extension for compiled C++ test sources. 5387e169010aSmrgobjext=o 5388e169010aSmrg_LT_TAGVAR(objext, $1)=$objext 5389e169010aSmrg 5390e169010aSmrg# No sense in running all these tests if we already determined that 5391e169010aSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 5392e169010aSmrg# are currently assumed to apply to all compilers on this platform, 5393e169010aSmrg# and will be corrupted by setting them based on a non-working compiler. 5394e169010aSmrgif test "$_lt_caught_CXX_error" != yes; then 5395e169010aSmrg # Code to be used in simple compile tests 5396e169010aSmrg lt_simple_compile_test_code="int some_variable = 0;" 5397e169010aSmrg 5398e169010aSmrg # Code to be used in simple link tests 5399e169010aSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5400e169010aSmrg 5401e169010aSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5402e169010aSmrg _LT_TAG_COMPILER 5403e169010aSmrg 5404e169010aSmrg # save warnings/boilerplate of simple test code 5405e169010aSmrg _LT_COMPILER_BOILERPLATE 5406e169010aSmrg _LT_LINKER_BOILERPLATE 5407e169010aSmrg 5408e169010aSmrg # Allow CC to be a program name with arguments. 5409e169010aSmrg lt_save_CC=$CC 5410e169010aSmrg lt_save_LD=$LD 5411e169010aSmrg lt_save_GCC=$GCC 5412e169010aSmrg GCC=$GXX 5413e169010aSmrg lt_save_with_gnu_ld=$with_gnu_ld 5414e169010aSmrg lt_save_path_LD=$lt_cv_path_LD 5415e169010aSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5416e169010aSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5417e169010aSmrg else 5418e169010aSmrg $as_unset lt_cv_prog_gnu_ld 54197914d74bSmrg fi 5420e169010aSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 5421e169010aSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 5422e169010aSmrg else 5423e169010aSmrg $as_unset lt_cv_path_LD 5424e169010aSmrg fi 5425e169010aSmrg test -z "${LDCXX+set}" || LD=$LDCXX 5426e169010aSmrg CC=${CXX-"c++"} 5427e169010aSmrg compiler=$CC 5428e169010aSmrg _LT_TAGVAR(compiler, $1)=$CC 5429e169010aSmrg _LT_CC_BASENAME([$compiler]) 54307914d74bSmrg 5431e169010aSmrg if test -n "$compiler"; then 5432e169010aSmrg # We don't want -fno-exception when compiling C++ code, so set the 5433e169010aSmrg # no_builtin_flag separately 5434e169010aSmrg if test "$GXX" = yes; then 5435e169010aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5436e169010aSmrg else 5437e169010aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5438e169010aSmrg fi 54397914d74bSmrg 5440e169010aSmrg if test "$GXX" = yes; then 5441e169010aSmrg # Set up default GNU C++ configuration 54427914d74bSmrg 5443e169010aSmrg LT_PATH_LD 54447914d74bSmrg 5445e169010aSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5446e169010aSmrg # archiving commands below assume that GNU ld is being used. 5447e169010aSmrg if test "$with_gnu_ld" = yes; then 5448e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5449e169010aSmrg _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' 54507914d74bSmrg 5451e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5452e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 54537914d74bSmrg 5454e169010aSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5455e169010aSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5456e169010aSmrg # investigate it a little bit more. (MM) 5457e169010aSmrg wlarc='${wl}' 54587914d74bSmrg 5459e169010aSmrg # ancient GNU ld didn't support --whole-archive et. al. 5460e169010aSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5461e169010aSmrg $GREP 'no-whole-archive' > /dev/null; then 5462e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5463e169010aSmrg else 5464e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5465e169010aSmrg fi 5466e169010aSmrg else 5467e169010aSmrg with_gnu_ld=no 5468e169010aSmrg wlarc= 5469e169010aSmrg 5470e169010aSmrg # A generic and very simple default shared library creation 5471e169010aSmrg # command for GNU C++ for the case where it uses the native 5472e169010aSmrg # linker, instead of GNU ld. If possible, this setting should 5473e169010aSmrg # overridden to take advantage of the native linker features on 5474e169010aSmrg # the platform it is being used on. 5475e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5476e169010aSmrg fi 54777914d74bSmrg 5478e169010aSmrg # Commands to make compiler produce verbose output that lists 5479e169010aSmrg # what "hidden" libraries, object files and flags are used when 5480e169010aSmrg # linking a shared library. 5481e169010aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 54827914d74bSmrg 5483e169010aSmrg else 5484e169010aSmrg GXX=no 5485e169010aSmrg with_gnu_ld=no 5486e169010aSmrg wlarc= 5487e169010aSmrg fi 54887914d74bSmrg 5489e169010aSmrg # PORTME: fill in a description of your system's C++ link characteristics 5490e169010aSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5491e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5492e169010aSmrg case $host_os in 5493e169010aSmrg aix3*) 5494e169010aSmrg # FIXME: insert proper C++ library support 5495e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5496e169010aSmrg ;; 5497e169010aSmrg aix[[4-9]]*) 5498e169010aSmrg if test "$host_cpu" = ia64; then 5499e169010aSmrg # On IA64, the linker does run time linking by default, so we don't 5500e169010aSmrg # have to do anything special. 5501e169010aSmrg aix_use_runtimelinking=no 5502e169010aSmrg exp_sym_flag='-Bexport' 5503e169010aSmrg no_entry_flag="" 5504e169010aSmrg else 5505e169010aSmrg aix_use_runtimelinking=no 5506e169010aSmrg 5507e169010aSmrg # Test if we are trying to use run time linking or normal 5508e169010aSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5509e169010aSmrg # need to do runtime linking. 5510e169010aSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5511e169010aSmrg for ld_flag in $LDFLAGS; do 5512e169010aSmrg case $ld_flag in 5513e169010aSmrg *-brtl*) 5514e169010aSmrg aix_use_runtimelinking=yes 5515e169010aSmrg break 5516e169010aSmrg ;; 5517e169010aSmrg esac 5518e169010aSmrg done 5519e169010aSmrg ;; 5520e169010aSmrg esac 55217914d74bSmrg 5522e169010aSmrg exp_sym_flag='-bexport' 5523e169010aSmrg no_entry_flag='-bnoentry' 5524e169010aSmrg fi 55257914d74bSmrg 5526e169010aSmrg # When large executables or shared objects are built, AIX ld can 5527e169010aSmrg # have problems creating the table of contents. If linking a library 5528e169010aSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5529e169010aSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5530e169010aSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5531e169010aSmrg 5532e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='' 5533e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5534e169010aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5535e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5536e169010aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5537e169010aSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5538e169010aSmrg 5539e169010aSmrg if test "$GXX" = yes; then 5540e169010aSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5541e169010aSmrg # We only want to do this on AIX 4.2 and lower, the check 5542e169010aSmrg # below for broken collect2 doesn't work under 4.3+ 5543e169010aSmrg collect2name=`${CC} -print-prog-name=collect2` 5544e169010aSmrg if test -f "$collect2name" && 5545e169010aSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5546e169010aSmrg then 5547e169010aSmrg # We have reworked collect2 5548e169010aSmrg : 5549e169010aSmrg else 5550e169010aSmrg # We have old collect2 5551e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5552e169010aSmrg # It fails to find uninstalled libraries when the uninstalled 5553e169010aSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5554e169010aSmrg # to unsupported forces relinking 5555e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5556e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5557e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5558e169010aSmrg fi 5559e169010aSmrg esac 5560e169010aSmrg shared_flag='-shared' 5561e169010aSmrg if test "$aix_use_runtimelinking" = yes; then 5562e169010aSmrg shared_flag="$shared_flag "'${wl}-G' 5563e169010aSmrg fi 5564e169010aSmrg else 5565e169010aSmrg # not using gcc 5566e169010aSmrg if test "$host_cpu" = ia64; then 5567e169010aSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5568e169010aSmrg # chokes on -Wl,-G. The following line is correct: 5569e169010aSmrg shared_flag='-G' 5570e169010aSmrg else 5571e169010aSmrg if test "$aix_use_runtimelinking" = yes; then 5572e169010aSmrg shared_flag='${wl}-G' 5573e169010aSmrg else 5574e169010aSmrg shared_flag='${wl}-bM:SRE' 5575e169010aSmrg fi 5576e169010aSmrg fi 5577e169010aSmrg fi 55787914d74bSmrg 5579e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5580e169010aSmrg # It seems that -bexpall does not export symbols beginning with 5581e169010aSmrg # underscore (_), so it is better to generate a list of symbols to 5582e169010aSmrg # export. 5583e169010aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5584e169010aSmrg if test "$aix_use_runtimelinking" = yes; then 5585e169010aSmrg # Warning - without using the other runtime loading flags (-brtl), 5586e169010aSmrg # -berok will link without error, but may produce a broken library. 5587e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5588e169010aSmrg # Determine the default libpath from the value encoded in an empty 5589e169010aSmrg # executable. 5590e169010aSmrg _LT_SYS_MODULE_PATH_AIX 5591e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5592e169010aSmrg 5593e169010aSmrg _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" 5594e169010aSmrg else 5595e169010aSmrg if test "$host_cpu" = ia64; then 5596e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5597e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5598e169010aSmrg _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" 5599e169010aSmrg else 5600e169010aSmrg # Determine the default libpath from the value encoded in an 5601e169010aSmrg # empty executable. 5602e169010aSmrg _LT_SYS_MODULE_PATH_AIX 5603e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5604e169010aSmrg # Warning - without using the other run time loading flags, 5605e169010aSmrg # -berok will link without error, but may produce a broken library. 5606e169010aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5607e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5608e169010aSmrg # Exported symbols can be pulled into shared objects from archives 5609e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5610e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5611e169010aSmrg # This is similar to how AIX traditionally builds its shared 5612e169010aSmrg # libraries. 5613e169010aSmrg _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' 5614e169010aSmrg fi 5615e169010aSmrg fi 5616e169010aSmrg ;; 56177914d74bSmrg 5618e169010aSmrg beos*) 5619e169010aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5620e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5621e169010aSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5622e169010aSmrg # support --undefined. This deserves some investigation. FIXME 5623e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5624e169010aSmrg else 5625e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5626e169010aSmrg fi 5627e169010aSmrg ;; 56287914d74bSmrg 5629e169010aSmrg chorus*) 5630e169010aSmrg case $cc_basename in 5631e169010aSmrg *) 5632e169010aSmrg # FIXME: insert proper C++ library support 5633e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5634e169010aSmrg ;; 5635e169010aSmrg esac 5636e169010aSmrg ;; 56377914d74bSmrg 5638e169010aSmrg cygwin* | mingw* | pw32* | cegcc*) 5639e169010aSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5640e169010aSmrg # as there is no search path for DLLs. 5641e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5642e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5643e169010aSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5644e169010aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5645e169010aSmrg 5646e169010aSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5647e169010aSmrg _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' 5648e169010aSmrg # If the export-symbols file already is a .def file (1st line 5649e169010aSmrg # is EXPORTS), use it as is; otherwise, prepend... 5650e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5651e169010aSmrg cp $export_symbols $output_objdir/$soname.def; 5652e169010aSmrg else 5653e169010aSmrg echo EXPORTS > $output_objdir/$soname.def; 5654e169010aSmrg cat $export_symbols >> $output_objdir/$soname.def; 5655e169010aSmrg fi~ 5656e169010aSmrg $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' 5657e169010aSmrg else 5658e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5659e169010aSmrg fi 5660e169010aSmrg ;; 5661e169010aSmrg darwin* | rhapsody*) 5662e169010aSmrg _LT_DARWIN_LINKER_FEATURES($1) 5663e169010aSmrg ;; 56647914d74bSmrg 5665e169010aSmrg dgux*) 5666e169010aSmrg case $cc_basename in 5667e169010aSmrg ec++*) 5668e169010aSmrg # FIXME: insert proper C++ library support 5669e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5670e169010aSmrg ;; 5671e169010aSmrg ghcx*) 5672e169010aSmrg # Green Hills C++ Compiler 5673e169010aSmrg # FIXME: insert proper C++ library support 5674e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5675e169010aSmrg ;; 5676e169010aSmrg *) 5677e169010aSmrg # FIXME: insert proper C++ library support 5678e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5679e169010aSmrg ;; 5680e169010aSmrg esac 5681e169010aSmrg ;; 56827914d74bSmrg 5683e169010aSmrg freebsd[[12]]*) 5684e169010aSmrg # C++ shared libraries reported to be fairly broken before 5685e169010aSmrg # switch to ELF 5686e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5687e169010aSmrg ;; 56887914d74bSmrg 5689e169010aSmrg freebsd-elf*) 5690e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5691e169010aSmrg ;; 56927914d74bSmrg 5693e169010aSmrg freebsd* | dragonfly*) 5694e169010aSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 5695e169010aSmrg # conventions 5696e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5697e169010aSmrg ;; 56987914d74bSmrg 5699e169010aSmrg gnu*) 5700e169010aSmrg ;; 57017914d74bSmrg 5702e169010aSmrg hpux9*) 5703e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5704e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5705e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5706e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5707e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5708e169010aSmrg # but as the default 5709e169010aSmrg # location of the library. 5710e169010aSmrg 5711e169010aSmrg case $cc_basename in 5712e169010aSmrg CC*) 5713e169010aSmrg # FIXME: insert proper C++ library support 5714e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5715e169010aSmrg ;; 5716e169010aSmrg aCC*) 5717e169010aSmrg _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' 5718e169010aSmrg # Commands to make compiler produce verbose output that lists 5719e169010aSmrg # what "hidden" libraries, object files and flags are used when 5720e169010aSmrg # linking a shared library. 5721e169010aSmrg # 5722e169010aSmrg # There doesn't appear to be a way to prevent this compiler from 5723e169010aSmrg # explicitly linking system object files so we need to strip them 5724e169010aSmrg # from the output so that they don't get included in the library 5725e169010aSmrg # dependencies. 5726e169010aSmrg 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' 5727e169010aSmrg ;; 5728e169010aSmrg *) 5729e169010aSmrg if test "$GXX" = yes; then 5730e169010aSmrg _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' 5731e169010aSmrg else 5732e169010aSmrg # FIXME: insert proper C++ library support 5733e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5734e169010aSmrg fi 5735e169010aSmrg ;; 5736e169010aSmrg esac 5737e169010aSmrg ;; 57387914d74bSmrg 5739e169010aSmrg hpux10*|hpux11*) 5740e169010aSmrg if test $with_gnu_ld = no; then 5741e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5742e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5743e169010aSmrg 5744e169010aSmrg case $host_cpu in 5745e169010aSmrg hppa*64*|ia64*) 5746e169010aSmrg ;; 5747e169010aSmrg *) 5748e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749e169010aSmrg ;; 5750e169010aSmrg esac 5751e169010aSmrg fi 5752e169010aSmrg case $host_cpu in 5753e169010aSmrg hppa*64*|ia64*) 5754e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5755e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5756e169010aSmrg ;; 5757e169010aSmrg *) 5758e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5759e169010aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5760e169010aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5761e169010aSmrg # but as the default 5762e169010aSmrg # location of the library. 5763e169010aSmrg ;; 5764e169010aSmrg esac 57657914d74bSmrg 5766e169010aSmrg case $cc_basename in 5767e169010aSmrg CC*) 5768e169010aSmrg # FIXME: insert proper C++ library support 5769e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5770e169010aSmrg ;; 5771e169010aSmrg aCC*) 5772e169010aSmrg case $host_cpu in 5773e169010aSmrg hppa*64*) 5774e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5775e169010aSmrg ;; 5776e169010aSmrg ia64*) 5777e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5778e169010aSmrg ;; 5779e169010aSmrg *) 5780e169010aSmrg _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' 5781e169010aSmrg ;; 5782e169010aSmrg esac 5783e169010aSmrg # Commands to make compiler produce verbose output that lists 5784e169010aSmrg # what "hidden" libraries, object files and flags are used when 5785e169010aSmrg # linking a shared library. 5786e169010aSmrg # 5787e169010aSmrg # There doesn't appear to be a way to prevent this compiler from 5788e169010aSmrg # explicitly linking system object files so we need to strip them 5789e169010aSmrg # from the output so that they don't get included in the library 5790e169010aSmrg # dependencies. 5791e169010aSmrg 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' 5792e169010aSmrg ;; 5793e169010aSmrg *) 5794e169010aSmrg if test "$GXX" = yes; then 5795e169010aSmrg if test $with_gnu_ld = no; then 5796e169010aSmrg case $host_cpu in 5797e169010aSmrg hppa*64*) 5798e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5799e169010aSmrg ;; 5800e169010aSmrg ia64*) 5801e169010aSmrg _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' 5802e169010aSmrg ;; 5803e169010aSmrg *) 5804e169010aSmrg _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' 5805e169010aSmrg ;; 5806e169010aSmrg esac 5807e169010aSmrg fi 5808e169010aSmrg else 5809e169010aSmrg # FIXME: insert proper C++ library support 5810e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5811e169010aSmrg fi 5812e169010aSmrg ;; 5813e169010aSmrg esac 5814e169010aSmrg ;; 58157914d74bSmrg 5816e169010aSmrg interix[[3-9]]*) 5817e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5818e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5819e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5820e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5821e169010aSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5822e169010aSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5823e169010aSmrg # default) and relocated if they conflict, which is a slow very memory 5824e169010aSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5825e169010aSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5826e169010aSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5827e169010aSmrg _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' 5828e169010aSmrg _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' 5829e169010aSmrg ;; 5830e169010aSmrg irix5* | irix6*) 5831e169010aSmrg case $cc_basename in 5832e169010aSmrg CC*) 5833e169010aSmrg # SGI C++ 5834e169010aSmrg _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' 5835e169010aSmrg 5836e169010aSmrg # Archives containing C++ object files must be created using 5837e169010aSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 5838e169010aSmrg # necessary to make sure instantiated templates are included 5839e169010aSmrg # in the archive. 5840e169010aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 5841e169010aSmrg ;; 5842e169010aSmrg *) 5843e169010aSmrg if test "$GXX" = yes; then 5844e169010aSmrg if test "$with_gnu_ld" = no; then 5845e169010aSmrg _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' 5846e169010aSmrg else 5847e169010aSmrg _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' 5848e169010aSmrg fi 5849e169010aSmrg fi 5850e169010aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5851e169010aSmrg ;; 5852e169010aSmrg esac 5853e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5854e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5855e169010aSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5856e169010aSmrg ;; 58577914d74bSmrg 5858e169010aSmrg linux* | k*bsd*-gnu) 5859e169010aSmrg case $cc_basename in 5860e169010aSmrg KCC*) 5861e169010aSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 58627914d74bSmrg 5863e169010aSmrg # KCC will only create a shared library if the output file 5864e169010aSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5865e169010aSmrg # to its proper name (with version) after linking. 5866e169010aSmrg _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' 5867e169010aSmrg _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' 5868e169010aSmrg # Commands to make compiler produce verbose output that lists 5869e169010aSmrg # what "hidden" libraries, object files and flags are used when 5870e169010aSmrg # linking a shared library. 5871e169010aSmrg # 5872e169010aSmrg # There doesn't appear to be a way to prevent this compiler from 5873e169010aSmrg # explicitly linking system object files so we need to strip them 5874e169010aSmrg # from the output so that they don't get included in the library 5875e169010aSmrg # dependencies. 5876e169010aSmrg 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' 5877e169010aSmrg 5878e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5879e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5880e169010aSmrg 5881e169010aSmrg # Archives containing C++ object files must be created using 5882e169010aSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5883e169010aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5884e169010aSmrg ;; 5885e169010aSmrg icpc* | ecpc* ) 5886e169010aSmrg # Intel C++ 5887e169010aSmrg with_gnu_ld=yes 5888e169010aSmrg # version 8.0 and above of icpc choke on multiply defined symbols 5889e169010aSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 5890e169010aSmrg # earlier do not add the objects themselves. 5891e169010aSmrg case `$CC -V 2>&1` in 5892e169010aSmrg *"Version 7."*) 5893e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5894e169010aSmrg _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' 5895e169010aSmrg ;; 5896e169010aSmrg *) # Version 8.0 or newer 5897e169010aSmrg tmp_idyn= 5898e169010aSmrg case $host_cpu in 5899e169010aSmrg ia64*) tmp_idyn=' -i_dynamic';; 5900e169010aSmrg esac 5901e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5902e169010aSmrg _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' 5903e169010aSmrg ;; 5904e169010aSmrg esac 5905e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5906e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5907e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5908e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5909e169010aSmrg ;; 5910e169010aSmrg pgCC* | pgcpp*) 5911e169010aSmrg # Portland Group C++ compiler 5912e169010aSmrg case `$CC -V` in 5913e169010aSmrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 5914e169010aSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 5915e169010aSmrg rm -rf $tpldir~ 5916e169010aSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 5917e169010aSmrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 5918e169010aSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 5919e169010aSmrg rm -rf $tpldir~ 5920e169010aSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 5921e169010aSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 5922e169010aSmrg $RANLIB $oldlib' 5923e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 5924e169010aSmrg rm -rf $tpldir~ 5925e169010aSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5926e169010aSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5927e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 5928e169010aSmrg rm -rf $tpldir~ 5929e169010aSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5930e169010aSmrg $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' 5931e169010aSmrg ;; 5932e169010aSmrg *) # Version 6 will use weak symbols 5933e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5934e169010aSmrg _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' 5935e169010aSmrg ;; 5936e169010aSmrg esac 59377914d74bSmrg 5938e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5939e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5940e169010aSmrg _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' 5941e169010aSmrg ;; 5942e169010aSmrg cxx*) 5943e169010aSmrg # Compaq C++ 5944e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5945e169010aSmrg _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' 59467914d74bSmrg 5947e169010aSmrg runpath_var=LD_RUN_PATH 5948e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5949e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59507914d74bSmrg 5951e169010aSmrg # Commands to make compiler produce verbose output that lists 5952e169010aSmrg # what "hidden" libraries, object files and flags are used when 5953e169010aSmrg # linking a shared library. 5954e169010aSmrg # 5955e169010aSmrg # There doesn't appear to be a way to prevent this compiler from 5956e169010aSmrg # explicitly linking system object files so we need to strip them 5957e169010aSmrg # from the output so that they don't get included in the library 5958e169010aSmrg # dependencies. 5959e169010aSmrg 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' 5960e169010aSmrg ;; 5961e169010aSmrg xl*) 5962e169010aSmrg # IBM XL 8.0 on PPC, with GNU ld 5963e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5964e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5965e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5966e169010aSmrg if test "x$supports_anon_versioning" = xyes; then 5967e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5968e169010aSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5969e169010aSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5970e169010aSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5971e169010aSmrg fi 5972e169010aSmrg ;; 5973e169010aSmrg *) 5974e169010aSmrg case `$CC -V 2>&1 | sed 5q` in 5975e169010aSmrg *Sun\ C*) 5976e169010aSmrg # Sun C++ 5.9 5977e169010aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 5978e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5979e169010aSmrg _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' 5980e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5981e169010aSmrg _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' 5982e169010aSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5983e169010aSmrg 5984e169010aSmrg # Not sure whether something based on 5985e169010aSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 5986e169010aSmrg # would be better. 5987e169010aSmrg output_verbose_link_cmd='echo' 5988e169010aSmrg 5989e169010aSmrg # Archives containing C++ object files must be created using 5990e169010aSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 5991e169010aSmrg # necessary to make sure instantiated templates are included 5992e169010aSmrg # in the archive. 5993e169010aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 5994e169010aSmrg ;; 5995e169010aSmrg esac 5996e169010aSmrg ;; 5997e169010aSmrg esac 5998e169010aSmrg ;; 59997914d74bSmrg 6000e169010aSmrg lynxos*) 6001e169010aSmrg # FIXME: insert proper C++ library support 6002e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6003e169010aSmrg ;; 60047914d74bSmrg 6005e169010aSmrg m88k*) 6006e169010aSmrg # FIXME: insert proper C++ library support 6007e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6008e169010aSmrg ;; 60097914d74bSmrg 6010e169010aSmrg mvs*) 6011e169010aSmrg case $cc_basename in 6012e169010aSmrg cxx*) 6013e169010aSmrg # FIXME: insert proper C++ library support 6014e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6015e169010aSmrg ;; 6016e169010aSmrg *) 6017e169010aSmrg # FIXME: insert proper C++ library support 6018e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6019e169010aSmrg ;; 6020e169010aSmrg esac 6021e169010aSmrg ;; 60227914d74bSmrg 6023e169010aSmrg netbsd*) 6024e169010aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6025e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6026e169010aSmrg wlarc= 6027e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6028e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6029e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6030e169010aSmrg fi 6031e169010aSmrg # Workaround some broken pre-1.5 toolchains 6032e169010aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6033e169010aSmrg ;; 60347914d74bSmrg 6035e169010aSmrg *nto* | *qnx*) 6036e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6037e169010aSmrg ;; 60387914d74bSmrg 6039e169010aSmrg openbsd2*) 6040e169010aSmrg # C++ shared libraries are fairly broken 6041e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6042e169010aSmrg ;; 60437914d74bSmrg 6044e169010aSmrg openbsd*) 6045e169010aSmrg if test -f /usr/libexec/ld.so; then 6046e169010aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6047e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6048e169010aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6049e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6050e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6051e169010aSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6052e169010aSmrg _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' 6053e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6054e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6055e169010aSmrg fi 6056e169010aSmrg output_verbose_link_cmd=echo 6057e169010aSmrg else 6058e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6059e169010aSmrg fi 6060e169010aSmrg ;; 60617914d74bSmrg 6062e169010aSmrg osf3* | osf4* | osf5*) 6063e169010aSmrg case $cc_basename in 6064e169010aSmrg KCC*) 6065e169010aSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6066e169010aSmrg 6067e169010aSmrg # KCC will only create a shared library if the output file 6068e169010aSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6069e169010aSmrg # to its proper name (with version) after linking. 6070e169010aSmrg _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' 6071e169010aSmrg 6072e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6073e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6074e169010aSmrg 6075e169010aSmrg # Archives containing C++ object files must be created using 6076e169010aSmrg # the KAI C++ compiler. 6077e169010aSmrg case $host in 6078e169010aSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6079e169010aSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6080e169010aSmrg esac 6081e169010aSmrg ;; 6082e169010aSmrg RCC*) 6083e169010aSmrg # Rational C++ 2.4.1 6084e169010aSmrg # FIXME: insert proper C++ library support 6085e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6086e169010aSmrg ;; 6087e169010aSmrg cxx*) 6088e169010aSmrg case $host in 6089e169010aSmrg osf3*) 6090e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6091e169010aSmrg _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' 6092e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6093e169010aSmrg ;; 6094e169010aSmrg *) 6095e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6096e169010aSmrg _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' 6097e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6098e169010aSmrg echo "-hidden">> $lib.exp~ 6099e169010aSmrg $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~ 6100e169010aSmrg $RM $lib.exp' 6101e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6102e169010aSmrg ;; 6103e169010aSmrg esac 61047914d74bSmrg 6105e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 61067914d74bSmrg 6107e169010aSmrg # Commands to make compiler produce verbose output that lists 6108e169010aSmrg # what "hidden" libraries, object files and flags are used when 6109e169010aSmrg # linking a shared library. 6110e169010aSmrg # 6111e169010aSmrg # There doesn't appear to be a way to prevent this compiler from 6112e169010aSmrg # explicitly linking system object files so we need to strip them 6113e169010aSmrg # from the output so that they don't get included in the library 6114e169010aSmrg # dependencies. 6115e169010aSmrg 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' 6116e169010aSmrg ;; 6117e169010aSmrg *) 6118e169010aSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6119e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6120e169010aSmrg case $host in 6121e169010aSmrg osf3*) 6122e169010aSmrg _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' 6123e169010aSmrg ;; 6124e169010aSmrg *) 6125e169010aSmrg _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' 6126e169010aSmrg ;; 6127e169010aSmrg esac 6128e169010aSmrg 6129e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6130e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6131e169010aSmrg 6132e169010aSmrg # Commands to make compiler produce verbose output that lists 6133e169010aSmrg # what "hidden" libraries, object files and flags are used when 6134e169010aSmrg # linking a shared library. 6135e169010aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6136e169010aSmrg 6137e169010aSmrg else 6138e169010aSmrg # FIXME: insert proper C++ library support 6139e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6140e169010aSmrg fi 6141e169010aSmrg ;; 6142e169010aSmrg esac 6143e169010aSmrg ;; 61447914d74bSmrg 6145e169010aSmrg psos*) 6146e169010aSmrg # FIXME: insert proper C++ library support 6147e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6148e169010aSmrg ;; 61497914d74bSmrg 6150e169010aSmrg sunos4*) 6151e169010aSmrg case $cc_basename in 6152e169010aSmrg CC*) 6153e169010aSmrg # Sun C++ 4.x 6154e169010aSmrg # FIXME: insert proper C++ library support 6155e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6156e169010aSmrg ;; 6157e169010aSmrg lcc*) 6158e169010aSmrg # Lucid 6159e169010aSmrg # FIXME: insert proper C++ library support 6160e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6161e169010aSmrg ;; 6162e169010aSmrg *) 6163e169010aSmrg # FIXME: insert proper C++ library support 6164e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6165e169010aSmrg ;; 6166e169010aSmrg esac 6167e169010aSmrg ;; 61687914d74bSmrg 6169e169010aSmrg solaris*) 6170e169010aSmrg case $cc_basename in 6171e169010aSmrg CC*) 6172e169010aSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6173e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6174e169010aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6175e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6176e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6177e169010aSmrg $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' 6178e169010aSmrg 6179e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6180e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6181e169010aSmrg case $host_os in 6182e169010aSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6183e169010aSmrg *) 6184e169010aSmrg # The compiler driver will combine and reorder linker options, 6185e169010aSmrg # but understands `-z linker_flag'. 6186e169010aSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6187e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6188e169010aSmrg ;; 6189e169010aSmrg esac 6190e169010aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 61917914d74bSmrg 6192e169010aSmrg output_verbose_link_cmd='echo' 61937914d74bSmrg 6194e169010aSmrg # Archives containing C++ object files must be created using 6195e169010aSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6196e169010aSmrg # necessary to make sure instantiated templates are included 6197e169010aSmrg # in the archive. 6198e169010aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6199e169010aSmrg ;; 6200e169010aSmrg gcx*) 6201e169010aSmrg # Green Hills C++ Compiler 6202e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 62037914d74bSmrg 6204e169010aSmrg # The C++ compiler must be used to create the archive. 6205e169010aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6206e169010aSmrg ;; 6207e169010aSmrg *) 6208e169010aSmrg # GNU C++ compiler with Solaris linker 6209e169010aSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6210e169010aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6211e169010aSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6212e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6213e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6214e169010aSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6215e169010aSmrg 6216e169010aSmrg # Commands to make compiler produce verbose output that lists 6217e169010aSmrg # what "hidden" libraries, object files and flags are used when 6218e169010aSmrg # linking a shared library. 6219e169010aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6220e169010aSmrg else 6221e169010aSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6222e169010aSmrg # platform. 6223e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6224e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6225e169010aSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6226e169010aSmrg 6227e169010aSmrg # Commands to make compiler produce verbose output that lists 6228e169010aSmrg # what "hidden" libraries, object files and flags are used when 6229e169010aSmrg # linking a shared library. 6230e169010aSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6231e169010aSmrg fi 6232e169010aSmrg 6233e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6234e169010aSmrg case $host_os in 6235e169010aSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6236e169010aSmrg *) 6237e169010aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6238e169010aSmrg ;; 6239e169010aSmrg esac 6240e169010aSmrg fi 6241e169010aSmrg ;; 6242e169010aSmrg esac 6243e169010aSmrg ;; 62447914d74bSmrg 6245e169010aSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6246e169010aSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6247e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6248e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6249e169010aSmrg runpath_var='LD_RUN_PATH' 62507914d74bSmrg 6251e169010aSmrg case $cc_basename in 6252e169010aSmrg CC*) 6253e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6254e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6255e169010aSmrg ;; 6256e169010aSmrg *) 6257e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6258e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6259e169010aSmrg ;; 6260e169010aSmrg esac 6261e169010aSmrg ;; 62627914d74bSmrg 6263e169010aSmrg sysv5* | sco3.2v5* | sco5v6*) 6264e169010aSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6265e169010aSmrg # link with -lc, and that would cause any symbols used from libc to 6266e169010aSmrg # always be unresolved, which means just about no library would 6267e169010aSmrg # ever link correctly. If we're not using GNU ld we use -z text 6268e169010aSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6269e169010aSmrg # as -z defs. 6270e169010aSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6271e169010aSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6272e169010aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6273e169010aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6274e169010aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6275e169010aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6276e169010aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6277e169010aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6278e169010aSmrg runpath_var='LD_RUN_PATH' 62797914d74bSmrg 6280e169010aSmrg case $cc_basename in 6281e169010aSmrg CC*) 6282e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6283e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6284e169010aSmrg ;; 6285e169010aSmrg *) 6286e169010aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6287e169010aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6288e169010aSmrg ;; 6289e169010aSmrg esac 6290e169010aSmrg ;; 62917914d74bSmrg 6292e169010aSmrg tandem*) 6293e169010aSmrg case $cc_basename in 6294e169010aSmrg NCC*) 6295e169010aSmrg # NonStop-UX NCC 3.20 6296e169010aSmrg # FIXME: insert proper C++ library support 6297e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6298e169010aSmrg ;; 6299e169010aSmrg *) 6300e169010aSmrg # FIXME: insert proper C++ library support 6301e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6302e169010aSmrg ;; 6303e169010aSmrg esac 6304e169010aSmrg ;; 63057914d74bSmrg 6306e169010aSmrg vxworks*) 6307e169010aSmrg # FIXME: insert proper C++ library support 6308e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6309e169010aSmrg ;; 63107914d74bSmrg 6311e169010aSmrg *) 6312e169010aSmrg # FIXME: insert proper C++ library support 6313e169010aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6314e169010aSmrg ;; 6315e169010aSmrg esac 63167914d74bSmrg 6317e169010aSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6318e169010aSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6319e169010aSmrg 6320e169010aSmrg _LT_TAGVAR(GCC, $1)="$GXX" 6321e169010aSmrg _LT_TAGVAR(LD, $1)="$LD" 6322e169010aSmrg 6323e169010aSmrg ## CAVEAT EMPTOR: 6324e169010aSmrg ## There is no encapsulation within the following macros, do not change 6325e169010aSmrg ## the running order or otherwise move them around unless you know exactly 6326e169010aSmrg ## what you are doing... 6327e169010aSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6328e169010aSmrg _LT_COMPILER_PIC($1) 6329e169010aSmrg _LT_COMPILER_C_O($1) 6330e169010aSmrg _LT_COMPILER_FILE_LOCKS($1) 6331e169010aSmrg _LT_LINKER_SHLIBS($1) 6332e169010aSmrg _LT_SYS_DYNAMIC_LINKER($1) 6333e169010aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6334e169010aSmrg 6335e169010aSmrg _LT_CONFIG($1) 6336e169010aSmrg fi # test -n "$compiler" 6337e169010aSmrg 6338e169010aSmrg CC=$lt_save_CC 6339e169010aSmrg LDCXX=$LD 6340e169010aSmrg LD=$lt_save_LD 6341e169010aSmrg GCC=$lt_save_GCC 6342e169010aSmrg with_gnu_ld=$lt_save_with_gnu_ld 6343e169010aSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 6344e169010aSmrg lt_cv_path_LD=$lt_save_path_LD 6345e169010aSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6346e169010aSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6347e169010aSmrgfi # test "$_lt_caught_CXX_error" != yes 63487914d74bSmrg 6349e169010aSmrgAC_LANG_POP 6350e169010aSmrg])# _LT_LANG_CXX_CONFIG 63517914d74bSmrg 63527914d74bSmrg 6353e169010aSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6354e169010aSmrg# --------------------------------- 6355e169010aSmrg# Figure out "hidden" library dependencies from verbose 6356e169010aSmrg# compiler output when linking a shared library. 6357e169010aSmrg# Parse the compiler output and extract the necessary 6358e169010aSmrg# objects, libraries and library flags. 6359e169010aSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6360e169010aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6361e169010aSmrg# Dependencies to place before and after the object being linked: 6362e169010aSmrg_LT_TAGVAR(predep_objects, $1)= 6363e169010aSmrg_LT_TAGVAR(postdep_objects, $1)= 6364e169010aSmrg_LT_TAGVAR(predeps, $1)= 6365e169010aSmrg_LT_TAGVAR(postdeps, $1)= 6366e169010aSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 63677914d74bSmrg 6368e169010aSmrgdnl we can't use the lt_simple_compile_test_code here, 6369e169010aSmrgdnl because it contains code intended for an executable, 6370e169010aSmrgdnl not a library. It's possible we should let each 6371e169010aSmrgdnl tag define a new lt_????_link_test_code variable, 6372e169010aSmrgdnl but it's only used here... 6373e169010aSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6374e169010aSmrgint a; 6375e169010aSmrgvoid foo (void) { a = 0; } 6376e169010aSmrg_LT_EOF 6377e169010aSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6378e169010aSmrgclass Foo 6379e169010aSmrg{ 6380e169010aSmrgpublic: 6381e169010aSmrg Foo (void) { a = 0; } 6382e169010aSmrgprivate: 6383e169010aSmrg int a; 6384e169010aSmrg}; 6385e169010aSmrg_LT_EOF 6386e169010aSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6387e169010aSmrg subroutine foo 6388e169010aSmrg implicit none 6389e169010aSmrg integer*4 a 6390e169010aSmrg a=0 6391e169010aSmrg return 6392e169010aSmrg end 6393e169010aSmrg_LT_EOF 6394e169010aSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6395e169010aSmrg subroutine foo 6396e169010aSmrg implicit none 6397e169010aSmrg integer a 6398e169010aSmrg a=0 6399e169010aSmrg return 6400e169010aSmrg end 6401e169010aSmrg_LT_EOF 6402e169010aSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6403e169010aSmrgpublic class foo { 6404e169010aSmrg private int a; 6405e169010aSmrg public void bar (void) { 6406e169010aSmrg a = 0; 6407e169010aSmrg } 6408e169010aSmrg}; 6409e169010aSmrg_LT_EOF 6410e169010aSmrg]) 6411e169010aSmrgdnl Parse the compiler output and extract the necessary 6412e169010aSmrgdnl objects, libraries and library flags. 6413e169010aSmrgif AC_TRY_EVAL(ac_compile); then 6414e169010aSmrg # Parse the compiler output and extract the necessary 6415e169010aSmrg # objects, libraries and library flags. 64167914d74bSmrg 6417e169010aSmrg # Sentinel used to keep track of whether or not we are before 6418e169010aSmrg # the conftest object file. 6419e169010aSmrg pre_test_object_deps_done=no 64207914d74bSmrg 6421e169010aSmrg for p in `eval "$output_verbose_link_cmd"`; do 6422e169010aSmrg case $p in 64237914d74bSmrg 6424e169010aSmrg -L* | -R* | -l*) 6425e169010aSmrg # Some compilers place space between "-{L,R}" and the path. 6426e169010aSmrg # Remove the space. 6427e169010aSmrg if test $p = "-L" || 6428e169010aSmrg test $p = "-R"; then 6429e169010aSmrg prev=$p 6430e169010aSmrg continue 6431e169010aSmrg else 6432e169010aSmrg prev= 6433e169010aSmrg fi 64347914d74bSmrg 6435e169010aSmrg if test "$pre_test_object_deps_done" = no; then 6436e169010aSmrg case $p in 6437e169010aSmrg -L* | -R*) 6438e169010aSmrg # Internal compiler library paths should come after those 6439e169010aSmrg # provided the user. The postdeps already come after the 6440e169010aSmrg # user supplied libs so there is no need to process them. 6441e169010aSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6442e169010aSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6443e169010aSmrg else 6444e169010aSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6445e169010aSmrg fi 6446e169010aSmrg ;; 6447e169010aSmrg # The "-l" case would never come before the object being 6448e169010aSmrg # linked, so don't bother handling this case. 6449e169010aSmrg esac 6450e169010aSmrg else 6451e169010aSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6452e169010aSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6453e169010aSmrg else 6454e169010aSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6455e169010aSmrg fi 6456e169010aSmrg fi 6457e169010aSmrg ;; 64587914d74bSmrg 6459e169010aSmrg *.$objext) 6460e169010aSmrg # This assumes that the test object file only shows up 6461e169010aSmrg # once in the compiler output. 6462e169010aSmrg if test "$p" = "conftest.$objext"; then 6463e169010aSmrg pre_test_object_deps_done=yes 6464e169010aSmrg continue 6465e169010aSmrg fi 64667914d74bSmrg 6467e169010aSmrg if test "$pre_test_object_deps_done" = no; then 6468e169010aSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6469e169010aSmrg _LT_TAGVAR(predep_objects, $1)="$p" 6470e169010aSmrg else 6471e169010aSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6472e169010aSmrg fi 6473e169010aSmrg else 6474e169010aSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6475e169010aSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 6476e169010aSmrg else 6477e169010aSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 6478e169010aSmrg fi 6479e169010aSmrg fi 6480e169010aSmrg ;; 64817914d74bSmrg 6482e169010aSmrg *) ;; # Ignore the rest. 64837914d74bSmrg 6484e169010aSmrg esac 6485e169010aSmrg done 64867914d74bSmrg 6487e169010aSmrg # Clean up. 6488e169010aSmrg rm -f a.out a.exe 6489e169010aSmrgelse 6490e169010aSmrg echo "libtool.m4: error: problem compiling $1 test program" 6491e169010aSmrgfi 64927914d74bSmrg 6493e169010aSmrg$RM -f confest.$objext 64947914d74bSmrg 6495e169010aSmrg# PORTME: override above test on systems where it is broken 6496e169010aSmrgm4_if([$1], [CXX], 6497e169010aSmrg[case $host_os in 6498e169010aSmrginterix[[3-9]]*) 6499e169010aSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 6500e169010aSmrg # hack all around it, let's just trust "g++" to DTRT. 6501e169010aSmrg _LT_TAGVAR(predep_objects,$1)= 6502e169010aSmrg _LT_TAGVAR(postdep_objects,$1)= 6503e169010aSmrg _LT_TAGVAR(postdeps,$1)= 6504e169010aSmrg ;; 65057914d74bSmrg 6506e169010aSmrglinux*) 6507e169010aSmrg case `$CC -V 2>&1 | sed 5q` in 6508e169010aSmrg *Sun\ C*) 6509e169010aSmrg # Sun C++ 5.9 6510e169010aSmrg 6511e169010aSmrg # The more standards-conforming stlport4 library is 6512e169010aSmrg # incompatible with the Cstd library. Avoid specifying 6513e169010aSmrg # it if it's in CXXFLAGS. Ignore libCrun as 6514e169010aSmrg # -library=stlport4 depends on it. 6515e169010aSmrg case " $CXX $CXXFLAGS " in 6516e169010aSmrg *" -library=stlport4 "*) 6517e169010aSmrg solaris_use_stlport4=yes 6518e169010aSmrg ;; 6519e169010aSmrg esac 65207914d74bSmrg 6521e169010aSmrg if test "$solaris_use_stlport4" != yes; then 6522e169010aSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6523e169010aSmrg fi 6524e169010aSmrg ;; 6525e169010aSmrg esac 6526e169010aSmrg ;; 65277914d74bSmrg 6528e169010aSmrgsolaris*) 6529e169010aSmrg case $cc_basename in 6530e169010aSmrg CC*) 6531e169010aSmrg # The more standards-conforming stlport4 library is 6532e169010aSmrg # incompatible with the Cstd library. Avoid specifying 6533e169010aSmrg # it if it's in CXXFLAGS. Ignore libCrun as 6534e169010aSmrg # -library=stlport4 depends on it. 6535e169010aSmrg case " $CXX $CXXFLAGS " in 6536e169010aSmrg *" -library=stlport4 "*) 6537e169010aSmrg solaris_use_stlport4=yes 6538e169010aSmrg ;; 6539e169010aSmrg esac 65407914d74bSmrg 6541e169010aSmrg # Adding this requires a known-good setup of shared libraries for 6542e169010aSmrg # Sun compiler versions before 5.6, else PIC objects from an old 6543e169010aSmrg # archive will be linked into the output, leading to subtle bugs. 6544e169010aSmrg if test "$solaris_use_stlport4" != yes; then 6545e169010aSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6546e169010aSmrg fi 6547e169010aSmrg ;; 6548e169010aSmrg esac 6549e169010aSmrg ;; 6550e169010aSmrgesac 6551e169010aSmrg]) 65527914d74bSmrg 6553e169010aSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 6554e169010aSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 6555e169010aSmrgesac 6556e169010aSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 6557e169010aSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 6558e169010aSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 6559e169010aSmrgfi 6560e169010aSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 6561e169010aSmrg [The directories searched by this compiler when creating a shared library]) 6562e169010aSmrg_LT_TAGDECL([], [predep_objects], [1], 6563e169010aSmrg [Dependencies to place before and after the objects being linked to 6564e169010aSmrg create a shared library]) 6565e169010aSmrg_LT_TAGDECL([], [postdep_objects], [1]) 6566e169010aSmrg_LT_TAGDECL([], [predeps], [1]) 6567e169010aSmrg_LT_TAGDECL([], [postdeps], [1]) 6568e169010aSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 6569e169010aSmrg [The library search path used internally by the compiler when linking 6570e169010aSmrg a shared library]) 6571e169010aSmrg])# _LT_SYS_HIDDEN_LIBDEPS 6572e169010aSmrg 6573e169010aSmrg 6574e169010aSmrg# _LT_PROG_F77 6575e169010aSmrg# ------------ 6576e169010aSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string 6577e169010aSmrg# if there is no fortran compiler, we have our own version here. 6578e169010aSmrgm4_defun([_LT_PROG_F77], 6579e169010aSmrg[ 6580e169010aSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 6581e169010aSmrgAC_PROG_F77 6582e169010aSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 6583e169010aSmrg _lt_disable_F77=yes 6584e169010aSmrgfi 6585e169010aSmrgpopdef([AC_MSG_ERROR]) 6586e169010aSmrg])# _LT_PROG_F77 65877914d74bSmrg 6588e169010aSmrgdnl aclocal-1.4 backwards compatibility: 6589e169010aSmrgdnl AC_DEFUN([_LT_PROG_F77], []) 65907914d74bSmrg 65917914d74bSmrg 6592e169010aSmrg# _LT_LANG_F77_CONFIG([TAG]) 6593e169010aSmrg# -------------------------- 6594e169010aSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 6595e169010aSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6596e169010aSmrg# to write the compiler configuration to `libtool'. 6597e169010aSmrgm4_defun([_LT_LANG_F77_CONFIG], 6598e169010aSmrg[AC_REQUIRE([_LT_PROG_F77])dnl 6599e169010aSmrgAC_LANG_PUSH(Fortran 77) 66007914d74bSmrg 6601e169010aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6602e169010aSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6603e169010aSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6604e169010aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6605e169010aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6606e169010aSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6607e169010aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6608e169010aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6609e169010aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6610e169010aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6611e169010aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6612e169010aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6613e169010aSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6614e169010aSmrg_LT_TAGVAR(module_cmds, $1)= 6615e169010aSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6616e169010aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6617e169010aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6618e169010aSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6619e169010aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6620e169010aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 66217914d74bSmrg 6622e169010aSmrg# Source file extension for f77 test sources. 6623e169010aSmrgac_ext=f 66247914d74bSmrg 6625e169010aSmrg# Object file extension for compiled f77 test sources. 6626e169010aSmrgobjext=o 6627e169010aSmrg_LT_TAGVAR(objext, $1)=$objext 6628e169010aSmrg 6629e169010aSmrg# No sense in running all these tests if we already determined that 6630e169010aSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 6631e169010aSmrg# are currently assumed to apply to all compilers on this platform, 6632e169010aSmrg# and will be corrupted by setting them based on a non-working compiler. 6633e169010aSmrgif test "$_lt_disable_F77" != yes; then 6634e169010aSmrg # Code to be used in simple compile tests 6635e169010aSmrg lt_simple_compile_test_code="\ 6636e169010aSmrg subroutine t 6637e169010aSmrg return 6638e169010aSmrg end 6639e169010aSmrg" 66407914d74bSmrg 6641e169010aSmrg # Code to be used in simple link tests 6642e169010aSmrg lt_simple_link_test_code="\ 6643e169010aSmrg program t 6644e169010aSmrg end 6645e169010aSmrg" 66467914d74bSmrg 6647e169010aSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6648e169010aSmrg _LT_TAG_COMPILER 66497914d74bSmrg 6650e169010aSmrg # save warnings/boilerplate of simple test code 6651e169010aSmrg _LT_COMPILER_BOILERPLATE 6652e169010aSmrg _LT_LINKER_BOILERPLATE 66537914d74bSmrg 6654e169010aSmrg # Allow CC to be a program name with arguments. 6655e169010aSmrg lt_save_CC="$CC" 6656e169010aSmrg lt_save_GCC=$GCC 6657e169010aSmrg CC=${F77-"f77"} 6658e169010aSmrg compiler=$CC 6659e169010aSmrg _LT_TAGVAR(compiler, $1)=$CC 6660e169010aSmrg _LT_CC_BASENAME([$compiler]) 6661e169010aSmrg GCC=$G77 6662e169010aSmrg if test -n "$compiler"; then 6663e169010aSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6664e169010aSmrg AC_MSG_RESULT([$can_build_shared]) 66657914d74bSmrg 6666e169010aSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6667e169010aSmrg test "$can_build_shared" = "no" && enable_shared=no 66687914d74bSmrg 6669e169010aSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6670e169010aSmrg # are all built from PIC. 6671e169010aSmrg case $host_os in 6672e169010aSmrg aix3*) 6673e169010aSmrg test "$enable_shared" = yes && enable_static=no 6674e169010aSmrg if test -n "$RANLIB"; then 6675e169010aSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6676e169010aSmrg postinstall_cmds='$RANLIB $lib' 6677e169010aSmrg fi 6678e169010aSmrg ;; 6679e169010aSmrg aix[[4-9]]*) 6680e169010aSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6681e169010aSmrg test "$enable_shared" = yes && enable_static=no 6682e169010aSmrg fi 6683e169010aSmrg ;; 6684e169010aSmrg esac 6685e169010aSmrg AC_MSG_RESULT([$enable_shared]) 6686e169010aSmrg 6687e169010aSmrg AC_MSG_CHECKING([whether to build static libraries]) 6688e169010aSmrg # Make sure either enable_shared or enable_static is yes. 6689e169010aSmrg test "$enable_shared" = yes || enable_static=yes 6690e169010aSmrg AC_MSG_RESULT([$enable_static]) 6691e169010aSmrg 6692e169010aSmrg _LT_TAGVAR(GCC, $1)="$G77" 6693e169010aSmrg _LT_TAGVAR(LD, $1)="$LD" 6694e169010aSmrg 6695e169010aSmrg ## CAVEAT EMPTOR: 6696e169010aSmrg ## There is no encapsulation within the following macros, do not change 6697e169010aSmrg ## the running order or otherwise move them around unless you know exactly 6698e169010aSmrg ## what you are doing... 6699e169010aSmrg _LT_COMPILER_PIC($1) 6700e169010aSmrg _LT_COMPILER_C_O($1) 6701e169010aSmrg _LT_COMPILER_FILE_LOCKS($1) 6702e169010aSmrg _LT_LINKER_SHLIBS($1) 6703e169010aSmrg _LT_SYS_DYNAMIC_LINKER($1) 6704e169010aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6705e169010aSmrg 6706e169010aSmrg _LT_CONFIG($1) 6707e169010aSmrg fi # test -n "$compiler" 6708e169010aSmrg 6709e169010aSmrg GCC=$lt_save_GCC 6710e169010aSmrg CC="$lt_save_CC" 6711e169010aSmrgfi # test "$_lt_disable_F77" != yes 67127914d74bSmrg 6713e169010aSmrgAC_LANG_POP 6714e169010aSmrg])# _LT_LANG_F77_CONFIG 67157914d74bSmrg 67167914d74bSmrg 6717e169010aSmrg# _LT_PROG_FC 6718e169010aSmrg# ----------- 6719e169010aSmrg# Since AC_PROG_FC is broken, in that it returns the empty string 6720e169010aSmrg# if there is no fortran compiler, we have our own version here. 6721e169010aSmrgm4_defun([_LT_PROG_FC], 6722e169010aSmrg[ 6723e169010aSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 6724e169010aSmrgAC_PROG_FC 6725e169010aSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 6726e169010aSmrg _lt_disable_FC=yes 6727e169010aSmrgfi 6728e169010aSmrgpopdef([AC_MSG_ERROR]) 6729e169010aSmrg])# _LT_PROG_FC 67307914d74bSmrg 6731e169010aSmrgdnl aclocal-1.4 backwards compatibility: 6732e169010aSmrgdnl AC_DEFUN([_LT_PROG_FC], []) 67337914d74bSmrg 67347914d74bSmrg 6735e169010aSmrg# _LT_LANG_FC_CONFIG([TAG]) 6736e169010aSmrg# ------------------------- 6737e169010aSmrg# Ensure that the configuration variables for a Fortran compiler are 6738e169010aSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6739e169010aSmrg# to write the compiler configuration to `libtool'. 6740e169010aSmrgm4_defun([_LT_LANG_FC_CONFIG], 6741e169010aSmrg[AC_REQUIRE([_LT_PROG_FC])dnl 6742e169010aSmrgAC_LANG_PUSH(Fortran) 6743e169010aSmrg 6744e169010aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6745e169010aSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6746e169010aSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6747e169010aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6748e169010aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6749e169010aSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6750e169010aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6751e169010aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6752e169010aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6753e169010aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6754e169010aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6755e169010aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6756e169010aSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6757e169010aSmrg_LT_TAGVAR(module_cmds, $1)= 6758e169010aSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6759e169010aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6760e169010aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6761e169010aSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6762e169010aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6763e169010aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6764e169010aSmrg 6765e169010aSmrg# Source file extension for fc test sources. 6766e169010aSmrgac_ext=${ac_fc_srcext-f} 6767e169010aSmrg 6768e169010aSmrg# Object file extension for compiled fc test sources. 6769e169010aSmrgobjext=o 6770e169010aSmrg_LT_TAGVAR(objext, $1)=$objext 6771e169010aSmrg 6772e169010aSmrg# No sense in running all these tests if we already determined that 6773e169010aSmrg# the FC compiler isn't working. Some variables (like enable_shared) 6774e169010aSmrg# are currently assumed to apply to all compilers on this platform, 6775e169010aSmrg# and will be corrupted by setting them based on a non-working compiler. 6776e169010aSmrgif test "$_lt_disable_FC" != yes; then 6777e169010aSmrg # Code to be used in simple compile tests 6778e169010aSmrg lt_simple_compile_test_code="\ 6779e169010aSmrg subroutine t 6780e169010aSmrg return 6781e169010aSmrg end 6782e169010aSmrg" 67837914d74bSmrg 6784e169010aSmrg # Code to be used in simple link tests 6785e169010aSmrg lt_simple_link_test_code="\ 6786e169010aSmrg program t 6787e169010aSmrg end 6788e169010aSmrg" 67897914d74bSmrg 6790e169010aSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6791e169010aSmrg _LT_TAG_COMPILER 67927914d74bSmrg 6793e169010aSmrg # save warnings/boilerplate of simple test code 6794e169010aSmrg _LT_COMPILER_BOILERPLATE 6795e169010aSmrg _LT_LINKER_BOILERPLATE 67967914d74bSmrg 6797e169010aSmrg # Allow CC to be a program name with arguments. 6798e169010aSmrg lt_save_CC="$CC" 6799e169010aSmrg lt_save_GCC=$GCC 6800e169010aSmrg CC=${FC-"f95"} 6801e169010aSmrg compiler=$CC 6802e169010aSmrg GCC=$ac_cv_fc_compiler_gnu 68037914d74bSmrg 6804e169010aSmrg _LT_TAGVAR(compiler, $1)=$CC 6805e169010aSmrg _LT_CC_BASENAME([$compiler]) 68067914d74bSmrg 6807e169010aSmrg if test -n "$compiler"; then 6808e169010aSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6809e169010aSmrg AC_MSG_RESULT([$can_build_shared]) 68107914d74bSmrg 6811e169010aSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6812e169010aSmrg test "$can_build_shared" = "no" && enable_shared=no 68137914d74bSmrg 6814e169010aSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6815e169010aSmrg # are all built from PIC. 6816e169010aSmrg case $host_os in 6817e169010aSmrg aix3*) 6818e169010aSmrg test "$enable_shared" = yes && enable_static=no 6819e169010aSmrg if test -n "$RANLIB"; then 6820e169010aSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6821e169010aSmrg postinstall_cmds='$RANLIB $lib' 6822e169010aSmrg fi 6823e169010aSmrg ;; 6824e169010aSmrg aix[[4-9]]*) 6825e169010aSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6826e169010aSmrg test "$enable_shared" = yes && enable_static=no 6827e169010aSmrg fi 6828e169010aSmrg ;; 6829e169010aSmrg esac 6830e169010aSmrg AC_MSG_RESULT([$enable_shared]) 6831e169010aSmrg 6832e169010aSmrg AC_MSG_CHECKING([whether to build static libraries]) 6833e169010aSmrg # Make sure either enable_shared or enable_static is yes. 6834e169010aSmrg test "$enable_shared" = yes || enable_static=yes 6835e169010aSmrg AC_MSG_RESULT([$enable_static]) 6836e169010aSmrg 6837e169010aSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 6838e169010aSmrg _LT_TAGVAR(LD, $1)="$LD" 6839e169010aSmrg 6840e169010aSmrg ## CAVEAT EMPTOR: 6841e169010aSmrg ## There is no encapsulation within the following macros, do not change 6842e169010aSmrg ## the running order or otherwise move them around unless you know exactly 6843e169010aSmrg ## what you are doing... 6844e169010aSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6845e169010aSmrg _LT_COMPILER_PIC($1) 6846e169010aSmrg _LT_COMPILER_C_O($1) 6847e169010aSmrg _LT_COMPILER_FILE_LOCKS($1) 6848e169010aSmrg _LT_LINKER_SHLIBS($1) 6849e169010aSmrg _LT_SYS_DYNAMIC_LINKER($1) 6850e169010aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6851e169010aSmrg 6852e169010aSmrg _LT_CONFIG($1) 6853e169010aSmrg fi # test -n "$compiler" 6854e169010aSmrg 6855e169010aSmrg GCC=$lt_save_GCC 6856e169010aSmrg CC="$lt_save_CC" 6857e169010aSmrgfi # test "$_lt_disable_FC" != yes 68587914d74bSmrg 6859e169010aSmrgAC_LANG_POP 6860e169010aSmrg])# _LT_LANG_FC_CONFIG 68617914d74bSmrg 68627914d74bSmrg 6863e169010aSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 6864e169010aSmrg# -------------------------- 6865e169010aSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 6866e169010aSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6867e169010aSmrg# to write the compiler configuration to `libtool'. 6868e169010aSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 6869e169010aSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 6870e169010aSmrgAC_LANG_SAVE 68717914d74bSmrg 6872e169010aSmrg# Source file extension for Java test sources. 6873e169010aSmrgac_ext=java 6874e169010aSmrg 6875e169010aSmrg# Object file extension for compiled Java test sources. 6876e169010aSmrgobjext=o 6877e169010aSmrg_LT_TAGVAR(objext, $1)=$objext 68787914d74bSmrg 6879e169010aSmrg# Code to be used in simple compile tests 6880e169010aSmrglt_simple_compile_test_code="class foo {}" 68817914d74bSmrg 6882e169010aSmrg# Code to be used in simple link tests 6883e169010aSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 68847914d74bSmrg 6885e169010aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6886e169010aSmrg_LT_TAG_COMPILER 68877914d74bSmrg 6888e169010aSmrg# save warnings/boilerplate of simple test code 6889e169010aSmrg_LT_COMPILER_BOILERPLATE 6890e169010aSmrg_LT_LINKER_BOILERPLATE 68917914d74bSmrg 6892e169010aSmrg# Allow CC to be a program name with arguments. 6893e169010aSmrglt_save_CC="$CC" 6894e169010aSmrglt_save_GCC=$GCC 6895e169010aSmrgGCC=yes 6896e169010aSmrgCC=${GCJ-"gcj"} 6897e169010aSmrgcompiler=$CC 6898e169010aSmrg_LT_TAGVAR(compiler, $1)=$CC 6899e169010aSmrg_LT_TAGVAR(LD, $1)="$LD" 6900e169010aSmrg_LT_CC_BASENAME([$compiler]) 6901e169010aSmrg 6902e169010aSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 6903e169010aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6904e169010aSmrg 6905e169010aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6906e169010aSmrg 6907e169010aSmrgif test -n "$compiler"; then 6908e169010aSmrg _LT_COMPILER_NO_RTTI($1) 6909e169010aSmrg _LT_COMPILER_PIC($1) 6910e169010aSmrg _LT_COMPILER_C_O($1) 6911e169010aSmrg _LT_COMPILER_FILE_LOCKS($1) 6912e169010aSmrg _LT_LINKER_SHLIBS($1) 6913e169010aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6914e169010aSmrg 6915e169010aSmrg _LT_CONFIG($1) 69167914d74bSmrgfi 69177914d74bSmrg 6918e169010aSmrgAC_LANG_RESTORE 69197914d74bSmrg 6920e169010aSmrgGCC=$lt_save_GCC 6921e169010aSmrgCC="$lt_save_CC" 6922e169010aSmrg])# _LT_LANG_GCJ_CONFIG 69237914d74bSmrg 69247914d74bSmrg 6925e169010aSmrg# _LT_LANG_RC_CONFIG([TAG]) 6926e169010aSmrg# ------------------------- 6927e169010aSmrg# Ensure that the configuration variables for the Windows resource compiler 6928e169010aSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6929e169010aSmrg# to write the compiler configuration to `libtool'. 6930e169010aSmrgm4_defun([_LT_LANG_RC_CONFIG], 6931e169010aSmrg[AC_REQUIRE([LT_PROG_RC])dnl 6932e169010aSmrgAC_LANG_SAVE 69337914d74bSmrg 6934e169010aSmrg# Source file extension for RC test sources. 6935e169010aSmrgac_ext=rc 69367914d74bSmrg 6937e169010aSmrg# Object file extension for compiled RC test sources. 6938e169010aSmrgobjext=o 6939e169010aSmrg_LT_TAGVAR(objext, $1)=$objext 69407914d74bSmrg 6941e169010aSmrg# Code to be used in simple compile tests 6942e169010aSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 69437914d74bSmrg 6944e169010aSmrg# Code to be used in simple link tests 6945e169010aSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 69467914d74bSmrg 6947e169010aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6948e169010aSmrg_LT_TAG_COMPILER 69497914d74bSmrg 6950e169010aSmrg# save warnings/boilerplate of simple test code 6951e169010aSmrg_LT_COMPILER_BOILERPLATE 6952e169010aSmrg_LT_LINKER_BOILERPLATE 69537914d74bSmrg 6954e169010aSmrg# Allow CC to be a program name with arguments. 6955e169010aSmrglt_save_CC="$CC" 6956e169010aSmrglt_save_GCC=$GCC 6957e169010aSmrgGCC= 6958e169010aSmrgCC=${RC-"windres"} 6959e169010aSmrgcompiler=$CC 6960e169010aSmrg_LT_TAGVAR(compiler, $1)=$CC 6961e169010aSmrg_LT_CC_BASENAME([$compiler]) 6962e169010aSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 69637914d74bSmrg 6964e169010aSmrgif test -n "$compiler"; then 6965e169010aSmrg : 6966e169010aSmrg _LT_CONFIG($1) 6967e169010aSmrgfi 69687914d74bSmrg 6969e169010aSmrgGCC=$lt_save_GCC 6970e169010aSmrgAC_LANG_RESTORE 6971e169010aSmrgCC="$lt_save_CC" 6972e169010aSmrg])# _LT_LANG_RC_CONFIG 69737914d74bSmrg 69747914d74bSmrg 6975e169010aSmrg# LT_PROG_GCJ 6976e169010aSmrg# ----------- 6977e169010aSmrgAC_DEFUN([LT_PROG_GCJ], 6978e169010aSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 6979e169010aSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 6980e169010aSmrg [AC_CHECK_TOOL(GCJ, gcj,) 6981e169010aSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6982e169010aSmrg AC_SUBST(GCJFLAGS)])])[]dnl 6983e169010aSmrg]) 69847914d74bSmrg 6985e169010aSmrg# Old name: 6986e169010aSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 6987e169010aSmrgdnl aclocal-1.4 backwards compatibility: 6988e169010aSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 69897914d74bSmrg 69907914d74bSmrg 6991e169010aSmrg# LT_PROG_RC 6992e169010aSmrg# ---------- 6993e169010aSmrgAC_DEFUN([LT_PROG_RC], 6994e169010aSmrg[AC_CHECK_TOOL(RC, windres,) 6995e169010aSmrg]) 69967914d74bSmrg 6997e169010aSmrg# Old name: 6998e169010aSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 6999e169010aSmrgdnl aclocal-1.4 backwards compatibility: 7000e169010aSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 70017914d74bSmrg 70027914d74bSmrg 7003e169010aSmrg# _LT_DECL_EGREP 7004e169010aSmrg# -------------- 7005e169010aSmrg# If we don't have a new enough Autoconf to choose the best grep 7006e169010aSmrg# available, choose the one first in the user's PATH. 7007e169010aSmrgm4_defun([_LT_DECL_EGREP], 7008e169010aSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7009e169010aSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7010e169010aSmrgtest -z "$GREP" && GREP=grep 7011e169010aSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7012e169010aSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7013e169010aSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7014e169010aSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7015e169010aSmrgAC_SUBST([GREP]) 70167914d74bSmrg]) 70177914d74bSmrg 70187914d74bSmrg 7019e169010aSmrg# _LT_DECL_OBJDUMP 7020e169010aSmrg# -------------- 7021e169010aSmrg# If we don't have a new enough Autoconf to choose the best objdump 7022e169010aSmrg# available, choose the one first in the user's PATH. 7023e169010aSmrgm4_defun([_LT_DECL_OBJDUMP], 7024e169010aSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7025e169010aSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7026e169010aSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7027e169010aSmrgAC_SUBST([OBJDUMP]) 7028e169010aSmrg]) 70297914d74bSmrg 70307914d74bSmrg 7031e169010aSmrg# _LT_DECL_SED 7032e169010aSmrg# ------------ 7033e169010aSmrg# Check for a fully-functional sed program, that truncates 7034e169010aSmrg# as few characters as possible. Prefer GNU sed if found. 7035e169010aSmrgm4_defun([_LT_DECL_SED], 7036e169010aSmrg[AC_PROG_SED 7037e169010aSmrgtest -z "$SED" && SED=sed 7038e169010aSmrgXsed="$SED -e 1s/^X//" 7039e169010aSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7040e169010aSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7041e169010aSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7042e169010aSmrg])# _LT_DECL_SED 7043e169010aSmrg 7044e169010aSmrgm4_ifndef([AC_PROG_SED], [ 7045e169010aSmrg# NOTE: This macro has been submitted for inclusion into # 7046e169010aSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7047e169010aSmrg# a released version of Autoconf we should remove this # 7048e169010aSmrg# macro and use it instead. # 7049e169010aSmrg 7050e169010aSmrgm4_defun([AC_PROG_SED], 7051e169010aSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7052e169010aSmrgAC_CACHE_VAL(lt_cv_path_SED, 7053e169010aSmrg[# Loop through the user's path and test for sed and gsed. 7054e169010aSmrg# Then use that list of sed's as ones to test for truncation. 7055e169010aSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7056e169010aSmrgfor as_dir in $PATH 7057e169010aSmrgdo 7058e169010aSmrg IFS=$as_save_IFS 7059e169010aSmrg test -z "$as_dir" && as_dir=. 7060e169010aSmrg for lt_ac_prog in sed gsed; do 7061e169010aSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7062e169010aSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7063e169010aSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 70647914d74bSmrg fi 7065e169010aSmrg done 7066e169010aSmrg done 7067e169010aSmrgdone 7068e169010aSmrgIFS=$as_save_IFS 7069e169010aSmrglt_ac_max=0 7070e169010aSmrglt_ac_count=0 7071e169010aSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7072e169010aSmrg# along with /bin/sed that truncates output. 7073e169010aSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7074e169010aSmrg test ! -f $lt_ac_sed && continue 7075e169010aSmrg cat /dev/null > conftest.in 7076e169010aSmrg lt_ac_count=0 7077e169010aSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7078e169010aSmrg # Check for GNU sed and select it if it is found. 7079e169010aSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7080e169010aSmrg lt_cv_path_SED=$lt_ac_sed 7081e169010aSmrg break 7082e169010aSmrg fi 7083e169010aSmrg while true; do 7084e169010aSmrg cat conftest.in conftest.in >conftest.tmp 7085e169010aSmrg mv conftest.tmp conftest.in 7086e169010aSmrg cp conftest.in conftest.nl 7087e169010aSmrg echo >>conftest.nl 7088e169010aSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7089e169010aSmrg cmp -s conftest.out conftest.nl || break 7090e169010aSmrg # 10000 chars as input seems more than enough 7091e169010aSmrg test $lt_ac_count -gt 10 && break 7092e169010aSmrg lt_ac_count=`expr $lt_ac_count + 1` 7093e169010aSmrg if test $lt_ac_count -gt $lt_ac_max; then 7094e169010aSmrg lt_ac_max=$lt_ac_count 7095e169010aSmrg lt_cv_path_SED=$lt_ac_sed 7096e169010aSmrg fi 7097e169010aSmrg done 7098e169010aSmrgdone 7099e169010aSmrg]) 7100e169010aSmrgSED=$lt_cv_path_SED 7101e169010aSmrgAC_SUBST([SED]) 7102e169010aSmrgAC_MSG_RESULT([$SED]) 7103e169010aSmrg])#AC_PROG_SED 7104e169010aSmrg])#m4_ifndef 7105e169010aSmrg 7106e169010aSmrg# Old name: 7107e169010aSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7108e169010aSmrgdnl aclocal-1.4 backwards compatibility: 7109e169010aSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7110e169010aSmrg 7111e169010aSmrg 7112e169010aSmrg# _LT_CHECK_SHELL_FEATURES 7113e169010aSmrg# ------------------------ 7114e169010aSmrg# Find out whether the shell is Bourne or XSI compatible, 7115e169010aSmrg# or has some other useful features. 7116e169010aSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7117e169010aSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7118e169010aSmrg# Try some XSI features 7119e169010aSmrgxsi_shell=no 7120e169010aSmrg( _lt_dummy="a/b/c" 7121e169010aSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 7122e169010aSmrg = c,a/b,, \ 7123e169010aSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7124e169010aSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7125e169010aSmrg && xsi_shell=yes 7126e169010aSmrgAC_MSG_RESULT([$xsi_shell]) 7127e169010aSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7128e169010aSmrg 7129e169010aSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7130e169010aSmrglt_shell_append=no 7131e169010aSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7132e169010aSmrg >/dev/null 2>&1 \ 7133e169010aSmrg && lt_shell_append=yes 7134e169010aSmrgAC_MSG_RESULT([$lt_shell_append]) 7135e169010aSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7136e169010aSmrg 7137e169010aSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7138e169010aSmrg lt_unset=unset 7139e169010aSmrgelse 7140e169010aSmrg lt_unset=false 7141e169010aSmrgfi 7142e169010aSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7143e169010aSmrg 7144e169010aSmrg# test EBCDIC or ASCII 7145e169010aSmrgcase `echo X|tr X '\101'` in 7146e169010aSmrg A) # ASCII based system 7147e169010aSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7148e169010aSmrg lt_SP2NL='tr \040 \012' 7149e169010aSmrg lt_NL2SP='tr \015\012 \040\040' 7150e169010aSmrg ;; 7151e169010aSmrg *) # EBCDIC based system 7152e169010aSmrg lt_SP2NL='tr \100 \n' 7153e169010aSmrg lt_NL2SP='tr \r\n \100\100' 7154e169010aSmrg ;; 7155e169010aSmrgesac 7156e169010aSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7157e169010aSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7158e169010aSmrg])# _LT_CHECK_SHELL_FEATURES 7159e169010aSmrg 7160e169010aSmrg 7161e169010aSmrg# _LT_PROG_XSI_SHELLFNS 7162e169010aSmrg# --------------------- 7163e169010aSmrg# Bourne and XSI compatible variants of some useful shell functions. 7164e169010aSmrgm4_defun([_LT_PROG_XSI_SHELLFNS], 7165e169010aSmrg[case $xsi_shell in 7166e169010aSmrg yes) 7167e169010aSmrg cat << \_LT_EOF >> "$cfgfile" 7168e169010aSmrg 7169e169010aSmrg# func_dirname file append nondir_replacement 7170e169010aSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7171e169010aSmrg# otherwise set result to NONDIR_REPLACEMENT. 7172e169010aSmrgfunc_dirname () 7173e169010aSmrg{ 7174e169010aSmrg case ${1} in 7175e169010aSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7176e169010aSmrg * ) func_dirname_result="${3}" ;; 7177e169010aSmrg esac 7178e169010aSmrg} 7179e169010aSmrg 7180e169010aSmrg# func_basename file 7181e169010aSmrgfunc_basename () 7182e169010aSmrg{ 7183e169010aSmrg func_basename_result="${1##*/}" 7184e169010aSmrg} 7185e169010aSmrg 7186e169010aSmrg# func_dirname_and_basename file append nondir_replacement 7187e169010aSmrg# perform func_basename and func_dirname in a single function 7188e169010aSmrg# call: 7189e169010aSmrg# dirname: Compute the dirname of FILE. If nonempty, 7190e169010aSmrg# add APPEND to the result, otherwise set result 7191e169010aSmrg# to NONDIR_REPLACEMENT. 7192e169010aSmrg# value returned in "$func_dirname_result" 7193e169010aSmrg# basename: Compute filename of FILE. 7194e169010aSmrg# value retuned in "$func_basename_result" 7195e169010aSmrg# Implementation must be kept synchronized with func_dirname 7196e169010aSmrg# and func_basename. For efficiency, we do not delegate to 7197e169010aSmrg# those functions but instead duplicate the functionality here. 7198e169010aSmrgfunc_dirname_and_basename () 7199e169010aSmrg{ 7200e169010aSmrg case ${1} in 7201e169010aSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7202e169010aSmrg * ) func_dirname_result="${3}" ;; 7203e169010aSmrg esac 7204e169010aSmrg func_basename_result="${1##*/}" 7205e169010aSmrg} 7206e169010aSmrg 7207e169010aSmrg# func_stripname prefix suffix name 7208e169010aSmrg# strip PREFIX and SUFFIX off of NAME. 7209e169010aSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7210e169010aSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7211e169010aSmrg# dot (in which case that matches only a dot). 7212e169010aSmrgfunc_stripname () 7213e169010aSmrg{ 7214e169010aSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7215e169010aSmrg # positional parameters, so assign one to ordinary parameter first. 7216e169010aSmrg func_stripname_result=${3} 7217e169010aSmrg func_stripname_result=${func_stripname_result#"${1}"} 7218e169010aSmrg func_stripname_result=${func_stripname_result%"${2}"} 7219e169010aSmrg} 7220e169010aSmrg 7221e169010aSmrg# func_opt_split 7222e169010aSmrgfunc_opt_split () 7223e169010aSmrg{ 7224e169010aSmrg func_opt_split_opt=${1%%=*} 7225e169010aSmrg func_opt_split_arg=${1#*=} 7226e169010aSmrg} 7227e169010aSmrg 7228e169010aSmrg# func_lo2o object 7229e169010aSmrgfunc_lo2o () 7230e169010aSmrg{ 7231e169010aSmrg case ${1} in 7232e169010aSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7233e169010aSmrg *) func_lo2o_result=${1} ;; 7234e169010aSmrg esac 7235e169010aSmrg} 7236e169010aSmrg 7237e169010aSmrg# func_xform libobj-or-source 7238e169010aSmrgfunc_xform () 7239e169010aSmrg{ 7240e169010aSmrg func_xform_result=${1%.*}.lo 7241e169010aSmrg} 7242e169010aSmrg 7243e169010aSmrg# func_arith arithmetic-term... 7244e169010aSmrgfunc_arith () 7245e169010aSmrg{ 7246e169010aSmrg func_arith_result=$(( $[*] )) 7247e169010aSmrg} 7248e169010aSmrg 7249e169010aSmrg# func_len string 7250e169010aSmrg# STRING may not start with a hyphen. 7251e169010aSmrgfunc_len () 7252e169010aSmrg{ 7253e169010aSmrg func_len_result=${#1} 7254e169010aSmrg} 7255e169010aSmrg 7256e169010aSmrg_LT_EOF 7257e169010aSmrg ;; 7258e169010aSmrg *) # Bourne compatible functions. 7259e169010aSmrg cat << \_LT_EOF >> "$cfgfile" 7260e169010aSmrg 7261e169010aSmrg# func_dirname file append nondir_replacement 7262e169010aSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7263e169010aSmrg# otherwise set result to NONDIR_REPLACEMENT. 7264e169010aSmrgfunc_dirname () 7265e169010aSmrg{ 7266e169010aSmrg # Extract subdirectory from the argument. 7267e169010aSmrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 7268e169010aSmrg if test "X$func_dirname_result" = "X${1}"; then 7269e169010aSmrg func_dirname_result="${3}" 72707914d74bSmrg else 7271e169010aSmrg func_dirname_result="$func_dirname_result${2}" 7272e169010aSmrg fi 7273e169010aSmrg} 7274e169010aSmrg 7275e169010aSmrg# func_basename file 7276e169010aSmrgfunc_basename () 7277e169010aSmrg{ 7278e169010aSmrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 7279e169010aSmrg} 7280e169010aSmrg 7281e169010aSmrgdnl func_dirname_and_basename 7282e169010aSmrgdnl A portable version of this function is already defined in general.m4sh 7283e169010aSmrgdnl so there is no need for it here. 7284e169010aSmrg 7285e169010aSmrg# func_stripname prefix suffix name 7286e169010aSmrg# strip PREFIX and SUFFIX off of NAME. 7287e169010aSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7288e169010aSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7289e169010aSmrg# dot (in which case that matches only a dot). 7290e169010aSmrg# func_strip_suffix prefix name 7291e169010aSmrgfunc_stripname () 7292e169010aSmrg{ 7293e169010aSmrg case ${2} in 7294e169010aSmrg .*) func_stripname_result=`$ECHO "X${3}" \ 7295e169010aSmrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 7296e169010aSmrg *) func_stripname_result=`$ECHO "X${3}" \ 7297e169010aSmrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 7298e169010aSmrg esac 7299e169010aSmrg} 7300e169010aSmrg 7301e169010aSmrg# sed scripts: 7302e169010aSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 7303e169010aSmrgmy_sed_long_arg='1s/^-[[^=]]*=//' 7304e169010aSmrg 7305e169010aSmrg# func_opt_split 7306e169010aSmrgfunc_opt_split () 7307e169010aSmrg{ 7308e169010aSmrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 7309e169010aSmrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 7310e169010aSmrg} 7311e169010aSmrg 7312e169010aSmrg# func_lo2o object 7313e169010aSmrgfunc_lo2o () 7314e169010aSmrg{ 7315e169010aSmrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 7316e169010aSmrg} 7317e169010aSmrg 7318e169010aSmrg# func_xform libobj-or-source 7319e169010aSmrgfunc_xform () 7320e169010aSmrg{ 7321e169010aSmrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 7322e169010aSmrg} 7323e169010aSmrg 7324e169010aSmrg# func_arith arithmetic-term... 7325e169010aSmrgfunc_arith () 7326e169010aSmrg{ 7327e169010aSmrg func_arith_result=`expr "$[@]"` 7328e169010aSmrg} 7329e169010aSmrg 7330e169010aSmrg# func_len string 7331e169010aSmrg# STRING may not start with a hyphen. 7332e169010aSmrgfunc_len () 7333e169010aSmrg{ 7334e169010aSmrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 7335e169010aSmrg} 7336e169010aSmrg 7337e169010aSmrg_LT_EOF 7338e169010aSmrgesac 7339e169010aSmrg 7340e169010aSmrgcase $lt_shell_append in 7341e169010aSmrg yes) 7342e169010aSmrg cat << \_LT_EOF >> "$cfgfile" 7343e169010aSmrg 7344e169010aSmrg# func_append var value 7345e169010aSmrg# Append VALUE to the end of shell variable VAR. 7346e169010aSmrgfunc_append () 7347e169010aSmrg{ 7348e169010aSmrg eval "$[1]+=\$[2]" 7349e169010aSmrg} 7350e169010aSmrg_LT_EOF 7351e169010aSmrg ;; 7352e169010aSmrg *) 7353e169010aSmrg cat << \_LT_EOF >> "$cfgfile" 7354e169010aSmrg 7355e169010aSmrg# func_append var value 7356e169010aSmrg# Append VALUE to the end of shell variable VAR. 7357e169010aSmrgfunc_append () 7358e169010aSmrg{ 7359e169010aSmrg eval "$[1]=\$$[1]\$[2]" 7360e169010aSmrg} 7361e169010aSmrg 7362e169010aSmrg_LT_EOF 7363e169010aSmrg ;; 7364e169010aSmrg esac 7365e169010aSmrg]) 7366e169010aSmrg 7367e169010aSmrg# Helper functions for option handling. -*- Autoconf -*- 7368e169010aSmrg# 7369e169010aSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7370e169010aSmrg# Written by Gary V. Vaughan, 2004 7371e169010aSmrg# 7372e169010aSmrg# This file is free software; the Free Software Foundation gives 7373e169010aSmrg# unlimited permission to copy and/or distribute it, with or without 7374e169010aSmrg# modifications, as long as this notice is preserved. 7375e169010aSmrg 7376e169010aSmrg# serial 6 ltoptions.m4 7377e169010aSmrg 7378e169010aSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7379e169010aSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7380e169010aSmrg 7381e169010aSmrg 7382e169010aSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7383e169010aSmrg# ------------------------------------------ 7384e169010aSmrgm4_define([_LT_MANGLE_OPTION], 7385e169010aSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7386e169010aSmrg 7387e169010aSmrg 7388e169010aSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7389e169010aSmrg# --------------------------------------- 7390e169010aSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7391e169010aSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7392e169010aSmrg# saved as a flag. 7393e169010aSmrgm4_define([_LT_SET_OPTION], 7394e169010aSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7395e169010aSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7396e169010aSmrg _LT_MANGLE_DEFUN([$1], [$2]), 7397e169010aSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7398e169010aSmrg]) 7399e169010aSmrg 7400e169010aSmrg 7401e169010aSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7402e169010aSmrg# ------------------------------------------------------------ 7403e169010aSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7404e169010aSmrgm4_define([_LT_IF_OPTION], 7405e169010aSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7406e169010aSmrg 7407e169010aSmrg 7408e169010aSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7409e169010aSmrg# ------------------------------------------------------- 7410e169010aSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7411e169010aSmrg# are set. 7412e169010aSmrgm4_define([_LT_UNLESS_OPTIONS], 7413e169010aSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7414e169010aSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7415e169010aSmrg [m4_define([$0_found])])])[]dnl 7416e169010aSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7417e169010aSmrg])[]dnl 7418e169010aSmrg]) 7419e169010aSmrg 7420e169010aSmrg 7421e169010aSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7422e169010aSmrg# ---------------------------------------- 7423e169010aSmrg# OPTION-LIST is a space-separated list of Libtool options associated 7424e169010aSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7425e169010aSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7426e169010aSmrg# the unknown option and exit. 7427e169010aSmrgm4_defun([_LT_SET_OPTIONS], 7428e169010aSmrg[# Set options 7429e169010aSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7430e169010aSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 7431e169010aSmrg 7432e169010aSmrgm4_if([$1],[LT_INIT],[ 7433e169010aSmrg dnl 7434e169010aSmrg dnl Simply set some default values (i.e off) if boolean options were not 7435e169010aSmrg dnl specified: 7436e169010aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7437e169010aSmrg ]) 7438e169010aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7439e169010aSmrg ]) 7440e169010aSmrg dnl 7441e169010aSmrg dnl If no reference was made to various pairs of opposing options, then 7442e169010aSmrg dnl we run the default mode handler for the pair. For example, if neither 7443e169010aSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7444e169010aSmrg dnl archives by default: 7445e169010aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7446e169010aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7447e169010aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7448e169010aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7449e169010aSmrg [_LT_ENABLE_FAST_INSTALL]) 7450e169010aSmrg ]) 7451e169010aSmrg])# _LT_SET_OPTIONS 7452e169010aSmrg 7453e169010aSmrg 7454e169010aSmrg 7455e169010aSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7456e169010aSmrg# ----------------------------------------- 7457e169010aSmrgm4_define([_LT_MANGLE_DEFUN], 7458e169010aSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7459e169010aSmrg 7460e169010aSmrg 7461e169010aSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7462e169010aSmrg# ----------------------------------------------- 7463e169010aSmrgm4_define([LT_OPTION_DEFINE], 7464e169010aSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7465e169010aSmrg])# LT_OPTION_DEFINE 7466e169010aSmrg 7467e169010aSmrg 7468e169010aSmrg# dlopen 7469e169010aSmrg# ------ 7470e169010aSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7471e169010aSmrg]) 7472e169010aSmrg 7473e169010aSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7474e169010aSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7475e169010aSmrgAC_DIAGNOSE([obsolete], 7476e169010aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7477e169010aSmrgput the `dlopen' option into LT_INIT's first parameter.]) 7478e169010aSmrg]) 7479e169010aSmrg 7480e169010aSmrgdnl aclocal-1.4 backwards compatibility: 7481e169010aSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 7482e169010aSmrg 7483e169010aSmrg 7484e169010aSmrg# win32-dll 7485e169010aSmrg# --------- 7486e169010aSmrg# Declare package support for building win32 dll's. 7487e169010aSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7488e169010aSmrg[enable_win32_dll=yes 7489e169010aSmrg 7490e169010aSmrgcase $host in 7491e169010aSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 7492e169010aSmrg AC_CHECK_TOOL(AS, as, false) 7493e169010aSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7494e169010aSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7495e169010aSmrg ;; 7496e169010aSmrgesac 7497e169010aSmrg 7498e169010aSmrgtest -z "$AS" && AS=as 7499e169010aSmrg_LT_DECL([], [AS], [0], [Assembler program])dnl 7500e169010aSmrg 7501e169010aSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7502e169010aSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 7503e169010aSmrg 7504e169010aSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7505e169010aSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 7506e169010aSmrg])# win32-dll 7507e169010aSmrg 7508e169010aSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7509e169010aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7510e169010aSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7511e169010aSmrgAC_DIAGNOSE([obsolete], 7512e169010aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7513e169010aSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 7514e169010aSmrg]) 7515e169010aSmrg 7516e169010aSmrgdnl aclocal-1.4 backwards compatibility: 7517e169010aSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 7518e169010aSmrg 7519e169010aSmrg 7520e169010aSmrg# _LT_ENABLE_SHARED([DEFAULT]) 7521e169010aSmrg# ---------------------------- 7522e169010aSmrg# implement the --enable-shared flag, and supports the `shared' and 7523e169010aSmrg# `disable-shared' LT_INIT options. 7524e169010aSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7525e169010aSmrgm4_define([_LT_ENABLE_SHARED], 7526e169010aSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 7527e169010aSmrgAC_ARG_ENABLE([shared], 7528e169010aSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 7529e169010aSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 7530e169010aSmrg [p=${PACKAGE-default} 7531e169010aSmrg case $enableval in 7532e169010aSmrg yes) enable_shared=yes ;; 7533e169010aSmrg no) enable_shared=no ;; 7534e169010aSmrg *) 7535e169010aSmrg enable_shared=no 7536e169010aSmrg # Look at the argument we got. We use all the common list separators. 7537e169010aSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7538e169010aSmrg for pkg in $enableval; do 7539e169010aSmrg IFS="$lt_save_ifs" 7540e169010aSmrg if test "X$pkg" = "X$p"; then 7541e169010aSmrg enable_shared=yes 75427914d74bSmrg fi 7543e169010aSmrg done 7544e169010aSmrg IFS="$lt_save_ifs" 7545e169010aSmrg ;; 7546e169010aSmrg esac], 7547e169010aSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 7548e169010aSmrg 7549e169010aSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 7550e169010aSmrg [Whether or not to build shared libraries]) 7551e169010aSmrg])# _LT_ENABLE_SHARED 7552e169010aSmrg 7553e169010aSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 7554e169010aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 7555e169010aSmrg 7556e169010aSmrg# Old names: 7557e169010aSmrgAC_DEFUN([AC_ENABLE_SHARED], 7558e169010aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 7559e169010aSmrg]) 7560e169010aSmrg 7561e169010aSmrgAC_DEFUN([AC_DISABLE_SHARED], 7562e169010aSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 7563e169010aSmrg]) 7564e169010aSmrg 7565e169010aSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7566e169010aSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7567e169010aSmrg 7568e169010aSmrgdnl aclocal-1.4 backwards compatibility: 7569e169010aSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 7570e169010aSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 7571e169010aSmrg 7572e169010aSmrg 7573e169010aSmrg 7574e169010aSmrg# _LT_ENABLE_STATIC([DEFAULT]) 7575e169010aSmrg# ---------------------------- 7576e169010aSmrg# implement the --enable-static flag, and support the `static' and 7577e169010aSmrg# `disable-static' LT_INIT options. 7578e169010aSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7579e169010aSmrgm4_define([_LT_ENABLE_STATIC], 7580e169010aSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 7581e169010aSmrgAC_ARG_ENABLE([static], 7582e169010aSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 7583e169010aSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 7584e169010aSmrg [p=${PACKAGE-default} 7585e169010aSmrg case $enableval in 7586e169010aSmrg yes) enable_static=yes ;; 7587e169010aSmrg no) enable_static=no ;; 7588e169010aSmrg *) 7589e169010aSmrg enable_static=no 7590e169010aSmrg # Look at the argument we got. We use all the common list separators. 7591e169010aSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7592e169010aSmrg for pkg in $enableval; do 7593e169010aSmrg IFS="$lt_save_ifs" 7594e169010aSmrg if test "X$pkg" = "X$p"; then 7595e169010aSmrg enable_static=yes 7596e169010aSmrg fi 7597e169010aSmrg done 7598e169010aSmrg IFS="$lt_save_ifs" 7599e169010aSmrg ;; 7600e169010aSmrg esac], 7601e169010aSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 7602e169010aSmrg 7603e169010aSmrg _LT_DECL([build_old_libs], [enable_static], [0], 7604e169010aSmrg [Whether or not to build static libraries]) 7605e169010aSmrg])# _LT_ENABLE_STATIC 7606e169010aSmrg 7607e169010aSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 7608e169010aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 7609e169010aSmrg 7610e169010aSmrg# Old names: 7611e169010aSmrgAC_DEFUN([AC_ENABLE_STATIC], 7612e169010aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 7613e169010aSmrg]) 7614e169010aSmrg 7615e169010aSmrgAC_DEFUN([AC_DISABLE_STATIC], 7616e169010aSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 7617e169010aSmrg]) 7618e169010aSmrg 7619e169010aSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7620e169010aSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7621e169010aSmrg 7622e169010aSmrgdnl aclocal-1.4 backwards compatibility: 7623e169010aSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 7624e169010aSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 7625e169010aSmrg 7626e169010aSmrg 7627e169010aSmrg 7628e169010aSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 7629e169010aSmrg# ---------------------------------- 7630e169010aSmrg# implement the --enable-fast-install flag, and support the `fast-install' 7631e169010aSmrg# and `disable-fast-install' LT_INIT options. 7632e169010aSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7633e169010aSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 7634e169010aSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 7635e169010aSmrgAC_ARG_ENABLE([fast-install], 7636e169010aSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 7637e169010aSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 7638e169010aSmrg [p=${PACKAGE-default} 7639e169010aSmrg case $enableval in 7640e169010aSmrg yes) enable_fast_install=yes ;; 7641e169010aSmrg no) enable_fast_install=no ;; 7642e169010aSmrg *) 7643e169010aSmrg enable_fast_install=no 7644e169010aSmrg # Look at the argument we got. We use all the common list separators. 7645e169010aSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7646e169010aSmrg for pkg in $enableval; do 7647e169010aSmrg IFS="$lt_save_ifs" 7648e169010aSmrg if test "X$pkg" = "X$p"; then 7649e169010aSmrg enable_fast_install=yes 7650e169010aSmrg fi 7651e169010aSmrg done 7652e169010aSmrg IFS="$lt_save_ifs" 7653e169010aSmrg ;; 7654e169010aSmrg esac], 7655e169010aSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 7656e169010aSmrg 7657e169010aSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 7658e169010aSmrg [Whether or not to optimize for fast installation])dnl 7659e169010aSmrg])# _LT_ENABLE_FAST_INSTALL 7660e169010aSmrg 7661e169010aSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 7662e169010aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 7663e169010aSmrg 7664e169010aSmrg# Old names: 7665e169010aSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 7666e169010aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 7667e169010aSmrgAC_DIAGNOSE([obsolete], 7668e169010aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7669e169010aSmrgthe `fast-install' option into LT_INIT's first parameter.]) 7670e169010aSmrg]) 7671e169010aSmrg 7672e169010aSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 7673e169010aSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 7674e169010aSmrgAC_DIAGNOSE([obsolete], 7675e169010aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7676e169010aSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 7677e169010aSmrg]) 7678e169010aSmrg 7679e169010aSmrgdnl aclocal-1.4 backwards compatibility: 7680e169010aSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 7681e169010aSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 7682e169010aSmrg 7683e169010aSmrg 7684e169010aSmrg# _LT_WITH_PIC([MODE]) 7685e169010aSmrg# -------------------- 7686e169010aSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 7687e169010aSmrg# LT_INIT options. 7688e169010aSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 7689e169010aSmrgm4_define([_LT_WITH_PIC], 7690e169010aSmrg[AC_ARG_WITH([pic], 7691e169010aSmrg [AS_HELP_STRING([--with-pic], 7692e169010aSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 7693e169010aSmrg [pic_mode="$withval"], 7694e169010aSmrg [pic_mode=default]) 7695e169010aSmrg 7696e169010aSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 7697e169010aSmrg 7698e169010aSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 7699e169010aSmrg])# _LT_WITH_PIC 7700e169010aSmrg 7701e169010aSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 7702e169010aSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 7703e169010aSmrg 7704e169010aSmrg# Old name: 7705e169010aSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 7706e169010aSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 7707e169010aSmrgAC_DIAGNOSE([obsolete], 7708e169010aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7709e169010aSmrgput the `pic-only' option into LT_INIT's first parameter.]) 7710e169010aSmrg]) 7711e169010aSmrg 7712e169010aSmrgdnl aclocal-1.4 backwards compatibility: 7713e169010aSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 7714e169010aSmrg 7715e169010aSmrg 7716e169010aSmrgm4_define([_LTDL_MODE], []) 7717e169010aSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 7718e169010aSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 7719e169010aSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 7720e169010aSmrg [m4_define([_LTDL_MODE], [recursive])]) 7721e169010aSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 7722e169010aSmrg [m4_define([_LTDL_MODE], [subproject])]) 7723e169010aSmrg 7724e169010aSmrgm4_define([_LTDL_TYPE], []) 7725e169010aSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 7726e169010aSmrg [m4_define([_LTDL_TYPE], [installable])]) 7727e169010aSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 7728e169010aSmrg [m4_define([_LTDL_TYPE], [convenience])]) 7729e169010aSmrg 7730e169010aSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 7731e169010aSmrg# 7732e169010aSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7733e169010aSmrg# Written by Gary V. Vaughan, 2004 7734e169010aSmrg# 7735e169010aSmrg# This file is free software; the Free Software Foundation gives 7736e169010aSmrg# unlimited permission to copy and/or distribute it, with or without 7737e169010aSmrg# modifications, as long as this notice is preserved. 7738e169010aSmrg 7739e169010aSmrg# serial 6 ltsugar.m4 7740e169010aSmrg 7741e169010aSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7742e169010aSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 7743e169010aSmrg 7744e169010aSmrg 7745e169010aSmrg# lt_join(SEP, ARG1, [ARG2...]) 7746e169010aSmrg# ----------------------------- 7747e169010aSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 7748e169010aSmrg# associated separator. 7749e169010aSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 7750e169010aSmrg# versions in m4sugar had bugs. 7751e169010aSmrgm4_define([lt_join], 7752e169010aSmrg[m4_if([$#], [1], [], 7753e169010aSmrg [$#], [2], [[$2]], 7754e169010aSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 7755e169010aSmrgm4_define([_lt_join], 7756e169010aSmrg[m4_if([$#$2], [2], [], 7757e169010aSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 7758e169010aSmrg 7759e169010aSmrg 7760e169010aSmrg# lt_car(LIST) 7761e169010aSmrg# lt_cdr(LIST) 7762e169010aSmrg# ------------ 7763e169010aSmrg# Manipulate m4 lists. 7764e169010aSmrg# These macros are necessary as long as will still need to support 7765e169010aSmrg# Autoconf-2.59 which quotes differently. 7766e169010aSmrgm4_define([lt_car], [[$1]]) 7767e169010aSmrgm4_define([lt_cdr], 7768e169010aSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 7769e169010aSmrg [$#], 1, [], 7770e169010aSmrg [m4_dquote(m4_shift($@))])]) 7771e169010aSmrgm4_define([lt_unquote], $1) 7772e169010aSmrg 7773e169010aSmrg 7774e169010aSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 7775e169010aSmrg# ------------------------------------------ 7776e169010aSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 7777e169010aSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 7778e169010aSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 7779e169010aSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 7780e169010aSmrg# than defined and empty). 7781e169010aSmrg# 7782e169010aSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 7783e169010aSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 7784e169010aSmrgm4_define([lt_append], 7785e169010aSmrg[m4_define([$1], 7786e169010aSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 7787e169010aSmrg 7788e169010aSmrg 7789e169010aSmrg 7790e169010aSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 7791e169010aSmrg# ---------------------------------------------------------- 7792e169010aSmrg# Produce a SEP delimited list of all paired combinations of elements of 7793e169010aSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 7794e169010aSmrg# has the form PREFIXmINFIXSUFFIXn. 7795e169010aSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 7796e169010aSmrgm4_define([lt_combine], 7797e169010aSmrg[m4_if(m4_eval([$# > 3]), [1], 7798e169010aSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 7799e169010aSmrg[[m4_foreach([_Lt_prefix], [$2], 7800e169010aSmrg [m4_foreach([_Lt_suffix], 7801e169010aSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 7802e169010aSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 7803e169010aSmrg 7804e169010aSmrg 7805e169010aSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 7806e169010aSmrg# ----------------------------------------------------------------------- 7807e169010aSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 7808e169010aSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 7809e169010aSmrgm4_define([lt_if_append_uniq], 7810e169010aSmrg[m4_ifdef([$1], 7811e169010aSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 7812e169010aSmrg [lt_append([$1], [$2], [$3])$4], 7813e169010aSmrg [$5])], 7814e169010aSmrg [lt_append([$1], [$2], [$3])$4])]) 7815e169010aSmrg 7816e169010aSmrg 7817e169010aSmrg# lt_dict_add(DICT, KEY, VALUE) 7818e169010aSmrg# ----------------------------- 7819e169010aSmrgm4_define([lt_dict_add], 7820e169010aSmrg[m4_define([$1($2)], [$3])]) 7821e169010aSmrg 7822e169010aSmrg 7823e169010aSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 7824e169010aSmrg# -------------------------------------------- 7825e169010aSmrgm4_define([lt_dict_add_subkey], 7826e169010aSmrg[m4_define([$1($2:$3)], [$4])]) 7827e169010aSmrg 7828e169010aSmrg 7829e169010aSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 7830e169010aSmrg# ---------------------------------- 7831e169010aSmrgm4_define([lt_dict_fetch], 7832e169010aSmrg[m4_ifval([$3], 7833e169010aSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 7834e169010aSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 7835e169010aSmrg 7836e169010aSmrg 7837e169010aSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 7838e169010aSmrg# ----------------------------------------------------------------- 7839e169010aSmrgm4_define([lt_if_dict_fetch], 7840e169010aSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 7841e169010aSmrg [$5], 7842e169010aSmrg [$6])]) 7843e169010aSmrg 7844e169010aSmrg 7845e169010aSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 7846e169010aSmrg# -------------------------------------------------------------- 7847e169010aSmrgm4_define([lt_dict_filter], 7848e169010aSmrg[m4_if([$5], [], [], 7849e169010aSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 7850e169010aSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 7851e169010aSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 7852e169010aSmrg]) 7853e169010aSmrg 7854e169010aSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 7855e169010aSmrg# 7856e169010aSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 7857e169010aSmrg# Written by Scott James Remnant, 2004 7858e169010aSmrg# 7859e169010aSmrg# This file is free software; the Free Software Foundation gives 7860e169010aSmrg# unlimited permission to copy and/or distribute it, with or without 7861e169010aSmrg# modifications, as long as this notice is preserved. 7862e169010aSmrg 7863e169010aSmrg# Generated from ltversion.in. 7864e169010aSmrg 7865e169010aSmrg# serial 3012 ltversion.m4 7866e169010aSmrg# This file is part of GNU Libtool 7867e169010aSmrg 7868e169010aSmrgm4_define([LT_PACKAGE_VERSION], [2.2.6]) 7869e169010aSmrgm4_define([LT_PACKAGE_REVISION], [1.3012]) 7870e169010aSmrg 7871e169010aSmrgAC_DEFUN([LTVERSION_VERSION], 7872e169010aSmrg[macro_version='2.2.6' 7873e169010aSmrgmacro_revision='1.3012' 7874e169010aSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 7875e169010aSmrg_LT_DECL(, macro_revision, 0) 7876e169010aSmrg]) 7877e169010aSmrg 7878e169010aSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 7879e169010aSmrg# 7880e169010aSmrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 7881e169010aSmrg# Written by Scott James Remnant, 2004. 7882e169010aSmrg# 7883e169010aSmrg# This file is free software; the Free Software Foundation gives 7884e169010aSmrg# unlimited permission to copy and/or distribute it, with or without 7885e169010aSmrg# modifications, as long as this notice is preserved. 7886e169010aSmrg 7887e169010aSmrg# serial 4 lt~obsolete.m4 7888e169010aSmrg 7889e169010aSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 7890e169010aSmrg# 7891e169010aSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 7892e169010aSmrg# which have later been changed to m4_define as they aren't part of the 7893e169010aSmrg# exported API, or moved to Autoconf or Automake where they belong. 7894e169010aSmrg# 7895e169010aSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 7896e169010aSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 7897e169010aSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 7898e169010aSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 7899e169010aSmrg# and doesn't know about Autoconf macros at all.) 7900e169010aSmrg# 7901e169010aSmrg# So we provide this file, which has a silly filename so it's always 7902e169010aSmrg# included after everything else. This provides aclocal with the 7903e169010aSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 7904e169010aSmrg# because those macros already exist, or will be overwritten later. 7905e169010aSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 7906e169010aSmrg# 7907e169010aSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 7908e169010aSmrg# Yes, that means every name once taken will need to remain here until 7909e169010aSmrg# we give up compatibility with versions before 1.7, at which point 7910e169010aSmrg# we need to keep only those names which we still refer to. 7911e169010aSmrg 7912e169010aSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7913e169010aSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 7914e169010aSmrg 7915e169010aSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 7916e169010aSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 7917e169010aSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 7918e169010aSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 7919e169010aSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 7920e169010aSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 7921e169010aSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 7922e169010aSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 7923e169010aSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 7924e169010aSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 7925e169010aSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 7926e169010aSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 7927e169010aSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 7928e169010aSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 7929e169010aSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 7930e169010aSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 7931e169010aSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 7932e169010aSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 7933e169010aSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 7934e169010aSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 7935e169010aSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 7936e169010aSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 7937e169010aSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 7938e169010aSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 7939e169010aSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 7940e169010aSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 7941e169010aSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 7942e169010aSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 7943e169010aSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 7944e169010aSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 7945e169010aSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 7946e169010aSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 7947e169010aSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 7948e169010aSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 7949e169010aSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 7950e169010aSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 7951e169010aSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 7952e169010aSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 7953e169010aSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 7954e169010aSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 7955e169010aSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 7956e169010aSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 7957e169010aSmrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 7958e169010aSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 7959e169010aSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 7960e169010aSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 7961e169010aSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 7962e169010aSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 7963e169010aSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 7964e169010aSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 7965e169010aSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 7966e169010aSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 7967e169010aSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 7968e169010aSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 7969e169010aSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 7970e169010aSmrg 7971e169010aSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 7972e169010aSmrg# 7973e169010aSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 7974e169010aSmrg# 7975e169010aSmrg# This program is free software; you can redistribute it and/or modify 7976e169010aSmrg# it under the terms of the GNU General Public License as published by 7977e169010aSmrg# the Free Software Foundation; either version 2 of the License, or 7978e169010aSmrg# (at your option) any later version. 7979e169010aSmrg# 7980e169010aSmrg# This program is distributed in the hope that it will be useful, but 7981e169010aSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 7982e169010aSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 7983e169010aSmrg# General Public License for more details. 7984e169010aSmrg# 7985e169010aSmrg# You should have received a copy of the GNU General Public License 7986e169010aSmrg# along with this program; if not, write to the Free Software 7987e169010aSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 7988e169010aSmrg# 7989e169010aSmrg# As a special exception to the GNU General Public License, if you 7990e169010aSmrg# distribute this file as part of a program that contains a 7991e169010aSmrg# configuration script generated by Autoconf, you may include it under 7992e169010aSmrg# the same distribution terms that you use for the rest of that program. 7993e169010aSmrg 7994e169010aSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 7995e169010aSmrg# ---------------------------------- 7996e169010aSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 7997e169010aSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 7998e169010aSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 7999e169010aSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 8000e169010aSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8001e169010aSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8002e169010aSmrgfi 8003e169010aSmrgif test -n "$PKG_CONFIG"; then 8004e169010aSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 8005e169010aSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8006e169010aSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8007e169010aSmrg AC_MSG_RESULT([yes]) 8008e169010aSmrg else 8009e169010aSmrg AC_MSG_RESULT([no]) 8010e169010aSmrg PKG_CONFIG="" 8011e169010aSmrg fi 8012e169010aSmrg 8013e169010aSmrgfi[]dnl 8014e169010aSmrg])# PKG_PROG_PKG_CONFIG 8015e169010aSmrg 8016e169010aSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8017e169010aSmrg# 8018e169010aSmrg# Check to see whether a particular set of modules exists. Similar 8019e169010aSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8020e169010aSmrg# 8021e169010aSmrg# 8022e169010aSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 8023e169010aSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 8024e169010aSmrg# PKG_CHECK_EXISTS manually 8025e169010aSmrg# -------------------------------------------------------------- 8026e169010aSmrgAC_DEFUN([PKG_CHECK_EXISTS], 8027e169010aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8028e169010aSmrgif test -n "$PKG_CONFIG" && \ 8029e169010aSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8030e169010aSmrg m4_ifval([$2], [$2], [:]) 8031e169010aSmrgm4_ifvaln([$3], [else 8032e169010aSmrg $3])dnl 8033e169010aSmrgfi]) 8034e169010aSmrg 8035e169010aSmrg 8036e169010aSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8037e169010aSmrg# --------------------------------------------- 8038e169010aSmrgm4_define([_PKG_CONFIG], 8039e169010aSmrg[if test -n "$$1"; then 8040e169010aSmrg pkg_cv_[]$1="$$1" 8041e169010aSmrg elif test -n "$PKG_CONFIG"; then 8042e169010aSmrg PKG_CHECK_EXISTS([$3], 8043e169010aSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8044e169010aSmrg [pkg_failed=yes]) 8045e169010aSmrg else 8046e169010aSmrg pkg_failed=untried 8047e169010aSmrgfi[]dnl 8048e169010aSmrg])# _PKG_CONFIG 8049e169010aSmrg 8050e169010aSmrg# _PKG_SHORT_ERRORS_SUPPORTED 8051e169010aSmrg# ----------------------------- 8052e169010aSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8053e169010aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8054e169010aSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8055e169010aSmrg _pkg_short_errors_supported=yes 8056e169010aSmrgelse 8057e169010aSmrg _pkg_short_errors_supported=no 8058e169010aSmrgfi[]dnl 8059e169010aSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 8060e169010aSmrg 8061e169010aSmrg 8062e169010aSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8063e169010aSmrg# [ACTION-IF-NOT-FOUND]) 8064e169010aSmrg# 8065e169010aSmrg# 8066e169010aSmrg# Note that if there is a possibility the first call to 8067e169010aSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8068e169010aSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8069e169010aSmrg# 8070e169010aSmrg# 8071e169010aSmrg# -------------------------------------------------------------- 8072e169010aSmrgAC_DEFUN([PKG_CHECK_MODULES], 8073e169010aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8074e169010aSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8075e169010aSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8076e169010aSmrg 8077e169010aSmrgpkg_failed=no 8078e169010aSmrgAC_MSG_CHECKING([for $1]) 8079e169010aSmrg 8080e169010aSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8081e169010aSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8082e169010aSmrg 8083e169010aSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8084e169010aSmrgand $1[]_LIBS to avoid the need to call pkg-config. 8085e169010aSmrgSee the pkg-config man page for more details.]) 8086e169010aSmrg 8087e169010aSmrgif test $pkg_failed = yes; then 8088e169010aSmrg _PKG_SHORT_ERRORS_SUPPORTED 8089e169010aSmrg if test $_pkg_short_errors_supported = yes; then 8090e169010aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8091e169010aSmrg else 8092e169010aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8093e169010aSmrg fi 8094e169010aSmrg # Put the nasty error message in config.log where it belongs 8095e169010aSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8096e169010aSmrg 8097e169010aSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 8098e169010aSmrg[Package requirements ($2) were not met: 8099e169010aSmrg 8100e169010aSmrg$$1_PKG_ERRORS 8101e169010aSmrg 8102e169010aSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8103e169010aSmrginstalled software in a non-standard prefix. 8104e169010aSmrg 8105e169010aSmrg_PKG_TEXT 8106e169010aSmrg])], 8107e169010aSmrg [AC_MSG_RESULT([no]) 8108e169010aSmrg $4]) 8109e169010aSmrgelif test $pkg_failed = untried; then 8110e169010aSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 8111e169010aSmrg[The pkg-config script could not be found or is too old. Make sure it 8112e169010aSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 8113e169010aSmrgpath to pkg-config. 8114e169010aSmrg 8115e169010aSmrg_PKG_TEXT 8116e169010aSmrg 8117e169010aSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 8118e169010aSmrg [$4]) 8119e169010aSmrgelse 8120e169010aSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8121e169010aSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8122e169010aSmrg AC_MSG_RESULT([yes]) 8123e169010aSmrg ifelse([$3], , :, [$3]) 8124e169010aSmrgfi[]dnl 8125e169010aSmrg])# PKG_CHECK_MODULES 8126e169010aSmrg 8127e169010aSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 8128e169010aSmrg# 8129e169010aSmrg# This file is free software; the Free Software Foundation 8130e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8131e169010aSmrg# with or without modifications, as long as this notice is preserved. 8132e169010aSmrg 8133e169010aSmrg# AM_AUTOMAKE_VERSION(VERSION) 8134e169010aSmrg# ---------------------------- 8135e169010aSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 8136e169010aSmrg# generated from the m4 files accompanying Automake X.Y. 8137e169010aSmrg# (This private macro should not be called outside this file.) 8138e169010aSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 8139e169010aSmrg[am__api_version='1.11' 8140e169010aSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 8141e169010aSmrgdnl require some minimum version. Point them to the right macro. 8142e169010aSmrgm4_if([$1], [1.11], [], 8143e169010aSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 8144e169010aSmrg]) 8145e169010aSmrg 8146e169010aSmrg# _AM_AUTOCONF_VERSION(VERSION) 8147e169010aSmrg# ----------------------------- 8148e169010aSmrg# aclocal traces this macro to find the Autoconf version. 8149e169010aSmrg# This is a private macro too. Using m4_define simplifies 8150e169010aSmrg# the logic in aclocal, which can simply ignore this definition. 8151e169010aSmrgm4_define([_AM_AUTOCONF_VERSION], []) 8152e169010aSmrg 8153e169010aSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 8154e169010aSmrg# ------------------------------- 8155e169010aSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8156e169010aSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 8157e169010aSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8158e169010aSmrg[AM_AUTOMAKE_VERSION([1.11])dnl 8159e169010aSmrgm4_ifndef([AC_AUTOCONF_VERSION], 8160e169010aSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8161e169010aSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 8162e169010aSmrg 8163e169010aSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 8164e169010aSmrg 8165e169010aSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8166e169010aSmrg# 8167e169010aSmrg# This file is free software; the Free Software Foundation 8168e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8169e169010aSmrg# with or without modifications, as long as this notice is preserved. 8170e169010aSmrg 8171e169010aSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8172e169010aSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 8173e169010aSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 8174e169010aSmrg# 8175e169010aSmrg# Of course, Automake must honor this variable whenever it calls a 8176e169010aSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 8177e169010aSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 8178e169010aSmrg# depending on how configure is run. This is pretty annoying, since 8179e169010aSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8180e169010aSmrg# source directory, any form will work fine, but in subdirectories a 8181e169010aSmrg# relative path needs to be adjusted first. 8182e169010aSmrg# 8183e169010aSmrg# $ac_aux_dir/missing 8184e169010aSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 8185e169010aSmrg# $top_srcdir/$ac_aux_dir/missing 8186e169010aSmrg# fails if $ac_aux_dir is absolute, 8187e169010aSmrg# fails when called from a subdirectory in a VPATH build with 8188e169010aSmrg# a relative $ac_aux_dir 8189e169010aSmrg# 8190e169010aSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8191e169010aSmrg# are both prefixed by $srcdir. In an in-source build this is usually 8192e169010aSmrg# harmless because $srcdir is `.', but things will broke when you 8193e169010aSmrg# start a VPATH build or use an absolute $srcdir. 8194e169010aSmrg# 8195e169010aSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 8196e169010aSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 8197e169010aSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 8198e169010aSmrg# and then we would define $MISSING as 8199e169010aSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 8200e169010aSmrg# This will work as long as MISSING is not called from configure, because 8201e169010aSmrg# unfortunately $(top_srcdir) has no meaning in configure. 8202e169010aSmrg# However there are other variables, like CC, which are often used in 8203e169010aSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 8204e169010aSmrg# 8205e169010aSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 8206e169010aSmrg# absolute PATH. The drawback is that using absolute paths prevent a 8207e169010aSmrg# configured tree to be moved without reconfiguration. 8208e169010aSmrg 8209e169010aSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 8210e169010aSmrg[dnl Rely on autoconf to set up CDPATH properly. 8211e169010aSmrgAC_PREREQ([2.50])dnl 8212e169010aSmrg# expand $ac_aux_dir to an absolute path 8213e169010aSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 8214e169010aSmrg]) 8215e169010aSmrg 8216e169010aSmrg# AM_CONDITIONAL -*- Autoconf -*- 8217e169010aSmrg 8218e169010aSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 8219e169010aSmrg# Free Software Foundation, Inc. 8220e169010aSmrg# 8221e169010aSmrg# This file is free software; the Free Software Foundation 8222e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8223e169010aSmrg# with or without modifications, as long as this notice is preserved. 8224e169010aSmrg 8225e169010aSmrg# serial 9 8226e169010aSmrg 8227e169010aSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8228e169010aSmrg# ------------------------------------- 8229e169010aSmrg# Define a conditional. 8230e169010aSmrgAC_DEFUN([AM_CONDITIONAL], 8231e169010aSmrg[AC_PREREQ(2.52)dnl 8232e169010aSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8233e169010aSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8234e169010aSmrgAC_SUBST([$1_TRUE])dnl 8235e169010aSmrgAC_SUBST([$1_FALSE])dnl 8236e169010aSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8237e169010aSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8238e169010aSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 8239e169010aSmrgif $2; then 8240e169010aSmrg $1_TRUE= 8241e169010aSmrg $1_FALSE='#' 8242e169010aSmrgelse 8243e169010aSmrg $1_TRUE='#' 8244e169010aSmrg $1_FALSE= 8245e169010aSmrgfi 8246e169010aSmrgAC_CONFIG_COMMANDS_PRE( 8247e169010aSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8248e169010aSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 8249e169010aSmrgUsually this means the macro was only invoked conditionally.]]) 8250e169010aSmrgfi])]) 82517914d74bSmrg 8252e169010aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 8253e169010aSmrg# Free Software Foundation, Inc. 8254e169010aSmrg# 8255e169010aSmrg# This file is free software; the Free Software Foundation 8256e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8257e169010aSmrg# with or without modifications, as long as this notice is preserved. 82587914d74bSmrg 8259e169010aSmrg# serial 10 82607914d74bSmrg 8261e169010aSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 8262e169010aSmrg# written in clear, in which case automake, when reading aclocal.m4, 8263e169010aSmrg# will think it sees a *use*, and therefore will trigger all it's 8264e169010aSmrg# C support machinery. Also note that it means that autoscan, seeing 8265e169010aSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 82667914d74bSmrg 82677914d74bSmrg 8268e169010aSmrg# _AM_DEPENDENCIES(NAME) 8269e169010aSmrg# ---------------------- 8270e169010aSmrg# See how the compiler implements dependency checking. 8271e169010aSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 8272e169010aSmrg# We try a few techniques and use that to set a single cache variable. 8273e169010aSmrg# 8274e169010aSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 8275e169010aSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 8276e169010aSmrg# dependency, and given that the user is not expected to run this macro, 8277e169010aSmrg# just rely on AC_PROG_CC. 8278e169010aSmrgAC_DEFUN([_AM_DEPENDENCIES], 8279e169010aSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 8280e169010aSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 8281e169010aSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 8282e169010aSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 82837914d74bSmrg 8284e169010aSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 8285e169010aSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 8286e169010aSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 8287e169010aSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 8288e169010aSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 8289e169010aSmrg [depcc="$$1" am_compiler_list=]) 82907914d74bSmrg 8291e169010aSmrgAC_CACHE_CHECK([dependency style of $depcc], 8292e169010aSmrg [am_cv_$1_dependencies_compiler_type], 8293e169010aSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 8294e169010aSmrg # We make a subdir and do the tests there. Otherwise we can end up 8295e169010aSmrg # making bogus files that we don't know about and never remove. For 8296e169010aSmrg # instance it was reported that on HP-UX the gcc test will end up 8297e169010aSmrg # making a dummy file named `D' -- because `-MD' means `put the output 8298e169010aSmrg # in D'. 8299e169010aSmrg mkdir conftest.dir 8300e169010aSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 8301e169010aSmrg # using a relative directory. 8302e169010aSmrg cp "$am_depcomp" conftest.dir 8303e169010aSmrg cd conftest.dir 8304e169010aSmrg # We will build objects and dependencies in a subdirectory because 8305e169010aSmrg # it helps to detect inapplicable dependency modes. For instance 8306e169010aSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 8307e169010aSmrg # side effect of compilation, but ICC will put the dependencies in 8308e169010aSmrg # the current directory while Tru64 will put them in the object 8309e169010aSmrg # directory. 8310e169010aSmrg mkdir sub 83117914d74bSmrg 8312e169010aSmrg am_cv_$1_dependencies_compiler_type=none 8313e169010aSmrg if test "$am_compiler_list" = ""; then 8314e169010aSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 8315e169010aSmrg fi 8316e169010aSmrg am__universal=false 8317e169010aSmrg m4_case([$1], [CC], 8318e169010aSmrg [case " $depcc " in #( 8319e169010aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8320e169010aSmrg esac], 8321e169010aSmrg [CXX], 8322e169010aSmrg [case " $depcc " in #( 8323e169010aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8324e169010aSmrg esac]) 83257914d74bSmrg 8326e169010aSmrg for depmode in $am_compiler_list; do 8327e169010aSmrg # Setup a source with many dependencies, because some compilers 8328e169010aSmrg # like to wrap large dependency lists on column 80 (with \), and 8329e169010aSmrg # we should not choose a depcomp mode which is confused by this. 8330e169010aSmrg # 8331e169010aSmrg # We need to recreate these files for each test, as the compiler may 8332e169010aSmrg # overwrite some of them when testing with obscure command lines. 8333e169010aSmrg # This happens at least with the AIX C compiler. 8334e169010aSmrg : > sub/conftest.c 8335e169010aSmrg for i in 1 2 3 4 5 6; do 8336e169010aSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 8337e169010aSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 8338e169010aSmrg # Solaris 8's {/usr,}/bin/sh. 8339e169010aSmrg touch sub/conftst$i.h 8340e169010aSmrg done 8341e169010aSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 83427914d74bSmrg 8343e169010aSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 8344e169010aSmrg # mode. It turns out that the SunPro C++ compiler does not properly 8345e169010aSmrg # handle `-M -o', and we need to detect this. Also, some Intel 8346e169010aSmrg # versions had trouble with output in subdirs 8347e169010aSmrg am__obj=sub/conftest.${OBJEXT-o} 8348e169010aSmrg am__minus_obj="-o $am__obj" 8349e169010aSmrg case $depmode in 8350e169010aSmrg gcc) 8351e169010aSmrg # This depmode causes a compiler race in universal mode. 8352e169010aSmrg test "$am__universal" = false || continue 83537914d74bSmrg ;; 8354e169010aSmrg nosideeffect) 8355e169010aSmrg # after this tag, mechanisms are not by side-effect, so they'll 8356e169010aSmrg # only be used when explicitly requested 8357e169010aSmrg if test "x$enable_dependency_tracking" = xyes; then 8358e169010aSmrg continue 83597914d74bSmrg else 8360e169010aSmrg break 83617914d74bSmrg fi 83627914d74bSmrg ;; 8363e169010aSmrg msvisualcpp | msvcmsys) 8364e169010aSmrg # This compiler won't grok `-c -o', but also, the minuso test has 8365e169010aSmrg # not run yet. These depmodes are late enough in the game, and 8366e169010aSmrg # so weak that their functioning should not be impacted. 8367e169010aSmrg am__obj=conftest.${OBJEXT-o} 8368e169010aSmrg am__minus_obj= 83697914d74bSmrg ;; 8370e169010aSmrg none) break ;; 8371e169010aSmrg esac 8372e169010aSmrg if depmode=$depmode \ 8373e169010aSmrg source=sub/conftest.c object=$am__obj \ 8374e169010aSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 8375e169010aSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 8376e169010aSmrg >/dev/null 2>conftest.err && 8377e169010aSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 8378e169010aSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 8379e169010aSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 8380e169010aSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 8381e169010aSmrg # icc doesn't choke on unknown options, it will just issue warnings 8382e169010aSmrg # or remarks (even with -Werror). So we grep stderr for any message 8383e169010aSmrg # that says an option was ignored or not supported. 8384e169010aSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 8385e169010aSmrg # icc: Command line warning: ignoring option '-M'; no argument required 8386e169010aSmrg # The diagnosis changed in icc 8.0: 8387e169010aSmrg # icc: Command line remark: option '-MP' not supported 8388e169010aSmrg if (grep 'ignoring option' conftest.err || 8389e169010aSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 8390e169010aSmrg am_cv_$1_dependencies_compiler_type=$depmode 8391e169010aSmrg break 8392e169010aSmrg fi 8393e169010aSmrg fi 8394e169010aSmrg done 83957914d74bSmrg 8396e169010aSmrg cd .. 8397e169010aSmrg rm -rf conftest.dir 8398e169010aSmrgelse 8399e169010aSmrg am_cv_$1_dependencies_compiler_type=none 8400e169010aSmrgfi 8401e169010aSmrg]) 8402e169010aSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 8403e169010aSmrgAM_CONDITIONAL([am__fastdep$1], [ 8404e169010aSmrg test "x$enable_dependency_tracking" != xno \ 8405e169010aSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 8406e169010aSmrg]) 84077914d74bSmrg 84087914d74bSmrg 8409e169010aSmrg# AM_SET_DEPDIR 8410e169010aSmrg# ------------- 8411e169010aSmrg# Choose a directory name for dependency files. 8412e169010aSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 8413e169010aSmrgAC_DEFUN([AM_SET_DEPDIR], 8414e169010aSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 8415e169010aSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 8416e169010aSmrg]) 84177914d74bSmrg 84187914d74bSmrg 8419e169010aSmrg# AM_DEP_TRACK 8420e169010aSmrg# ------------ 8421e169010aSmrgAC_DEFUN([AM_DEP_TRACK], 8422e169010aSmrg[AC_ARG_ENABLE(dependency-tracking, 8423e169010aSmrg[ --disable-dependency-tracking speeds up one-time build 8424e169010aSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 8425e169010aSmrgif test "x$enable_dependency_tracking" != xno; then 8426e169010aSmrg am_depcomp="$ac_aux_dir/depcomp" 8427e169010aSmrg AMDEPBACKSLASH='\' 8428e169010aSmrgfi 8429e169010aSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 8430e169010aSmrgAC_SUBST([AMDEPBACKSLASH])dnl 8431e169010aSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 8432e169010aSmrg]) 8433e169010aSmrg 8434e169010aSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 8435e169010aSmrg 8436e169010aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 8437e169010aSmrg# Free Software Foundation, Inc. 8438e169010aSmrg# 8439e169010aSmrg# This file is free software; the Free Software Foundation 8440e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8441e169010aSmrg# with or without modifications, as long as this notice is preserved. 8442e169010aSmrg 8443e169010aSmrg#serial 5 8444e169010aSmrg 8445e169010aSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 8446e169010aSmrg# ------------------------------ 8447e169010aSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 8448e169010aSmrg[{ 8449e169010aSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 8450e169010aSmrg # are listed without --file. Let's play safe and only enable the eval 8451e169010aSmrg # if we detect the quoting. 8452e169010aSmrg case $CONFIG_FILES in 8453e169010aSmrg *\'*) eval set x "$CONFIG_FILES" ;; 8454e169010aSmrg *) set x $CONFIG_FILES ;; 8455e169010aSmrg esac 8456e169010aSmrg shift 8457e169010aSmrg for mf 8458e169010aSmrg do 8459e169010aSmrg # Strip MF so we end up with the name of the file. 8460e169010aSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 8461e169010aSmrg # Check whether this is an Automake generated Makefile or not. 8462e169010aSmrg # We used to match only the files named `Makefile.in', but 8463e169010aSmrg # some people rename them; so instead we look at the file content. 8464e169010aSmrg # Grep'ing the first line is not enough: some people post-process 8465e169010aSmrg # each Makefile.in and add a new line on top of each file to say so. 8466e169010aSmrg # Grep'ing the whole file is not good either: AIX grep has a line 8467e169010aSmrg # limit of 2048, but all sed's we know have understand at least 4000. 8468e169010aSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 8469e169010aSmrg dirpart=`AS_DIRNAME("$mf")` 8470e169010aSmrg else 8471e169010aSmrg continue 8472e169010aSmrg fi 8473e169010aSmrg # Extract the definition of DEPDIR, am__include, and am__quote 8474e169010aSmrg # from the Makefile without running `make'. 8475e169010aSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 8476e169010aSmrg test -z "$DEPDIR" && continue 8477e169010aSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 8478e169010aSmrg test -z "am__include" && continue 8479e169010aSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 8480e169010aSmrg # When using ansi2knr, U may be empty or an underscore; expand it 8481e169010aSmrg U=`sed -n 's/^U = //p' < "$mf"` 8482e169010aSmrg # Find all dependency output files, they are included files with 8483e169010aSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 8484e169010aSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 8485e169010aSmrg # expansion. 8486e169010aSmrg for file in `sed -n " 8487e169010aSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 8488e169010aSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 8489e169010aSmrg # Make sure the directory exists. 8490e169010aSmrg test -f "$dirpart/$file" && continue 8491e169010aSmrg fdir=`AS_DIRNAME(["$file"])` 8492e169010aSmrg AS_MKDIR_P([$dirpart/$fdir]) 8493e169010aSmrg # echo "creating $dirpart/$file" 8494e169010aSmrg echo '# dummy' > "$dirpart/$file" 8495e169010aSmrg done 8496e169010aSmrg done 8497e169010aSmrg} 8498e169010aSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 8499e169010aSmrg 8500e169010aSmrg 8501e169010aSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 8502e169010aSmrg# ----------------------------- 8503e169010aSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 8504e169010aSmrg# 8505e169010aSmrg# This code is only required when automatic dependency tracking 8506e169010aSmrg# is enabled. FIXME. This creates each `.P' file that we will 8507e169010aSmrg# need in order to bootstrap the dependency handling code. 8508e169010aSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 8509e169010aSmrg[AC_CONFIG_COMMANDS([depfiles], 8510e169010aSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 8511e169010aSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 8512e169010aSmrg]) 85137914d74bSmrg 8514e169010aSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 8515e169010aSmrg# Free Software Foundation, Inc. 8516e169010aSmrg# 8517e169010aSmrg# This file is free software; the Free Software Foundation 8518e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8519e169010aSmrg# with or without modifications, as long as this notice is preserved. 85207914d74bSmrg 8521e169010aSmrg# serial 8 85227914d74bSmrg 8523e169010aSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 8524e169010aSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 85257914d74bSmrg 8526e169010aSmrg# Do all the work for Automake. -*- Autoconf -*- 85277914d74bSmrg 8528e169010aSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 8529e169010aSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 8530e169010aSmrg# 8531e169010aSmrg# This file is free software; the Free Software Foundation 8532e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8533e169010aSmrg# with or without modifications, as long as this notice is preserved. 85347914d74bSmrg 8535e169010aSmrg# serial 16 85367914d74bSmrg 8537e169010aSmrg# This macro actually does too much. Some checks are only needed if 8538e169010aSmrg# your package does certain things. But this isn't really a big deal. 85397914d74bSmrg 8540e169010aSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 8541e169010aSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 8542e169010aSmrg# ----------------------------------------------- 8543e169010aSmrg# The call with PACKAGE and VERSION arguments is the old style 8544e169010aSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 8545e169010aSmrg# and VERSION should now be passed to AC_INIT and removed from 8546e169010aSmrg# the call to AM_INIT_AUTOMAKE. 8547e169010aSmrg# We support both call styles for the transition. After 8548e169010aSmrg# the next Automake release, Autoconf can make the AC_INIT 8549e169010aSmrg# arguments mandatory, and then we can depend on a new Autoconf 8550e169010aSmrg# release and drop the old call support. 8551e169010aSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 8552e169010aSmrg[AC_PREREQ([2.62])dnl 8553e169010aSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 8554e169010aSmrgdnl the ones we care about. 8555e169010aSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 8556e169010aSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 8557e169010aSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 8558e169010aSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 8559e169010aSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 8560e169010aSmrg # is not polluted with repeated "-I." 8561e169010aSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 8562e169010aSmrg # test to see if srcdir already configured 8563e169010aSmrg if test -f $srcdir/config.status; then 8564e169010aSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 85657914d74bSmrg fi 85667914d74bSmrgfi 85677914d74bSmrg 8568e169010aSmrg# test whether we have cygpath 8569e169010aSmrgif test -z "$CYGPATH_W"; then 8570e169010aSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 8571e169010aSmrg CYGPATH_W='cygpath -w' 8572e169010aSmrg else 8573e169010aSmrg CYGPATH_W=echo 8574e169010aSmrg fi 8575e169010aSmrgfi 8576e169010aSmrgAC_SUBST([CYGPATH_W]) 85777914d74bSmrg 8578e169010aSmrg# Define the identity of the package. 8579e169010aSmrgdnl Distinguish between old-style and new-style calls. 8580e169010aSmrgm4_ifval([$2], 8581e169010aSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 8582e169010aSmrg AC_SUBST([PACKAGE], [$1])dnl 8583e169010aSmrg AC_SUBST([VERSION], [$2])], 8584e169010aSmrg[_AM_SET_OPTIONS([$1])dnl 8585e169010aSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 8586e169010aSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 8587e169010aSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 8588e169010aSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 8589e169010aSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 85907914d74bSmrg 8591e169010aSmrg_AM_IF_OPTION([no-define],, 8592e169010aSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 8593e169010aSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 85947914d74bSmrg 8595e169010aSmrg# Some tools Automake needs. 8596e169010aSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 8597e169010aSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 8598e169010aSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 8599e169010aSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 8600e169010aSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 8601e169010aSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 8602e169010aSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 8603e169010aSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 8604e169010aSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 8605e169010aSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 8606e169010aSmrg# We need awk for the "check" target. The system "awk" is bad on 8607e169010aSmrg# some platforms. 8608e169010aSmrgAC_REQUIRE([AC_PROG_AWK])dnl 8609e169010aSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 8610e169010aSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 8611e169010aSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 8612e169010aSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 8613e169010aSmrg [_AM_PROG_TAR([v7])])]) 8614e169010aSmrg_AM_IF_OPTION([no-dependencies],, 8615e169010aSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 8616e169010aSmrg [_AM_DEPENDENCIES(CC)], 8617e169010aSmrg [define([AC_PROG_CC], 8618e169010aSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 8619e169010aSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 8620e169010aSmrg [_AM_DEPENDENCIES(CXX)], 8621e169010aSmrg [define([AC_PROG_CXX], 8622e169010aSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 8623e169010aSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 8624e169010aSmrg [_AM_DEPENDENCIES(OBJC)], 8625e169010aSmrg [define([AC_PROG_OBJC], 8626e169010aSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 8627e169010aSmrg]) 8628e169010aSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 8629e169010aSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 8630e169010aSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 8631e169010aSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 8632e169010aSmrgAC_CONFIG_COMMANDS_PRE(dnl 8633e169010aSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 8634e169010aSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 8635e169010aSmrg]) 86367914d74bSmrg 8637e169010aSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 8638e169010aSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 8639e169010aSmrgdnl mangled by Autoconf and run in a shell conditional statement. 8640e169010aSmrgm4_define([_AC_COMPILER_EXEEXT], 8641e169010aSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 86427914d74bSmrg 86437914d74bSmrg 8644e169010aSmrg# When config.status generates a header, we must update the stamp-h file. 8645e169010aSmrg# This file resides in the same directory as the config header 8646e169010aSmrg# that is generated. The stamp files are numbered to have different names. 86477914d74bSmrg 8648e169010aSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 8649e169010aSmrg# loop where config.status creates the headers, so we can generate 8650e169010aSmrg# our stamp files there. 8651e169010aSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 8652e169010aSmrg[# Compute $1's index in $config_headers. 8653e169010aSmrg_am_arg=$1 8654e169010aSmrg_am_stamp_count=1 8655e169010aSmrgfor _am_header in $config_headers :; do 8656e169010aSmrg case $_am_header in 8657e169010aSmrg $_am_arg | $_am_arg:* ) 8658e169010aSmrg break ;; 8659e169010aSmrg * ) 8660e169010aSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 8661e169010aSmrg esac 8662e169010aSmrgdone 8663e169010aSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 86647914d74bSmrg 8665e169010aSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 8666e169010aSmrg# 8667e169010aSmrg# This file is free software; the Free Software Foundation 8668e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8669e169010aSmrg# with or without modifications, as long as this notice is preserved. 86707914d74bSmrg 8671e169010aSmrg# AM_PROG_INSTALL_SH 8672e169010aSmrg# ------------------ 8673e169010aSmrg# Define $install_sh. 8674e169010aSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 8675e169010aSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8676e169010aSmrgif test x"${install_sh}" != xset; then 8677e169010aSmrg case $am_aux_dir in 8678e169010aSmrg *\ * | *\ *) 8679e169010aSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 8680e169010aSmrg *) 8681e169010aSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 8682e169010aSmrg esac 8683e169010aSmrgfi 8684e169010aSmrgAC_SUBST(install_sh)]) 86857914d74bSmrg 8686e169010aSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 8687e169010aSmrg# 8688e169010aSmrg# This file is free software; the Free Software Foundation 8689e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8690e169010aSmrg# with or without modifications, as long as this notice is preserved. 86917914d74bSmrg 8692e169010aSmrg# serial 2 86937914d74bSmrg 8694e169010aSmrg# Check whether the underlying file-system supports filenames 8695e169010aSmrg# with a leading dot. For instance MS-DOS doesn't. 8696e169010aSmrgAC_DEFUN([AM_SET_LEADING_DOT], 8697e169010aSmrg[rm -rf .tst 2>/dev/null 8698e169010aSmrgmkdir .tst 2>/dev/null 8699e169010aSmrgif test -d .tst; then 8700e169010aSmrg am__leading_dot=. 8701e169010aSmrgelse 8702e169010aSmrg am__leading_dot=_ 8703e169010aSmrgfi 8704e169010aSmrgrmdir .tst 2>/dev/null 8705e169010aSmrgAC_SUBST([am__leading_dot])]) 87067914d74bSmrg 8707e169010aSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 8708e169010aSmrg# From Jim Meyering 87097914d74bSmrg 8710e169010aSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 8711e169010aSmrg# Free Software Foundation, Inc. 8712e169010aSmrg# 8713e169010aSmrg# This file is free software; the Free Software Foundation 8714e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8715e169010aSmrg# with or without modifications, as long as this notice is preserved. 87167914d74bSmrg 8717e169010aSmrg# serial 5 87187914d74bSmrg 8719e169010aSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 8720e169010aSmrg# ---------------------------------- 8721e169010aSmrg# Control maintainer-specific portions of Makefiles. 8722e169010aSmrg# Default is to disable them, unless `enable' is passed literally. 8723e169010aSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 8724e169010aSmrg# can override the default with the --enable/--disable switch. 8725e169010aSmrgAC_DEFUN([AM_MAINTAINER_MODE], 8726e169010aSmrg[m4_case(m4_default([$1], [disable]), 8727e169010aSmrg [enable], [m4_define([am_maintainer_other], [disable])], 8728e169010aSmrg [disable], [m4_define([am_maintainer_other], [enable])], 8729e169010aSmrg [m4_define([am_maintainer_other], [enable]) 8730e169010aSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 8731e169010aSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 8732e169010aSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 8733e169010aSmrg AC_ARG_ENABLE([maintainer-mode], 8734e169010aSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 8735e169010aSmrg (and sometimes confusing) to the casual installer], 8736e169010aSmrg [USE_MAINTAINER_MODE=$enableval], 8737e169010aSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 8738e169010aSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 8739e169010aSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 8740e169010aSmrg MAINT=$MAINTAINER_MODE_TRUE 8741e169010aSmrg AC_SUBST([MAINT])dnl 8742e169010aSmrg] 8743e169010aSmrg) 87447914d74bSmrg 8745e169010aSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 87467914d74bSmrg 8747e169010aSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 87487914d74bSmrg 8749e169010aSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 8750e169010aSmrg# 8751e169010aSmrg# This file is free software; the Free Software Foundation 8752e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8753e169010aSmrg# with or without modifications, as long as this notice is preserved. 87547914d74bSmrg 8755e169010aSmrg# serial 4 87567914d74bSmrg 8757e169010aSmrg# AM_MAKE_INCLUDE() 8758e169010aSmrg# ----------------- 8759e169010aSmrg# Check to see how make treats includes. 8760e169010aSmrgAC_DEFUN([AM_MAKE_INCLUDE], 8761e169010aSmrg[am_make=${MAKE-make} 8762e169010aSmrgcat > confinc << 'END' 8763e169010aSmrgam__doit: 8764e169010aSmrg @echo this is the am__doit target 8765e169010aSmrg.PHONY: am__doit 8766e169010aSmrgEND 8767e169010aSmrg# If we don't find an include directive, just comment out the code. 8768e169010aSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 8769e169010aSmrgam__include="#" 8770e169010aSmrgam__quote= 8771e169010aSmrg_am_result=none 8772e169010aSmrg# First try GNU make style include. 8773e169010aSmrgecho "include confinc" > confmf 8774e169010aSmrg# Ignore all kinds of additional output from `make'. 8775e169010aSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 8776e169010aSmrg*the\ am__doit\ target*) 8777e169010aSmrg am__include=include 8778e169010aSmrg am__quote= 8779e169010aSmrg _am_result=GNU 8780e169010aSmrg ;; 8781e169010aSmrgesac 8782e169010aSmrg# Now try BSD make style include. 8783e169010aSmrgif test "$am__include" = "#"; then 8784e169010aSmrg echo '.include "confinc"' > confmf 8785e169010aSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 8786e169010aSmrg *the\ am__doit\ target*) 8787e169010aSmrg am__include=.include 8788e169010aSmrg am__quote="\"" 8789e169010aSmrg _am_result=BSD 8790e169010aSmrg ;; 8791e169010aSmrg esac 8792e169010aSmrgfi 8793e169010aSmrgAC_SUBST([am__include]) 8794e169010aSmrgAC_SUBST([am__quote]) 8795e169010aSmrgAC_MSG_RESULT([$_am_result]) 8796e169010aSmrgrm -f confinc confmf 8797e169010aSmrg]) 87987914d74bSmrg 8799e169010aSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 88007914d74bSmrg 8801e169010aSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 8802e169010aSmrg# Free Software Foundation, Inc. 8803e169010aSmrg# 8804e169010aSmrg# This file is free software; the Free Software Foundation 8805e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8806e169010aSmrg# with or without modifications, as long as this notice is preserved. 88077914d74bSmrg 8808e169010aSmrg# serial 6 88097914d74bSmrg 8810e169010aSmrg# AM_MISSING_PROG(NAME, PROGRAM) 8811e169010aSmrg# ------------------------------ 8812e169010aSmrgAC_DEFUN([AM_MISSING_PROG], 8813e169010aSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 8814e169010aSmrg$1=${$1-"${am_missing_run}$2"} 8815e169010aSmrgAC_SUBST($1)]) 88167914d74bSmrg 88177914d74bSmrg 8818e169010aSmrg# AM_MISSING_HAS_RUN 8819e169010aSmrg# ------------------ 8820e169010aSmrg# Define MISSING if not defined so far and test if it supports --run. 8821e169010aSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 8822e169010aSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 8823e169010aSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8824e169010aSmrgAC_REQUIRE_AUX_FILE([missing])dnl 8825e169010aSmrgif test x"${MISSING+set}" != xset; then 8826e169010aSmrg case $am_aux_dir in 8827e169010aSmrg *\ * | *\ *) 8828e169010aSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 8829e169010aSmrg *) 8830e169010aSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 8831e169010aSmrg esac 8832e169010aSmrgfi 8833e169010aSmrg# Use eval to expand $SHELL 8834e169010aSmrgif eval "$MISSING --run true"; then 8835e169010aSmrg am_missing_run="$MISSING --run " 8836e169010aSmrgelse 8837e169010aSmrg am_missing_run= 8838e169010aSmrg AC_MSG_WARN([`missing' script is too old or missing]) 8839e169010aSmrgfi 8840e169010aSmrg]) 88417914d74bSmrg 8842e169010aSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 8843e169010aSmrg# 8844e169010aSmrg# This file is free software; the Free Software Foundation 8845e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8846e169010aSmrg# with or without modifications, as long as this notice is preserved. 88477914d74bSmrg 8848e169010aSmrg# AM_PROG_MKDIR_P 8849e169010aSmrg# --------------- 8850e169010aSmrg# Check for `mkdir -p'. 8851e169010aSmrgAC_DEFUN([AM_PROG_MKDIR_P], 8852e169010aSmrg[AC_PREREQ([2.60])dnl 8853e169010aSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 8854e169010aSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 8855e169010aSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 8856e169010aSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 8857e169010aSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 8858e169010aSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 8859e169010aSmrgdnl adjustment using top_builddir (which is defined more often than 8860e169010aSmrgdnl MKDIR_P). 8861e169010aSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 8862e169010aSmrgcase $mkdir_p in 8863e169010aSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 8864e169010aSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 8865e169010aSmrgesac 8866e169010aSmrg]) 8867e169010aSmrg 8868e169010aSmrg# Helper functions for option handling. -*- Autoconf -*- 8869e169010aSmrg 8870e169010aSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 8871e169010aSmrg# 8872e169010aSmrg# This file is free software; the Free Software Foundation 8873e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8874e169010aSmrg# with or without modifications, as long as this notice is preserved. 88757914d74bSmrg 8876e169010aSmrg# serial 4 88777914d74bSmrg 8878e169010aSmrg# _AM_MANGLE_OPTION(NAME) 8879e169010aSmrg# ----------------------- 8880e169010aSmrgAC_DEFUN([_AM_MANGLE_OPTION], 8881e169010aSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 88827914d74bSmrg 8883e169010aSmrg# _AM_SET_OPTION(NAME) 8884e169010aSmrg# ------------------------------ 8885e169010aSmrg# Set option NAME. Presently that only means defining a flag for this option. 8886e169010aSmrgAC_DEFUN([_AM_SET_OPTION], 8887e169010aSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 88887914d74bSmrg 8889e169010aSmrg# _AM_SET_OPTIONS(OPTIONS) 8890e169010aSmrg# ---------------------------------- 8891e169010aSmrg# OPTIONS is a space-separated list of Automake options. 8892e169010aSmrgAC_DEFUN([_AM_SET_OPTIONS], 8893e169010aSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 88947914d74bSmrg 8895e169010aSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 8896e169010aSmrg# ------------------------------------------- 8897e169010aSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8898e169010aSmrgAC_DEFUN([_AM_IF_OPTION], 8899e169010aSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 89007914d74bSmrg 8901e169010aSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 89027914d74bSmrg 8903e169010aSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 8904e169010aSmrg# Free Software Foundation, Inc. 8905e169010aSmrg# 8906e169010aSmrg# This file is free software; the Free Software Foundation 8907e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8908e169010aSmrg# with or without modifications, as long as this notice is preserved. 89097914d74bSmrg 8910e169010aSmrg# serial 5 89117914d74bSmrg 8912e169010aSmrg# AM_SANITY_CHECK 8913e169010aSmrg# --------------- 8914e169010aSmrgAC_DEFUN([AM_SANITY_CHECK], 8915e169010aSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8916e169010aSmrg# Just in case 8917e169010aSmrgsleep 1 8918e169010aSmrgecho timestamp > conftest.file 8919e169010aSmrg# Reject unsafe characters in $srcdir or the absolute working directory 8920e169010aSmrg# name. Accept space and tab only in the latter. 8921e169010aSmrgam_lf=' 8922e169010aSmrg' 8923e169010aSmrgcase `pwd` in 8924e169010aSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8925e169010aSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8926e169010aSmrgesac 8927e169010aSmrgcase $srcdir in 8928e169010aSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8929e169010aSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8930e169010aSmrgesac 89317914d74bSmrg 8932e169010aSmrg# Do `set' in a subshell so we don't clobber the current shell's 8933e169010aSmrg# arguments. Must try -L first in case configure is actually a 8934e169010aSmrg# symlink; some systems play weird games with the mod time of symlinks 8935e169010aSmrg# (eg FreeBSD returns the mod time of the symlink's containing 8936e169010aSmrg# directory). 8937e169010aSmrgif ( 8938e169010aSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8939e169010aSmrg if test "$[*]" = "X"; then 8940e169010aSmrg # -L didn't work. 8941e169010aSmrg set X `ls -t "$srcdir/configure" conftest.file` 8942e169010aSmrg fi 8943e169010aSmrg rm -f conftest.file 8944e169010aSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8945e169010aSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 89467914d74bSmrg 8947e169010aSmrg # If neither matched, then we have a broken ls. This can happen 8948e169010aSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8949e169010aSmrg # broken ls alias from the environment. This has actually 8950e169010aSmrg # happened. Such a system could not be considered "sane". 8951e169010aSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8952e169010aSmrgalias in your environment]) 8953e169010aSmrg fi 89547914d74bSmrg 8955e169010aSmrg test "$[2]" = conftest.file 8956e169010aSmrg ) 8957e169010aSmrgthen 8958e169010aSmrg # Ok. 8959e169010aSmrg : 8960e169010aSmrgelse 8961e169010aSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8962e169010aSmrgCheck your system clock]) 8963e169010aSmrgfi 8964e169010aSmrgAC_MSG_RESULT(yes)]) 89657914d74bSmrg 8966e169010aSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 8967e169010aSmrg# 8968e169010aSmrg# This file is free software; the Free Software Foundation 8969e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8970e169010aSmrg# with or without modifications, as long as this notice is preserved. 89717914d74bSmrg 8972e169010aSmrg# serial 1 89737914d74bSmrg 8974e169010aSmrg# AM_SILENT_RULES([DEFAULT]) 8975e169010aSmrg# -------------------------- 8976e169010aSmrg# Enable less verbose build rules; with the default set to DEFAULT 8977e169010aSmrg# (`yes' being less verbose, `no' or empty being verbose). 8978e169010aSmrgAC_DEFUN([AM_SILENT_RULES], 8979e169010aSmrg[AC_ARG_ENABLE([silent-rules], 8980e169010aSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 8981e169010aSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 8982e169010aSmrgcase $enable_silent_rules in 8983e169010aSmrgyes) AM_DEFAULT_VERBOSITY=0;; 8984e169010aSmrgno) AM_DEFAULT_VERBOSITY=1;; 8985e169010aSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 8986e169010aSmrgesac 8987e169010aSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 8988e169010aSmrgAM_BACKSLASH='\' 8989e169010aSmrgAC_SUBST([AM_BACKSLASH])dnl 8990e169010aSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 8991e169010aSmrg]) 89927914d74bSmrg 8993e169010aSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8994e169010aSmrg# 8995e169010aSmrg# This file is free software; the Free Software Foundation 8996e169010aSmrg# gives unlimited permission to copy and/or distribute it, 8997e169010aSmrg# with or without modifications, as long as this notice is preserved. 89987914d74bSmrg 8999e169010aSmrg# AM_PROG_INSTALL_STRIP 9000e169010aSmrg# --------------------- 9001e169010aSmrg# One issue with vendor `install' (even GNU) is that you can't 9002e169010aSmrg# specify the program used to strip binaries. This is especially 9003e169010aSmrg# annoying in cross-compiling environments, where the build's strip 9004e169010aSmrg# is unlikely to handle the host's binaries. 9005e169010aSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9006e169010aSmrg# always use install-sh in `make install-strip', and initialize 9007e169010aSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9008e169010aSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9009e169010aSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9010e169010aSmrg# Installed binaries are usually stripped using `strip' when the user 9011e169010aSmrg# run `make install-strip'. However `strip' might not be the right 9012e169010aSmrg# tool to use in cross-compilation environments, therefore Automake 9013e169010aSmrg# will honor the `STRIP' environment variable to overrule this program. 9014e169010aSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9015e169010aSmrgif test "$cross_compiling" != no; then 9016e169010aSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9017e169010aSmrgfi 9018e169010aSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9019e169010aSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 90207914d74bSmrg 9021e169010aSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9022e169010aSmrg# 9023e169010aSmrg# This file is free software; the Free Software Foundation 9024e169010aSmrg# gives unlimited permission to copy and/or distribute it, 9025e169010aSmrg# with or without modifications, as long as this notice is preserved. 90267914d74bSmrg 9027e169010aSmrg# serial 2 9028e169010aSmrg 9029e169010aSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 9030e169010aSmrg# --------------------------- 9031e169010aSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9032e169010aSmrg# This macro is traced by Automake. 9033e169010aSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9034e169010aSmrg 9035e169010aSmrg# AM_SUBST_NOTMAKE(VARIABLE) 9036e169010aSmrg# --------------------------- 9037e169010aSmrg# Public sister of _AM_SUBST_NOTMAKE. 9038e169010aSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9039e169010aSmrg 9040e169010aSmrg# Check how to create a tarball. -*- Autoconf -*- 9041e169010aSmrg 9042e169010aSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9043e169010aSmrg# 9044e169010aSmrg# This file is free software; the Free Software Foundation 9045e169010aSmrg# gives unlimited permission to copy and/or distribute it, 9046e169010aSmrg# with or without modifications, as long as this notice is preserved. 9047e169010aSmrg 9048e169010aSmrg# serial 2 9049e169010aSmrg 9050e169010aSmrg# _AM_PROG_TAR(FORMAT) 9051e169010aSmrg# -------------------- 9052e169010aSmrg# Check how to create a tarball in format FORMAT. 9053e169010aSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 9054e169010aSmrg# 9055e169010aSmrg# Substitute a variable $(am__tar) that is a command 9056e169010aSmrg# writing to stdout a FORMAT-tarball containing the directory 9057e169010aSmrg# $tardir. 9058e169010aSmrg# tardir=directory && $(am__tar) > result.tar 9059e169010aSmrg# 9060e169010aSmrg# Substitute a variable $(am__untar) that extract such 9061e169010aSmrg# a tarball read from stdin. 9062e169010aSmrg# $(am__untar) < result.tar 9063e169010aSmrgAC_DEFUN([_AM_PROG_TAR], 9064e169010aSmrg[# Always define AMTAR for backward compatibility. 9065e169010aSmrgAM_MISSING_PROG([AMTAR], [tar]) 9066e169010aSmrgm4_if([$1], [v7], 9067e169010aSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9068e169010aSmrg [m4_case([$1], [ustar],, [pax],, 9069e169010aSmrg [m4_fatal([Unknown tar format])]) 9070e169010aSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9071e169010aSmrg# Loop over all known methods to create a tar archive until one works. 9072e169010aSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9073e169010aSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9074e169010aSmrg# Do not fold the above two line into one, because Tru64 sh and 9075e169010aSmrg# Solaris sh will not grok spaces in the rhs of `-'. 9076e169010aSmrgfor _am_tool in $_am_tools 9077e169010aSmrgdo 9078e169010aSmrg case $_am_tool in 9079e169010aSmrg gnutar) 9080e169010aSmrg for _am_tar in tar gnutar gtar; 9081e169010aSmrg do 9082e169010aSmrg AM_RUN_LOG([$_am_tar --version]) && break 9083e169010aSmrg done 9084e169010aSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9085e169010aSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9086e169010aSmrg am__untar="$_am_tar -xf -" 9087e169010aSmrg ;; 9088e169010aSmrg plaintar) 9089e169010aSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 9090e169010aSmrg # ustar tarball either. 9091e169010aSmrg (tar --version) >/dev/null 2>&1 && continue 9092e169010aSmrg am__tar='tar chf - "$$tardir"' 9093e169010aSmrg am__tar_='tar chf - "$tardir"' 9094e169010aSmrg am__untar='tar xf -' 9095e169010aSmrg ;; 9096e169010aSmrg pax) 9097e169010aSmrg am__tar='pax -L -x $1 -w "$$tardir"' 9098e169010aSmrg am__tar_='pax -L -x $1 -w "$tardir"' 9099e169010aSmrg am__untar='pax -r' 9100e169010aSmrg ;; 9101e169010aSmrg cpio) 9102e169010aSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9103e169010aSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9104e169010aSmrg am__untar='cpio -i -H $1 -d' 9105e169010aSmrg ;; 9106e169010aSmrg none) 9107e169010aSmrg am__tar=false 9108e169010aSmrg am__tar_=false 9109e169010aSmrg am__untar=false 9110e169010aSmrg ;; 9111e169010aSmrg esac 91127914d74bSmrg 9113e169010aSmrg # If the value was cached, stop now. We just wanted to have am__tar 9114e169010aSmrg # and am__untar set. 9115e169010aSmrg test -n "${am_cv_prog_tar_$1}" && break 91167914d74bSmrg 9117e169010aSmrg # tar/untar a dummy directory, and stop if the command works 9118e169010aSmrg rm -rf conftest.dir 9119e169010aSmrg mkdir conftest.dir 9120e169010aSmrg echo GrepMe > conftest.dir/file 9121e169010aSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 9122e169010aSmrg rm -rf conftest.dir 9123e169010aSmrg if test -s conftest.tar; then 9124e169010aSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 9125e169010aSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 9126e169010aSmrg fi 9127e169010aSmrgdone 9128e169010aSmrgrm -rf conftest.dir 91297914d74bSmrg 9130e169010aSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 9131e169010aSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 9132e169010aSmrgAC_SUBST([am__tar]) 9133e169010aSmrgAC_SUBST([am__untar]) 9134e169010aSmrg]) # _AM_PROG_TAR 91357914d74bSmrg 9136e169010aSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9137e169010aSmrgdnl 9138e169010aSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 9139e169010aSmrgdnl 9140e169010aSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9141e169010aSmrgdnl copy of this software and associated documentation files (the 9142e169010aSmrgdnl "Software"), to deal in the Software without restriction, including 9143e169010aSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 9144e169010aSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 9145e169010aSmrgdnl to whom the Software is furnished to do so, provided that the above 9146e169010aSmrgdnl copyright notice(s) and this permission notice appear in all copies of 9147e169010aSmrgdnl the Software and that both the above copyright notice(s) and this 9148e169010aSmrgdnl permission notice appear in supporting documentation. 9149e169010aSmrgdnl 9150e169010aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9151e169010aSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9152e169010aSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 9153e169010aSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 9154e169010aSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 9155e169010aSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 9156e169010aSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 9157e169010aSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 9158e169010aSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 9159e169010aSmrgdnl 9160e169010aSmrgdnl Except as contained in this notice, the name of a copyright holder 9161e169010aSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 9162e169010aSmrgdnl or other dealings in this Software without prior written authorization 9163e169010aSmrgdnl of the copyright holder. 91647914d74bSmrg 9165e169010aSmrg# XORG_MACROS_VERSION(required-version) 9166e169010aSmrg# ------------------------------------- 9167e169010aSmrg# Minimum version: 1.1.0 9168e169010aSmrg# 9169e169010aSmrg# If you're using a macro added in Version 1.1 or newer, include this in 9170e169010aSmrg# your configure.ac with the minimum required version, such as: 9171e169010aSmrg# XORG_MACROS_VERSION(1.1) 9172e169010aSmrg# 9173e169010aSmrg# To ensure that this macro is defined, also add: 9174e169010aSmrg# m4_ifndef([XORG_MACROS_VERSION], 9175e169010aSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9176e169010aSmrg# 9177e169010aSmrg# 9178e169010aSmrg# See the "minimum version" comment for each macro you use to see what 9179e169010aSmrg# version you require. 9180e169010aSmrgm4_defun([XORG_MACROS_VERSION],[ 9181e169010aSmrgm4_define([vers_have], [1.2.2]) 9182e169010aSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9183e169010aSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9184e169010aSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9185e169010aSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9186e169010aSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9187e169010aSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9188e169010aSmrgm4_undefine([vers_have]) 9189e169010aSmrgm4_undefine([maj_have]) 9190e169010aSmrgm4_undefine([maj_needed]) 9191e169010aSmrg]) # XORG_MACROS_VERSION 91927914d74bSmrg 9193e169010aSmrg# XORG_PROG_RAWCPP() 9194e169010aSmrg# ------------------ 9195e169010aSmrg# Minimum version: 1.0.0 9196e169010aSmrg# 9197e169010aSmrg# Find cpp program and necessary flags for use in pre-processing text files 9198e169010aSmrg# such as man pages and config files 9199e169010aSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9200e169010aSmrgAC_REQUIRE([AC_PROG_CPP]) 9201e169010aSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9202e169010aSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 92037914d74bSmrg 9204e169010aSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9205e169010aSmrg# which is not the best choice for supporting other OS'es, but covers most 9206e169010aSmrg# of the ones we need for now. 9207e169010aSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9208e169010aSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 9209e169010aSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9210e169010aSmrg AC_MSG_RESULT([no]) 9211e169010aSmrgelse 9212e169010aSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9213e169010aSmrg RAWCPPFLAGS=-undef 9214e169010aSmrg AC_MSG_RESULT([yes]) 9215e169010aSmrg # under Cygwin unix is still defined even with -undef 9216e169010aSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9217e169010aSmrg RAWCPPFLAGS="-undef -ansi" 9218e169010aSmrg AC_MSG_RESULT([yes, with -ansi]) 9219e169010aSmrg else 9220e169010aSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9221e169010aSmrg fi 9222e169010aSmrgfi 9223e169010aSmrgrm -f conftest.$ac_ext 92247914d74bSmrg 9225e169010aSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9226e169010aSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 9227e169010aSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9228e169010aSmrg AC_MSG_RESULT([no]) 9229e169010aSmrgelse 9230e169010aSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9231e169010aSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9232e169010aSmrg AC_MSG_RESULT([yes]) 9233e169010aSmrg else 9234e169010aSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9235e169010aSmrg fi 9236e169010aSmrgfi 9237e169010aSmrgrm -f conftest.$ac_ext 9238e169010aSmrgAC_SUBST(RAWCPPFLAGS) 9239e169010aSmrg]) # XORG_PROG_RAWCPP 92407914d74bSmrg 9241e169010aSmrg# XORG_MANPAGE_SECTIONS() 9242e169010aSmrg# ----------------------- 9243e169010aSmrg# Minimum version: 1.0.0 9244e169010aSmrg# 9245e169010aSmrg# Determine which sections man pages go in for the different man page types 9246e169010aSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9247e169010aSmrg# Not sure if there's any better way than just hardcoding by OS name. 9248e169010aSmrg# Override default settings by setting environment variables 92497914d74bSmrg 9250e169010aSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9251e169010aSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 92527914d74bSmrg 9253e169010aSmrgif test x$APP_MAN_SUFFIX = x ; then 9254e169010aSmrg APP_MAN_SUFFIX=1 9255e169010aSmrgfi 9256e169010aSmrgif test x$APP_MAN_DIR = x ; then 9257e169010aSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9258e169010aSmrgfi 92597914d74bSmrg 9260e169010aSmrgif test x$LIB_MAN_SUFFIX = x ; then 9261e169010aSmrg LIB_MAN_SUFFIX=3 9262e169010aSmrgfi 9263e169010aSmrgif test x$LIB_MAN_DIR = x ; then 9264e169010aSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9265e169010aSmrgfi 92667914d74bSmrg 9267e169010aSmrgif test x$FILE_MAN_SUFFIX = x ; then 9268e169010aSmrg case $host_os in 9269e169010aSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 9270e169010aSmrg *) FILE_MAN_SUFFIX=5 ;; 9271e169010aSmrg esac 9272e169010aSmrgfi 9273e169010aSmrgif test x$FILE_MAN_DIR = x ; then 9274e169010aSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9275e169010aSmrgfi 92767914d74bSmrg 9277e169010aSmrgif test x$MISC_MAN_SUFFIX = x ; then 9278e169010aSmrg case $host_os in 9279e169010aSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 9280e169010aSmrg *) MISC_MAN_SUFFIX=7 ;; 9281e169010aSmrg esac 9282e169010aSmrgfi 9283e169010aSmrgif test x$MISC_MAN_DIR = x ; then 9284e169010aSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9285e169010aSmrgfi 92867914d74bSmrg 9287e169010aSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 9288e169010aSmrg case $host_os in 9289e169010aSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9290e169010aSmrg *) DRIVER_MAN_SUFFIX=4 ;; 9291e169010aSmrg esac 9292e169010aSmrgfi 9293e169010aSmrgif test x$DRIVER_MAN_DIR = x ; then 9294e169010aSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9295e169010aSmrgfi 92967914d74bSmrg 9297e169010aSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 9298e169010aSmrg case $host_os in 9299e169010aSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9300e169010aSmrg *) ADMIN_MAN_SUFFIX=8 ;; 9301e169010aSmrg esac 9302e169010aSmrgfi 9303e169010aSmrgif test x$ADMIN_MAN_DIR = x ; then 9304e169010aSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9305e169010aSmrgfi 93067914d74bSmrg 93077914d74bSmrg 9308e169010aSmrgAC_SUBST([APP_MAN_SUFFIX]) 9309e169010aSmrgAC_SUBST([LIB_MAN_SUFFIX]) 9310e169010aSmrgAC_SUBST([FILE_MAN_SUFFIX]) 9311e169010aSmrgAC_SUBST([MISC_MAN_SUFFIX]) 9312e169010aSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9313e169010aSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9314e169010aSmrgAC_SUBST([APP_MAN_DIR]) 9315e169010aSmrgAC_SUBST([LIB_MAN_DIR]) 9316e169010aSmrgAC_SUBST([FILE_MAN_DIR]) 9317e169010aSmrgAC_SUBST([MISC_MAN_DIR]) 9318e169010aSmrgAC_SUBST([DRIVER_MAN_DIR]) 9319e169010aSmrgAC_SUBST([ADMIN_MAN_DIR]) 9320e169010aSmrg]) # XORG_MANPAGE_SECTIONS 93217914d74bSmrg 9322e169010aSmrg# XORG_CHECK_LINUXDOC 9323e169010aSmrg# ------------------- 9324e169010aSmrg# Minimum version: 1.0.0 93257914d74bSmrg# 9326e169010aSmrg# Defines the variable MAKE_TEXT if the necessary tools and 9327e169010aSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9328e169010aSmrg# Whether or not the necessary tools and files are found can be checked 9329e169010aSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9330e169010aSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9331e169010aSmrgif test x$XORG_SGML_PATH = x ; then 9332e169010aSmrg XORG_SGML_PATH=$prefix/share/sgml 9333e169010aSmrgfi 9334e169010aSmrgHAVE_DEFS_ENT= 93357914d74bSmrg 9336e169010aSmrgif test x"$cross_compiling" = x"yes" ; then 9337e169010aSmrg HAVE_DEFS_ENT=no 9338e169010aSmrgelse 9339e169010aSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 9340e169010aSmrgfi 93417914d74bSmrg 9342e169010aSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9343e169010aSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 93447914d74bSmrg 9345e169010aSmrgAC_MSG_CHECKING([Whether to build documentation]) 93467914d74bSmrg 9347e169010aSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 9348e169010aSmrg BUILDDOC=yes 9349e169010aSmrgelse 9350e169010aSmrg BUILDDOC=no 9351e169010aSmrgfi 93527914d74bSmrg 9353e169010aSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 93547914d74bSmrg 9355e169010aSmrgAC_MSG_RESULT([$BUILDDOC]) 93567914d74bSmrg 9357e169010aSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 93587914d74bSmrg 9359e169010aSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 9360e169010aSmrg BUILDPDFDOC=yes 9361e169010aSmrgelse 9362e169010aSmrg BUILDPDFDOC=no 9363e169010aSmrgfi 93647914d74bSmrg 9365e169010aSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 93667914d74bSmrg 9367e169010aSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 93687914d74bSmrg 9369e169010aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 9370e169010aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9371e169010aSmrgMAKE_PDF="$PS2PDF" 9372e169010aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 93737914d74bSmrg 9374e169010aSmrgAC_SUBST(MAKE_TEXT) 9375e169010aSmrgAC_SUBST(MAKE_PS) 9376e169010aSmrgAC_SUBST(MAKE_PDF) 9377e169010aSmrgAC_SUBST(MAKE_HTML) 9378e169010aSmrg]) # XORG_CHECK_LINUXDOC 93797914d74bSmrg 9380e169010aSmrg# XORG_CHECK_DOCBOOK 9381e169010aSmrg# ------------------- 9382e169010aSmrg# Minimum version: 1.0.0 93837914d74bSmrg# 9384e169010aSmrg# Checks for the ability to build output formats from SGML DocBook source. 9385e169010aSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9386e169010aSmrg# indicates whether the necessary tools and files are found and, if set, 9387e169010aSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9388e169010aSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9389e169010aSmrgif test x$XORG_SGML_PATH = x ; then 9390e169010aSmrg XORG_SGML_PATH=$prefix/share/sgml 9391e169010aSmrgfi 9392e169010aSmrgHAVE_DEFS_ENT= 9393e169010aSmrgBUILDTXTDOC=no 9394e169010aSmrgBUILDPDFDOC=no 9395e169010aSmrgBUILDPSDOC=no 9396e169010aSmrgBUILDHTMLDOC=no 93977914d74bSmrg 9398e169010aSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 9399e169010aSmrg 9400e169010aSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9401e169010aSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9402e169010aSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9403e169010aSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9404e169010aSmrg 9405e169010aSmrgAC_MSG_CHECKING([Whether to build text documentation]) 9406e169010aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 9407e169010aSmrg test x$BUILD_TXTDOC != xno; then 9408e169010aSmrg BUILDTXTDOC=yes 94097914d74bSmrgfi 9410e169010aSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9411e169010aSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9412e169010aSmrg 9413e169010aSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 9414e169010aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 9415e169010aSmrg test x$BUILD_PDFDOC != xno; then 9416e169010aSmrg BUILDPDFDOC=yes 9417e169010aSmrgfi 9418e169010aSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9419e169010aSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9420e169010aSmrg 9421e169010aSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 9422e169010aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 9423e169010aSmrg test x$BUILD_PSDOC != xno; then 9424e169010aSmrg BUILDPSDOC=yes 9425e169010aSmrgfi 9426e169010aSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9427e169010aSmrgAC_MSG_RESULT([$BUILDPSDOC]) 94287914d74bSmrg 9429e169010aSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 9430e169010aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 9431e169010aSmrg test x$BUILD_HTMLDOC != xno; then 9432e169010aSmrg BUILDHTMLDOC=yes 9433e169010aSmrgfi 9434e169010aSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9435e169010aSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9436e169010aSmrg 9437e169010aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9438e169010aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9439e169010aSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9440e169010aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9441e169010aSmrg 9442e169010aSmrgAC_SUBST(MAKE_TEXT) 9443e169010aSmrgAC_SUBST(MAKE_PS) 9444e169010aSmrgAC_SUBST(MAKE_PDF) 9445e169010aSmrgAC_SUBST(MAKE_HTML) 9446e169010aSmrg]) # XORG_CHECK_DOCBOOK 9447e169010aSmrg 9448e169010aSmrg# XORG_CHECK_MALLOC_ZERO 9449e169010aSmrg# ---------------------- 9450e169010aSmrg# Minimum version: 1.0.0 94517914d74bSmrg# 9452e169010aSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 9453e169010aSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 9454e169010aSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 9455e169010aSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 9456e169010aSmrgAC_ARG_ENABLE(malloc0returnsnull, 9457e169010aSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 9458e169010aSmrg [malloc(0) returns NULL (default: auto)]), 9459e169010aSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 9460e169010aSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 94617914d74bSmrg 9462e169010aSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 9463e169010aSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 9464e169010aSmrg AC_RUN_IFELSE([ 9465e169010aSmrgchar *malloc(); 9466e169010aSmrgchar *realloc(); 9467e169010aSmrgchar *calloc(); 9468e169010aSmrgmain() { 9469e169010aSmrg char *m0, *r0, *c0, *p; 9470e169010aSmrg m0 = malloc(0); 9471e169010aSmrg p = malloc(10); 9472e169010aSmrg r0 = realloc(p,0); 9473e169010aSmrg c0 = calloc(0); 9474e169010aSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 9475e169010aSmrg}], 9476e169010aSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 9477e169010aSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 9478e169010aSmrgfi 9479e169010aSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 94807914d74bSmrg 9481e169010aSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 9482e169010aSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 9483e169010aSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 9484e169010aSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 94857914d74bSmrgelse 9486e169010aSmrg MALLOC_ZERO_CFLAGS="" 9487e169010aSmrg XMALLOC_ZERO_CFLAGS="" 9488e169010aSmrg XTMALLOC_ZERO_CFLAGS="" 9489e169010aSmrgfi 94907914d74bSmrg 9491e169010aSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 9492e169010aSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 9493e169010aSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 9494e169010aSmrg]) # XORG_CHECK_MALLOC_ZERO 9495e169010aSmrg 9496e169010aSmrg# XORG_WITH_LINT() 9497e169010aSmrg# ---------------- 9498e169010aSmrg# Minimum version: 1.1.0 94997914d74bSmrg# 9500e169010aSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 9501e169010aSmrg# is specified. (Use --with-lint=sparse for sparse.) 9502e169010aSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 9503e169010aSmrg# Sets $LINT_FLAGS to flags to pass to source checker 9504e169010aSmrg# Sets LINT automake conditional if enabled (default: disabled) 95057914d74bSmrg# 9506e169010aSmrgAC_DEFUN([XORG_WITH_LINT],[ 95077914d74bSmrg 9508e169010aSmrg# Allow checking code with lint, sparse, etc. 9509e169010aSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 9510e169010aSmrg [Use a lint-style source code checker (default: disabled)])], 9511e169010aSmrg [use_lint=$withval], [use_lint=no]) 9512e169010aSmrgif test "x$use_lint" = "xyes" ; then 9513e169010aSmrg LINT="lint" 9514e169010aSmrgelse 9515e169010aSmrg LINT="$use_lint" 9516e169010aSmrgfi 9517e169010aSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 9518e169010aSmrg case $LINT in 9519e169010aSmrg lint|*/lint) 9520e169010aSmrg case $host_os in 9521e169010aSmrg solaris*) 9522e169010aSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 9523e169010aSmrg ;; 9524e169010aSmrg esac 9525e169010aSmrg ;; 9526e169010aSmrg esac 9527e169010aSmrgfi 95287914d74bSmrg 9529e169010aSmrgAC_SUBST(LINT) 9530e169010aSmrgAC_SUBST(LINT_FLAGS) 9531e169010aSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 95327914d74bSmrg 9533e169010aSmrg]) # XORG_WITH_LINT 95347914d74bSmrg 9535e169010aSmrg# XORG_LINT_LIBRARY(LIBNAME) 9536e169010aSmrg# -------------------------- 9537e169010aSmrg# Minimum version: 1.1.0 9538e169010aSmrg# 9539e169010aSmrg# Sets up flags for building lint libraries for checking programs that call 9540e169010aSmrg# functions in the library. 9541e169010aSmrg# Disabled by default, enable with --enable-lint-library 9542e169010aSmrg# Sets: 9543e169010aSmrg# @LINTLIB@ - name of lint library file to make 9544e169010aSmrg# MAKE_LINT_LIB - automake conditional 9545e169010aSmrg# 95467914d74bSmrg 9547e169010aSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 9548e169010aSmrgAC_REQUIRE([XORG_WITH_LINT]) 9549e169010aSmrg# Build lint "library" for more indepth checks of programs calling this library 9550e169010aSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 9551e169010aSmrg [Create lint library (default: disabled)])], 9552e169010aSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 9553e169010aSmrgif test "x$make_lint_lib" != "xno" ; then 9554e169010aSmrg if test "x$LINT" = "xno" ; then 9555e169010aSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 9556e169010aSmrg fi 9557e169010aSmrg if test "x$make_lint_lib" = "xyes" ; then 9558e169010aSmrg LINTLIB=llib-l$1.ln 9559e169010aSmrg else 9560e169010aSmrg LINTLIB=$make_lint_lib 9561e169010aSmrg fi 9562e169010aSmrgfi 9563e169010aSmrgAC_SUBST(LINTLIB) 9564e169010aSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 95657914d74bSmrg 9566e169010aSmrg]) # XORG_LINT_LIBRARY 95677914d74bSmrg 9568e169010aSmrg# XORG_CWARNFLAGS 9569e169010aSmrg# --------------- 9570e169010aSmrg# Minimum version: 1.2.0 9571e169010aSmrg# 9572e169010aSmrg# Defines CWARNFLAGS to enable C compiler warnings. 9573e169010aSmrg# 9574e169010aSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 9575e169010aSmrgAC_REQUIRE([AC_PROG_CC]) 9576e169010aSmrgif test "x$GCC" = xyes ; then 9577e169010aSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 9578e169010aSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 9579e169010aSmrg-Wbad-function-cast" 9580e169010aSmrg case `$CC -dumpversion` in 9581e169010aSmrg 3.4.* | 4.*) 9582e169010aSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 9583e169010aSmrg ;; 9584e169010aSmrg esac 95857914d74bSmrgelse 9586e169010aSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 9587e169010aSmrg if test "x$SUNCC" = "xyes"; then 9588e169010aSmrg CWARNFLAGS="-v" 9589e169010aSmrg fi 9590e169010aSmrgfi 9591e169010aSmrgAC_SUBST(CWARNFLAGS) 9592e169010aSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 9593e169010aSmrg]) # XORG_CWARNFLAGS 9594e169010aSmrgdnl Copyright 2005 Red Hat, Inc 9595e169010aSmrgdnl 9596e169010aSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 9597e169010aSmrgdnl documentation for any purpose is hereby granted without fee, provided that 9598e169010aSmrgdnl the above copyright notice appear in all copies and that both that 9599e169010aSmrgdnl copyright notice and this permission notice appear in supporting 9600e169010aSmrgdnl documentation. 9601e169010aSmrgdnl 9602e169010aSmrgdnl The above copyright notice and this permission notice shall be included 9603e169010aSmrgdnl in all copies or substantial portions of the Software. 9604e169010aSmrgdnl 9605e169010aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9606e169010aSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9607e169010aSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 9608e169010aSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 9609e169010aSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 9610e169010aSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 9611e169010aSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 9612e169010aSmrgdnl 9613e169010aSmrgdnl Except as contained in this notice, the name of the copyright holders shall 9614e169010aSmrgdnl not be used in advertising or otherwise to promote the sale, use or 9615e169010aSmrgdnl other dealings in this Software without prior written authorization 9616e169010aSmrgdnl from the copyright holders. 9617e169010aSmrgdnl 9618e169010aSmrg 9619e169010aSmrg# XORG_RELEASE_VERSION 9620e169010aSmrg# -------------------- 9621e169010aSmrg# Adds --with/without-release-string and changes the PACKAGE and 9622e169010aSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 9623e169010aSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 9624e169010aSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 9625e169010aSmrg 9626e169010aSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 9627e169010aSmrg AC_ARG_WITH(release-version, 9628e169010aSmrg AC_HELP_STRING([--with-release-version=STRING], 9629e169010aSmrg [Use release version string in package name]), 9630e169010aSmrg [RELEASE_VERSION="$withval"], 9631e169010aSmrg [RELEASE_VERSION=""]) 9632e169010aSmrg if test "x$RELEASE_VERSION" != "x"; then 9633e169010aSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 9634e169010aSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 9635e169010aSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 9636e169010aSmrg fi 9637e169010aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 9638e169010aSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 9639e169010aSmrg [Major version of this package]) 9640e169010aSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 9641e169010aSmrg if test "x$PVM" = "x"; then 9642e169010aSmrg PVM="0" 9643e169010aSmrg fi 9644e169010aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 9645e169010aSmrg [$PVM], 9646e169010aSmrg [Minor version of this package]) 9647e169010aSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 9648e169010aSmrg if test "x$PVP" = "x"; then 9649e169010aSmrg PVP="0" 9650e169010aSmrg fi 9651e169010aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 9652e169010aSmrg [$PVP], 9653e169010aSmrg [Patch version of this package]) 9654e169010aSmrg]) 9655e169010aSmrg 9656e169010aSmrg# XORG_CHANGELOG() 9657e169010aSmrg# ---------------- 9658e169010aSmrg# Minimum version: 1.2.0 9659e169010aSmrg# 9660e169010aSmrg# Defines the variable CHANGELOG_CMD as the command to generate 9661e169010aSmrg# ChangeLog from git. 9662e169010aSmrg# 9663e169010aSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 9664e169010aSmrg# 9665e169010aSmrgAC_DEFUN([XORG_CHANGELOG], [ 9666e169010aSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 9667e169010aSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 9668e169010aSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 9669e169010aSmrgAC_SUBST([CHANGELOG_CMD]) 9670e169010aSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 9671e169010aSmrg]) # XORG_CHANGELOG 96727914d74bSmrg 9673