aclocal.m4 revision f55e6a01
1f55e6a01Smrg# generated automatically by aclocal 1.10.2 -*- Autoconf -*- 2c35d236eSmrg 3c35d236eSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 44f6cd06fSmrg# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 5c35d236eSmrg# This file is free software; the Free Software Foundation 6c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8c35d236eSmrg 9c35d236eSmrg# This program is distributed in the hope that it will be useful, 10c35d236eSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11c35d236eSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12c35d236eSmrg# PARTICULAR PURPOSE. 13c35d236eSmrg 144f6cd06fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 154f6cd06fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16f55e6a01Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 174f6cd06fSmrg[m4_warning([this file was generated for autoconf 2.63. 184f6cd06fSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 194f6cd06fSmrgIf you have problems, you may need to regenerate the build system entirely. 204f6cd06fSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 214f6cd06fSmrg 22c35d236eSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23f55e6a01Smrg# 24f55e6a01Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 25f55e6a01Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 26f55e6a01Smrg# Written by Gordon Matzigkeit, 1996 27f55e6a01Smrg# 28f55e6a01Smrg# This file is free software; the Free Software Foundation gives 29f55e6a01Smrg# unlimited permission to copy and/or distribute it, with or without 30f55e6a01Smrg# modifications, as long as this notice is preserved. 31f55e6a01Smrg 32f55e6a01Smrgm4_define([_LT_COPYING], [dnl 33f55e6a01Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 34f55e6a01Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 35f55e6a01Smrg# Written by Gordon Matzigkeit, 1996 36f55e6a01Smrg# 37f55e6a01Smrg# This file is part of GNU Libtool. 38f55e6a01Smrg# 39f55e6a01Smrg# GNU Libtool is free software; you can redistribute it and/or 40f55e6a01Smrg# modify it under the terms of the GNU General Public License as 41f55e6a01Smrg# published by the Free Software Foundation; either version 2 of 42f55e6a01Smrg# the License, or (at your option) any later version. 43f55e6a01Smrg# 44f55e6a01Smrg# As a special exception to the GNU General Public License, 45f55e6a01Smrg# if you distribute this file as part of a program or library that 46f55e6a01Smrg# is built using GNU Libtool, you may include this file under the 47f55e6a01Smrg# same distribution terms that you use for the rest of that program. 48f55e6a01Smrg# 49f55e6a01Smrg# GNU Libtool is distributed in the hope that it will be useful, 50f55e6a01Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 51f55e6a01Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 52f55e6a01Smrg# GNU General Public License for more details. 53f55e6a01Smrg# 54f55e6a01Smrg# You should have received a copy of the GNU General Public License 55f55e6a01Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 56f55e6a01Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 57f55e6a01Smrg# obtained by writing to the Free Software Foundation, Inc., 58f55e6a01Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 59f55e6a01Smrg]) 60c35d236eSmrg 61f55e6a01Smrg# serial 56 LT_INIT 62c35d236eSmrg 63c35d236eSmrg 64f55e6a01Smrg# LT_PREREQ(VERSION) 65f55e6a01Smrg# ------------------ 66f55e6a01Smrg# Complain and exit if this libtool version is less that VERSION. 67f55e6a01Smrgm4_defun([LT_PREREQ], 68f55e6a01Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 69f55e6a01Smrg [m4_default([$3], 70f55e6a01Smrg [m4_fatal([Libtool version $1 or higher is required], 71f55e6a01Smrg 63)])], 72f55e6a01Smrg [$2])]) 73c35d236eSmrg 74c35d236eSmrg 75f55e6a01Smrg# _LT_CHECK_BUILDDIR 76f55e6a01Smrg# ------------------ 77f55e6a01Smrg# Complain if the absolute build directory name contains unusual characters 78f55e6a01Smrgm4_defun([_LT_CHECK_BUILDDIR], 79f55e6a01Smrg[case `pwd` in 80f55e6a01Smrg *\ * | *\ *) 81f55e6a01Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 82f55e6a01Smrgesac 83f55e6a01Smrg]) 84f55e6a01Smrg 85f55e6a01Smrg 86f55e6a01Smrg# LT_INIT([OPTIONS]) 87f55e6a01Smrg# ------------------ 88f55e6a01SmrgAC_DEFUN([LT_INIT], 89f55e6a01Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 90f55e6a01SmrgAC_BEFORE([$0], [LT_LANG])dnl 91f55e6a01SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 92f55e6a01SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 93f55e6a01Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 94f55e6a01Smrg 95f55e6a01Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 96f55e6a01Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 97f55e6a01Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 98f55e6a01Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 99f55e6a01Smrgdnl unless we require an AC_DEFUNed macro: 100f55e6a01SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 101f55e6a01SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 102f55e6a01SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 103f55e6a01SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 104f55e6a01Smrgm4_require([_LT_PROG_LTMAIN])dnl 105f55e6a01Smrg 106f55e6a01Smrgdnl Parse OPTIONS 107f55e6a01Smrg_LT_SET_OPTIONS([$0], [$1]) 108c35d236eSmrg 109c35d236eSmrg# This can be used to rebuild libtool when needed 110f55e6a01SmrgLIBTOOL_DEPS="$ltmain" 111c35d236eSmrg 112c35d236eSmrg# Always use our own libtool. 113c35d236eSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 114c35d236eSmrgAC_SUBST(LIBTOOL)dnl 115c35d236eSmrg 116f55e6a01Smrg_LT_SETUP 117c35d236eSmrg 118f55e6a01Smrg# Only expand once: 119f55e6a01Smrgm4_define([LT_INIT]) 120f55e6a01Smrg])# LT_INIT 121c35d236eSmrg 122f55e6a01Smrg# Old names: 123f55e6a01SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 124f55e6a01SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 125f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 126f55e6a01Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 127f55e6a01Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 128f55e6a01Smrg 129f55e6a01Smrg 130f55e6a01Smrg# _LT_CC_BASENAME(CC) 131f55e6a01Smrg# ------------------- 132f55e6a01Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 133f55e6a01Smrgm4_defun([_LT_CC_BASENAME], 134f55e6a01Smrg[for cc_temp in $1""; do 135f55e6a01Smrg case $cc_temp in 136f55e6a01Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137f55e6a01Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138f55e6a01Smrg \-*) ;; 139f55e6a01Smrg *) break;; 140f55e6a01Smrg esac 141f55e6a01Smrgdone 142f55e6a01Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 143f55e6a01Smrg]) 144f55e6a01Smrg 145f55e6a01Smrg 146f55e6a01Smrg# _LT_FILEUTILS_DEFAULTS 147f55e6a01Smrg# ---------------------- 148f55e6a01Smrg# It is okay to use these file commands and assume they have been set 149f55e6a01Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 150f55e6a01Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 151f55e6a01Smrg[: ${CP="cp -f"} 152f55e6a01Smrg: ${MV="mv -f"} 153f55e6a01Smrg: ${RM="rm -f"} 154f55e6a01Smrg])# _LT_FILEUTILS_DEFAULTS 155f55e6a01Smrg 156f55e6a01Smrg 157f55e6a01Smrg# _LT_SETUP 158f55e6a01Smrg# --------- 159f55e6a01Smrgm4_defun([_LT_SETUP], 160f55e6a01Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 161c35d236eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 162f55e6a01Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 163f55e6a01Smrg_LT_DECL([], [host], [0])dnl 164f55e6a01Smrg_LT_DECL([], [host_os], [0])dnl 165f55e6a01Smrgdnl 166f55e6a01Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 167f55e6a01Smrg_LT_DECL([], [build], [0])dnl 168f55e6a01Smrg_LT_DECL([], [build_os], [0])dnl 169f55e6a01Smrgdnl 170c35d236eSmrgAC_REQUIRE([AC_PROG_CC])dnl 171f55e6a01SmrgAC_REQUIRE([LT_PATH_LD])dnl 172f55e6a01SmrgAC_REQUIRE([LT_PATH_NM])dnl 173f55e6a01Smrgdnl 174c35d236eSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 175f55e6a01Smrgtest -z "$LN_S" && LN_S="ln -s" 176f55e6a01Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 177f55e6a01Smrgdnl 178f55e6a01SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 179f55e6a01Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 180f55e6a01Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 181c35d236eSmrgdnl 182f55e6a01Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 183f55e6a01Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 184f55e6a01Smrgm4_require([_LT_CMD_RELOAD])dnl 185f55e6a01Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 186f55e6a01Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 187f55e6a01Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 188f55e6a01Smrg 189f55e6a01Smrg_LT_CONFIG_LIBTOOL_INIT([ 190f55e6a01Smrg# See if we are running on zsh, and set the options which allow our 191f55e6a01Smrg# commands through without removal of \ escapes INIT. 192f55e6a01Smrgif test -n "\${ZSH_VERSION+set}" ; then 193f55e6a01Smrg setopt NO_GLOB_SUBST 194f55e6a01Smrgfi 195f55e6a01Smrg]) 196f55e6a01Smrgif test -n "${ZSH_VERSION+set}" ; then 197f55e6a01Smrg setopt NO_GLOB_SUBST 198f55e6a01Smrgfi 199f55e6a01Smrg 200f55e6a01Smrg_LT_CHECK_OBJDIR 201c35d236eSmrg 202f55e6a01Smrgm4_require([_LT_TAG_COMPILER])dnl 203f55e6a01Smrg_LT_PROG_ECHO_BACKSLASH 204c35d236eSmrg 205c35d236eSmrgcase $host_os in 206c35d236eSmrgaix3*) 207c35d236eSmrg # AIX sometimes has problems with the GCC collect2 program. For some 208c35d236eSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 209c35d236eSmrg # vanish in a puff of smoke. 210c35d236eSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 211c35d236eSmrg COLLECT_NAMES= 212c35d236eSmrg export COLLECT_NAMES 213c35d236eSmrg fi 214c35d236eSmrg ;; 215c35d236eSmrgesac 216c35d236eSmrg 217c35d236eSmrg# Sed substitution that helps us do robust quoting. It backslashifies 218c35d236eSmrg# metacharacters that are still active within double-quoted strings. 219f55e6a01Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 220c35d236eSmrg 221c35d236eSmrg# Same as above, but do not quote variable references. 222f55e6a01Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 223c35d236eSmrg 224c35d236eSmrg# Sed substitution to delay expansion of an escaped shell variable in a 225c35d236eSmrg# double_quote_subst'ed string. 226c35d236eSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 227c35d236eSmrg 228f55e6a01Smrg# Sed substitution to delay expansion of an escaped single quote. 229f55e6a01Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 230f55e6a01Smrg 231c35d236eSmrg# Sed substitution to avoid accidental globbing in evaled expressions 232c35d236eSmrgno_glob_subst='s/\*/\\\*/g' 233c35d236eSmrg 234c35d236eSmrg# Global variables: 235f55e6a01Smrgofile=libtool 236c35d236eSmrgcan_build_shared=yes 237c35d236eSmrg 238c35d236eSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 239c35d236eSmrg# which needs '.lib'). 240c35d236eSmrglibext=a 241c35d236eSmrg 242f55e6a01Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 243c35d236eSmrg 244c35d236eSmrgold_CC="$CC" 245c35d236eSmrgold_CFLAGS="$CFLAGS" 246c35d236eSmrg 247c35d236eSmrg# Set sane defaults for various variables 248c35d236eSmrgtest -z "$CC" && CC=cc 249c35d236eSmrgtest -z "$LTCC" && LTCC=$CC 250c35d236eSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 251c35d236eSmrgtest -z "$LD" && LD=ld 252c35d236eSmrgtest -z "$ac_objext" && ac_objext=o 253c35d236eSmrg 254c35d236eSmrg_LT_CC_BASENAME([$compiler]) 255c35d236eSmrg 256c35d236eSmrg# Only perform the check for file, if the check method requires it 257f55e6a01Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 258c35d236eSmrgcase $deplibs_check_method in 259c35d236eSmrgfile_magic*) 260c35d236eSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 261f55e6a01Smrg _LT_PATH_MAGIC 262c35d236eSmrg fi 263c35d236eSmrg ;; 264c35d236eSmrgesac 265c35d236eSmrg 266f55e6a01Smrg# Use C for the default configuration in the libtool script 267f55e6a01SmrgLT_SUPPORTED_TAG([CC]) 268f55e6a01Smrg_LT_LANG_C_CONFIG 269f55e6a01Smrg_LT_LANG_DEFAULT_CONFIG 270f55e6a01Smrg_LT_CONFIG_COMMANDS 271f55e6a01Smrg])# _LT_SETUP 2724f6cd06fSmrg 273c35d236eSmrg 274f55e6a01Smrg# _LT_PROG_LTMAIN 275f55e6a01Smrg# --------------- 276f55e6a01Smrg# Note that this code is called both from `configure', and `config.status' 277f55e6a01Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 278f55e6a01Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 279f55e6a01Smrg# so we pass a copy along to make sure it has a sensible value anyway. 280f55e6a01Smrgm4_defun([_LT_PROG_LTMAIN], 281f55e6a01Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 282f55e6a01Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 283f55e6a01Smrgltmain="$ac_aux_dir/ltmain.sh" 284f55e6a01Smrg])# _LT_PROG_LTMAIN 285c35d236eSmrg 286c35d236eSmrg 287f55e6a01Smrg 288f55e6a01Smrg# So that we can recreate a full libtool script including additional 289f55e6a01Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 290f55e6a01Smrg# in macros and then make a single call at the end using the `libtool' 291f55e6a01Smrg# label. 292f55e6a01Smrg 293f55e6a01Smrg 294f55e6a01Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 295f55e6a01Smrg# ---------------------------------------- 296f55e6a01Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 297f55e6a01Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 298f55e6a01Smrg[m4_ifval([$1], 299f55e6a01Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 300f55e6a01Smrg [$1 301f55e6a01Smrg])])]) 302f55e6a01Smrg 303f55e6a01Smrg# Initialize. 304f55e6a01Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 305f55e6a01Smrg 306f55e6a01Smrg 307f55e6a01Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 308f55e6a01Smrg# ------------------------------ 309f55e6a01Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 310f55e6a01Smrgm4_define([_LT_CONFIG_LIBTOOL], 311f55e6a01Smrg[m4_ifval([$1], 312f55e6a01Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 313f55e6a01Smrg [$1 314f55e6a01Smrg])])]) 315f55e6a01Smrg 316f55e6a01Smrg# Initialize. 317f55e6a01Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 318f55e6a01Smrg 319f55e6a01Smrg 320f55e6a01Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 321f55e6a01Smrg# ----------------------------------------------------- 322f55e6a01Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 323f55e6a01Smrg[_LT_CONFIG_LIBTOOL([$1]) 324f55e6a01Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 325f55e6a01Smrg]) 326f55e6a01Smrg 327f55e6a01Smrg 328f55e6a01Smrg# _LT_FORMAT_COMMENT([COMMENT]) 329f55e6a01Smrg# ----------------------------- 330f55e6a01Smrg# Add leading comment marks to the start of each line, and a trailing 331f55e6a01Smrg# full-stop to the whole comment if one is not present already. 332f55e6a01Smrgm4_define([_LT_FORMAT_COMMENT], 333f55e6a01Smrg[m4_ifval([$1], [ 334f55e6a01Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 335f55e6a01Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 336f55e6a01Smrg)]) 337f55e6a01Smrg 338f55e6a01Smrg 339f55e6a01Smrg 340f55e6a01Smrg 341f55e6a01Smrg 342f55e6a01Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 343f55e6a01Smrg# ------------------------------------------------------------------- 344f55e6a01Smrg# CONFIGNAME is the name given to the value in the libtool script. 345f55e6a01Smrg# VARNAME is the (base) name used in the configure script. 346f55e6a01Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 347f55e6a01Smrg# VARNAME. Any other value will be used directly. 348f55e6a01Smrgm4_define([_LT_DECL], 349f55e6a01Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 350f55e6a01Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 351f55e6a01Smrg [m4_ifval([$1], [$1], [$2])]) 352f55e6a01Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 353f55e6a01Smrg m4_ifval([$4], 354f55e6a01Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 355f55e6a01Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 356f55e6a01Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 357f55e6a01Smrg]) 358f55e6a01Smrg 359f55e6a01Smrg 360f55e6a01Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 361f55e6a01Smrg# -------------------------------------------------------- 362f55e6a01Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 363f55e6a01Smrg 364f55e6a01Smrg 365f55e6a01Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 366f55e6a01Smrg# ------------------------------------------------ 367f55e6a01Smrgm4_define([lt_decl_tag_varnames], 368f55e6a01Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 369f55e6a01Smrg 370f55e6a01Smrg 371f55e6a01Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 372f55e6a01Smrg# --------------------------------------------------------- 373f55e6a01Smrgm4_define([_lt_decl_filter], 374f55e6a01Smrg[m4_case([$#], 375f55e6a01Smrg [0], [m4_fatal([$0: too few arguments: $#])], 376f55e6a01Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 377f55e6a01Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 378f55e6a01Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 379f55e6a01Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 380f55e6a01Smrg]) 381f55e6a01Smrg 382f55e6a01Smrg 383f55e6a01Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 384f55e6a01Smrg# -------------------------------------------------- 385f55e6a01Smrgm4_define([lt_decl_quote_varnames], 386f55e6a01Smrg[_lt_decl_filter([value], [1], $@)]) 387f55e6a01Smrg 388f55e6a01Smrg 389f55e6a01Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 390f55e6a01Smrg# --------------------------------------------------- 391f55e6a01Smrgm4_define([lt_decl_dquote_varnames], 392f55e6a01Smrg[_lt_decl_filter([value], [2], $@)]) 393f55e6a01Smrg 394f55e6a01Smrg 395f55e6a01Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 396f55e6a01Smrg# --------------------------------------------------- 397f55e6a01Smrgm4_define([lt_decl_varnames_tagged], 398f55e6a01Smrg[m4_assert([$# <= 2])dnl 399f55e6a01Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 400f55e6a01Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 401f55e6a01Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 402f55e6a01Smrgm4_define([_lt_decl_varnames_tagged], 403f55e6a01Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 404f55e6a01Smrg 405f55e6a01Smrg 406f55e6a01Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 407f55e6a01Smrg# ------------------------------------------------ 408f55e6a01Smrgm4_define([lt_decl_all_varnames], 409f55e6a01Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 410f55e6a01Smrg m4_if([$2], [], 411f55e6a01Smrg m4_quote(lt_decl_varnames), 412f55e6a01Smrg m4_quote(m4_shift($@))))[]dnl 413f55e6a01Smrg]) 414f55e6a01Smrgm4_define([_lt_decl_all_varnames], 415f55e6a01Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 416f55e6a01Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 417f55e6a01Smrg]) 418f55e6a01Smrg 419f55e6a01Smrg 420f55e6a01Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 421f55e6a01Smrg# ------------------------------------ 422f55e6a01Smrg# Quote a variable value, and forward it to `config.status' so that its 423f55e6a01Smrg# declaration there will have the same value as in `configure'. VARNAME 424f55e6a01Smrg# must have a single quote delimited value for this to work. 425f55e6a01Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 426f55e6a01Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 427f55e6a01Smrg 428f55e6a01Smrg 429f55e6a01Smrg# _LT_CONFIG_STATUS_DECLARATIONS 430f55e6a01Smrg# ------------------------------ 431f55e6a01Smrg# We delimit libtool config variables with single quotes, so when 432f55e6a01Smrg# we write them to config.status, we have to be sure to quote all 433f55e6a01Smrg# embedded single quotes properly. In configure, this macro expands 434f55e6a01Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 435f55e6a01Smrg# 436f55e6a01Smrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 437f55e6a01Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 438f55e6a01Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 439f55e6a01Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 440c35d236eSmrg 441c35d236eSmrg 442f55e6a01Smrg# _LT_LIBTOOL_TAGS 443f55e6a01Smrg# ---------------- 444f55e6a01Smrg# Output comment and list of tags supported by the script 445f55e6a01Smrgm4_defun([_LT_LIBTOOL_TAGS], 446f55e6a01Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 447f55e6a01Smrgavailable_tags="_LT_TAGS"dnl 448f55e6a01Smrg]) 449f55e6a01Smrg 450f55e6a01Smrg 451f55e6a01Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 452f55e6a01Smrg# ----------------------------------- 453f55e6a01Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 454f55e6a01Smrg# expand to a commented shell variable setting: 455f55e6a01Smrg# 456f55e6a01Smrg# # Some comment about what VAR is for. 457f55e6a01Smrg# visible_name=$lt_internal_name 458f55e6a01Smrgm4_define([_LT_LIBTOOL_DECLARE], 459f55e6a01Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 460f55e6a01Smrg [description])))[]dnl 461f55e6a01Smrgm4_pushdef([_libtool_name], 462f55e6a01Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 463f55e6a01Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 464f55e6a01Smrg [0], [_libtool_name=[$]$1], 465f55e6a01Smrg [1], [_libtool_name=$lt_[]$1], 466f55e6a01Smrg [2], [_libtool_name=$lt_[]$1], 467f55e6a01Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 468f55e6a01Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 469f55e6a01Smrg]) 470f55e6a01Smrg 471f55e6a01Smrg 472f55e6a01Smrg# _LT_LIBTOOL_CONFIG_VARS 473f55e6a01Smrg# ----------------------- 474f55e6a01Smrg# Produce commented declarations of non-tagged libtool config variables 475f55e6a01Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 476f55e6a01Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 477f55e6a01Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 478f55e6a01Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 479f55e6a01Smrg[m4_foreach([_lt_var], 480f55e6a01Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 481f55e6a01Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 482f55e6a01Smrg 483f55e6a01Smrg 484f55e6a01Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 485f55e6a01Smrg# ------------------------- 486f55e6a01Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 487f55e6a01Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 488f55e6a01Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 489f55e6a01Smrg 490f55e6a01Smrg 491f55e6a01Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 492f55e6a01Smrg# ------------------------------ 493f55e6a01Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 494f55e6a01Smrg 495f55e6a01Smrg 496f55e6a01Smrg# _LT_CONFIG_COMMANDS 497c35d236eSmrg# ------------------- 498f55e6a01Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 499f55e6a01Smrg# variables for single and double quote escaping we saved from calls 500f55e6a01Smrg# to _LT_DECL, we can put quote escaped variables declarations 501f55e6a01Smrg# into `config.status', and then the shell code to quote escape them in 502f55e6a01Smrg# for loops in `config.status'. Finally, any additional code accumulated 503f55e6a01Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 504f55e6a01Smrgm4_defun([_LT_CONFIG_COMMANDS], 505f55e6a01Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 506f55e6a01Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 507f55e6a01Smrg dnl instead of duplicating it all over again into config.status, 508f55e6a01Smrg dnl then we will have config.status run $CONFIG_LT later, so it 509f55e6a01Smrg dnl needs to know what name is stored there: 510f55e6a01Smrg [AC_CONFIG_COMMANDS([libtool], 511f55e6a01Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 512f55e6a01Smrg dnl If the libtool generation code is destined for config.status, 513f55e6a01Smrg dnl expand the accumulated commands and init code now: 514f55e6a01Smrg [AC_CONFIG_COMMANDS([libtool], 515f55e6a01Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 516f55e6a01Smrg])#_LT_CONFIG_COMMANDS 517f55e6a01Smrg 518f55e6a01Smrg 519f55e6a01Smrg# Initialize. 520f55e6a01Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 521f55e6a01Smrg[ 522f55e6a01Smrg 523f55e6a01Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 524f55e6a01Smrg# if CDPATH is set. 525f55e6a01Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 526f55e6a01Smrg 527f55e6a01Smrgsed_quote_subst='$sed_quote_subst' 528f55e6a01Smrgdouble_quote_subst='$double_quote_subst' 529f55e6a01Smrgdelay_variable_subst='$delay_variable_subst' 530f55e6a01Smrg_LT_CONFIG_STATUS_DECLARATIONS 531f55e6a01SmrgLTCC='$LTCC' 532f55e6a01SmrgLTCFLAGS='$LTCFLAGS' 533f55e6a01Smrgcompiler='$compiler_DEFAULT' 534f55e6a01Smrg 535f55e6a01Smrg# Quote evaled strings. 536f55e6a01Smrgfor var in lt_decl_all_varnames([[ \ 537f55e6a01Smrg]], lt_decl_quote_varnames); do 538f55e6a01Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 539f55e6a01Smrg *[[\\\\\\\`\\"\\\$]]*) 540f55e6a01Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 541f55e6a01Smrg ;; 542f55e6a01Smrg *) 543f55e6a01Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 544f55e6a01Smrg ;; 545f55e6a01Smrg esac 546f55e6a01Smrgdone 547f55e6a01Smrg 548f55e6a01Smrg# Double-quote double-evaled strings. 549f55e6a01Smrgfor var in lt_decl_all_varnames([[ \ 550f55e6a01Smrg]], lt_decl_dquote_varnames); do 551f55e6a01Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 552f55e6a01Smrg *[[\\\\\\\`\\"\\\$]]*) 553f55e6a01Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 554f55e6a01Smrg ;; 555f55e6a01Smrg *) 556f55e6a01Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 557f55e6a01Smrg ;; 558f55e6a01Smrg esac 559f55e6a01Smrgdone 560f55e6a01Smrg 561f55e6a01Smrg# Fix-up fallback echo if it was mangled by the above quoting rules. 562f55e6a01Smrgcase \$lt_ECHO in 563f55e6a01Smrg*'\\\[$]0 --fallback-echo"')dnl " 564f55e6a01Smrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 565f55e6a01Smrg ;; 566f55e6a01Smrgesac 567f55e6a01Smrg 568f55e6a01Smrg_LT_OUTPUT_LIBTOOL_INIT 569f55e6a01Smrg]) 570f55e6a01Smrg 571f55e6a01Smrg 572f55e6a01Smrg# LT_OUTPUT 573f55e6a01Smrg# --------- 574f55e6a01Smrg# This macro allows early generation of the libtool script (before 575f55e6a01Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 576f55e6a01Smrg# tests. 577f55e6a01SmrgAC_DEFUN([LT_OUTPUT], 578f55e6a01Smrg[: ${CONFIG_LT=./config.lt} 579f55e6a01SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 580f55e6a01Smrgcat >"$CONFIG_LT" <<_LTEOF 581f55e6a01Smrg#! $SHELL 582f55e6a01Smrg# Generated by $as_me. 583f55e6a01Smrg# Run this file to recreate a libtool stub with the current configuration. 584f55e6a01Smrg 585f55e6a01Smrglt_cl_silent=false 586f55e6a01SmrgSHELL=\${CONFIG_SHELL-$SHELL} 587f55e6a01Smrg_LTEOF 588f55e6a01Smrg 589f55e6a01Smrgcat >>"$CONFIG_LT" <<\_LTEOF 590f55e6a01SmrgAS_SHELL_SANITIZE 591f55e6a01Smrg_AS_PREPARE 592f55e6a01Smrg 593f55e6a01Smrgexec AS_MESSAGE_FD>&1 594f55e6a01Smrgexec AS_MESSAGE_LOG_FD>>config.log 595f55e6a01Smrg{ 596f55e6a01Smrg echo 597f55e6a01Smrg AS_BOX([Running $as_me.]) 598f55e6a01Smrg} >&AS_MESSAGE_LOG_FD 599f55e6a01Smrg 600f55e6a01Smrglt_cl_help="\ 601f55e6a01Smrg\`$as_me' creates a local libtool stub from the current configuration, 602f55e6a01Smrgfor use in further configure time tests before the real libtool is 603f55e6a01Smrggenerated. 604f55e6a01Smrg 605f55e6a01SmrgUsage: $[0] [[OPTIONS]] 606f55e6a01Smrg 607f55e6a01Smrg -h, --help print this help, then exit 608f55e6a01Smrg -V, --version print version number, then exit 609f55e6a01Smrg -q, --quiet do not print progress messages 610f55e6a01Smrg -d, --debug don't remove temporary files 611f55e6a01Smrg 612f55e6a01SmrgReport bugs to <bug-libtool@gnu.org>." 613f55e6a01Smrg 614f55e6a01Smrglt_cl_version="\ 615f55e6a01Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 616f55e6a01Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 617f55e6a01Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 618f55e6a01Smrg 619f55e6a01SmrgCopyright (C) 2008 Free Software Foundation, Inc. 620f55e6a01SmrgThis config.lt script is free software; the Free Software Foundation 621f55e6a01Smrggives unlimited permision to copy, distribute and modify it." 622f55e6a01Smrg 623f55e6a01Smrgwhile test $[#] != 0 624f55e6a01Smrgdo 625f55e6a01Smrg case $[1] in 626f55e6a01Smrg --version | --v* | -V ) 627f55e6a01Smrg echo "$lt_cl_version"; exit 0 ;; 628f55e6a01Smrg --help | --h* | -h ) 629f55e6a01Smrg echo "$lt_cl_help"; exit 0 ;; 630f55e6a01Smrg --debug | --d* | -d ) 631f55e6a01Smrg debug=: ;; 632f55e6a01Smrg --quiet | --q* | --silent | --s* | -q ) 633f55e6a01Smrg lt_cl_silent=: ;; 634f55e6a01Smrg 635f55e6a01Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 636f55e6a01SmrgTry \`$[0] --help' for more information.]) ;; 637f55e6a01Smrg 638f55e6a01Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 639f55e6a01SmrgTry \`$[0] --help' for more information.]) ;; 640f55e6a01Smrg esac 641f55e6a01Smrg shift 642f55e6a01Smrgdone 643f55e6a01Smrg 644f55e6a01Smrgif $lt_cl_silent; then 645f55e6a01Smrg exec AS_MESSAGE_FD>/dev/null 646f55e6a01Smrgfi 647f55e6a01Smrg_LTEOF 648f55e6a01Smrg 649f55e6a01Smrgcat >>"$CONFIG_LT" <<_LTEOF 650f55e6a01Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 651f55e6a01Smrg_LTEOF 652f55e6a01Smrg 653f55e6a01Smrgcat >>"$CONFIG_LT" <<\_LTEOF 654f55e6a01SmrgAC_MSG_NOTICE([creating $ofile]) 655f55e6a01Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 656f55e6a01SmrgAS_EXIT(0) 657f55e6a01Smrg_LTEOF 658f55e6a01Smrgchmod +x "$CONFIG_LT" 659f55e6a01Smrg 660f55e6a01Smrg# configure is writing to config.log, but config.lt does its own redirection, 661f55e6a01Smrg# appending to config.log, which fails on DOS, as config.log is still kept 662f55e6a01Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 663f55e6a01Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 664f55e6a01Smrgif test "$no_create" != yes; then 665f55e6a01Smrg lt_cl_success=: 666f55e6a01Smrg test "$silent" = yes && 667f55e6a01Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 668f55e6a01Smrg exec AS_MESSAGE_LOG_FD>/dev/null 669f55e6a01Smrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 670f55e6a01Smrg exec AS_MESSAGE_LOG_FD>>config.log 671f55e6a01Smrg $lt_cl_success || AS_EXIT(1) 672f55e6a01Smrgfi 673f55e6a01Smrg])# LT_OUTPUT 674f55e6a01Smrg 675f55e6a01Smrg 676f55e6a01Smrg# _LT_CONFIG(TAG) 677f55e6a01Smrg# --------------- 678f55e6a01Smrg# If TAG is the built-in tag, create an initial libtool script with a 679f55e6a01Smrg# default configuration from the untagged config vars. Otherwise add code 680f55e6a01Smrg# to config.status for appending the configuration named by TAG from the 681f55e6a01Smrg# matching tagged config vars. 682f55e6a01Smrgm4_defun([_LT_CONFIG], 683f55e6a01Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 684f55e6a01Smrg_LT_CONFIG_SAVE_COMMANDS([ 685f55e6a01Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 686f55e6a01Smrg m4_if(_LT_TAG, [C], [ 687f55e6a01Smrg # See if we are running on zsh, and set the options which allow our 688f55e6a01Smrg # commands through without removal of \ escapes. 689f55e6a01Smrg if test -n "${ZSH_VERSION+set}" ; then 690f55e6a01Smrg setopt NO_GLOB_SUBST 691f55e6a01Smrg fi 692f55e6a01Smrg 693f55e6a01Smrg cfgfile="${ofile}T" 694f55e6a01Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 695f55e6a01Smrg $RM "$cfgfile" 696f55e6a01Smrg 697f55e6a01Smrg cat <<_LT_EOF >> "$cfgfile" 698f55e6a01Smrg#! $SHELL 699f55e6a01Smrg 700f55e6a01Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 701f55e6a01Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 702f55e6a01Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 703f55e6a01Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 704f55e6a01Smrg# 705f55e6a01Smrg_LT_COPYING 706f55e6a01Smrg_LT_LIBTOOL_TAGS 707f55e6a01Smrg 708f55e6a01Smrg# ### BEGIN LIBTOOL CONFIG 709f55e6a01Smrg_LT_LIBTOOL_CONFIG_VARS 710f55e6a01Smrg_LT_LIBTOOL_TAG_VARS 711f55e6a01Smrg# ### END LIBTOOL CONFIG 712f55e6a01Smrg 713f55e6a01Smrg_LT_EOF 714f55e6a01Smrg 715f55e6a01Smrg case $host_os in 716f55e6a01Smrg aix3*) 717f55e6a01Smrg cat <<\_LT_EOF >> "$cfgfile" 718f55e6a01Smrg# AIX sometimes has problems with the GCC collect2 program. For some 719f55e6a01Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 720f55e6a01Smrg# vanish in a puff of smoke. 721f55e6a01Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 722f55e6a01Smrg COLLECT_NAMES= 723f55e6a01Smrg export COLLECT_NAMES 724f55e6a01Smrgfi 725f55e6a01Smrg_LT_EOF 726f55e6a01Smrg ;; 727f55e6a01Smrg esac 728f55e6a01Smrg 729f55e6a01Smrg _LT_PROG_LTMAIN 730f55e6a01Smrg 731f55e6a01Smrg # We use sed instead of cat because bash on DJGPP gets confused if 732f55e6a01Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 733f55e6a01Smrg # text mode, it properly converts lines to CR/LF. This bash problem 734f55e6a01Smrg # is reportedly fixed, but why not run on old versions too? 735f55e6a01Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 736f55e6a01Smrg || (rm -f "$cfgfile"; exit 1) 737f55e6a01Smrg 738f55e6a01Smrg _LT_PROG_XSI_SHELLFNS 739f55e6a01Smrg 740f55e6a01Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 741f55e6a01Smrg || (rm -f "$cfgfile"; exit 1) 742f55e6a01Smrg 743f55e6a01Smrg mv -f "$cfgfile" "$ofile" || 744f55e6a01Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 745f55e6a01Smrg chmod +x "$ofile" 746f55e6a01Smrg], 747f55e6a01Smrg[cat <<_LT_EOF >> "$ofile" 748f55e6a01Smrg 749f55e6a01Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 750f55e6a01Smrgdnl in a comment (ie after a #). 751f55e6a01Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 752f55e6a01Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 753f55e6a01Smrg# ### END LIBTOOL TAG CONFIG: $1 754f55e6a01Smrg_LT_EOF 755f55e6a01Smrg])dnl /m4_if 756f55e6a01Smrg], 757f55e6a01Smrg[m4_if([$1], [], [ 758f55e6a01Smrg PACKAGE='$PACKAGE' 759f55e6a01Smrg VERSION='$VERSION' 760f55e6a01Smrg TIMESTAMP='$TIMESTAMP' 761f55e6a01Smrg RM='$RM' 762f55e6a01Smrg ofile='$ofile'], []) 763f55e6a01Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 764f55e6a01Smrg])# _LT_CONFIG 765f55e6a01Smrg 766f55e6a01Smrg 767f55e6a01Smrg# LT_SUPPORTED_TAG(TAG) 768f55e6a01Smrg# --------------------- 769f55e6a01Smrg# Trace this macro to discover what tags are supported by the libtool 770f55e6a01Smrg# --tag option, using: 771f55e6a01Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 772f55e6a01SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 773f55e6a01Smrg 774f55e6a01Smrg 775f55e6a01Smrg# C support is built-in for now 776f55e6a01Smrgm4_define([_LT_LANG_C_enabled], []) 777f55e6a01Smrgm4_define([_LT_TAGS], []) 778f55e6a01Smrg 779f55e6a01Smrg 780f55e6a01Smrg# LT_LANG(LANG) 781f55e6a01Smrg# ------------- 782f55e6a01Smrg# Enable libtool support for the given language if not already enabled. 783f55e6a01SmrgAC_DEFUN([LT_LANG], 784f55e6a01Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 785f55e6a01Smrgm4_case([$1], 786f55e6a01Smrg [C], [_LT_LANG(C)], 787f55e6a01Smrg [C++], [_LT_LANG(CXX)], 788f55e6a01Smrg [Java], [_LT_LANG(GCJ)], 789f55e6a01Smrg [Fortran 77], [_LT_LANG(F77)], 790f55e6a01Smrg [Fortran], [_LT_LANG(FC)], 791f55e6a01Smrg [Windows Resource], [_LT_LANG(RC)], 792f55e6a01Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 793f55e6a01Smrg [_LT_LANG($1)], 794f55e6a01Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 795f55e6a01Smrg])# LT_LANG 796f55e6a01Smrg 797f55e6a01Smrg 798f55e6a01Smrg# _LT_LANG(LANGNAME) 799f55e6a01Smrg# ------------------ 800f55e6a01Smrgm4_defun([_LT_LANG], 801f55e6a01Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 802f55e6a01Smrg [LT_SUPPORTED_TAG([$1])dnl 803f55e6a01Smrg m4_append([_LT_TAGS], [$1 ])dnl 804f55e6a01Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 805f55e6a01Smrg _LT_LANG_$1_CONFIG($1)])dnl 806f55e6a01Smrg])# _LT_LANG 807f55e6a01Smrg 808f55e6a01Smrg 809f55e6a01Smrg# _LT_LANG_DEFAULT_CONFIG 810f55e6a01Smrg# ----------------------- 811f55e6a01Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 812f55e6a01Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 813f55e6a01Smrg [LT_LANG(CXX)], 814f55e6a01Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 815f55e6a01Smrg 816f55e6a01SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 817f55e6a01Smrg [LT_LANG(F77)], 818f55e6a01Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 819f55e6a01Smrg 820f55e6a01SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 821f55e6a01Smrg [LT_LANG(FC)], 822f55e6a01Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 823f55e6a01Smrg 824f55e6a01Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 825f55e6a01Smrgdnl pulling things in needlessly. 826f55e6a01SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 827f55e6a01Smrg [LT_LANG(GCJ)], 828f55e6a01Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 829f55e6a01Smrg [LT_LANG(GCJ)], 830f55e6a01Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 831f55e6a01Smrg [LT_LANG(GCJ)], 832f55e6a01Smrg [m4_ifdef([AC_PROG_GCJ], 833f55e6a01Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 834f55e6a01Smrg m4_ifdef([A][M_PROG_GCJ], 835f55e6a01Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 836f55e6a01Smrg m4_ifdef([LT_PROG_GCJ], 837f55e6a01Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 838f55e6a01Smrg 839f55e6a01SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 840f55e6a01Smrg [LT_LANG(RC)], 841f55e6a01Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 842f55e6a01Smrg])# _LT_LANG_DEFAULT_CONFIG 843f55e6a01Smrg 844f55e6a01Smrg# Obsolete macros: 845f55e6a01SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 846f55e6a01SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 847f55e6a01SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 848f55e6a01SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 849f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 850f55e6a01Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 851f55e6a01Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 852f55e6a01Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 853f55e6a01Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 854f55e6a01Smrg 855f55e6a01Smrg 856f55e6a01Smrg# _LT_TAG_COMPILER 857f55e6a01Smrg# ---------------- 858f55e6a01Smrgm4_defun([_LT_TAG_COMPILER], 859c35d236eSmrg[AC_REQUIRE([AC_PROG_CC])dnl 860c35d236eSmrg 861f55e6a01Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 862f55e6a01Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 863f55e6a01Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 864f55e6a01Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 865f55e6a01Smrg 866c35d236eSmrg# If no C compiler was specified, use CC. 867c35d236eSmrgLTCC=${LTCC-"$CC"} 868c35d236eSmrg 869c35d236eSmrg# If no C compiler flags were specified, use CFLAGS. 870c35d236eSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 871c35d236eSmrg 872c35d236eSmrg# Allow CC to be a program name with arguments. 873c35d236eSmrgcompiler=$CC 874f55e6a01Smrg])# _LT_TAG_COMPILER 875c35d236eSmrg 876c35d236eSmrg 877c35d236eSmrg# _LT_COMPILER_BOILERPLATE 878c35d236eSmrg# ------------------------ 879c35d236eSmrg# Check for compiler boilerplate output or warnings with 880c35d236eSmrg# the simple compiler test code. 881f55e6a01Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 882f55e6a01Smrg[m4_require([_LT_DECL_SED])dnl 8834f6cd06fSmrgac_outfile=conftest.$ac_objext 8844f6cd06fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 885c35d236eSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 886c35d236eSmrg_lt_compiler_boilerplate=`cat conftest.err` 887f55e6a01Smrg$RM conftest* 888c35d236eSmrg])# _LT_COMPILER_BOILERPLATE 889c35d236eSmrg 890c35d236eSmrg 891c35d236eSmrg# _LT_LINKER_BOILERPLATE 892c35d236eSmrg# ---------------------- 893c35d236eSmrg# Check for linker boilerplate output or warnings with 894c35d236eSmrg# the simple link test code. 895f55e6a01Smrgm4_defun([_LT_LINKER_BOILERPLATE], 896f55e6a01Smrg[m4_require([_LT_DECL_SED])dnl 8974f6cd06fSmrgac_outfile=conftest.$ac_objext 8984f6cd06fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 899c35d236eSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 900c35d236eSmrg_lt_linker_boilerplate=`cat conftest.err` 901f55e6a01Smrg$RM -r conftest* 902c35d236eSmrg])# _LT_LINKER_BOILERPLATE 903c35d236eSmrg 9044f6cd06fSmrg# _LT_REQUIRED_DARWIN_CHECKS 905f55e6a01Smrg# ------------------------- 906f55e6a01Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9074f6cd06fSmrg case $host_os in 9084f6cd06fSmrg rhapsody* | darwin*) 9094f6cd06fSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9104f6cd06fSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 911f55e6a01Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 912f55e6a01Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 913f55e6a01Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 914f55e6a01Smrg _LT_DECL([], [DSYMUTIL], [1], 915f55e6a01Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 916f55e6a01Smrg _LT_DECL([], [NMEDIT], [1], 917f55e6a01Smrg [Tool to change global to local symbols on Mac OS X]) 918f55e6a01Smrg _LT_DECL([], [LIPO], [1], 919f55e6a01Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 920f55e6a01Smrg _LT_DECL([], [OTOOL], [1], 921f55e6a01Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 922f55e6a01Smrg _LT_DECL([], [OTOOL64], [1], 923f55e6a01Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9244f6cd06fSmrg 9254f6cd06fSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9264f6cd06fSmrg [lt_cv_apple_cc_single_mod=no 9274f6cd06fSmrg if test -z "${LT_MULTI_MODULE}"; then 928f55e6a01Smrg # By default we will add the -single_module flag. You can override 929f55e6a01Smrg # by either setting the environment variable LT_MULTI_MODULE 930f55e6a01Smrg # non-empty at configure time, or by adding -multi_module to the 931f55e6a01Smrg # link flags. 932f55e6a01Smrg rm -rf libconftest.dylib* 933f55e6a01Smrg echo "int foo(void){return 1;}" > conftest.c 934f55e6a01Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 935f55e6a01Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 936f55e6a01Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 937f55e6a01Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 938f55e6a01Smrg _lt_result=$? 939f55e6a01Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 940f55e6a01Smrg lt_cv_apple_cc_single_mod=yes 941f55e6a01Smrg else 942f55e6a01Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 943f55e6a01Smrg fi 944f55e6a01Smrg rm -rf libconftest.dylib* 945f55e6a01Smrg rm -f conftest.* 9464f6cd06fSmrg fi]) 9474f6cd06fSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 9484f6cd06fSmrg [lt_cv_ld_exported_symbols_list], 9494f6cd06fSmrg [lt_cv_ld_exported_symbols_list=no 9504f6cd06fSmrg save_LDFLAGS=$LDFLAGS 9514f6cd06fSmrg echo "_main" > conftest.sym 9524f6cd06fSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 9534f6cd06fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 954f55e6a01Smrg [lt_cv_ld_exported_symbols_list=yes], 955f55e6a01Smrg [lt_cv_ld_exported_symbols_list=no]) 956f55e6a01Smrg LDFLAGS="$save_LDFLAGS" 9574f6cd06fSmrg ]) 9584f6cd06fSmrg case $host_os in 959f55e6a01Smrg rhapsody* | darwin1.[[012]]) 9604f6cd06fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 9614f6cd06fSmrg darwin1.*) 962f55e6a01Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 963f55e6a01Smrg darwin*) # darwin 5.x on 9644f6cd06fSmrg # if running on 10.5 or later, the deployment target defaults 9654f6cd06fSmrg # to the OS version, if on x86, and 10.4, the deployment 9664f6cd06fSmrg # target defaults to 10.4. Don't you love it? 9674f6cd06fSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 968f55e6a01Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 969f55e6a01Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 970f55e6a01Smrg 10.[[012]]*) 971f55e6a01Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 972f55e6a01Smrg 10.*) 973f55e6a01Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 9744f6cd06fSmrg esac 9754f6cd06fSmrg ;; 9764f6cd06fSmrg esac 9774f6cd06fSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 9784f6cd06fSmrg _lt_dar_single_mod='$single_module' 9794f6cd06fSmrg fi 9804f6cd06fSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 9814f6cd06fSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 9824f6cd06fSmrg else 983f55e6a01Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 9844f6cd06fSmrg fi 9854f6cd06fSmrg if test "$DSYMUTIL" != ":"; then 986f55e6a01Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 9874f6cd06fSmrg else 9884f6cd06fSmrg _lt_dsymutil= 9894f6cd06fSmrg fi 9904f6cd06fSmrg ;; 9914f6cd06fSmrg esac 9924f6cd06fSmrg]) 993c35d236eSmrg 994f55e6a01Smrg 995f55e6a01Smrg# _LT_DARWIN_LINKER_FEATURES 996f55e6a01Smrg# -------------------------- 997f55e6a01Smrg# Checks for linker and compiler features on darwin 998f55e6a01Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 999f55e6a01Smrg[ 1000f55e6a01Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1001f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1002f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1003f55e6a01Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1004f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1005f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1006f55e6a01Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1007f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1008f55e6a01Smrg case $cc_basename in 1009f55e6a01Smrg ifort*) _lt_dar_can_shared=yes ;; 1010f55e6a01Smrg *) _lt_dar_can_shared=$GCC ;; 1011f55e6a01Smrg esac 1012f55e6a01Smrg if test "$_lt_dar_can_shared" = "yes"; then 1013f55e6a01Smrg output_verbose_link_cmd=echo 1014f55e6a01Smrg _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}" 1015f55e6a01Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1016f55e6a01Smrg _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}" 1017f55e6a01Smrg _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}" 1018f55e6a01Smrg m4_if([$1], [CXX], 1019f55e6a01Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1020f55e6a01Smrg _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}" 1021f55e6a01Smrg _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}" 1022f55e6a01Smrg fi 1023f55e6a01Smrg],[]) 1024f55e6a01Smrg else 1025f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1026f55e6a01Smrg fi 1027f55e6a01Smrg]) 1028f55e6a01Smrg 1029f55e6a01Smrg# _LT_SYS_MODULE_PATH_AIX 1030f55e6a01Smrg# ----------------------- 1031c35d236eSmrg# Links a minimal program and checks the executable 1032c35d236eSmrg# for the system default hardcoded library path. In most cases, 1033c35d236eSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1034c35d236eSmrg# the location of the communication and MPI libs are included too. 1035c35d236eSmrg# If we don't find anything, use the default library path according 1036c35d236eSmrg# to the aix ld manual. 1037f55e6a01Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1038f55e6a01Smrg[m4_require([_LT_DECL_SED])dnl 10394f6cd06fSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 10404f6cd06fSmrglt_aix_libpath_sed=' 10414f6cd06fSmrg /Import File Strings/,/^$/ { 10424f6cd06fSmrg /^0/ { 10434f6cd06fSmrg s/^0 *\(.*\)$/\1/ 10444f6cd06fSmrg p 10454f6cd06fSmrg } 10464f6cd06fSmrg }' 10474f6cd06fSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1048c35d236eSmrg# Check for a 64-bit object if we didn't find anything. 10494f6cd06fSmrgif test -z "$aix_libpath"; then 10504f6cd06fSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 10514f6cd06fSmrgfi],[]) 1052c35d236eSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1053f55e6a01Smrg])# _LT_SYS_MODULE_PATH_AIX 1054c35d236eSmrg 1055c35d236eSmrg 1056f55e6a01Smrg# _LT_SHELL_INIT(ARG) 1057f55e6a01Smrg# ------------------- 1058f55e6a01Smrgm4_define([_LT_SHELL_INIT], 1059c35d236eSmrg[ifdef([AC_DIVERSION_NOTICE], 1060c35d236eSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 1061c35d236eSmrg [AC_DIVERT_PUSH(NOTICE)]) 1062c35d236eSmrg$1 1063c35d236eSmrgAC_DIVERT_POP 1064f55e6a01Smrg])# _LT_SHELL_INIT 1065c35d236eSmrg 1066c35d236eSmrg 1067f55e6a01Smrg# _LT_PROG_ECHO_BACKSLASH 1068f55e6a01Smrg# ----------------------- 1069c35d236eSmrg# Add some code to the start of the generated configure script which 1070c35d236eSmrg# will find an echo command which doesn't interpret backslashes. 1071f55e6a01Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1072f55e6a01Smrg[_LT_SHELL_INIT([ 1073c35d236eSmrg# Check that we are running under the correct shell. 1074c35d236eSmrgSHELL=${CONFIG_SHELL-/bin/sh} 1075c35d236eSmrg 1076f55e6a01Smrgcase X$lt_ECHO in 1077c35d236eSmrgX*--fallback-echo) 1078c35d236eSmrg # Remove one level of quotation (which was required for Make). 1079f55e6a01Smrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1080c35d236eSmrg ;; 1081c35d236eSmrgesac 1082c35d236eSmrg 1083f55e6a01SmrgECHO=${lt_ECHO-echo} 1084c35d236eSmrgif test "X[$]1" = X--no-reexec; then 1085c35d236eSmrg # Discard the --no-reexec flag, and continue. 1086c35d236eSmrg shift 1087c35d236eSmrgelif test "X[$]1" = X--fallback-echo; then 1088c35d236eSmrg # Avoid inline document here, it may be left over 1089c35d236eSmrg : 1090f55e6a01Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 1091f55e6a01Smrg # Yippee, $ECHO works! 1092c35d236eSmrg : 1093c35d236eSmrgelse 1094c35d236eSmrg # Restart under the correct shell. 1095c35d236eSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1096c35d236eSmrgfi 1097c35d236eSmrg 1098c35d236eSmrgif test "X[$]1" = X--fallback-echo; then 1099c35d236eSmrg # used as fallback echo 1100c35d236eSmrg shift 1101f55e6a01Smrg cat <<_LT_EOF 1102c35d236eSmrg[$]* 1103f55e6a01Smrg_LT_EOF 1104c35d236eSmrg exit 0 1105c35d236eSmrgfi 1106c35d236eSmrg 1107c35d236eSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1108c35d236eSmrg# if CDPATH is set. 1109c35d236eSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1110c35d236eSmrg 1111f55e6a01Smrgif test -z "$lt_ECHO"; then 1112f55e6a01Smrg if test "X${echo_test_string+set}" != Xset; then 1113f55e6a01Smrg # find a string as large as possible, as long as the shell can cope with it 1114f55e6a01Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1115f55e6a01Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1116f55e6a01Smrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 1117f55e6a01Smrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 1118f55e6a01Smrg then 1119f55e6a01Smrg break 1120f55e6a01Smrg fi 1121f55e6a01Smrg done 1122f55e6a01Smrg fi 1123c35d236eSmrg 1124f55e6a01Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1125f55e6a01Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1126f55e6a01Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1127f55e6a01Smrg : 1128f55e6a01Smrg else 1129f55e6a01Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 1130f55e6a01Smrg # backslashes. This makes it impossible to quote backslashes using 1131f55e6a01Smrg # echo "$something" | sed 's/\\/\\\\/g' 1132f55e6a01Smrg # 1133f55e6a01Smrg # So, first we look for a working echo in the user's PATH. 1134c35d236eSmrg 1135f55e6a01Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1136f55e6a01Smrg for dir in $PATH /usr/ucb; do 1137f55e6a01Smrg IFS="$lt_save_ifs" 1138f55e6a01Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1139f55e6a01Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1140f55e6a01Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1141f55e6a01Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1142f55e6a01Smrg ECHO="$dir/echo" 1143f55e6a01Smrg break 1144f55e6a01Smrg fi 1145f55e6a01Smrg done 1146c35d236eSmrg IFS="$lt_save_ifs" 1147c35d236eSmrg 1148f55e6a01Smrg if test "X$ECHO" = Xecho; then 1149f55e6a01Smrg # We didn't find a better echo, so look for alternatives. 1150f55e6a01Smrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 1151f55e6a01Smrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 1152f55e6a01Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1153f55e6a01Smrg # This shell has a builtin print -r that does the trick. 1154f55e6a01Smrg ECHO='print -r' 1155f55e6a01Smrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 1156f55e6a01Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 1157f55e6a01Smrg # If we have ksh, try running configure again with it. 1158f55e6a01Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1159f55e6a01Smrg export ORIGINAL_CONFIG_SHELL 1160f55e6a01Smrg CONFIG_SHELL=/bin/ksh 1161f55e6a01Smrg export CONFIG_SHELL 1162f55e6a01Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 1163c35d236eSmrg else 1164f55e6a01Smrg # Try using printf. 1165f55e6a01Smrg ECHO='printf %s\n' 1166f55e6a01Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1167f55e6a01Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1168f55e6a01Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1169f55e6a01Smrg # Cool, printf works 1170f55e6a01Smrg : 1171f55e6a01Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1172f55e6a01Smrg test "X$echo_testing_string" = 'X\t' && 1173f55e6a01Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1174f55e6a01Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1175f55e6a01Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1176f55e6a01Smrg export CONFIG_SHELL 1177f55e6a01Smrg SHELL="$CONFIG_SHELL" 1178f55e6a01Smrg export SHELL 1179f55e6a01Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1180f55e6a01Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1181f55e6a01Smrg test "X$echo_testing_string" = 'X\t' && 1182f55e6a01Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1183f55e6a01Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1184f55e6a01Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1185f55e6a01Smrg else 1186f55e6a01Smrg # maybe with a smaller string... 1187f55e6a01Smrg prev=: 1188c35d236eSmrg 1189f55e6a01Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1190f55e6a01Smrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 1191f55e6a01Smrg then 1192f55e6a01Smrg break 1193f55e6a01Smrg fi 1194f55e6a01Smrg prev="$cmd" 1195f55e6a01Smrg done 1196c35d236eSmrg 1197f55e6a01Smrg if test "$prev" != 'sed 50q "[$]0"'; then 1198f55e6a01Smrg echo_test_string=`eval $prev` 1199f55e6a01Smrg export echo_test_string 1200f55e6a01Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1201f55e6a01Smrg else 1202f55e6a01Smrg # Oops. We lost completely, so just stick with echo. 1203f55e6a01Smrg ECHO=echo 1204f55e6a01Smrg fi 1205f55e6a01Smrg fi 1206c35d236eSmrg fi 1207c35d236eSmrg fi 1208c35d236eSmrg fi 1209c35d236eSmrgfi 1210c35d236eSmrg 1211c35d236eSmrg# Copy echo and quote the copy suitably for passing to libtool from 1212c35d236eSmrg# the Makefile, instead of quoting the original, which is used later. 1213f55e6a01Smrglt_ECHO=$ECHO 1214f55e6a01Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1215f55e6a01Smrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 1216c35d236eSmrgfi 1217c35d236eSmrg 1218f55e6a01SmrgAC_SUBST(lt_ECHO) 1219f55e6a01Smrg]) 1220f55e6a01Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1221f55e6a01Smrg_LT_DECL([], [ECHO], [1], 1222f55e6a01Smrg [An echo program that does not interpret backslashes]) 1223f55e6a01Smrg])# _LT_PROG_ECHO_BACKSLASH 1224c35d236eSmrg 1225c35d236eSmrg 1226f55e6a01Smrg# _LT_ENABLE_LOCK 1227f55e6a01Smrg# --------------- 1228f55e6a01Smrgm4_defun([_LT_ENABLE_LOCK], 1229c35d236eSmrg[AC_ARG_ENABLE([libtool-lock], 1230f55e6a01Smrg [AS_HELP_STRING([--disable-libtool-lock], 1231f55e6a01Smrg [avoid locking (might break parallel builds)])]) 1232c35d236eSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1233c35d236eSmrg 1234c35d236eSmrg# Some flags need to be propagated to the compiler or linker for good 1235c35d236eSmrg# libtool support. 1236c35d236eSmrgcase $host in 1237c35d236eSmrgia64-*-hpux*) 1238c35d236eSmrg # Find out which ABI we are using. 1239c35d236eSmrg echo 'int i;' > conftest.$ac_ext 1240c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 1241c35d236eSmrg case `/usr/bin/file conftest.$ac_objext` in 1242f55e6a01Smrg *ELF-32*) 1243f55e6a01Smrg HPUX_IA64_MODE="32" 1244f55e6a01Smrg ;; 1245f55e6a01Smrg *ELF-64*) 1246f55e6a01Smrg HPUX_IA64_MODE="64" 1247f55e6a01Smrg ;; 1248c35d236eSmrg esac 1249c35d236eSmrg fi 1250c35d236eSmrg rm -rf conftest* 1251c35d236eSmrg ;; 1252c35d236eSmrg*-*-irix6*) 1253c35d236eSmrg # Find out which ABI we are using. 1254c35d236eSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1255c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 1256f55e6a01Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1257f55e6a01Smrg case `/usr/bin/file conftest.$ac_objext` in 1258f55e6a01Smrg *32-bit*) 1259f55e6a01Smrg LD="${LD-ld} -melf32bsmip" 1260f55e6a01Smrg ;; 1261f55e6a01Smrg *N32*) 1262f55e6a01Smrg LD="${LD-ld} -melf32bmipn32" 1263f55e6a01Smrg ;; 1264f55e6a01Smrg *64-bit*) 1265f55e6a01Smrg LD="${LD-ld} -melf64bmip" 1266f55e6a01Smrg ;; 1267f55e6a01Smrg esac 1268f55e6a01Smrg else 1269f55e6a01Smrg case `/usr/bin/file conftest.$ac_objext` in 1270f55e6a01Smrg *32-bit*) 1271f55e6a01Smrg LD="${LD-ld} -32" 1272f55e6a01Smrg ;; 1273f55e6a01Smrg *N32*) 1274f55e6a01Smrg LD="${LD-ld} -n32" 1275f55e6a01Smrg ;; 1276f55e6a01Smrg *64-bit*) 1277f55e6a01Smrg LD="${LD-ld} -64" 1278f55e6a01Smrg ;; 1279f55e6a01Smrg esac 1280f55e6a01Smrg fi 1281c35d236eSmrg fi 1282c35d236eSmrg rm -rf conftest* 1283c35d236eSmrg ;; 1284c35d236eSmrg 12854f6cd06fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1286f55e6a01Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1287c35d236eSmrg # Find out which ABI we are using. 1288c35d236eSmrg echo 'int i;' > conftest.$ac_ext 1289c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 1290c35d236eSmrg case `/usr/bin/file conftest.o` in 1291f55e6a01Smrg *32-bit*) 1292f55e6a01Smrg case $host in 1293f55e6a01Smrg x86_64-*kfreebsd*-gnu) 1294f55e6a01Smrg LD="${LD-ld} -m elf_i386_fbsd" 1295f55e6a01Smrg ;; 1296f55e6a01Smrg x86_64-*linux*) 1297f55e6a01Smrg LD="${LD-ld} -m elf_i386" 1298f55e6a01Smrg ;; 1299f55e6a01Smrg ppc64-*linux*|powerpc64-*linux*) 1300f55e6a01Smrg LD="${LD-ld} -m elf32ppclinux" 1301f55e6a01Smrg ;; 1302f55e6a01Smrg s390x-*linux*) 1303f55e6a01Smrg LD="${LD-ld} -m elf_s390" 1304f55e6a01Smrg ;; 1305f55e6a01Smrg sparc64-*linux*) 1306f55e6a01Smrg LD="${LD-ld} -m elf32_sparc" 1307f55e6a01Smrg ;; 1308f55e6a01Smrg esac 1309f55e6a01Smrg ;; 1310f55e6a01Smrg *64-bit*) 1311f55e6a01Smrg case $host in 1312f55e6a01Smrg x86_64-*kfreebsd*-gnu) 1313f55e6a01Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1314f55e6a01Smrg ;; 1315f55e6a01Smrg x86_64-*linux*) 1316f55e6a01Smrg LD="${LD-ld} -m elf_x86_64" 1317f55e6a01Smrg ;; 1318f55e6a01Smrg ppc*-*linux*|powerpc*-*linux*) 1319f55e6a01Smrg LD="${LD-ld} -m elf64ppc" 1320f55e6a01Smrg ;; 1321f55e6a01Smrg s390*-*linux*|s390*-*tpf*) 1322f55e6a01Smrg LD="${LD-ld} -m elf64_s390" 1323f55e6a01Smrg ;; 1324f55e6a01Smrg sparc*-*linux*) 1325f55e6a01Smrg LD="${LD-ld} -m elf64_sparc" 1326f55e6a01Smrg ;; 1327f55e6a01Smrg esac 1328f55e6a01Smrg ;; 1329c35d236eSmrg esac 1330c35d236eSmrg fi 1331c35d236eSmrg rm -rf conftest* 1332c35d236eSmrg ;; 1333c35d236eSmrg 1334c35d236eSmrg*-*-sco3.2v5*) 1335c35d236eSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1336c35d236eSmrg SAVE_CFLAGS="$CFLAGS" 1337c35d236eSmrg CFLAGS="$CFLAGS -belf" 1338c35d236eSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1339c35d236eSmrg [AC_LANG_PUSH(C) 1340f55e6a01Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1341c35d236eSmrg AC_LANG_POP]) 1342c35d236eSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1343c35d236eSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1344c35d236eSmrg CFLAGS="$SAVE_CFLAGS" 1345c35d236eSmrg fi 1346c35d236eSmrg ;; 1347c35d236eSmrgsparc*-*solaris*) 1348c35d236eSmrg # Find out which ABI we are using. 1349c35d236eSmrg echo 'int i;' > conftest.$ac_ext 1350c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 1351c35d236eSmrg case `/usr/bin/file conftest.o` in 1352c35d236eSmrg *64-bit*) 1353c35d236eSmrg case $lt_cv_prog_gnu_ld in 1354c35d236eSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 13554f6cd06fSmrg *) 1356f55e6a01Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 13574f6cd06fSmrg LD="${LD-ld} -64" 13584f6cd06fSmrg fi 13594f6cd06fSmrg ;; 1360c35d236eSmrg esac 1361c35d236eSmrg ;; 1362c35d236eSmrg esac 1363c35d236eSmrg fi 1364c35d236eSmrg rm -rf conftest* 1365c35d236eSmrg ;; 1366c35d236eSmrgesac 1367c35d236eSmrg 1368c35d236eSmrgneed_locks="$enable_libtool_lock" 1369f55e6a01Smrg])# _LT_ENABLE_LOCK 1370f55e6a01Smrg 1371f55e6a01Smrg 1372f55e6a01Smrg# _LT_CMD_OLD_ARCHIVE 1373f55e6a01Smrg# ------------------- 1374f55e6a01Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1375f55e6a01Smrg[AC_CHECK_TOOL(AR, ar, false) 1376f55e6a01Smrgtest -z "$AR" && AR=ar 1377f55e6a01Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1378f55e6a01Smrg_LT_DECL([], [AR], [1], [The archiver]) 1379f55e6a01Smrg_LT_DECL([], [AR_FLAGS], [1]) 1380f55e6a01Smrg 1381f55e6a01SmrgAC_CHECK_TOOL(STRIP, strip, :) 1382f55e6a01Smrgtest -z "$STRIP" && STRIP=: 1383f55e6a01Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1384f55e6a01Smrg 1385f55e6a01SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1386f55e6a01Smrgtest -z "$RANLIB" && RANLIB=: 1387f55e6a01Smrg_LT_DECL([], [RANLIB], [1], 1388f55e6a01Smrg [Commands used to install an old-style archive]) 1389f55e6a01Smrg 1390f55e6a01Smrg# Determine commands to create old-style static archives. 1391f55e6a01Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1392f55e6a01Smrgold_postinstall_cmds='chmod 644 $oldlib' 1393f55e6a01Smrgold_postuninstall_cmds= 1394c35d236eSmrg 1395f55e6a01Smrgif test -n "$RANLIB"; then 1396f55e6a01Smrg case $host_os in 1397f55e6a01Smrg openbsd*) 1398f55e6a01Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1399f55e6a01Smrg ;; 1400f55e6a01Smrg *) 1401f55e6a01Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1402f55e6a01Smrg ;; 1403f55e6a01Smrg esac 1404f55e6a01Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1405f55e6a01Smrgfi 1406f55e6a01Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1407f55e6a01Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1408f55e6a01Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1409f55e6a01Smrg [Commands used to build an old-style archive]) 1410f55e6a01Smrg])# _LT_CMD_OLD_ARCHIVE 1411c35d236eSmrg 1412c35d236eSmrg 1413f55e6a01Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1414c35d236eSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1415c35d236eSmrg# ---------------------------------------------------------------- 1416c35d236eSmrg# Check whether the given compiler option works 1417f55e6a01SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1418f55e6a01Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1419f55e6a01Smrgm4_require([_LT_DECL_SED])dnl 1420c35d236eSmrgAC_CACHE_CHECK([$1], [$2], 1421c35d236eSmrg [$2=no 1422f55e6a01Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 14234f6cd06fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1424c35d236eSmrg lt_compiler_flag="$3" 1425c35d236eSmrg # Insert the option either (1) after the last *FLAGS variable, or 1426c35d236eSmrg # (2) before a word containing "conftest.", or (3) at the end. 1427c35d236eSmrg # Note that $ac_compile itself does not contain backslashes and begins 1428c35d236eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1429c35d236eSmrg # The option is referenced via a variable to avoid confusing sed. 1430c35d236eSmrg lt_compile=`echo "$ac_compile" | $SED \ 1431c35d236eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1432c35d236eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1433c35d236eSmrg -e 's:$: $lt_compiler_flag:'` 1434c35d236eSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1435c35d236eSmrg (eval "$lt_compile" 2>conftest.err) 1436c35d236eSmrg ac_status=$? 1437c35d236eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1438c35d236eSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1439c35d236eSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1440c35d236eSmrg # The compiler can only warn and ignore the option if not recognized 1441c35d236eSmrg # So say no if there are warnings other than the usual output. 1442f55e6a01Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 1443c35d236eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1444c35d236eSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1445c35d236eSmrg $2=yes 1446c35d236eSmrg fi 1447c35d236eSmrg fi 1448f55e6a01Smrg $RM conftest* 1449c35d236eSmrg]) 1450c35d236eSmrg 1451c35d236eSmrgif test x"[$]$2" = xyes; then 1452f55e6a01Smrg m4_if([$5], , :, [$5]) 1453c35d236eSmrgelse 1454f55e6a01Smrg m4_if([$6], , :, [$6]) 1455c35d236eSmrgfi 1456f55e6a01Smrg])# _LT_COMPILER_OPTION 1457c35d236eSmrg 1458f55e6a01Smrg# Old name: 1459f55e6a01SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1460f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 1461f55e6a01Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1462c35d236eSmrg 1463f55e6a01Smrg 1464f55e6a01Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1465f55e6a01Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1466f55e6a01Smrg# ---------------------------------------------------- 1467f55e6a01Smrg# Check whether the given linker option works 1468f55e6a01SmrgAC_DEFUN([_LT_LINKER_OPTION], 1469f55e6a01Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1470f55e6a01Smrgm4_require([_LT_DECL_SED])dnl 14714f6cd06fSmrgAC_CACHE_CHECK([$1], [$2], 1472c35d236eSmrg [$2=no 1473c35d236eSmrg save_LDFLAGS="$LDFLAGS" 1474c35d236eSmrg LDFLAGS="$LDFLAGS $3" 14754f6cd06fSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1476c35d236eSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1477c35d236eSmrg # The linker can only warn and ignore the option if not recognized 1478c35d236eSmrg # So say no if there are warnings 1479c35d236eSmrg if test -s conftest.err; then 1480c35d236eSmrg # Append any errors to the config.log. 1481c35d236eSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1482f55e6a01Smrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 1483c35d236eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1484c35d236eSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1485c35d236eSmrg $2=yes 1486c35d236eSmrg fi 1487c35d236eSmrg else 1488c35d236eSmrg $2=yes 1489c35d236eSmrg fi 1490c35d236eSmrg fi 1491f55e6a01Smrg $RM -r conftest* 1492c35d236eSmrg LDFLAGS="$save_LDFLAGS" 1493c35d236eSmrg]) 1494c35d236eSmrg 1495c35d236eSmrgif test x"[$]$2" = xyes; then 1496f55e6a01Smrg m4_if([$4], , :, [$4]) 1497c35d236eSmrgelse 1498f55e6a01Smrg m4_if([$5], , :, [$5]) 1499c35d236eSmrgfi 1500f55e6a01Smrg])# _LT_LINKER_OPTION 1501c35d236eSmrg 1502f55e6a01Smrg# Old name: 1503f55e6a01SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1504f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 1505f55e6a01Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1506c35d236eSmrg 1507f55e6a01Smrg 1508f55e6a01Smrg# LT_CMD_MAX_LEN 1509f55e6a01Smrg#--------------- 1510f55e6a01SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1511f55e6a01Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1512f55e6a01Smrg# find the maximum length of command line arguments 1513c35d236eSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1514c35d236eSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1515c35d236eSmrg i=0 1516c35d236eSmrg teststring="ABCD" 1517c35d236eSmrg 1518c35d236eSmrg case $build_os in 1519c35d236eSmrg msdosdjgpp*) 1520c35d236eSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1521c35d236eSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1522c35d236eSmrg # during glob expansion). Even if it were fixed, the result of this 1523c35d236eSmrg # check would be larger than it should be. 1524c35d236eSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1525c35d236eSmrg ;; 1526c35d236eSmrg 1527c35d236eSmrg gnu*) 1528c35d236eSmrg # Under GNU Hurd, this test is not required because there is 1529c35d236eSmrg # no limit to the length of command line arguments. 1530c35d236eSmrg # Libtool will interpret -1 as no limit whatsoever 1531c35d236eSmrg lt_cv_sys_max_cmd_len=-1; 1532c35d236eSmrg ;; 1533c35d236eSmrg 1534f55e6a01Smrg cygwin* | mingw* | cegcc*) 1535c35d236eSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1536c35d236eSmrg # about 5 minutes as the teststring grows exponentially. 1537c35d236eSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1538c35d236eSmrg # you end up with a "frozen" computer, even though with patience 1539c35d236eSmrg # the test eventually succeeds (with a max line length of 256k). 1540c35d236eSmrg # Instead, let's just punt: use the minimum linelength reported by 1541c35d236eSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1542c35d236eSmrg lt_cv_sys_max_cmd_len=8192; 1543c35d236eSmrg ;; 1544c35d236eSmrg 1545c35d236eSmrg amigaos*) 1546c35d236eSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1547c35d236eSmrg # So we just punt and use a minimum line length of 8192. 1548c35d236eSmrg lt_cv_sys_max_cmd_len=8192; 1549c35d236eSmrg ;; 1550c35d236eSmrg 1551c35d236eSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1552c35d236eSmrg # This has been around since 386BSD, at least. Likely further. 1553c35d236eSmrg if test -x /sbin/sysctl; then 1554c35d236eSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1555c35d236eSmrg elif test -x /usr/sbin/sysctl; then 1556c35d236eSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1557c35d236eSmrg else 1558c35d236eSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1559c35d236eSmrg fi 1560c35d236eSmrg # And add a safety zone 1561c35d236eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1562c35d236eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1563c35d236eSmrg ;; 1564c35d236eSmrg 1565c35d236eSmrg interix*) 1566c35d236eSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1567c35d236eSmrg lt_cv_sys_max_cmd_len=196608 1568c35d236eSmrg ;; 1569c35d236eSmrg 1570c35d236eSmrg osf*) 1571c35d236eSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1572c35d236eSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1573c35d236eSmrg # nice to cause kernel panics so lets avoid the loop below. 1574c35d236eSmrg # First set a reasonable default. 1575c35d236eSmrg lt_cv_sys_max_cmd_len=16384 1576c35d236eSmrg # 1577c35d236eSmrg if test -x /sbin/sysconfig; then 1578c35d236eSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1579c35d236eSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1580c35d236eSmrg esac 1581c35d236eSmrg fi 1582c35d236eSmrg ;; 1583c35d236eSmrg sco3.2v5*) 1584c35d236eSmrg lt_cv_sys_max_cmd_len=102400 1585c35d236eSmrg ;; 1586c35d236eSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1587c35d236eSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1588c35d236eSmrg if test -n "$kargmax"; then 1589f55e6a01Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1590c35d236eSmrg else 1591c35d236eSmrg lt_cv_sys_max_cmd_len=32768 1592c35d236eSmrg fi 1593c35d236eSmrg ;; 1594c35d236eSmrg *) 15954f6cd06fSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 15964f6cd06fSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 15974f6cd06fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 15984f6cd06fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 15994f6cd06fSmrg else 1600f55e6a01Smrg # Make teststring a little bigger before we do anything with it. 1601f55e6a01Smrg # a 1K string should be a reasonable start. 1602f55e6a01Smrg for i in 1 2 3 4 5 6 7 8 ; do 1603f55e6a01Smrg teststring=$teststring$teststring 1604f55e6a01Smrg done 16054f6cd06fSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1606f55e6a01Smrg # If test is not a shell built-in, we'll probably end up computing a 1607f55e6a01Smrg # maximum length that is only half of the actual maximum length, but 1608f55e6a01Smrg # we can't tell. 1609f55e6a01Smrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 1610f55e6a01Smrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 16114f6cd06fSmrg test $i != 17 # 1/2 MB should be enough 16124f6cd06fSmrg do 16134f6cd06fSmrg i=`expr $i + 1` 16144f6cd06fSmrg teststring=$teststring$teststring 16154f6cd06fSmrg done 1616f55e6a01Smrg # Only check the string length outside the loop. 1617f55e6a01Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 16184f6cd06fSmrg teststring= 1619f55e6a01Smrg # Add a significant safety factor because C++ compilers can tack on 1620f55e6a01Smrg # massive amounts of additional arguments before passing them to the 1621f55e6a01Smrg # linker. It appears as though 1/2 is a usable value. 16224f6cd06fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 16234f6cd06fSmrg fi 1624c35d236eSmrg ;; 1625c35d236eSmrg esac 1626c35d236eSmrg]) 1627c35d236eSmrgif test -n $lt_cv_sys_max_cmd_len ; then 1628c35d236eSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1629c35d236eSmrgelse 1630c35d236eSmrg AC_MSG_RESULT(none) 1631c35d236eSmrgfi 1632f55e6a01Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1633f55e6a01Smrg_LT_DECL([], [max_cmd_len], [0], 1634f55e6a01Smrg [What is the maximum length of a command?]) 1635f55e6a01Smrg])# LT_CMD_MAX_LEN 1636c35d236eSmrg 1637f55e6a01Smrg# Old name: 1638f55e6a01SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1639f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 1640f55e6a01Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1641c35d236eSmrg 1642f55e6a01Smrg 1643f55e6a01Smrg# _LT_HEADER_DLFCN 1644f55e6a01Smrg# ---------------- 1645f55e6a01Smrgm4_defun([_LT_HEADER_DLFCN], 1646f55e6a01Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1647f55e6a01Smrg])# _LT_HEADER_DLFCN 1648c35d236eSmrg 1649c35d236eSmrg 1650f55e6a01Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1651f55e6a01Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1652f55e6a01Smrg# ---------------------------------------------------------------- 1653f55e6a01Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1654f55e6a01Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1655c35d236eSmrgif test "$cross_compiling" = yes; then : 1656c35d236eSmrg [$4] 1657c35d236eSmrgelse 1658c35d236eSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1659c35d236eSmrg lt_status=$lt_dlunknown 1660f55e6a01Smrg cat > conftest.$ac_ext <<_LT_EOF 1661c35d236eSmrg[#line __oline__ "configure" 1662c35d236eSmrg#include "confdefs.h" 1663c35d236eSmrg 1664c35d236eSmrg#if HAVE_DLFCN_H 1665c35d236eSmrg#include <dlfcn.h> 1666c35d236eSmrg#endif 1667c35d236eSmrg 1668c35d236eSmrg#include <stdio.h> 1669c35d236eSmrg 1670c35d236eSmrg#ifdef RTLD_GLOBAL 1671c35d236eSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1672c35d236eSmrg#else 1673c35d236eSmrg# ifdef DL_GLOBAL 1674c35d236eSmrg# define LT_DLGLOBAL DL_GLOBAL 1675c35d236eSmrg# else 1676c35d236eSmrg# define LT_DLGLOBAL 0 1677c35d236eSmrg# endif 1678c35d236eSmrg#endif 1679c35d236eSmrg 1680c35d236eSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1681c35d236eSmrg find out it does not work in some platform. */ 1682c35d236eSmrg#ifndef LT_DLLAZY_OR_NOW 1683c35d236eSmrg# ifdef RTLD_LAZY 1684c35d236eSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1685c35d236eSmrg# else 1686c35d236eSmrg# ifdef DL_LAZY 1687c35d236eSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1688c35d236eSmrg# else 1689c35d236eSmrg# ifdef RTLD_NOW 1690c35d236eSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1691c35d236eSmrg# else 1692c35d236eSmrg# ifdef DL_NOW 1693c35d236eSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1694c35d236eSmrg# else 1695c35d236eSmrg# define LT_DLLAZY_OR_NOW 0 1696c35d236eSmrg# endif 1697c35d236eSmrg# endif 1698c35d236eSmrg# endif 1699c35d236eSmrg# endif 1700c35d236eSmrg#endif 1701c35d236eSmrg 1702c35d236eSmrgvoid fnord() { int i=42;} 1703c35d236eSmrgint main () 1704c35d236eSmrg{ 1705c35d236eSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1706c35d236eSmrg int status = $lt_dlunknown; 1707c35d236eSmrg 1708c35d236eSmrg if (self) 1709c35d236eSmrg { 1710c35d236eSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1711c35d236eSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1712c35d236eSmrg /* dlclose (self); */ 1713c35d236eSmrg } 1714c35d236eSmrg else 1715c35d236eSmrg puts (dlerror ()); 1716c35d236eSmrg 1717f55e6a01Smrg return status; 1718c35d236eSmrg}] 1719f55e6a01Smrg_LT_EOF 1720c35d236eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1721c35d236eSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1722c35d236eSmrg lt_status=$? 1723c35d236eSmrg case x$lt_status in 1724c35d236eSmrg x$lt_dlno_uscore) $1 ;; 1725c35d236eSmrg x$lt_dlneed_uscore) $2 ;; 1726c35d236eSmrg x$lt_dlunknown|x*) $3 ;; 1727c35d236eSmrg esac 1728c35d236eSmrg else : 1729c35d236eSmrg # compilation failed 1730c35d236eSmrg $3 1731c35d236eSmrg fi 1732c35d236eSmrgfi 1733c35d236eSmrgrm -fr conftest* 1734f55e6a01Smrg])# _LT_TRY_DLOPEN_SELF 1735c35d236eSmrg 1736c35d236eSmrg 1737f55e6a01Smrg# LT_SYS_DLOPEN_SELF 1738f55e6a01Smrg# ------------------ 1739f55e6a01SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1740f55e6a01Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1741c35d236eSmrgif test "x$enable_dlopen" != xyes; then 1742c35d236eSmrg enable_dlopen=unknown 1743c35d236eSmrg enable_dlopen_self=unknown 1744c35d236eSmrg enable_dlopen_self_static=unknown 1745c35d236eSmrgelse 1746c35d236eSmrg lt_cv_dlopen=no 1747c35d236eSmrg lt_cv_dlopen_libs= 1748c35d236eSmrg 1749c35d236eSmrg case $host_os in 1750c35d236eSmrg beos*) 1751c35d236eSmrg lt_cv_dlopen="load_add_on" 1752c35d236eSmrg lt_cv_dlopen_libs= 1753c35d236eSmrg lt_cv_dlopen_self=yes 1754c35d236eSmrg ;; 1755c35d236eSmrg 1756f55e6a01Smrg mingw* | pw32* | cegcc*) 1757c35d236eSmrg lt_cv_dlopen="LoadLibrary" 1758c35d236eSmrg lt_cv_dlopen_libs= 1759f55e6a01Smrg ;; 1760c35d236eSmrg 1761c35d236eSmrg cygwin*) 1762c35d236eSmrg lt_cv_dlopen="dlopen" 1763c35d236eSmrg lt_cv_dlopen_libs= 1764f55e6a01Smrg ;; 1765c35d236eSmrg 1766c35d236eSmrg darwin*) 1767c35d236eSmrg # if libdl is installed we need to link against it 1768c35d236eSmrg AC_CHECK_LIB([dl], [dlopen], 1769c35d236eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1770c35d236eSmrg lt_cv_dlopen="dyld" 1771c35d236eSmrg lt_cv_dlopen_libs= 1772c35d236eSmrg lt_cv_dlopen_self=yes 1773c35d236eSmrg ]) 1774f55e6a01Smrg ;; 1775c35d236eSmrg 1776c35d236eSmrg *) 1777c35d236eSmrg AC_CHECK_FUNC([shl_load], 1778c35d236eSmrg [lt_cv_dlopen="shl_load"], 1779c35d236eSmrg [AC_CHECK_LIB([dld], [shl_load], 17804f6cd06fSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1781c35d236eSmrg [AC_CHECK_FUNC([dlopen], 1782c35d236eSmrg [lt_cv_dlopen="dlopen"], 1783c35d236eSmrg [AC_CHECK_LIB([dl], [dlopen], 1784c35d236eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1785c35d236eSmrg [AC_CHECK_LIB([svld], [dlopen], 1786c35d236eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1787c35d236eSmrg [AC_CHECK_LIB([dld], [dld_link], 17884f6cd06fSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1789c35d236eSmrg ]) 1790c35d236eSmrg ]) 1791c35d236eSmrg ]) 1792c35d236eSmrg ]) 1793c35d236eSmrg ]) 1794c35d236eSmrg ;; 1795c35d236eSmrg esac 1796c35d236eSmrg 1797c35d236eSmrg if test "x$lt_cv_dlopen" != xno; then 1798c35d236eSmrg enable_dlopen=yes 1799c35d236eSmrg else 1800c35d236eSmrg enable_dlopen=no 1801c35d236eSmrg fi 1802c35d236eSmrg 1803c35d236eSmrg case $lt_cv_dlopen in 1804c35d236eSmrg dlopen) 1805c35d236eSmrg save_CPPFLAGS="$CPPFLAGS" 1806c35d236eSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1807c35d236eSmrg 1808c35d236eSmrg save_LDFLAGS="$LDFLAGS" 1809c35d236eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1810c35d236eSmrg 1811c35d236eSmrg save_LIBS="$LIBS" 1812c35d236eSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1813c35d236eSmrg 1814c35d236eSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1815c35d236eSmrg lt_cv_dlopen_self, [dnl 1816f55e6a01Smrg _LT_TRY_DLOPEN_SELF( 1817c35d236eSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1818c35d236eSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1819c35d236eSmrg ]) 1820c35d236eSmrg 1821c35d236eSmrg if test "x$lt_cv_dlopen_self" = xyes; then 1822c35d236eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1823c35d236eSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1824f55e6a01Smrg lt_cv_dlopen_self_static, [dnl 1825f55e6a01Smrg _LT_TRY_DLOPEN_SELF( 1826c35d236eSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1827c35d236eSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1828c35d236eSmrg ]) 1829c35d236eSmrg fi 1830c35d236eSmrg 1831c35d236eSmrg CPPFLAGS="$save_CPPFLAGS" 1832c35d236eSmrg LDFLAGS="$save_LDFLAGS" 1833c35d236eSmrg LIBS="$save_LIBS" 1834c35d236eSmrg ;; 1835c35d236eSmrg esac 1836c35d236eSmrg 1837c35d236eSmrg case $lt_cv_dlopen_self in 1838c35d236eSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1839c35d236eSmrg *) enable_dlopen_self=unknown ;; 1840c35d236eSmrg esac 1841c35d236eSmrg 1842c35d236eSmrg case $lt_cv_dlopen_self_static in 1843c35d236eSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1844c35d236eSmrg *) enable_dlopen_self_static=unknown ;; 1845c35d236eSmrg esac 1846c35d236eSmrgfi 1847f55e6a01Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1848f55e6a01Smrg [Whether dlopen is supported]) 1849f55e6a01Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1850f55e6a01Smrg [Whether dlopen of programs is supported]) 1851f55e6a01Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1852f55e6a01Smrg [Whether dlopen of statically linked programs is supported]) 1853f55e6a01Smrg])# LT_SYS_DLOPEN_SELF 1854c35d236eSmrg 1855f55e6a01Smrg# Old name: 1856f55e6a01SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1857f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 1858f55e6a01Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1859c35d236eSmrg 1860f55e6a01Smrg 1861f55e6a01Smrg# _LT_COMPILER_C_O([TAGNAME]) 1862f55e6a01Smrg# --------------------------- 1863f55e6a01Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 1864f55e6a01Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1865f55e6a01Smrgm4_defun([_LT_COMPILER_C_O], 1866f55e6a01Smrg[m4_require([_LT_DECL_SED])dnl 1867f55e6a01Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1868f55e6a01Smrgm4_require([_LT_TAG_COMPILER])dnl 1869c35d236eSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1870f55e6a01Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1871f55e6a01Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1872f55e6a01Smrg $RM -r conftest 2>/dev/null 1873c35d236eSmrg mkdir conftest 1874c35d236eSmrg cd conftest 1875c35d236eSmrg mkdir out 18764f6cd06fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1877c35d236eSmrg 1878c35d236eSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1879c35d236eSmrg # Insert the option either (1) after the last *FLAGS variable, or 1880c35d236eSmrg # (2) before a word containing "conftest.", or (3) at the end. 1881c35d236eSmrg # Note that $ac_compile itself does not contain backslashes and begins 1882c35d236eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1883c35d236eSmrg lt_compile=`echo "$ac_compile" | $SED \ 1884c35d236eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1885c35d236eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1886c35d236eSmrg -e 's:$: $lt_compiler_flag:'` 1887c35d236eSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1888c35d236eSmrg (eval "$lt_compile" 2>out/conftest.err) 1889c35d236eSmrg ac_status=$? 1890c35d236eSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1891c35d236eSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1892c35d236eSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1893c35d236eSmrg then 1894c35d236eSmrg # The compiler can only warn and ignore the option if not recognized 1895c35d236eSmrg # So say no if there are warnings 1896f55e6a01Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1897c35d236eSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1898c35d236eSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1899f55e6a01Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1900c35d236eSmrg fi 1901c35d236eSmrg fi 1902c35d236eSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1903f55e6a01Smrg $RM conftest* 1904c35d236eSmrg # SGI C++ compiler will create directory out/ii_files/ for 1905c35d236eSmrg # template instantiation 1906f55e6a01Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1907f55e6a01Smrg $RM out/* && rmdir out 1908c35d236eSmrg cd .. 1909f55e6a01Smrg $RM -r conftest 1910f55e6a01Smrg $RM conftest* 1911c35d236eSmrg]) 1912f55e6a01Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1913f55e6a01Smrg [Does compiler simultaneously support -c and -o options?]) 1914f55e6a01Smrg])# _LT_COMPILER_C_O 1915c35d236eSmrg 1916c35d236eSmrg 1917f55e6a01Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1918f55e6a01Smrg# ---------------------------------- 1919c35d236eSmrg# Check to see if we can do hard links to lock some files if needed 1920f55e6a01Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1921f55e6a01Smrg[m4_require([_LT_ENABLE_LOCK])dnl 1922f55e6a01Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1923f55e6a01Smrg_LT_COMPILER_C_O([$1]) 1924c35d236eSmrg 1925c35d236eSmrghard_links="nottested" 1926f55e6a01Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1927c35d236eSmrg # do not overwrite the value of need_locks provided by the user 1928c35d236eSmrg AC_MSG_CHECKING([if we can lock with hard links]) 1929c35d236eSmrg hard_links=yes 1930f55e6a01Smrg $RM conftest* 1931c35d236eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1932c35d236eSmrg touch conftest.a 1933c35d236eSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 1934c35d236eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1935c35d236eSmrg AC_MSG_RESULT([$hard_links]) 1936c35d236eSmrg if test "$hard_links" = no; then 1937c35d236eSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1938c35d236eSmrg need_locks=warn 1939c35d236eSmrg fi 1940c35d236eSmrgelse 1941c35d236eSmrg need_locks=no 1942c35d236eSmrgfi 1943f55e6a01Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 1944f55e6a01Smrg])# _LT_COMPILER_FILE_LOCKS 1945c35d236eSmrg 1946c35d236eSmrg 1947f55e6a01Smrg# _LT_CHECK_OBJDIR 1948f55e6a01Smrg# ---------------- 1949f55e6a01Smrgm4_defun([_LT_CHECK_OBJDIR], 1950c35d236eSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1951c35d236eSmrg[rm -f .libs 2>/dev/null 1952c35d236eSmrgmkdir .libs 2>/dev/null 1953c35d236eSmrgif test -d .libs; then 1954c35d236eSmrg lt_cv_objdir=.libs 1955c35d236eSmrgelse 1956c35d236eSmrg # MS-DOS does not allow filenames that begin with a dot. 1957c35d236eSmrg lt_cv_objdir=_libs 1958c35d236eSmrgfi 1959c35d236eSmrgrmdir .libs 2>/dev/null]) 1960c35d236eSmrgobjdir=$lt_cv_objdir 1961f55e6a01Smrg_LT_DECL([], [objdir], [0], 1962f55e6a01Smrg [The name of the directory that contains temporary libtool files])dnl 1963f55e6a01Smrgm4_pattern_allow([LT_OBJDIR])dnl 1964f55e6a01SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 1965f55e6a01Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 1966f55e6a01Smrg])# _LT_CHECK_OBJDIR 1967c35d236eSmrg 1968c35d236eSmrg 1969f55e6a01Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 1970f55e6a01Smrg# -------------------------------------- 1971c35d236eSmrg# Check hardcoding attributes. 1972f55e6a01Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 1973c35d236eSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1974f55e6a01Smrg_LT_TAGVAR(hardcode_action, $1)= 1975f55e6a01Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 1976f55e6a01Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 1977f55e6a01Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1978c35d236eSmrg 1979f55e6a01Smrg # We can hardcode non-existent directories. 1980f55e6a01Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 1981c35d236eSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1982c35d236eSmrg # have to relink, otherwise we might link with an installed library 1983c35d236eSmrg # when we should be linking with a yet-to-be-installed one 1984f55e6a01Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1985f55e6a01Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 1986c35d236eSmrg # Linking always hardcodes the temporary library directory. 1987f55e6a01Smrg _LT_TAGVAR(hardcode_action, $1)=relink 1988c35d236eSmrg else 1989c35d236eSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1990f55e6a01Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 1991c35d236eSmrg fi 1992c35d236eSmrgelse 1993c35d236eSmrg # We cannot hardcode anything, or else we can only hardcode existing 1994c35d236eSmrg # directories. 1995f55e6a01Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 1996c35d236eSmrgfi 1997f55e6a01SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 1998c35d236eSmrg 1999f55e6a01Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2000f55e6a01Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2001c35d236eSmrg # Fast installation is not supported 2002c35d236eSmrg enable_fast_install=no 2003c35d236eSmrgelif test "$shlibpath_overrides_runpath" = yes || 2004c35d236eSmrg test "$enable_shared" = no; then 2005c35d236eSmrg # Fast installation is not necessary 2006c35d236eSmrg enable_fast_install=needless 2007c35d236eSmrgfi 2008f55e6a01Smrg_LT_TAGDECL([], [hardcode_action], [0], 2009f55e6a01Smrg [How to hardcode a shared library path into an executable]) 2010f55e6a01Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2011c35d236eSmrg 2012c35d236eSmrg 2013f55e6a01Smrg# _LT_CMD_STRIPLIB 2014f55e6a01Smrg# ---------------- 2015f55e6a01Smrgm4_defun([_LT_CMD_STRIPLIB], 2016f55e6a01Smrg[m4_require([_LT_DECL_EGREP]) 2017f55e6a01Smrgstriplib= 2018c35d236eSmrgold_striplib= 2019c35d236eSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2020f55e6a01Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2021c35d236eSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2022c35d236eSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2023c35d236eSmrg AC_MSG_RESULT([yes]) 2024c35d236eSmrgelse 2025c35d236eSmrg# FIXME - insert some real tests, host_os isn't really good enough 2026c35d236eSmrg case $host_os in 2027f55e6a01Smrg darwin*) 2028f55e6a01Smrg if test -n "$STRIP" ; then 2029f55e6a01Smrg striplib="$STRIP -x" 2030f55e6a01Smrg old_striplib="$STRIP -S" 2031f55e6a01Smrg AC_MSG_RESULT([yes]) 2032f55e6a01Smrg else 2033f55e6a01Smrg AC_MSG_RESULT([no]) 2034f55e6a01Smrg fi 2035f55e6a01Smrg ;; 2036f55e6a01Smrg *) 2037f55e6a01Smrg AC_MSG_RESULT([no]) 2038c35d236eSmrg ;; 2039c35d236eSmrg esac 2040c35d236eSmrgfi 2041f55e6a01Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2042f55e6a01Smrg_LT_DECL([], [striplib], [1]) 2043f55e6a01Smrg])# _LT_CMD_STRIPLIB 2044c35d236eSmrg 2045c35d236eSmrg 2046f55e6a01Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2047c35d236eSmrg# ----------------------------- 2048c35d236eSmrg# PORTME Fill in your ld.so characteristics 2049f55e6a01Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2050f55e6a01Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2051f55e6a01Smrgm4_require([_LT_DECL_EGREP])dnl 2052f55e6a01Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2053f55e6a01Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2054f55e6a01Smrgm4_require([_LT_DECL_SED])dnl 20554f6cd06fSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2056f55e6a01Smrgm4_if([$1], 2057f55e6a01Smrg [], [ 2058c35d236eSmrgif test "$GCC" = yes; then 20594f6cd06fSmrg case $host_os in 20604f6cd06fSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 20614f6cd06fSmrg *) lt_awk_arg="/^libraries:/" ;; 20624f6cd06fSmrg esac 20634f6cd06fSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2064f55e6a01Smrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 2065c35d236eSmrg # if the path contains ";" then we assume it to be the separator 2066c35d236eSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2067c35d236eSmrg # assumed that no part of a normal pathname contains ";" but that should 2068c35d236eSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2069f55e6a01Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 2070c35d236eSmrg else 2071f55e6a01Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2072c35d236eSmrg fi 20734f6cd06fSmrg # Ok, now we have the path, separated by spaces, we can step through it 20744f6cd06fSmrg # and add multilib dir if necessary. 20754f6cd06fSmrg lt_tmp_lt_search_path_spec= 20764f6cd06fSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 20774f6cd06fSmrg for lt_sys_path in $lt_search_path_spec; do 20784f6cd06fSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 20794f6cd06fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 20804f6cd06fSmrg else 20814f6cd06fSmrg test -d "$lt_sys_path" && \ 20824f6cd06fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 20834f6cd06fSmrg fi 20844f6cd06fSmrg done 2085f55e6a01Smrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 20864f6cd06fSmrgBEGIN {RS=" "; FS="/|\n";} { 20874f6cd06fSmrg lt_foo=""; 20884f6cd06fSmrg lt_count=0; 20894f6cd06fSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 20904f6cd06fSmrg if ($lt_i != "" && $lt_i != ".") { 20914f6cd06fSmrg if ($lt_i == "..") { 20924f6cd06fSmrg lt_count++; 20934f6cd06fSmrg } else { 20944f6cd06fSmrg if (lt_count == 0) { 20954f6cd06fSmrg lt_foo="/" $lt_i lt_foo; 20964f6cd06fSmrg } else { 20974f6cd06fSmrg lt_count--; 20984f6cd06fSmrg } 20994f6cd06fSmrg } 21004f6cd06fSmrg } 21014f6cd06fSmrg } 21024f6cd06fSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 21034f6cd06fSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 21044f6cd06fSmrg}'` 2105f55e6a01Smrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 2106c35d236eSmrgelse 2107c35d236eSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 21084f6cd06fSmrgfi]) 2109f55e6a01Smrglibrary_names_spec= 2110f55e6a01Smrglibname_spec='lib$name' 2111f55e6a01Smrgsoname_spec= 2112f55e6a01Smrgshrext_cmds=".so" 2113f55e6a01Smrgpostinstall_cmds= 2114f55e6a01Smrgpostuninstall_cmds= 2115f55e6a01Smrgfinish_cmds= 2116f55e6a01Smrgfinish_eval= 2117f55e6a01Smrgshlibpath_var= 2118f55e6a01Smrgshlibpath_overrides_runpath=unknown 2119f55e6a01Smrgversion_type=none 2120f55e6a01Smrgdynamic_linker="$host_os ld.so" 2121f55e6a01Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2122c35d236eSmrgneed_lib_prefix=unknown 2123c35d236eSmrghardcode_into_libs=no 2124c35d236eSmrg 2125c35d236eSmrg# when you set need_version to no, make sure it does not cause -set_version 2126c35d236eSmrg# flags to be left without arguments 2127c35d236eSmrgneed_version=unknown 2128c35d236eSmrg 2129c35d236eSmrgcase $host_os in 2130c35d236eSmrgaix3*) 2131c35d236eSmrg version_type=linux 2132c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2133c35d236eSmrg shlibpath_var=LIBPATH 2134c35d236eSmrg 2135c35d236eSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2136c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2137c35d236eSmrg ;; 2138c35d236eSmrg 21394f6cd06fSmrgaix[[4-9]]*) 2140c35d236eSmrg version_type=linux 2141c35d236eSmrg need_lib_prefix=no 2142c35d236eSmrg need_version=no 2143c35d236eSmrg hardcode_into_libs=yes 2144c35d236eSmrg if test "$host_cpu" = ia64; then 2145c35d236eSmrg # AIX 5 supports IA64 2146c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2147c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2148c35d236eSmrg else 2149c35d236eSmrg # With GCC up to 2.95.x, collect2 would create an import file 2150c35d236eSmrg # for dependence libraries. The import file would start with 2151c35d236eSmrg # the line `#! .'. This would cause the generated library to 2152c35d236eSmrg # depend on `.', always an invalid library. This was fixed in 2153c35d236eSmrg # development snapshots of GCC prior to 3.0. 2154c35d236eSmrg case $host_os in 2155c35d236eSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2156c35d236eSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2157c35d236eSmrg echo ' yes ' 2158f55e6a01Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2159c35d236eSmrg : 2160c35d236eSmrg else 2161c35d236eSmrg can_build_shared=no 2162c35d236eSmrg fi 2163c35d236eSmrg ;; 2164c35d236eSmrg esac 2165c35d236eSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2166c35d236eSmrg # soname into executable. Probably we can add versioning support to 2167c35d236eSmrg # collect2, so additional links can be useful in future. 2168c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 2169c35d236eSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2170c35d236eSmrg # instead of lib<name>.a to let people know that these are not 2171c35d236eSmrg # typical AIX shared libraries. 2172c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2173c35d236eSmrg else 2174c35d236eSmrg # We preserve .a as extension for shared libraries through AIX4.2 2175c35d236eSmrg # and later when we are not doing run time linking. 2176c35d236eSmrg library_names_spec='${libname}${release}.a $libname.a' 2177c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2178c35d236eSmrg fi 2179c35d236eSmrg shlibpath_var=LIBPATH 2180c35d236eSmrg fi 2181c35d236eSmrg ;; 2182c35d236eSmrg 2183c35d236eSmrgamigaos*) 2184f55e6a01Smrg case $host_cpu in 2185f55e6a01Smrg powerpc) 2186f55e6a01Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2187f55e6a01Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2188f55e6a01Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2189f55e6a01Smrg ;; 2190f55e6a01Smrg m68k) 2191f55e6a01Smrg library_names_spec='$libname.ixlibrary $libname.a' 2192f55e6a01Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2193f55e6a01Smrg 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' 2194f55e6a01Smrg ;; 2195f55e6a01Smrg esac 2196c35d236eSmrg ;; 2197c35d236eSmrg 2198c35d236eSmrgbeos*) 2199c35d236eSmrg library_names_spec='${libname}${shared_ext}' 2200c35d236eSmrg dynamic_linker="$host_os ld.so" 2201c35d236eSmrg shlibpath_var=LIBRARY_PATH 2202c35d236eSmrg ;; 2203c35d236eSmrg 2204c35d236eSmrgbsdi[[45]]*) 2205c35d236eSmrg version_type=linux 2206c35d236eSmrg need_version=no 2207c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2208c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2209c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2210c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2211c35d236eSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2212c35d236eSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2213c35d236eSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2214c35d236eSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2215c35d236eSmrg # libtool to hard-code these into programs 2216c35d236eSmrg ;; 2217c35d236eSmrg 2218f55e6a01Smrgcygwin* | mingw* | pw32* | cegcc*) 2219c35d236eSmrg version_type=windows 2220c35d236eSmrg shrext_cmds=".dll" 2221c35d236eSmrg need_version=no 2222c35d236eSmrg need_lib_prefix=no 2223c35d236eSmrg 2224c35d236eSmrg case $GCC,$host_os in 2225f55e6a01Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 2226c35d236eSmrg library_names_spec='$libname.dll.a' 2227c35d236eSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2228c35d236eSmrg postinstall_cmds='base_file=`basename \${file}`~ 2229f55e6a01Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2230c35d236eSmrg dldir=$destdir/`dirname \$dlpath`~ 2231c35d236eSmrg test -d \$dldir || mkdir -p \$dldir~ 2232c35d236eSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2233f55e6a01Smrg chmod a+x \$dldir/$dlname~ 2234f55e6a01Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2235f55e6a01Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2236f55e6a01Smrg fi' 2237c35d236eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2238c35d236eSmrg dlpath=$dir/\$dldll~ 2239f55e6a01Smrg $RM \$dlpath' 2240c35d236eSmrg shlibpath_overrides_runpath=yes 2241c35d236eSmrg 2242c35d236eSmrg case $host_os in 2243c35d236eSmrg cygwin*) 2244c35d236eSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2245c35d236eSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2246c35d236eSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2247c35d236eSmrg ;; 2248f55e6a01Smrg mingw* | cegcc*) 2249c35d236eSmrg # MinGW DLLs use traditional 'lib' prefix 2250c35d236eSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2251f55e6a01Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2252f55e6a01Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2253c35d236eSmrg # It is most probably a Windows format PATH printed by 2254c35d236eSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 2255c35d236eSmrg # path with ; separators, and with drive letters. We can handle the 2256c35d236eSmrg # drive letters (cygwin fileutils understands them), so leave them, 2257c35d236eSmrg # especially as we might pass files found there to a mingw objdump, 2258c35d236eSmrg # which wouldn't understand a cygwinified path. Ahh. 2259f55e6a01Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2260c35d236eSmrg else 2261f55e6a01Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2262c35d236eSmrg fi 2263c35d236eSmrg ;; 2264c35d236eSmrg pw32*) 2265c35d236eSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2266c35d236eSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2267c35d236eSmrg ;; 2268c35d236eSmrg esac 2269c35d236eSmrg ;; 2270c35d236eSmrg 2271c35d236eSmrg *) 2272c35d236eSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2273c35d236eSmrg ;; 2274c35d236eSmrg esac 2275c35d236eSmrg dynamic_linker='Win32 ld.exe' 2276c35d236eSmrg # FIXME: first we should search . and the directory the executable is in 2277c35d236eSmrg shlibpath_var=PATH 2278c35d236eSmrg ;; 2279c35d236eSmrg 2280c35d236eSmrgdarwin* | rhapsody*) 2281c35d236eSmrg dynamic_linker="$host_os dyld" 2282c35d236eSmrg version_type=darwin 2283c35d236eSmrg need_lib_prefix=no 2284c35d236eSmrg need_version=no 2285f55e6a01Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2286c35d236eSmrg soname_spec='${libname}${release}${major}$shared_ext' 2287c35d236eSmrg shlibpath_overrides_runpath=yes 2288c35d236eSmrg shlibpath_var=DYLD_LIBRARY_PATH 2289c35d236eSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2290f55e6a01Smrgm4_if([$1], [],[ 2291f55e6a01Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2292c35d236eSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2293c35d236eSmrg ;; 2294c35d236eSmrg 2295c35d236eSmrgdgux*) 2296c35d236eSmrg version_type=linux 2297c35d236eSmrg need_lib_prefix=no 2298c35d236eSmrg need_version=no 2299c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2300c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2301c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2302c35d236eSmrg ;; 2303c35d236eSmrg 2304c35d236eSmrgfreebsd1*) 2305c35d236eSmrg dynamic_linker=no 2306c35d236eSmrg ;; 2307c35d236eSmrg 2308c35d236eSmrgfreebsd* | dragonfly*) 2309c35d236eSmrg # DragonFly does not have aout. When/if they implement a new 2310c35d236eSmrg # versioning mechanism, adjust this. 2311c35d236eSmrg if test -x /usr/bin/objformat; then 2312c35d236eSmrg objformat=`/usr/bin/objformat` 2313c35d236eSmrg else 2314c35d236eSmrg case $host_os in 2315c35d236eSmrg freebsd[[123]]*) objformat=aout ;; 2316c35d236eSmrg *) objformat=elf ;; 2317c35d236eSmrg esac 2318c35d236eSmrg fi 2319c35d236eSmrg version_type=freebsd-$objformat 2320c35d236eSmrg case $version_type in 2321c35d236eSmrg freebsd-elf*) 2322c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2323c35d236eSmrg need_version=no 2324c35d236eSmrg need_lib_prefix=no 2325c35d236eSmrg ;; 2326c35d236eSmrg freebsd-*) 2327c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2328c35d236eSmrg need_version=yes 2329c35d236eSmrg ;; 2330c35d236eSmrg esac 2331c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2332c35d236eSmrg case $host_os in 2333c35d236eSmrg freebsd2*) 2334c35d236eSmrg shlibpath_overrides_runpath=yes 2335c35d236eSmrg ;; 2336c35d236eSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2337c35d236eSmrg shlibpath_overrides_runpath=yes 2338c35d236eSmrg hardcode_into_libs=yes 2339c35d236eSmrg ;; 2340c35d236eSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2341c35d236eSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2342c35d236eSmrg shlibpath_overrides_runpath=no 2343c35d236eSmrg hardcode_into_libs=yes 2344c35d236eSmrg ;; 23454f6cd06fSmrg *) # from 4.6 on, and DragonFly 2346c35d236eSmrg shlibpath_overrides_runpath=yes 2347c35d236eSmrg hardcode_into_libs=yes 2348c35d236eSmrg ;; 2349c35d236eSmrg esac 2350c35d236eSmrg ;; 2351c35d236eSmrg 2352c35d236eSmrggnu*) 2353c35d236eSmrg version_type=linux 2354c35d236eSmrg need_lib_prefix=no 2355c35d236eSmrg need_version=no 2356c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2357c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2358c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2359c35d236eSmrg hardcode_into_libs=yes 2360c35d236eSmrg ;; 2361c35d236eSmrg 2362c35d236eSmrghpux9* | hpux10* | hpux11*) 2363c35d236eSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2364c35d236eSmrg # link against other versions. 2365c35d236eSmrg version_type=sunos 2366c35d236eSmrg need_lib_prefix=no 2367c35d236eSmrg need_version=no 2368c35d236eSmrg case $host_cpu in 2369c35d236eSmrg ia64*) 2370c35d236eSmrg shrext_cmds='.so' 2371c35d236eSmrg hardcode_into_libs=yes 2372c35d236eSmrg dynamic_linker="$host_os dld.so" 2373c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2374c35d236eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2375c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2376c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2377c35d236eSmrg if test "X$HPUX_IA64_MODE" = X32; then 2378c35d236eSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2379c35d236eSmrg else 2380c35d236eSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2381c35d236eSmrg fi 2382c35d236eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2383c35d236eSmrg ;; 2384f55e6a01Smrg hppa*64*) 2385f55e6a01Smrg shrext_cmds='.sl' 2386f55e6a01Smrg hardcode_into_libs=yes 2387f55e6a01Smrg dynamic_linker="$host_os dld.sl" 2388f55e6a01Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2389f55e6a01Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2390f55e6a01Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2391f55e6a01Smrg soname_spec='${libname}${release}${shared_ext}$major' 2392f55e6a01Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2393f55e6a01Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2394f55e6a01Smrg ;; 2395f55e6a01Smrg *) 2396c35d236eSmrg shrext_cmds='.sl' 2397c35d236eSmrg dynamic_linker="$host_os dld.sl" 2398c35d236eSmrg shlibpath_var=SHLIB_PATH 2399c35d236eSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2400c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2401c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2402c35d236eSmrg ;; 2403c35d236eSmrg esac 2404c35d236eSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 2405c35d236eSmrg postinstall_cmds='chmod 555 $lib' 2406c35d236eSmrg ;; 2407c35d236eSmrg 24084f6cd06fSmrginterix[[3-9]]*) 2409c35d236eSmrg version_type=linux 2410c35d236eSmrg need_lib_prefix=no 2411c35d236eSmrg need_version=no 2412c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2413c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2414c35d236eSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2415c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2416c35d236eSmrg shlibpath_overrides_runpath=no 2417c35d236eSmrg hardcode_into_libs=yes 2418c35d236eSmrg ;; 2419c35d236eSmrg 2420c35d236eSmrgirix5* | irix6* | nonstopux*) 2421c35d236eSmrg case $host_os in 2422c35d236eSmrg nonstopux*) version_type=nonstopux ;; 2423c35d236eSmrg *) 2424c35d236eSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2425c35d236eSmrg version_type=linux 2426c35d236eSmrg else 2427c35d236eSmrg version_type=irix 2428c35d236eSmrg fi ;; 2429c35d236eSmrg esac 2430c35d236eSmrg need_lib_prefix=no 2431c35d236eSmrg need_version=no 2432c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2433c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2434c35d236eSmrg case $host_os in 2435c35d236eSmrg irix5* | nonstopux*) 2436c35d236eSmrg libsuff= shlibsuff= 2437c35d236eSmrg ;; 2438c35d236eSmrg *) 2439c35d236eSmrg case $LD in # libtool.m4 will add one of these switches to LD 2440c35d236eSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2441c35d236eSmrg libsuff= shlibsuff= libmagic=32-bit;; 2442c35d236eSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2443c35d236eSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2444c35d236eSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2445c35d236eSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2446c35d236eSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2447c35d236eSmrg esac 2448c35d236eSmrg ;; 2449c35d236eSmrg esac 2450c35d236eSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2451c35d236eSmrg shlibpath_overrides_runpath=no 2452c35d236eSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2453c35d236eSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2454c35d236eSmrg hardcode_into_libs=yes 2455c35d236eSmrg ;; 2456c35d236eSmrg 2457c35d236eSmrg# No shared lib support for Linux oldld, aout, or coff. 2458c35d236eSmrglinux*oldld* | linux*aout* | linux*coff*) 2459c35d236eSmrg dynamic_linker=no 2460c35d236eSmrg ;; 2461c35d236eSmrg 2462c35d236eSmrg# This must be Linux ELF. 24634f6cd06fSmrglinux* | k*bsd*-gnu) 2464c35d236eSmrg version_type=linux 2465c35d236eSmrg need_lib_prefix=no 2466c35d236eSmrg need_version=no 2467c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2468c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2469c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2470c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2471c35d236eSmrg shlibpath_overrides_runpath=no 2472f55e6a01Smrg # Some binutils ld are patched to set DT_RUNPATH 2473f55e6a01Smrg save_LDFLAGS=$LDFLAGS 2474f55e6a01Smrg save_libdir=$libdir 2475f55e6a01Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2476f55e6a01Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2477f55e6a01Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2478f55e6a01Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2479f55e6a01Smrg [shlibpath_overrides_runpath=yes])]) 2480f55e6a01Smrg LDFLAGS=$save_LDFLAGS 2481f55e6a01Smrg libdir=$save_libdir 2482f55e6a01Smrg 2483c35d236eSmrg # This implies no fast_install, which is unacceptable. 2484c35d236eSmrg # Some rework will be needed to allow for fast_install 2485c35d236eSmrg # before this can be enabled. 2486c35d236eSmrg hardcode_into_libs=yes 2487f55e6a01Smrg 2488f55e6a01Smrg # Add ABI-specific directories to the system library path. 2489f55e6a01Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2490c35d236eSmrg 2491c35d236eSmrg # Append ld.so.conf contents to the search path 2492c35d236eSmrg if test -f /etc/ld.so.conf; then 2493f55e6a01Smrg 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' ' '` 24944f6cd06fSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2495c35d236eSmrg fi 2496c35d236eSmrg 2497c35d236eSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2498c35d236eSmrg # powerpc, because MkLinux only supported shared libraries with the 2499c35d236eSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2500c35d236eSmrg # most powerpc-linux boxes support dynamic linking these days and 2501c35d236eSmrg # people can always --disable-shared, the test was removed, and we 2502c35d236eSmrg # assume the GNU/Linux dynamic linker is in use. 2503c35d236eSmrg dynamic_linker='GNU/Linux ld.so' 2504c35d236eSmrg ;; 2505c35d236eSmrg 2506c35d236eSmrgnetbsd*) 2507c35d236eSmrg version_type=sunos 2508c35d236eSmrg need_lib_prefix=no 2509c35d236eSmrg need_version=no 2510f55e6a01Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2511c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2512c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2513c35d236eSmrg dynamic_linker='NetBSD (a.out) ld.so' 2514c35d236eSmrg else 2515c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2516c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2517c35d236eSmrg dynamic_linker='NetBSD ld.elf_so' 2518c35d236eSmrg fi 2519c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2520c35d236eSmrg shlibpath_overrides_runpath=yes 2521c35d236eSmrg hardcode_into_libs=yes 2522c35d236eSmrg ;; 2523c35d236eSmrg 2524c35d236eSmrgnewsos6) 2525c35d236eSmrg version_type=linux 2526c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2527c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2528c35d236eSmrg shlibpath_overrides_runpath=yes 2529c35d236eSmrg ;; 2530c35d236eSmrg 2531f55e6a01Smrg*nto* | *qnx*) 2532f55e6a01Smrg version_type=qnx 2533c35d236eSmrg need_lib_prefix=no 2534c35d236eSmrg need_version=no 2535c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2536c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2537c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2538f55e6a01Smrg shlibpath_overrides_runpath=no 2539f55e6a01Smrg hardcode_into_libs=yes 2540f55e6a01Smrg dynamic_linker='ldqnx.so' 2541c35d236eSmrg ;; 2542c35d236eSmrg 2543c35d236eSmrgopenbsd*) 2544c35d236eSmrg version_type=sunos 2545c35d236eSmrg sys_lib_dlsearch_path_spec="/usr/lib" 2546c35d236eSmrg need_lib_prefix=no 2547c35d236eSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2548c35d236eSmrg case $host_os in 2549f55e6a01Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2550f55e6a01Smrg *) need_version=no ;; 2551c35d236eSmrg esac 2552c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2553c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2554c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2555f55e6a01Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2556c35d236eSmrg case $host_os in 2557c35d236eSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 2558c35d236eSmrg shlibpath_overrides_runpath=no 2559c35d236eSmrg ;; 2560c35d236eSmrg *) 2561c35d236eSmrg shlibpath_overrides_runpath=yes 2562c35d236eSmrg ;; 2563c35d236eSmrg esac 2564c35d236eSmrg else 2565c35d236eSmrg shlibpath_overrides_runpath=yes 2566c35d236eSmrg fi 2567c35d236eSmrg ;; 2568c35d236eSmrg 2569c35d236eSmrgos2*) 2570c35d236eSmrg libname_spec='$name' 2571c35d236eSmrg shrext_cmds=".dll" 2572c35d236eSmrg need_lib_prefix=no 2573c35d236eSmrg library_names_spec='$libname${shared_ext} $libname.a' 2574c35d236eSmrg dynamic_linker='OS/2 ld.exe' 2575c35d236eSmrg shlibpath_var=LIBPATH 2576c35d236eSmrg ;; 2577c35d236eSmrg 2578c35d236eSmrgosf3* | osf4* | osf5*) 2579c35d236eSmrg version_type=osf 2580c35d236eSmrg need_lib_prefix=no 2581c35d236eSmrg need_version=no 2582c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2583c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2584c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2585c35d236eSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2586c35d236eSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2587c35d236eSmrg ;; 2588c35d236eSmrg 25894f6cd06fSmrgrdos*) 25904f6cd06fSmrg dynamic_linker=no 25914f6cd06fSmrg ;; 25924f6cd06fSmrg 2593c35d236eSmrgsolaris*) 2594c35d236eSmrg version_type=linux 2595c35d236eSmrg need_lib_prefix=no 2596c35d236eSmrg need_version=no 2597c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2598c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2599c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2600c35d236eSmrg shlibpath_overrides_runpath=yes 2601c35d236eSmrg hardcode_into_libs=yes 2602c35d236eSmrg # ldd complains unless libraries are executable 2603c35d236eSmrg postinstall_cmds='chmod +x $lib' 2604c35d236eSmrg ;; 2605c35d236eSmrg 2606c35d236eSmrgsunos4*) 2607c35d236eSmrg version_type=sunos 2608c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2609c35d236eSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2610c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2611c35d236eSmrg shlibpath_overrides_runpath=yes 2612c35d236eSmrg if test "$with_gnu_ld" = yes; then 2613c35d236eSmrg need_lib_prefix=no 2614c35d236eSmrg fi 2615c35d236eSmrg need_version=yes 2616c35d236eSmrg ;; 2617c35d236eSmrg 2618c35d236eSmrgsysv4 | sysv4.3*) 2619c35d236eSmrg version_type=linux 2620c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2621c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2622c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2623c35d236eSmrg case $host_vendor in 2624c35d236eSmrg sni) 2625c35d236eSmrg shlibpath_overrides_runpath=no 2626c35d236eSmrg need_lib_prefix=no 2627c35d236eSmrg runpath_var=LD_RUN_PATH 2628c35d236eSmrg ;; 2629c35d236eSmrg siemens) 2630c35d236eSmrg need_lib_prefix=no 2631c35d236eSmrg ;; 2632c35d236eSmrg motorola) 2633c35d236eSmrg need_lib_prefix=no 2634c35d236eSmrg need_version=no 2635c35d236eSmrg shlibpath_overrides_runpath=no 2636c35d236eSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2637c35d236eSmrg ;; 2638c35d236eSmrg esac 2639c35d236eSmrg ;; 2640c35d236eSmrg 2641c35d236eSmrgsysv4*MP*) 2642c35d236eSmrg if test -d /usr/nec ;then 2643c35d236eSmrg version_type=linux 2644c35d236eSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2645c35d236eSmrg soname_spec='$libname${shared_ext}.$major' 2646c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2647c35d236eSmrg fi 2648c35d236eSmrg ;; 2649c35d236eSmrg 2650c35d236eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2651c35d236eSmrg version_type=freebsd-elf 2652c35d236eSmrg need_lib_prefix=no 2653c35d236eSmrg need_version=no 2654c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2655c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2656c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2657f55e6a01Smrg shlibpath_overrides_runpath=yes 2658c35d236eSmrg hardcode_into_libs=yes 2659c35d236eSmrg if test "$with_gnu_ld" = yes; then 2660c35d236eSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2661c35d236eSmrg else 2662c35d236eSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2663c35d236eSmrg case $host_os in 2664c35d236eSmrg sco3.2v5*) 2665c35d236eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2666c35d236eSmrg ;; 2667c35d236eSmrg esac 2668c35d236eSmrg fi 2669c35d236eSmrg sys_lib_dlsearch_path_spec='/usr/lib' 2670c35d236eSmrg ;; 2671c35d236eSmrg 2672f55e6a01Smrgtpf*) 2673f55e6a01Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2674f55e6a01Smrg version_type=linux 2675f55e6a01Smrg need_lib_prefix=no 2676f55e6a01Smrg need_version=no 2677f55e6a01Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2678f55e6a01Smrg shlibpath_var=LD_LIBRARY_PATH 2679f55e6a01Smrg shlibpath_overrides_runpath=no 2680f55e6a01Smrg hardcode_into_libs=yes 2681f55e6a01Smrg ;; 2682f55e6a01Smrg 2683c35d236eSmrguts4*) 2684c35d236eSmrg version_type=linux 2685c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2686c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2687c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2688c35d236eSmrg ;; 2689c35d236eSmrg 2690c35d236eSmrg*) 2691c35d236eSmrg dynamic_linker=no 2692c35d236eSmrg ;; 2693c35d236eSmrgesac 2694c35d236eSmrgAC_MSG_RESULT([$dynamic_linker]) 2695c35d236eSmrgtest "$dynamic_linker" = no && can_build_shared=no 2696c35d236eSmrg 2697c35d236eSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2698c35d236eSmrgif test "$GCC" = yes; then 2699c35d236eSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2700c35d236eSmrgfi 2701c35d236eSmrg 2702f55e6a01Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2703f55e6a01Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2704f55e6a01Smrgfi 2705f55e6a01Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2706f55e6a01Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2707f55e6a01Smrgfi 2708c35d236eSmrg 2709f55e6a01Smrg_LT_DECL([], [variables_saved_for_relink], [1], 2710f55e6a01Smrg [Variables whose values should be saved in libtool wrapper scripts and 2711f55e6a01Smrg restored at link time]) 2712f55e6a01Smrg_LT_DECL([], [need_lib_prefix], [0], 2713f55e6a01Smrg [Do we need the "lib" prefix for modules?]) 2714f55e6a01Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2715f55e6a01Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2716f55e6a01Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2717f55e6a01Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2718f55e6a01Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2719f55e6a01Smrg [Is shlibpath searched before the hard-coded library search path?]) 2720f55e6a01Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2721f55e6a01Smrg_LT_DECL([], [library_names_spec], [1], 2722f55e6a01Smrg [[List of archive names. First name is the real one, the rest are links. 2723f55e6a01Smrg The last name is the one that the linker finds with -lNAME]]) 2724f55e6a01Smrg_LT_DECL([], [soname_spec], [1], 2725f55e6a01Smrg [[The coded name of the library, if different from the real name]]) 2726f55e6a01Smrg_LT_DECL([], [postinstall_cmds], [2], 2727f55e6a01Smrg [Command to use after installation of a shared archive]) 2728f55e6a01Smrg_LT_DECL([], [postuninstall_cmds], [2], 2729f55e6a01Smrg [Command to use after uninstallation of a shared archive]) 2730f55e6a01Smrg_LT_DECL([], [finish_cmds], [2], 2731f55e6a01Smrg [Commands used to finish a libtool library installation in a directory]) 2732f55e6a01Smrg_LT_DECL([], [finish_eval], [1], 2733f55e6a01Smrg [[As "finish_cmds", except a single script fragment to be evaled but 2734f55e6a01Smrg not shown]]) 2735f55e6a01Smrg_LT_DECL([], [hardcode_into_libs], [0], 2736f55e6a01Smrg [Whether we should hardcode library paths into libraries]) 2737f55e6a01Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2738f55e6a01Smrg [Compile-time system search path for libraries]) 2739f55e6a01Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2740f55e6a01Smrg [Run-time system search path for libraries]) 2741f55e6a01Smrg])# _LT_SYS_DYNAMIC_LINKER 2742f55e6a01Smrg 2743f55e6a01Smrg 2744f55e6a01Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 2745c35d236eSmrg# -------------------------- 27464f6cd06fSmrg# find a file program which can recognize shared library 2747f55e6a01SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2748f55e6a01Smrg[m4_require([_LT_DECL_EGREP])dnl 2749c35d236eSmrgAC_MSG_CHECKING([for $1]) 2750c35d236eSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2751c35d236eSmrg[case $MAGIC_CMD in 2752c35d236eSmrg[[\\/*] | ?:[\\/]*]) 2753c35d236eSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2754c35d236eSmrg ;; 2755c35d236eSmrg*) 2756c35d236eSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2757c35d236eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2758c35d236eSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2759c35d236eSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2760c35d236eSmrgdnl not every word. This closes a longstanding sh security hole. 2761f55e6a01Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2762c35d236eSmrg for ac_dir in $ac_dummy; do 2763c35d236eSmrg IFS="$lt_save_ifs" 2764c35d236eSmrg test -z "$ac_dir" && ac_dir=. 2765c35d236eSmrg if test -f $ac_dir/$1; then 2766c35d236eSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2767c35d236eSmrg if test -n "$file_magic_test_file"; then 2768c35d236eSmrg case $deplibs_check_method in 2769c35d236eSmrg "file_magic "*) 2770c35d236eSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2771c35d236eSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2772c35d236eSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2773c35d236eSmrg $EGREP "$file_magic_regex" > /dev/null; then 2774c35d236eSmrg : 2775c35d236eSmrg else 2776f55e6a01Smrg cat <<_LT_EOF 1>&2 2777c35d236eSmrg 2778c35d236eSmrg*** Warning: the command libtool uses to detect shared libraries, 2779c35d236eSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2780c35d236eSmrg*** The result is that libtool may fail to recognize shared libraries 2781c35d236eSmrg*** as such. This will affect the creation of libtool libraries that 2782c35d236eSmrg*** depend on shared libraries, but programs linked with such libtool 2783c35d236eSmrg*** libraries will work regardless of this problem. Nevertheless, you 2784c35d236eSmrg*** may want to report the problem to your system manager and/or to 2785c35d236eSmrg*** bug-libtool@gnu.org 2786c35d236eSmrg 2787f55e6a01Smrg_LT_EOF 2788c35d236eSmrg fi ;; 2789c35d236eSmrg esac 2790c35d236eSmrg fi 2791c35d236eSmrg break 2792c35d236eSmrg fi 2793c35d236eSmrg done 2794c35d236eSmrg IFS="$lt_save_ifs" 2795c35d236eSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2796c35d236eSmrg ;; 2797c35d236eSmrgesac]) 2798c35d236eSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2799c35d236eSmrgif test -n "$MAGIC_CMD"; then 2800c35d236eSmrg AC_MSG_RESULT($MAGIC_CMD) 2801c35d236eSmrgelse 2802c35d236eSmrg AC_MSG_RESULT(no) 2803c35d236eSmrgfi 2804f55e6a01Smrg_LT_DECL([], [MAGIC_CMD], [0], 2805f55e6a01Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2806f55e6a01Smrg])# _LT_PATH_TOOL_PREFIX 2807c35d236eSmrg 2808f55e6a01Smrg# Old name: 2809f55e6a01SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2810f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 2811f55e6a01Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2812c35d236eSmrg 2813f55e6a01Smrg 2814f55e6a01Smrg# _LT_PATH_MAGIC 2815f55e6a01Smrg# -------------- 28164f6cd06fSmrg# find a file program which can recognize a shared library 2817f55e6a01Smrgm4_defun([_LT_PATH_MAGIC], 2818f55e6a01Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2819c35d236eSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2820c35d236eSmrg if test -n "$ac_tool_prefix"; then 2821f55e6a01Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2822c35d236eSmrg else 2823c35d236eSmrg MAGIC_CMD=: 2824c35d236eSmrg fi 2825c35d236eSmrgfi 2826f55e6a01Smrg])# _LT_PATH_MAGIC 2827c35d236eSmrg 2828c35d236eSmrg 2829f55e6a01Smrg# LT_PATH_LD 2830c35d236eSmrg# ---------- 2831c35d236eSmrg# find the pathname to the GNU or non-GNU linker 2832f55e6a01SmrgAC_DEFUN([LT_PATH_LD], 2833f55e6a01Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2834c35d236eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2835c35d236eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2836f55e6a01Smrgm4_require([_LT_DECL_SED])dnl 2837f55e6a01Smrgm4_require([_LT_DECL_EGREP])dnl 2838f55e6a01Smrg 2839f55e6a01SmrgAC_ARG_WITH([gnu-ld], 2840f55e6a01Smrg [AS_HELP_STRING([--with-gnu-ld], 2841f55e6a01Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2842f55e6a01Smrg [test "$withval" = no || with_gnu_ld=yes], 2843f55e6a01Smrg [with_gnu_ld=no])dnl 2844f55e6a01Smrg 2845c35d236eSmrgac_prog=ld 2846c35d236eSmrgif test "$GCC" = yes; then 2847c35d236eSmrg # Check if gcc -print-prog-name=ld gives a path. 2848c35d236eSmrg AC_MSG_CHECKING([for ld used by $CC]) 2849c35d236eSmrg case $host in 2850c35d236eSmrg *-*-mingw*) 2851c35d236eSmrg # gcc leaves a trailing carriage return which upsets mingw 2852c35d236eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2853c35d236eSmrg *) 2854c35d236eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2855c35d236eSmrg esac 2856c35d236eSmrg case $ac_prog in 2857c35d236eSmrg # Accept absolute paths. 2858c35d236eSmrg [[\\/]]* | ?:[[\\/]]*) 2859c35d236eSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 2860c35d236eSmrg # Canonicalize the pathname of ld 2861f55e6a01Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 2862f55e6a01Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 2863f55e6a01Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 2864c35d236eSmrg done 2865c35d236eSmrg test -z "$LD" && LD="$ac_prog" 2866c35d236eSmrg ;; 2867c35d236eSmrg "") 2868c35d236eSmrg # If it fails, then pretend we aren't using GCC. 2869c35d236eSmrg ac_prog=ld 2870c35d236eSmrg ;; 2871c35d236eSmrg *) 2872c35d236eSmrg # If it is relative, then search for the first ld in PATH. 2873c35d236eSmrg with_gnu_ld=unknown 2874c35d236eSmrg ;; 2875c35d236eSmrg esac 2876c35d236eSmrgelif test "$with_gnu_ld" = yes; then 2877c35d236eSmrg AC_MSG_CHECKING([for GNU ld]) 2878c35d236eSmrgelse 2879c35d236eSmrg AC_MSG_CHECKING([for non-GNU ld]) 2880c35d236eSmrgfi 2881c35d236eSmrgAC_CACHE_VAL(lt_cv_path_LD, 2882c35d236eSmrg[if test -z "$LD"; then 2883c35d236eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2884c35d236eSmrg for ac_dir in $PATH; do 2885c35d236eSmrg IFS="$lt_save_ifs" 2886c35d236eSmrg test -z "$ac_dir" && ac_dir=. 2887c35d236eSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2888c35d236eSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 2889c35d236eSmrg # Check to see if the program is GNU ld. I'd rather use --version, 2890c35d236eSmrg # but apparently some variants of GNU ld only accept -v. 2891c35d236eSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 2892c35d236eSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2893c35d236eSmrg *GNU* | *'with BFD'*) 2894c35d236eSmrg test "$with_gnu_ld" != no && break 2895c35d236eSmrg ;; 2896c35d236eSmrg *) 2897c35d236eSmrg test "$with_gnu_ld" != yes && break 2898c35d236eSmrg ;; 2899c35d236eSmrg esac 2900c35d236eSmrg fi 2901c35d236eSmrg done 2902c35d236eSmrg IFS="$lt_save_ifs" 2903c35d236eSmrgelse 2904c35d236eSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2905c35d236eSmrgfi]) 2906c35d236eSmrgLD="$lt_cv_path_LD" 2907c35d236eSmrgif test -n "$LD"; then 2908c35d236eSmrg AC_MSG_RESULT($LD) 2909c35d236eSmrgelse 2910c35d236eSmrg AC_MSG_RESULT(no) 2911c35d236eSmrgfi 2912c35d236eSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2913f55e6a01Smrg_LT_PATH_LD_GNU 2914f55e6a01SmrgAC_SUBST([LD]) 2915c35d236eSmrg 2916f55e6a01Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 2917f55e6a01Smrg])# LT_PATH_LD 2918c35d236eSmrg 2919f55e6a01Smrg# Old names: 2920f55e6a01SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 2921f55e6a01SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 2922f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 2923f55e6a01Smrgdnl AC_DEFUN([AM_PROG_LD], []) 2924f55e6a01Smrgdnl AC_DEFUN([AC_PROG_LD], []) 2925f55e6a01Smrg 2926f55e6a01Smrg 2927f55e6a01Smrg# _LT_PATH_LD_GNU 2928f55e6a01Smrg#- -------------- 2929f55e6a01Smrgm4_defun([_LT_PATH_LD_GNU], 2930f55e6a01Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2931c35d236eSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2932c35d236eSmrgcase `$LD -v 2>&1 </dev/null` in 2933c35d236eSmrg*GNU* | *'with BFD'*) 2934c35d236eSmrg lt_cv_prog_gnu_ld=yes 2935c35d236eSmrg ;; 2936c35d236eSmrg*) 2937c35d236eSmrg lt_cv_prog_gnu_ld=no 2938c35d236eSmrg ;; 2939c35d236eSmrgesac]) 2940c35d236eSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2941f55e6a01Smrg])# _LT_PATH_LD_GNU 2942c35d236eSmrg 2943c35d236eSmrg 2944f55e6a01Smrg# _LT_CMD_RELOAD 2945f55e6a01Smrg# -------------- 2946c35d236eSmrg# find reload flag for linker 2947c35d236eSmrg# -- PORTME Some linkers may need a different reload flag. 2948f55e6a01Smrgm4_defun([_LT_CMD_RELOAD], 2949c35d236eSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 2950c35d236eSmrg lt_cv_ld_reload_flag, 2951c35d236eSmrg [lt_cv_ld_reload_flag='-r']) 2952c35d236eSmrgreload_flag=$lt_cv_ld_reload_flag 2953c35d236eSmrgcase $reload_flag in 2954c35d236eSmrg"" | " "*) ;; 2955c35d236eSmrg*) reload_flag=" $reload_flag" ;; 2956c35d236eSmrgesac 2957c35d236eSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2958c35d236eSmrgcase $host_os in 2959c35d236eSmrg darwin*) 2960c35d236eSmrg if test "$GCC" = yes; then 2961c35d236eSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2962c35d236eSmrg else 2963c35d236eSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2964c35d236eSmrg fi 2965c35d236eSmrg ;; 2966c35d236eSmrgesac 2967f55e6a01Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 2968f55e6a01Smrg_LT_DECL([], [reload_cmds], [2])dnl 2969f55e6a01Smrg])# _LT_CMD_RELOAD 2970c35d236eSmrg 2971c35d236eSmrg 2972f55e6a01Smrg# _LT_CHECK_MAGIC_METHOD 2973f55e6a01Smrg# ---------------------- 2974c35d236eSmrg# how to check for library dependencies 2975c35d236eSmrg# -- PORTME fill in with the dynamic library characteristics 2976f55e6a01Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 2977f55e6a01Smrg[m4_require([_LT_DECL_EGREP]) 2978f55e6a01Smrgm4_require([_LT_DECL_OBJDUMP]) 2979f55e6a01SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 2980c35d236eSmrglt_cv_deplibs_check_method, 2981c35d236eSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2982c35d236eSmrglt_cv_file_magic_test_file= 2983c35d236eSmrglt_cv_deplibs_check_method='unknown' 2984c35d236eSmrg# Need to set the preceding variable on all platforms that support 2985c35d236eSmrg# interlibrary dependencies. 2986c35d236eSmrg# 'none' -- dependencies not supported. 2987c35d236eSmrg# `unknown' -- same as none, but documents that we really don't know. 2988c35d236eSmrg# 'pass_all' -- all dependencies passed with no checks. 2989c35d236eSmrg# 'test_compile' -- check by making test program. 2990c35d236eSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 2991c35d236eSmrg# which responds to the $file_magic_cmd with a given extended regex. 2992c35d236eSmrg# If you have `file' or equivalent on your system and you're not sure 2993c35d236eSmrg# whether `pass_all' will *always* work, you probably want this one. 2994c35d236eSmrg 2995c35d236eSmrgcase $host_os in 29964f6cd06fSmrgaix[[4-9]]*) 2997c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2998c35d236eSmrg ;; 2999c35d236eSmrg 3000c35d236eSmrgbeos*) 3001c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3002c35d236eSmrg ;; 3003c35d236eSmrg 3004c35d236eSmrgbsdi[[45]]*) 3005c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3006c35d236eSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3007c35d236eSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3008c35d236eSmrg ;; 3009c35d236eSmrg 3010c35d236eSmrgcygwin*) 3011c35d236eSmrg # func_win32_libid is a shell function defined in ltmain.sh 3012c35d236eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3013c35d236eSmrg lt_cv_file_magic_cmd='func_win32_libid' 3014c35d236eSmrg ;; 3015c35d236eSmrg 3016c35d236eSmrgmingw* | pw32*) 3017c35d236eSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 30184f6cd06fSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 30194f6cd06fSmrg # unless we find 'file', for example because we are cross-compiling. 30204f6cd06fSmrg if ( file / ) >/dev/null 2>&1; then 30214f6cd06fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 30224f6cd06fSmrg lt_cv_file_magic_cmd='func_win32_libid' 30234f6cd06fSmrg else 30244f6cd06fSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 30254f6cd06fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 30264f6cd06fSmrg fi 3027c35d236eSmrg ;; 3028c35d236eSmrg 3029f55e6a01Smrgcegcc) 3030f55e6a01Smrg # use the weaker test based on 'objdump'. See mingw*. 3031f55e6a01Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3032f55e6a01Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3033f55e6a01Smrg ;; 3034f55e6a01Smrg 3035c35d236eSmrgdarwin* | rhapsody*) 3036c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3037c35d236eSmrg ;; 3038c35d236eSmrg 30394f6cd06fSmrgfreebsd* | dragonfly*) 3040f55e6a01Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3041c35d236eSmrg case $host_cpu in 3042c35d236eSmrg i*86 ) 3043c35d236eSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3044c35d236eSmrg # Let's accept both of them until this is cleared up. 3045c35d236eSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3046c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3047c35d236eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3048c35d236eSmrg ;; 3049c35d236eSmrg esac 3050c35d236eSmrg else 3051c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3052c35d236eSmrg fi 3053c35d236eSmrg ;; 3054c35d236eSmrg 3055c35d236eSmrggnu*) 3056c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3057c35d236eSmrg ;; 3058c35d236eSmrg 3059c35d236eSmrghpux10.20* | hpux11*) 3060c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3061c35d236eSmrg case $host_cpu in 3062c35d236eSmrg ia64*) 3063c35d236eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3064c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3065c35d236eSmrg ;; 3066c35d236eSmrg hppa*64*) 3067c35d236eSmrg [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]'] 3068c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3069c35d236eSmrg ;; 3070c35d236eSmrg *) 3071c35d236eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 3072c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3073c35d236eSmrg ;; 3074c35d236eSmrg esac 3075c35d236eSmrg ;; 3076c35d236eSmrg 30774f6cd06fSmrginterix[[3-9]]*) 3078c35d236eSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3079c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3080c35d236eSmrg ;; 3081c35d236eSmrg 3082c35d236eSmrgirix5* | irix6* | nonstopux*) 3083c35d236eSmrg case $LD in 3084c35d236eSmrg *-32|*"-32 ") libmagic=32-bit;; 3085c35d236eSmrg *-n32|*"-n32 ") libmagic=N32;; 3086c35d236eSmrg *-64|*"-64 ") libmagic=64-bit;; 3087c35d236eSmrg *) libmagic=never-match;; 3088c35d236eSmrg esac 3089c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3090c35d236eSmrg ;; 3091c35d236eSmrg 3092c35d236eSmrg# This must be Linux ELF. 30934f6cd06fSmrglinux* | k*bsd*-gnu) 3094c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3095c35d236eSmrg ;; 3096c35d236eSmrg 3097c35d236eSmrgnetbsd*) 3098f55e6a01Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3099c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3100c35d236eSmrg else 3101c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3102c35d236eSmrg fi 3103c35d236eSmrg ;; 3104c35d236eSmrg 3105c35d236eSmrgnewos6*) 3106c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3107c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3108c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3109c35d236eSmrg ;; 3110c35d236eSmrg 3111f55e6a01Smrg*nto* | *qnx*) 3112f55e6a01Smrg lt_cv_deplibs_check_method=pass_all 3113c35d236eSmrg ;; 3114c35d236eSmrg 3115c35d236eSmrgopenbsd*) 3116f55e6a01Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3117c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3118c35d236eSmrg else 3119c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3120c35d236eSmrg fi 3121c35d236eSmrg ;; 3122c35d236eSmrg 3123c35d236eSmrgosf3* | osf4* | osf5*) 3124c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3125c35d236eSmrg ;; 3126c35d236eSmrg 31274f6cd06fSmrgrdos*) 31284f6cd06fSmrg lt_cv_deplibs_check_method=pass_all 31294f6cd06fSmrg ;; 31304f6cd06fSmrg 3131c35d236eSmrgsolaris*) 3132c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3133c35d236eSmrg ;; 3134c35d236eSmrg 3135f55e6a01Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3136f55e6a01Smrg lt_cv_deplibs_check_method=pass_all 3137f55e6a01Smrg ;; 3138f55e6a01Smrg 3139c35d236eSmrgsysv4 | sysv4.3*) 3140c35d236eSmrg case $host_vendor in 3141c35d236eSmrg motorola) 3142c35d236eSmrg 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]]' 3143c35d236eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3144c35d236eSmrg ;; 3145c35d236eSmrg ncr) 3146c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3147c35d236eSmrg ;; 3148c35d236eSmrg sequent) 3149c35d236eSmrg lt_cv_file_magic_cmd='/bin/file' 3150c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3151c35d236eSmrg ;; 3152c35d236eSmrg sni) 3153c35d236eSmrg lt_cv_file_magic_cmd='/bin/file' 3154c35d236eSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3155c35d236eSmrg lt_cv_file_magic_test_file=/lib/libc.so 3156c35d236eSmrg ;; 3157c35d236eSmrg siemens) 3158c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3159c35d236eSmrg ;; 3160c35d236eSmrg pc) 3161c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3162c35d236eSmrg ;; 3163c35d236eSmrg esac 3164c35d236eSmrg ;; 3165c35d236eSmrg 3166f55e6a01Smrgtpf*) 3167c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3168c35d236eSmrg ;; 3169c35d236eSmrgesac 3170c35d236eSmrg]) 3171c35d236eSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3172c35d236eSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3173c35d236eSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3174c35d236eSmrg 3175f55e6a01Smrg_LT_DECL([], [deplibs_check_method], [1], 3176f55e6a01Smrg [Method to check whether dependent libraries are shared objects]) 3177f55e6a01Smrg_LT_DECL([], [file_magic_cmd], [1], 3178f55e6a01Smrg [Command to use when deplibs_check_method == "file_magic"]) 3179f55e6a01Smrg])# _LT_CHECK_MAGIC_METHOD 3180c35d236eSmrg 3181f55e6a01Smrg 3182f55e6a01Smrg# LT_PATH_NM 3183c35d236eSmrg# ---------- 3184f55e6a01Smrg# find the pathname to a BSD- or MS-compatible name lister 3185f55e6a01SmrgAC_DEFUN([LT_PATH_NM], 3186f55e6a01Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3187f55e6a01SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3188c35d236eSmrg[if test -n "$NM"; then 3189c35d236eSmrg # Let the user override the test. 3190c35d236eSmrg lt_cv_path_NM="$NM" 3191c35d236eSmrgelse 3192c35d236eSmrg lt_nm_to_check="${ac_tool_prefix}nm" 31934f6cd06fSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3194c35d236eSmrg lt_nm_to_check="$lt_nm_to_check nm" 3195c35d236eSmrg fi 3196c35d236eSmrg for lt_tmp_nm in $lt_nm_to_check; do 3197c35d236eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3198c35d236eSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3199c35d236eSmrg IFS="$lt_save_ifs" 3200c35d236eSmrg test -z "$ac_dir" && ac_dir=. 3201c35d236eSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3202c35d236eSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3203c35d236eSmrg # Check to see if the nm accepts a BSD-compat flag. 3204c35d236eSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3205c35d236eSmrg # nm: unknown option "B" ignored 3206c35d236eSmrg # Tru64's nm complains that /dev/null is an invalid object file 3207c35d236eSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3208c35d236eSmrg */dev/null* | *'Invalid file or object type'*) 3209c35d236eSmrg lt_cv_path_NM="$tmp_nm -B" 3210c35d236eSmrg break 3211c35d236eSmrg ;; 3212c35d236eSmrg *) 3213c35d236eSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3214c35d236eSmrg */dev/null*) 3215c35d236eSmrg lt_cv_path_NM="$tmp_nm -p" 3216c35d236eSmrg break 3217c35d236eSmrg ;; 3218c35d236eSmrg *) 3219c35d236eSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3220c35d236eSmrg continue # so that we can try to find one that supports BSD flags 3221c35d236eSmrg ;; 3222c35d236eSmrg esac 3223c35d236eSmrg ;; 3224c35d236eSmrg esac 3225c35d236eSmrg fi 3226c35d236eSmrg done 3227c35d236eSmrg IFS="$lt_save_ifs" 3228c35d236eSmrg done 3229f55e6a01Smrg : ${lt_cv_path_NM=no} 3230c35d236eSmrgfi]) 3231f55e6a01Smrgif test "$lt_cv_path_NM" != "no"; then 3232f55e6a01Smrg NM="$lt_cv_path_NM" 3233f55e6a01Smrgelse 3234f55e6a01Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3235f55e6a01Smrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 3236f55e6a01Smrg AC_SUBST([DUMPBIN]) 3237f55e6a01Smrg if test "$DUMPBIN" != ":"; then 3238f55e6a01Smrg NM="$DUMPBIN" 3239f55e6a01Smrg fi 3240f55e6a01Smrgfi 3241f55e6a01Smrgtest -z "$NM" && NM=nm 3242f55e6a01SmrgAC_SUBST([NM]) 3243f55e6a01Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3244f55e6a01Smrg 3245f55e6a01SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3246f55e6a01Smrg [lt_cv_nm_interface="BSD nm" 3247f55e6a01Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3248f55e6a01Smrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3249f55e6a01Smrg (eval "$ac_compile" 2>conftest.err) 3250f55e6a01Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3251f55e6a01Smrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3252f55e6a01Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3253f55e6a01Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3254f55e6a01Smrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 3255f55e6a01Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3256f55e6a01Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3257f55e6a01Smrg lt_cv_nm_interface="MS dumpbin" 3258f55e6a01Smrg fi 3259f55e6a01Smrg rm -f conftest*]) 3260f55e6a01Smrg])# LT_PATH_NM 3261c35d236eSmrg 3262f55e6a01Smrg# Old names: 3263f55e6a01SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3264f55e6a01SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3265f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 3266f55e6a01Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3267f55e6a01Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3268c35d236eSmrg 3269f55e6a01Smrg 3270f55e6a01Smrg# LT_LIB_M 3271f55e6a01Smrg# -------- 3272c35d236eSmrg# check for math library 3273f55e6a01SmrgAC_DEFUN([LT_LIB_M], 3274c35d236eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3275c35d236eSmrgLIBM= 3276c35d236eSmrgcase $host in 3277c35d236eSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3278c35d236eSmrg # These system don't have libm, or don't need it 3279c35d236eSmrg ;; 3280c35d236eSmrg*-ncr-sysv4.3*) 3281c35d236eSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3282c35d236eSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3283c35d236eSmrg ;; 3284c35d236eSmrg*) 3285c35d236eSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3286c35d236eSmrg ;; 3287c35d236eSmrgesac 3288f55e6a01SmrgAC_SUBST([LIBM]) 3289f55e6a01Smrg])# LT_LIB_M 3290c35d236eSmrg 3291f55e6a01Smrg# Old name: 3292f55e6a01SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3293f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 3294f55e6a01Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3295c35d236eSmrg 3296c35d236eSmrg 3297f55e6a01Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3298f55e6a01Smrg# ------------------------------- 3299f55e6a01Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3300f55e6a01Smrg[m4_require([_LT_TAG_COMPILER])dnl 3301c35d236eSmrg 3302f55e6a01Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3303c35d236eSmrg 3304f55e6a01Smrgif test "$GCC" = yes; then 3305f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 3306c35d236eSmrg 3307f55e6a01Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3308f55e6a01Smrg lt_cv_prog_compiler_rtti_exceptions, 3309f55e6a01Smrg [-fno-rtti -fno-exceptions], [], 3310f55e6a01Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3311f55e6a01Smrgfi 3312f55e6a01Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3313f55e6a01Smrg [Compiler flag to turn off builtin functions]) 3314f55e6a01Smrg])# _LT_COMPILER_NO_RTTI 3315c35d236eSmrg 3316c35d236eSmrg 3317f55e6a01Smrg# _LT_CMD_GLOBAL_SYMBOLS 3318f55e6a01Smrg# ---------------------- 3319f55e6a01Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3320f55e6a01Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3321f55e6a01SmrgAC_REQUIRE([AC_PROG_CC])dnl 3322f55e6a01SmrgAC_REQUIRE([LT_PATH_NM])dnl 3323f55e6a01SmrgAC_REQUIRE([LT_PATH_LD])dnl 3324f55e6a01Smrgm4_require([_LT_DECL_SED])dnl 3325f55e6a01Smrgm4_require([_LT_DECL_EGREP])dnl 3326f55e6a01Smrgm4_require([_LT_TAG_COMPILER])dnl 3327c35d236eSmrg 3328f55e6a01Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3329f55e6a01SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3330f55e6a01SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3331c35d236eSmrg[ 3332f55e6a01Smrg# These are sane defaults that work on at least a few old systems. 3333f55e6a01Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3334c35d236eSmrg 3335f55e6a01Smrg# Character class describing NM global symbol codes. 3336f55e6a01Smrgsymcode='[[BCDEGRST]]' 3337c35d236eSmrg 3338f55e6a01Smrg# Regexp to match symbols that can be accessed directly from C. 3339f55e6a01Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3340c35d236eSmrg 3341f55e6a01Smrg# Define system-specific variables. 3342f55e6a01Smrgcase $host_os in 3343f55e6a01Smrgaix*) 3344f55e6a01Smrg symcode='[[BCDT]]' 3345f55e6a01Smrg ;; 3346f55e6a01Smrgcygwin* | mingw* | pw32* | cegcc*) 3347f55e6a01Smrg symcode='[[ABCDGISTW]]' 3348f55e6a01Smrg ;; 3349f55e6a01Smrghpux*) 3350f55e6a01Smrg if test "$host_cpu" = ia64; then 3351f55e6a01Smrg symcode='[[ABCDEGRST]]' 3352f55e6a01Smrg fi 3353f55e6a01Smrg ;; 3354f55e6a01Smrgirix* | nonstopux*) 3355f55e6a01Smrg symcode='[[BCDEGRST]]' 3356f55e6a01Smrg ;; 3357f55e6a01Smrgosf*) 3358f55e6a01Smrg symcode='[[BCDEGQRST]]' 3359f55e6a01Smrg ;; 3360f55e6a01Smrgsolaris*) 3361f55e6a01Smrg symcode='[[BDRT]]' 3362f55e6a01Smrg ;; 3363f55e6a01Smrgsco3.2v5*) 3364f55e6a01Smrg symcode='[[DT]]' 3365f55e6a01Smrg ;; 3366f55e6a01Smrgsysv4.2uw2*) 3367f55e6a01Smrg symcode='[[DT]]' 3368f55e6a01Smrg ;; 3369f55e6a01Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3370f55e6a01Smrg symcode='[[ABDT]]' 3371f55e6a01Smrg ;; 3372f55e6a01Smrgsysv4) 3373f55e6a01Smrg symcode='[[DFNSTU]]' 3374f55e6a01Smrg ;; 3375f55e6a01Smrgesac 3376c35d236eSmrg 3377f55e6a01Smrg# If we're using GNU nm, then use its standard symbol codes. 3378f55e6a01Smrgcase `$NM -V 2>&1` in 3379f55e6a01Smrg*GNU* | *'with BFD'*) 3380f55e6a01Smrg symcode='[[ABCDGIRSTW]]' ;; 3381f55e6a01Smrgesac 3382c35d236eSmrg 3383f55e6a01Smrg# Transform an extracted symbol line into a proper C declaration. 3384f55e6a01Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3385f55e6a01Smrg# so use this general approach. 3386f55e6a01Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3387c35d236eSmrg 3388f55e6a01Smrg# Transform an extracted symbol line into symbol name and symbol address 3389f55e6a01Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3390f55e6a01Smrglt_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'" 3391c35d236eSmrg 3392f55e6a01Smrg# Handle CRLF in mingw tool chain 3393f55e6a01Smrgopt_cr= 3394f55e6a01Smrgcase $build_os in 3395f55e6a01Smrgmingw*) 3396f55e6a01Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3397f55e6a01Smrg ;; 3398f55e6a01Smrgesac 3399c35d236eSmrg 3400f55e6a01Smrg# Try without a prefix underscore, then with it. 3401f55e6a01Smrgfor ac_symprfx in "" "_"; do 3402c35d236eSmrg 3403f55e6a01Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3404f55e6a01Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3405c35d236eSmrg 3406f55e6a01Smrg # Write the raw and C identifiers. 3407f55e6a01Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3408f55e6a01Smrg # Fake it for dumpbin and say T for any non-static function 3409f55e6a01Smrg # and D for any global variable. 3410f55e6a01Smrg # Also find C++ and __fastcall symbols from MSVC++, 3411f55e6a01Smrg # which start with @ or ?. 3412f55e6a01Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3413f55e6a01Smrg" {last_section=section; section=\$ 3};"\ 3414f55e6a01Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3415f55e6a01Smrg" \$ 0!~/External *\|/{next};"\ 3416f55e6a01Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3417f55e6a01Smrg" {if(hide[section]) next};"\ 3418f55e6a01Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3419f55e6a01Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3420f55e6a01Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3421f55e6a01Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3422f55e6a01Smrg" ' prfx=^$ac_symprfx]" 3423f55e6a01Smrg else 3424f55e6a01Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3425c35d236eSmrg fi 3426c35d236eSmrg 3427f55e6a01Smrg # Check to see that the pipe works correctly. 3428f55e6a01Smrg pipe_works=no 3429c35d236eSmrg 3430f55e6a01Smrg rm -f conftest* 3431f55e6a01Smrg cat > conftest.$ac_ext <<_LT_EOF 3432f55e6a01Smrg#ifdef __cplusplus 3433f55e6a01Smrgextern "C" { 3434f55e6a01Smrg#endif 3435f55e6a01Smrgchar nm_test_var; 3436f55e6a01Smrgvoid nm_test_func(void); 3437f55e6a01Smrgvoid nm_test_func(void){} 3438f55e6a01Smrg#ifdef __cplusplus 3439f55e6a01Smrg} 3440f55e6a01Smrg#endif 3441f55e6a01Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3442f55e6a01Smrg_LT_EOF 3443c35d236eSmrg 3444f55e6a01Smrg if AC_TRY_EVAL(ac_compile); then 3445f55e6a01Smrg # Now try to grab the symbols. 3446f55e6a01Smrg nlist=conftest.nm 3447f55e6a01Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 3448f55e6a01Smrg # Try sorting and uniquifying the output. 3449f55e6a01Smrg if sort "$nlist" | uniq > "$nlist"T; then 3450f55e6a01Smrg mv -f "$nlist"T "$nlist" 3451f55e6a01Smrg else 3452f55e6a01Smrg rm -f "$nlist"T 3453f55e6a01Smrg fi 3454c35d236eSmrg 3455f55e6a01Smrg # Make sure that we snagged all the symbols we need. 3456f55e6a01Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3457f55e6a01Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3458f55e6a01Smrg cat <<_LT_EOF > conftest.$ac_ext 3459f55e6a01Smrg#ifdef __cplusplus 3460f55e6a01Smrgextern "C" { 3461f55e6a01Smrg#endif 3462c35d236eSmrg 3463f55e6a01Smrg_LT_EOF 3464f55e6a01Smrg # Now generate the symbol file. 3465f55e6a01Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3466c35d236eSmrg 3467f55e6a01Smrg cat <<_LT_EOF >> conftest.$ac_ext 3468c35d236eSmrg 3469f55e6a01Smrg/* The mapping between symbol names and symbols. */ 3470f55e6a01Smrgconst struct { 3471f55e6a01Smrg const char *name; 3472f55e6a01Smrg void *address; 3473f55e6a01Smrg} 3474f55e6a01Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3475f55e6a01Smrg{ 3476f55e6a01Smrg { "@PROGRAM@", (void *) 0 }, 3477f55e6a01Smrg_LT_EOF 3478f55e6a01Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3479f55e6a01Smrg cat <<\_LT_EOF >> conftest.$ac_ext 3480f55e6a01Smrg {0, (void *) 0} 3481f55e6a01Smrg}; 3482c35d236eSmrg 3483f55e6a01Smrg/* This works around a problem in FreeBSD linker */ 3484f55e6a01Smrg#ifdef FREEBSD_WORKAROUND 3485f55e6a01Smrgstatic const void *lt_preloaded_setup() { 3486f55e6a01Smrg return lt__PROGRAM__LTX_preloaded_symbols; 3487f55e6a01Smrg} 3488f55e6a01Smrg#endif 3489c35d236eSmrg 3490f55e6a01Smrg#ifdef __cplusplus 3491f55e6a01Smrg} 3492f55e6a01Smrg#endif 3493f55e6a01Smrg_LT_EOF 3494f55e6a01Smrg # Now try linking the two files. 3495f55e6a01Smrg mv conftest.$ac_objext conftstm.$ac_objext 3496f55e6a01Smrg lt_save_LIBS="$LIBS" 3497f55e6a01Smrg lt_save_CFLAGS="$CFLAGS" 3498f55e6a01Smrg LIBS="conftstm.$ac_objext" 3499f55e6a01Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3500f55e6a01Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3501f55e6a01Smrg pipe_works=yes 3502f55e6a01Smrg fi 3503f55e6a01Smrg LIBS="$lt_save_LIBS" 3504f55e6a01Smrg CFLAGS="$lt_save_CFLAGS" 3505f55e6a01Smrg else 3506f55e6a01Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3507f55e6a01Smrg fi 3508f55e6a01Smrg else 3509f55e6a01Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3510f55e6a01Smrg fi 3511c35d236eSmrg else 3512f55e6a01Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3513c35d236eSmrg fi 3514c35d236eSmrg else 3515f55e6a01Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3516f55e6a01Smrg cat conftest.$ac_ext >&5 3517c35d236eSmrg fi 3518f55e6a01Smrg rm -rf conftest* conftst* 3519c35d236eSmrg 3520f55e6a01Smrg # Do not use the global_symbol_pipe unless it works. 3521f55e6a01Smrg if test "$pipe_works" = yes; then 3522f55e6a01Smrg break 3523f55e6a01Smrg else 3524f55e6a01Smrg lt_cv_sys_global_symbol_pipe= 3525f55e6a01Smrg fi 3526f55e6a01Smrgdone 3527f55e6a01Smrg]) 3528f55e6a01Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3529f55e6a01Smrg lt_cv_sys_global_symbol_to_cdecl= 3530f55e6a01Smrgfi 3531f55e6a01Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3532f55e6a01Smrg AC_MSG_RESULT(failed) 3533c35d236eSmrgelse 3534f55e6a01Smrg AC_MSG_RESULT(ok) 3535c35d236eSmrgfi 3536c35d236eSmrg 3537f55e6a01Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3538f55e6a01Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 3539f55e6a01Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3540f55e6a01Smrg [Transform the output of nm in a proper C declaration]) 3541f55e6a01Smrg_LT_DECL([global_symbol_to_c_name_address], 3542f55e6a01Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3543f55e6a01Smrg [Transform the output of nm in a C name address pair]) 3544f55e6a01Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3545f55e6a01Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3546f55e6a01Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3547f55e6a01Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3548c35d236eSmrg 3549c35d236eSmrg 3550f55e6a01Smrg# _LT_COMPILER_PIC([TAGNAME]) 3551f55e6a01Smrg# --------------------------- 3552f55e6a01Smrgm4_defun([_LT_COMPILER_PIC], 3553f55e6a01Smrg[m4_require([_LT_TAG_COMPILER])dnl 3554f55e6a01Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3555f55e6a01Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3556f55e6a01Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3557c35d236eSmrg 3558f55e6a01SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 3559f55e6a01Smrgm4_if([$1], [CXX], [ 3560f55e6a01Smrg # C++ specific cases for pic, static, wl, etc. 3561f55e6a01Smrg if test "$GXX" = yes; then 3562f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3563f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3564c35d236eSmrg 3565f55e6a01Smrg case $host_os in 3566f55e6a01Smrg aix*) 3567f55e6a01Smrg # All AIX code is PIC. 3568c35d236eSmrg if test "$host_cpu" = ia64; then 3569f55e6a01Smrg # AIX 5 now supports IA64 processor 3570f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3571c35d236eSmrg fi 3572f55e6a01Smrg ;; 3573c35d236eSmrg 3574f55e6a01Smrg amigaos*) 3575f55e6a01Smrg case $host_cpu in 3576f55e6a01Smrg powerpc) 3577f55e6a01Smrg # see comment about AmigaOS4 .so support 3578f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3579c35d236eSmrg ;; 3580f55e6a01Smrg m68k) 3581f55e6a01Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3582f55e6a01Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3583f55e6a01Smrg # like `-m68040'. 3584f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3585f55e6a01Smrg ;; 3586f55e6a01Smrg esac 3587f55e6a01Smrg ;; 3588c35d236eSmrg 3589f55e6a01Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3590f55e6a01Smrg # PIC is the default for these OSes. 3591f55e6a01Smrg ;; 3592f55e6a01Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3593f55e6a01Smrg # This hack is so that the source file can tell whether it is being 3594f55e6a01Smrg # built for inclusion in a dll (and should export symbols for example). 3595f55e6a01Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3596f55e6a01Smrg # (--disable-auto-import) libraries 3597f55e6a01Smrg m4_if([$1], [GCJ], [], 3598f55e6a01Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3599f55e6a01Smrg ;; 3600f55e6a01Smrg darwin* | rhapsody*) 3601f55e6a01Smrg # PIC is the default on this platform 3602f55e6a01Smrg # Common symbols not allowed in MH_DYLIB files 3603f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3604f55e6a01Smrg ;; 3605f55e6a01Smrg *djgpp*) 3606f55e6a01Smrg # DJGPP does not support shared libraries at all 3607f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3608f55e6a01Smrg ;; 3609f55e6a01Smrg interix[[3-9]]*) 3610f55e6a01Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3611f55e6a01Smrg # Instead, we relocate shared libraries at runtime. 3612f55e6a01Smrg ;; 3613f55e6a01Smrg sysv4*MP*) 3614f55e6a01Smrg if test -d /usr/nec; then 3615f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3616f55e6a01Smrg fi 3617f55e6a01Smrg ;; 3618f55e6a01Smrg hpux*) 3619f55e6a01Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3620f55e6a01Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3621f55e6a01Smrg # sets the default TLS model and affects inlining. 3622f55e6a01Smrg case $host_cpu in 3623f55e6a01Smrg hppa*64*) 3624c35d236eSmrg ;; 3625c35d236eSmrg *) 3626f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3627c35d236eSmrg ;; 3628f55e6a01Smrg esac 3629c35d236eSmrg ;; 3630f55e6a01Smrg *qnx* | *nto*) 3631f55e6a01Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3632f55e6a01Smrg # it will coredump. 3633f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3634c35d236eSmrg ;; 3635c35d236eSmrg *) 3636f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3637c35d236eSmrg ;; 3638c35d236eSmrg esac 3639f55e6a01Smrg else 3640f55e6a01Smrg case $host_os in 3641f55e6a01Smrg aix[[4-9]]*) 3642f55e6a01Smrg # All AIX code is PIC. 3643f55e6a01Smrg if test "$host_cpu" = ia64; then 3644f55e6a01Smrg # AIX 5 now supports IA64 processor 3645f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3646f55e6a01Smrg else 3647f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3648f55e6a01Smrg fi 3649c35d236eSmrg ;; 3650f55e6a01Smrg chorus*) 3651f55e6a01Smrg case $cc_basename in 3652f55e6a01Smrg cxch68*) 3653f55e6a01Smrg # Green Hills C++ Compiler 3654f55e6a01Smrg # _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" 3655c35d236eSmrg ;; 3656c35d236eSmrg esac 3657c35d236eSmrg ;; 3658f55e6a01Smrg dgux*) 3659f55e6a01Smrg case $cc_basename in 3660f55e6a01Smrg ec++*) 3661f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3662f55e6a01Smrg ;; 3663f55e6a01Smrg ghcx*) 3664f55e6a01Smrg # Green Hills C++ Compiler 3665f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3666f55e6a01Smrg ;; 3667f55e6a01Smrg *) 3668f55e6a01Smrg ;; 3669f55e6a01Smrg esac 3670f55e6a01Smrg ;; 3671f55e6a01Smrg freebsd* | dragonfly*) 3672f55e6a01Smrg # FreeBSD uses GNU C++ 3673f55e6a01Smrg ;; 3674f55e6a01Smrg hpux9* | hpux10* | hpux11*) 3675f55e6a01Smrg case $cc_basename in 3676f55e6a01Smrg CC*) 3677f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3678f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3679f55e6a01Smrg if test "$host_cpu" != ia64; then 3680f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3681f55e6a01Smrg fi 3682f55e6a01Smrg ;; 3683f55e6a01Smrg aCC*) 3684f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3685f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3686c35d236eSmrg case $host_cpu in 3687f55e6a01Smrg hppa*64*|ia64*) 3688f55e6a01Smrg # +Z the default 3689c35d236eSmrg ;; 3690c35d236eSmrg *) 3691f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3692c35d236eSmrg ;; 3693c35d236eSmrg esac 3694f55e6a01Smrg ;; 3695f55e6a01Smrg *) 3696f55e6a01Smrg ;; 3697c35d236eSmrg esac 3698c35d236eSmrg ;; 3699f55e6a01Smrg interix*) 3700f55e6a01Smrg # This is c89, which is MS Visual C++ (no shared libs) 3701f55e6a01Smrg # Anyone wants to do a port? 3702c35d236eSmrg ;; 3703f55e6a01Smrg irix5* | irix6* | nonstopux*) 3704f55e6a01Smrg case $cc_basename in 3705f55e6a01Smrg CC*) 3706f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3707f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3708f55e6a01Smrg # CC pic flag -KPIC is the default. 3709f55e6a01Smrg ;; 3710f55e6a01Smrg *) 3711f55e6a01Smrg ;; 37124f6cd06fSmrg esac 37134f6cd06fSmrg ;; 3714f55e6a01Smrg linux* | k*bsd*-gnu) 3715f55e6a01Smrg case $cc_basename in 3716f55e6a01Smrg KCC*) 3717f55e6a01Smrg # KAI C++ Compiler 3718f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3719f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3720f55e6a01Smrg ;; 3721f55e6a01Smrg ecpc* ) 3722f55e6a01Smrg # old Intel C++ for x86_64 which still supported -KPIC. 3723f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3724f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3725f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3726f55e6a01Smrg ;; 3727f55e6a01Smrg icpc* ) 3728f55e6a01Smrg # Intel C++, used to be incompatible with GCC. 3729f55e6a01Smrg # ICC 10 doesn't accept -KPIC any more. 3730f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3731f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3732f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3733f55e6a01Smrg ;; 3734f55e6a01Smrg pgCC* | pgcpp*) 3735f55e6a01Smrg # Portland Group C++ compiler 3736f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3737f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 3738f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3739f55e6a01Smrg ;; 3740f55e6a01Smrg cxx*) 3741f55e6a01Smrg # Compaq C++ 3742f55e6a01Smrg # Make sure the PIC flag is empty. It appears that all Alpha 3743f55e6a01Smrg # Linux and Compaq Tru64 Unix objects are PIC. 3744f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3745f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3746f55e6a01Smrg ;; 3747f55e6a01Smrg xlc* | xlC*) 3748f55e6a01Smrg # IBM XL 8.0 on PPC 3749f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3750f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 3751f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 3752f55e6a01Smrg ;; 3753f55e6a01Smrg *) 3754f55e6a01Smrg case `$CC -V 2>&1 | sed 5q` in 3755f55e6a01Smrg *Sun\ C*) 3756f55e6a01Smrg # Sun C++ 5.9 3757f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3758f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3759f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3760f55e6a01Smrg ;; 3761f55e6a01Smrg esac 3762f55e6a01Smrg ;; 3763f55e6a01Smrg esac 3764c35d236eSmrg ;; 3765f55e6a01Smrg lynxos*) 3766c35d236eSmrg ;; 3767f55e6a01Smrg m88k*) 3768c35d236eSmrg ;; 3769f55e6a01Smrg mvs*) 3770f55e6a01Smrg case $cc_basename in 3771f55e6a01Smrg cxx*) 3772f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 3773f55e6a01Smrg ;; 3774f55e6a01Smrg *) 3775f55e6a01Smrg ;; 3776f55e6a01Smrg esac 3777c35d236eSmrg ;; 3778f55e6a01Smrg netbsd*) 3779c35d236eSmrg ;; 3780f55e6a01Smrg *qnx* | *nto*) 3781f55e6a01Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3782f55e6a01Smrg # it will coredump. 3783f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3784f55e6a01Smrg ;; 3785f55e6a01Smrg osf3* | osf4* | osf5*) 3786f55e6a01Smrg case $cc_basename in 3787f55e6a01Smrg KCC*) 3788f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3789f55e6a01Smrg ;; 3790f55e6a01Smrg RCC*) 3791f55e6a01Smrg # Rational C++ 2.4.1 3792f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3793f55e6a01Smrg ;; 3794f55e6a01Smrg cxx*) 3795f55e6a01Smrg # Digital/Compaq C++ 3796f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3797f55e6a01Smrg # Make sure the PIC flag is empty. It appears that all Alpha 3798f55e6a01Smrg # Linux and Compaq Tru64 Unix objects are PIC. 3799f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3800f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3801f55e6a01Smrg ;; 3802f55e6a01Smrg *) 3803f55e6a01Smrg ;; 3804f55e6a01Smrg esac 3805c35d236eSmrg ;; 3806f55e6a01Smrg psos*) 3807c35d236eSmrg ;; 3808f55e6a01Smrg solaris*) 3809f55e6a01Smrg case $cc_basename in 3810f55e6a01Smrg CC*) 3811f55e6a01Smrg # Sun C++ 4.2, 5.x and Centerline C++ 3812f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3813f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3814f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3815f55e6a01Smrg ;; 3816f55e6a01Smrg gcx*) 3817f55e6a01Smrg # Green Hills C++ Compiler 3818f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 3819f55e6a01Smrg ;; 3820c35d236eSmrg *) 3821c35d236eSmrg ;; 3822c35d236eSmrg esac 3823c35d236eSmrg ;; 3824f55e6a01Smrg sunos4*) 3825f55e6a01Smrg case $cc_basename in 3826f55e6a01Smrg CC*) 3827f55e6a01Smrg # Sun C++ 4.x 3828f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3829f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3830f55e6a01Smrg ;; 3831f55e6a01Smrg lcc*) 3832f55e6a01Smrg # Lucid 3833f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3834f55e6a01Smrg ;; 38354f6cd06fSmrg *) 38364f6cd06fSmrg ;; 3837f55e6a01Smrg esac 3838c35d236eSmrg ;; 3839f55e6a01Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 3840f55e6a01Smrg case $cc_basename in 3841f55e6a01Smrg CC*) 3842f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3843f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3844f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3845f55e6a01Smrg ;; 3846f55e6a01Smrg esac 3847c35d236eSmrg ;; 3848f55e6a01Smrg tandem*) 3849f55e6a01Smrg case $cc_basename in 3850f55e6a01Smrg NCC*) 3851f55e6a01Smrg # NonStop-UX NCC 3.20 3852f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3853f55e6a01Smrg ;; 3854f55e6a01Smrg *) 3855f55e6a01Smrg ;; 3856f55e6a01Smrg esac 3857c35d236eSmrg ;; 3858f55e6a01Smrg vxworks*) 3859c35d236eSmrg ;; 3860c35d236eSmrg *) 3861f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3862c35d236eSmrg ;; 3863c35d236eSmrg esac 3864f55e6a01Smrg fi 3865f55e6a01Smrg], 3866f55e6a01Smrg[ 3867f55e6a01Smrg if test "$GCC" = yes; then 3868f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3869f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3870c35d236eSmrg 3871f55e6a01Smrg case $host_os in 3872f55e6a01Smrg aix*) 3873f55e6a01Smrg # All AIX code is PIC. 3874f55e6a01Smrg if test "$host_cpu" = ia64; then 3875f55e6a01Smrg # AIX 5 now supports IA64 processor 3876f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3877f55e6a01Smrg fi 3878f55e6a01Smrg ;; 3879c35d236eSmrg 3880f55e6a01Smrg amigaos*) 3881f55e6a01Smrg case $host_cpu in 3882f55e6a01Smrg powerpc) 3883f55e6a01Smrg # see comment about AmigaOS4 .so support 3884f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3885f55e6a01Smrg ;; 3886f55e6a01Smrg m68k) 3887f55e6a01Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3888f55e6a01Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3889f55e6a01Smrg # like `-m68040'. 3890f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3891f55e6a01Smrg ;; 3892f55e6a01Smrg esac 3893f55e6a01Smrg ;; 3894c35d236eSmrg 3895f55e6a01Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3896f55e6a01Smrg # PIC is the default for these OSes. 3897f55e6a01Smrg ;; 3898c35d236eSmrg 3899f55e6a01Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3900f55e6a01Smrg # This hack is so that the source file can tell whether it is being 3901f55e6a01Smrg # built for inclusion in a dll (and should export symbols for example). 3902f55e6a01Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3903f55e6a01Smrg # (--disable-auto-import) libraries 3904f55e6a01Smrg m4_if([$1], [GCJ], [], 3905f55e6a01Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3906f55e6a01Smrg ;; 3907c35d236eSmrg 3908f55e6a01Smrg darwin* | rhapsody*) 3909f55e6a01Smrg # PIC is the default on this platform 3910f55e6a01Smrg # Common symbols not allowed in MH_DYLIB files 3911f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3912f55e6a01Smrg ;; 3913c35d236eSmrg 3914f55e6a01Smrg hpux*) 3915f55e6a01Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3916f55e6a01Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3917f55e6a01Smrg # sets the default TLS model and affects inlining. 3918f55e6a01Smrg case $host_cpu in 3919f55e6a01Smrg hppa*64*) 3920f55e6a01Smrg # +Z the default 3921f55e6a01Smrg ;; 3922f55e6a01Smrg *) 3923f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3924f55e6a01Smrg ;; 3925f55e6a01Smrg esac 3926f55e6a01Smrg ;; 3927c35d236eSmrg 3928f55e6a01Smrg interix[[3-9]]*) 3929f55e6a01Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3930f55e6a01Smrg # Instead, we relocate shared libraries at runtime. 3931f55e6a01Smrg ;; 3932c35d236eSmrg 3933f55e6a01Smrg msdosdjgpp*) 3934f55e6a01Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 3935f55e6a01Smrg # on systems that don't support them. 3936f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3937f55e6a01Smrg enable_shared=no 3938f55e6a01Smrg ;; 3939c35d236eSmrg 3940f55e6a01Smrg *nto* | *qnx*) 3941f55e6a01Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3942f55e6a01Smrg # it will coredump. 3943f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3944f55e6a01Smrg ;; 3945c35d236eSmrg 3946f55e6a01Smrg sysv4*MP*) 3947f55e6a01Smrg if test -d /usr/nec; then 3948f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3949f55e6a01Smrg fi 3950f55e6a01Smrg ;; 3951c35d236eSmrg 3952f55e6a01Smrg *) 3953f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3954f55e6a01Smrg ;; 3955c35d236eSmrg esac 3956f55e6a01Smrg else 3957f55e6a01Smrg # PORTME Check for flag to pass linker flags through the system compiler. 3958f55e6a01Smrg case $host_os in 3959f55e6a01Smrg aix*) 3960f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3961f55e6a01Smrg if test "$host_cpu" = ia64; then 3962f55e6a01Smrg # AIX 5 now supports IA64 processor 3963f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3964f55e6a01Smrg else 3965f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3966f55e6a01Smrg fi 3967f55e6a01Smrg ;; 3968c35d236eSmrg 3969f55e6a01Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3970f55e6a01Smrg # This hack is so that the source file can tell whether it is being 3971f55e6a01Smrg # built for inclusion in a dll (and should export symbols for example). 3972f55e6a01Smrg m4_if([$1], [GCJ], [], 3973f55e6a01Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3974f55e6a01Smrg ;; 3975c35d236eSmrg 3976f55e6a01Smrg hpux9* | hpux10* | hpux11*) 3977f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3978f55e6a01Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 3979f55e6a01Smrg # not for PA HP-UX. 3980f55e6a01Smrg case $host_cpu in 3981f55e6a01Smrg hppa*64*|ia64*) 3982f55e6a01Smrg # +Z the default 3983f55e6a01Smrg ;; 3984f55e6a01Smrg *) 3985f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3986f55e6a01Smrg ;; 3987f55e6a01Smrg esac 3988f55e6a01Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 3989f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3990f55e6a01Smrg ;; 3991c35d236eSmrg 3992f55e6a01Smrg irix5* | irix6* | nonstopux*) 3993f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3994f55e6a01Smrg # PIC (with -KPIC) is the default. 3995f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3996f55e6a01Smrg ;; 39974f6cd06fSmrg 3998f55e6a01Smrg linux* | k*bsd*-gnu) 3999f55e6a01Smrg case $cc_basename in 4000f55e6a01Smrg # old Intel for x86_64 which still supported -KPIC. 4001f55e6a01Smrg ecc*) 4002f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4003f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4004f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4005f55e6a01Smrg ;; 4006f55e6a01Smrg # icc used to be incompatible with GCC. 4007f55e6a01Smrg # ICC 10 doesn't accept -KPIC any more. 4008f55e6a01Smrg icc* | ifort*) 4009f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4010f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4011f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4012f55e6a01Smrg ;; 4013f55e6a01Smrg # Lahey Fortran 8.1. 4014f55e6a01Smrg lf95*) 4015f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4016f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4017f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4018f55e6a01Smrg ;; 4019f55e6a01Smrg pgcc* | pgf77* | pgf90* | pgf95*) 4020f55e6a01Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4021f55e6a01Smrg # which looks to be a dead project) 4022f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4023f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4024f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4025f55e6a01Smrg ;; 4026f55e6a01Smrg ccc*) 4027f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4028f55e6a01Smrg # All Alpha code is PIC. 4029f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4030f55e6a01Smrg ;; 4031f55e6a01Smrg xl*) 4032f55e6a01Smrg # IBM XL C 8.0/Fortran 10.1 on PPC 4033f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4034f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4035f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4036f55e6a01Smrg ;; 4037f55e6a01Smrg *) 4038f55e6a01Smrg case `$CC -V 2>&1 | sed 5q` in 4039f55e6a01Smrg *Sun\ C*) 4040f55e6a01Smrg # Sun C 5.9 4041f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4042f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4043f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4044f55e6a01Smrg ;; 4045f55e6a01Smrg *Sun\ F*) 4046f55e6a01Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4047f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4048f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4049f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4050f55e6a01Smrg ;; 4051f55e6a01Smrg esac 4052f55e6a01Smrg ;; 4053f55e6a01Smrg esac 4054f55e6a01Smrg ;; 4055c35d236eSmrg 4056f55e6a01Smrg newsos6) 4057f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4058f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40594f6cd06fSmrg ;; 40604f6cd06fSmrg 4061f55e6a01Smrg *nto* | *qnx*) 4062f55e6a01Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4063f55e6a01Smrg # it will coredump. 4064f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 40654f6cd06fSmrg ;; 40664f6cd06fSmrg 4067f55e6a01Smrg osf3* | osf4* | osf5*) 4068f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4069f55e6a01Smrg # All OSF/1 code is PIC. 4070f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4071f55e6a01Smrg ;; 4072c35d236eSmrg 4073f55e6a01Smrg rdos*) 4074f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4075f55e6a01Smrg ;; 4076c35d236eSmrg 4077f55e6a01Smrg solaris*) 4078f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4079f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4080f55e6a01Smrg case $cc_basename in 4081f55e6a01Smrg f77* | f90* | f95*) 4082f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4083f55e6a01Smrg *) 4084f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4085f55e6a01Smrg esac 4086f55e6a01Smrg ;; 4087c35d236eSmrg 4088f55e6a01Smrg sunos4*) 4089f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4090f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4091f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4092f55e6a01Smrg ;; 4093c35d236eSmrg 4094f55e6a01Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4095f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4096f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4097f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4098f55e6a01Smrg ;; 4099c35d236eSmrg 4100f55e6a01Smrg sysv4*MP*) 4101f55e6a01Smrg if test -d /usr/nec ;then 4102f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4103f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4104f55e6a01Smrg fi 4105f55e6a01Smrg ;; 4106c35d236eSmrg 4107f55e6a01Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4108f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4109f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4110f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4111f55e6a01Smrg ;; 4112c35d236eSmrg 4113f55e6a01Smrg unicos*) 4114f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4115f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4116f55e6a01Smrg ;; 4117c35d236eSmrg 4118f55e6a01Smrg uts4*) 4119f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4120f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4121f55e6a01Smrg ;; 4122c35d236eSmrg 4123f55e6a01Smrg *) 4124f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4125f55e6a01Smrg ;; 4126f55e6a01Smrg esac 4127c35d236eSmrg fi 4128f55e6a01Smrg]) 4129f55e6a01Smrgcase $host_os in 4130f55e6a01Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4131f55e6a01Smrg *djgpp*) 4132f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4133f55e6a01Smrg ;; 4134f55e6a01Smrg *) 4135f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4136f55e6a01Smrg ;; 4137c35d236eSmrgesac 4138f55e6a01SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4139f55e6a01Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4140f55e6a01Smrg [How to pass a linker flag through the compiler]) 4141c35d236eSmrg 4142f55e6a01Smrg# 4143f55e6a01Smrg# Check to make sure the PIC flag actually works. 4144f55e6a01Smrg# 4145f55e6a01Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4146f55e6a01Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4147f55e6a01Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4148f55e6a01Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4149f55e6a01Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4150f55e6a01Smrg "" | " "*) ;; 4151f55e6a01Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4152f55e6a01Smrg esac], 4153f55e6a01Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4154f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4155f55e6a01Smrgfi 4156f55e6a01Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4157f55e6a01Smrg [Additional compiler flags for building library objects]) 4158c35d236eSmrg 4159f55e6a01Smrg# 4160f55e6a01Smrg# Check to make sure the static flag actually works. 4161f55e6a01Smrg# 4162f55e6a01Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4163f55e6a01Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4164f55e6a01Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4165f55e6a01Smrg $lt_tmp_static_flag, 4166f55e6a01Smrg [], 4167f55e6a01Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4168f55e6a01Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4169f55e6a01Smrg [Compiler flag to prevent dynamic linking]) 4170f55e6a01Smrg])# _LT_COMPILER_PIC 4171c35d236eSmrg 4172c35d236eSmrg 4173f55e6a01Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4174f55e6a01Smrg# ---------------------------- 4175f55e6a01Smrg# See if the linker supports building shared libraries. 4176f55e6a01Smrgm4_defun([_LT_LINKER_SHLIBS], 4177f55e6a01Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4178f55e6a01SmrgAC_REQUIRE([LT_PATH_NM])dnl 4179f55e6a01Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4180f55e6a01Smrgm4_require([_LT_DECL_EGREP])dnl 4181f55e6a01Smrgm4_require([_LT_DECL_SED])dnl 4182f55e6a01Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4183f55e6a01Smrgm4_require([_LT_TAG_COMPILER])dnl 4184f55e6a01SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4185f55e6a01Smrgm4_if([$1], [CXX], [ 4186f55e6a01Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4187f55e6a01Smrg case $host_os in 4188f55e6a01Smrg aix[[4-9]]*) 4189f55e6a01Smrg # If we're using GNU nm, then we don't want the "-C" option. 4190f55e6a01Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4191f55e6a01Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4192f55e6a01Smrg _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' 4193f55e6a01Smrg else 4194f55e6a01Smrg _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' 4195f55e6a01Smrg fi 4196f55e6a01Smrg ;; 4197f55e6a01Smrg pw32*) 4198f55e6a01Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4199f55e6a01Smrg ;; 4200f55e6a01Smrg cygwin* | mingw* | cegcc*) 4201f55e6a01Smrg _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' 4202f55e6a01Smrg ;; 4203f55e6a01Smrg *) 4204f55e6a01Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4205f55e6a01Smrg ;; 4206f55e6a01Smrg esac 4207f55e6a01Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4208f55e6a01Smrg], [ 4209f55e6a01Smrg runpath_var= 4210f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4211f55e6a01Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4212f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)= 4213f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4214f55e6a01Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4215f55e6a01Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4216f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4217f55e6a01Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4218f55e6a01Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4219f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4220f55e6a01Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4221f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4222f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4223f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4224f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4225f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4226f55e6a01Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4227f55e6a01Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4228f55e6a01Smrg _LT_TAGVAR(module_cmds, $1)= 4229f55e6a01Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4230f55e6a01Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4231f55e6a01Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4232f55e6a01Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4233f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4234f55e6a01Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4235f55e6a01Smrg # included in the symbol list 4236f55e6a01Smrg _LT_TAGVAR(include_expsyms, $1)= 4237f55e6a01Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4238f55e6a01Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4239f55e6a01Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4240f55e6a01Smrg # as well as any symbol that contains `d'. 4241f55e6a01Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4242f55e6a01Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4243f55e6a01Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4244f55e6a01Smrg # the symbol is explicitly referenced. Since portable code cannot 4245f55e6a01Smrg # rely on this symbol name, it's probably fine to never include it in 4246f55e6a01Smrg # preloaded symbol tables. 4247f55e6a01Smrg # Exclude shared library initialization/finalization symbols. 4248f55e6a01Smrgdnl Note also adjust exclude_expsyms for C++ above. 4249f55e6a01Smrg extract_expsyms_cmds= 4250c35d236eSmrg 4251f55e6a01Smrg case $host_os in 4252f55e6a01Smrg cygwin* | mingw* | pw32* | cegcc*) 4253f55e6a01Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4254f55e6a01Smrg # When not using gcc, we currently assume that we are using 4255f55e6a01Smrg # Microsoft Visual C++. 4256f55e6a01Smrg if test "$GCC" != yes; then 4257f55e6a01Smrg with_gnu_ld=no 4258f55e6a01Smrg fi 4259f55e6a01Smrg ;; 4260f55e6a01Smrg interix*) 4261f55e6a01Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4262f55e6a01Smrg with_gnu_ld=yes 4263f55e6a01Smrg ;; 4264f55e6a01Smrg openbsd*) 4265f55e6a01Smrg with_gnu_ld=no 4266f55e6a01Smrg ;; 4267f55e6a01Smrg esac 4268c35d236eSmrg 4269f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4270f55e6a01Smrg if test "$with_gnu_ld" = yes; then 4271f55e6a01Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4272f55e6a01Smrg wlarc='${wl}' 4273c35d236eSmrg 4274f55e6a01Smrg # Set some defaults for GNU ld with shared library support. These 4275f55e6a01Smrg # are reset later if shared libraries are not supported. Putting them 4276f55e6a01Smrg # here allows them to be overridden if necessary. 4277f55e6a01Smrg runpath_var=LD_RUN_PATH 4278f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4279f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4280f55e6a01Smrg # ancient GNU ld didn't support --whole-archive et. al. 4281f55e6a01Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4282f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4283f55e6a01Smrg else 4284f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4285f55e6a01Smrg fi 4286f55e6a01Smrg supports_anon_versioning=no 4287f55e6a01Smrg case `$LD -v 2>&1` in 4288f55e6a01Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4289f55e6a01Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4290f55e6a01Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4291f55e6a01Smrg *\ 2.11.*) ;; # other 2.11 versions 4292f55e6a01Smrg *) supports_anon_versioning=yes ;; 4293f55e6a01Smrg esac 4294c35d236eSmrg 4295f55e6a01Smrg # See if GNU ld supports shared libraries. 4296f55e6a01Smrg case $host_os in 4297f55e6a01Smrg aix[[3-9]]*) 4298f55e6a01Smrg # On AIX/PPC, the GNU linker is very broken 4299f55e6a01Smrg if test "$host_cpu" != ia64; then 4300f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4301f55e6a01Smrg cat <<_LT_EOF 1>&2 4302c35d236eSmrg 4303f55e6a01Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 4304f55e6a01Smrg*** to be unable to reliably create shared libraries on AIX. 4305f55e6a01Smrg*** Therefore, libtool is disabling shared libraries support. If you 4306f55e6a01Smrg*** really care for shared libraries, you may want to modify your PATH 4307f55e6a01Smrg*** so that a non-GNU linker is found, and then restart. 4308c35d236eSmrg 4309f55e6a01Smrg_LT_EOF 4310f55e6a01Smrg fi 4311f55e6a01Smrg ;; 4312c35d236eSmrg 4313f55e6a01Smrg amigaos*) 4314f55e6a01Smrg case $host_cpu in 4315f55e6a01Smrg powerpc) 4316f55e6a01Smrg # see comment about AmigaOS4 .so support 4317f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4318f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4319f55e6a01Smrg ;; 4320f55e6a01Smrg m68k) 4321f55e6a01Smrg _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)' 4322f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4323f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4324f55e6a01Smrg ;; 4325f55e6a01Smrg esac 4326f55e6a01Smrg ;; 4327c35d236eSmrg 4328f55e6a01Smrg beos*) 4329f55e6a01Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4330f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4331f55e6a01Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4332f55e6a01Smrg # support --undefined. This deserves some investigation. FIXME 4333f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4334f55e6a01Smrg else 4335f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4336f55e6a01Smrg fi 4337f55e6a01Smrg ;; 4338c35d236eSmrg 4339f55e6a01Smrg cygwin* | mingw* | pw32* | cegcc*) 4340f55e6a01Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4341f55e6a01Smrg # as there is no search path for DLLs. 4342f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4343f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4344f55e6a01Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4345f55e6a01Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4346f55e6a01Smrg _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' 4347f55e6a01Smrg 4348f55e6a01Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4349f55e6a01Smrg _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' 4350f55e6a01Smrg # If the export-symbols file already is a .def file (1st line 4351f55e6a01Smrg # is EXPORTS), use it as is; otherwise, prepend... 4352f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4353f55e6a01Smrg cp $export_symbols $output_objdir/$soname.def; 4354f55e6a01Smrg else 4355f55e6a01Smrg echo EXPORTS > $output_objdir/$soname.def; 4356f55e6a01Smrg cat $export_symbols >> $output_objdir/$soname.def; 4357f55e6a01Smrg fi~ 4358f55e6a01Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4359f55e6a01Smrg else 4360f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4361f55e6a01Smrg fi 4362f55e6a01Smrg ;; 4363c35d236eSmrg 4364f55e6a01Smrg interix[[3-9]]*) 4365f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4366f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4367f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4368f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4369f55e6a01Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4370f55e6a01Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4371f55e6a01Smrg # default) and relocated if they conflict, which is a slow very memory 4372f55e6a01Smrg # consuming and fragmenting process. To avoid this, we pick a random, 4373f55e6a01Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4374f55e6a01Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4375f55e6a01Smrg _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' 4376f55e6a01Smrg _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' 4377f55e6a01Smrg ;; 4378c35d236eSmrg 4379f55e6a01Smrg gnu* | linux* | tpf* | k*bsd*-gnu) 4380f55e6a01Smrg tmp_diet=no 4381f55e6a01Smrg if test "$host_os" = linux-dietlibc; then 4382f55e6a01Smrg case $cc_basename in 4383f55e6a01Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4384f55e6a01Smrg esac 4385f55e6a01Smrg fi 4386f55e6a01Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4387f55e6a01Smrg && test "$tmp_diet" = no 4388f55e6a01Smrg then 4389f55e6a01Smrg tmp_addflag= 4390f55e6a01Smrg tmp_sharedflag='-shared' 4391f55e6a01Smrg case $cc_basename,$host_cpu in 4392f55e6a01Smrg pgcc*) # Portland Group C compiler 4393f55e6a01Smrg _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' 4394f55e6a01Smrg tmp_addflag=' $pic_flag' 4395f55e6a01Smrg ;; 4396f55e6a01Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 4397f55e6a01Smrg _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' 4398f55e6a01Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 4399f55e6a01Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4400f55e6a01Smrg tmp_addflag=' -i_dynamic' ;; 4401f55e6a01Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4402f55e6a01Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4403f55e6a01Smrg ifc* | ifort*) # Intel Fortran compiler 4404f55e6a01Smrg tmp_addflag=' -nofor_main' ;; 4405f55e6a01Smrg lf95*) # Lahey Fortran 8.1 4406f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4407f55e6a01Smrg tmp_sharedflag='--shared' ;; 4408f55e6a01Smrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4409f55e6a01Smrg tmp_sharedflag='-qmkshrobj' 4410f55e6a01Smrg tmp_addflag= ;; 4411f55e6a01Smrg esac 4412f55e6a01Smrg case `$CC -V 2>&1 | sed 5q` in 4413f55e6a01Smrg *Sun\ C*) # Sun C 5.9 4414f55e6a01Smrg _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' 4415f55e6a01Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4416f55e6a01Smrg tmp_sharedflag='-G' ;; 4417f55e6a01Smrg *Sun\ F*) # Sun Fortran 8.3 4418f55e6a01Smrg tmp_sharedflag='-G' ;; 4419f55e6a01Smrg esac 4420f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4421c35d236eSmrg 4422f55e6a01Smrg if test "x$supports_anon_versioning" = xyes; then 4423f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4424f55e6a01Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4425f55e6a01Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4426f55e6a01Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4427f55e6a01Smrg fi 4428c35d236eSmrg 4429f55e6a01Smrg case $cc_basename in 4430f55e6a01Smrg xlf*) 4431f55e6a01Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4432f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4433f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4434f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4435f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 4436f55e6a01Smrg if test "x$supports_anon_versioning" = xyes; then 4437f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4438f55e6a01Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4439f55e6a01Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4440f55e6a01Smrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4441f55e6a01Smrg fi 4442f55e6a01Smrg ;; 4443f55e6a01Smrg esac 4444f55e6a01Smrg else 4445f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4446f55e6a01Smrg fi 4447f55e6a01Smrg ;; 4448c35d236eSmrg 4449f55e6a01Smrg netbsd*) 4450f55e6a01Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4451f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4452f55e6a01Smrg wlarc= 4453f55e6a01Smrg else 4454f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4455f55e6a01Smrg _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' 4456f55e6a01Smrg fi 4457f55e6a01Smrg ;; 4458c35d236eSmrg 4459f55e6a01Smrg solaris*) 4460f55e6a01Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4461f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4462f55e6a01Smrg cat <<_LT_EOF 1>&2 4463c35d236eSmrg 4464f55e6a01Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4465f55e6a01Smrg*** create shared libraries on Solaris systems. Therefore, libtool 4466f55e6a01Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4467f55e6a01Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 4468f55e6a01Smrg*** your PATH or compiler configuration so that the native linker is 4469f55e6a01Smrg*** used, and then restart. 4470c35d236eSmrg 4471f55e6a01Smrg_LT_EOF 4472f55e6a01Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4473f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4474f55e6a01Smrg _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' 4475f55e6a01Smrg else 4476f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4477f55e6a01Smrg fi 4478f55e6a01Smrg ;; 4479c35d236eSmrg 4480f55e6a01Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4481f55e6a01Smrg case `$LD -v 2>&1` in 4482f55e6a01Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4483f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4484f55e6a01Smrg cat <<_LT_EOF 1>&2 4485c35d236eSmrg 4486f55e6a01Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4487f55e6a01Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4488f55e6a01Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4489f55e6a01Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4490f55e6a01Smrg*** your PATH or compiler configuration so that the native linker is 4491f55e6a01Smrg*** used, and then restart. 4492c35d236eSmrg 4493f55e6a01Smrg_LT_EOF 4494f55e6a01Smrg ;; 4495f55e6a01Smrg *) 4496f55e6a01Smrg # For security reasons, it is highly recommended that you always 4497f55e6a01Smrg # use absolute paths for naming shared libraries, and exclude the 4498f55e6a01Smrg # DT_RUNPATH tag from executables and libraries. But doing so 4499f55e6a01Smrg # requires that you compile everything twice, which is a pain. 4500f55e6a01Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4501f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4502f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4503f55e6a01Smrg _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' 4504f55e6a01Smrg else 4505f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4506f55e6a01Smrg fi 4507f55e6a01Smrg ;; 4508f55e6a01Smrg esac 4509f55e6a01Smrg ;; 4510c35d236eSmrg 4511f55e6a01Smrg sunos4*) 4512f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4513f55e6a01Smrg wlarc= 4514f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4515f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4516c35d236eSmrg ;; 4517f55e6a01Smrg 4518c35d236eSmrg *) 4519f55e6a01Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4520f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4521f55e6a01Smrg _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' 4522f55e6a01Smrg else 4523f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4524f55e6a01Smrg fi 4525c35d236eSmrg ;; 4526c35d236eSmrg esac 4527c35d236eSmrg 4528f55e6a01Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4529f55e6a01Smrg runpath_var= 4530f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4531f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4532f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4533f55e6a01Smrg fi 4534f55e6a01Smrg else 4535f55e6a01Smrg # PORTME fill in a description of your system's linker (not GNU ld) 4536f55e6a01Smrg case $host_os in 4537f55e6a01Smrg aix3*) 4538f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4539f55e6a01Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4540f55e6a01Smrg _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' 4541f55e6a01Smrg # Note: this linker hardcodes the directories in LIBPATH if there 4542f55e6a01Smrg # are no directories specified by -L. 4543f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4544f55e6a01Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4545f55e6a01Smrg # Neither direct hardcoding nor static linking is supported with a 4546f55e6a01Smrg # broken collect2. 4547f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4548f55e6a01Smrg fi 4549f55e6a01Smrg ;; 4550c35d236eSmrg 4551f55e6a01Smrg aix[[4-9]]*) 4552f55e6a01Smrg if test "$host_cpu" = ia64; then 4553f55e6a01Smrg # On IA64, the linker does run time linking by default, so we don't 4554f55e6a01Smrg # have to do anything special. 4555f55e6a01Smrg aix_use_runtimelinking=no 4556f55e6a01Smrg exp_sym_flag='-Bexport' 4557f55e6a01Smrg no_entry_flag="" 4558f55e6a01Smrg else 4559f55e6a01Smrg # If we're using GNU nm, then we don't want the "-C" option. 4560f55e6a01Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4561f55e6a01Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4562f55e6a01Smrg _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' 4563f55e6a01Smrg else 4564f55e6a01Smrg _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' 4565f55e6a01Smrg fi 4566f55e6a01Smrg aix_use_runtimelinking=no 4567c35d236eSmrg 4568f55e6a01Smrg # Test if we are trying to use run time linking or normal 4569f55e6a01Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4570f55e6a01Smrg # need to do runtime linking. 4571f55e6a01Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4572f55e6a01Smrg for ld_flag in $LDFLAGS; do 4573f55e6a01Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4574f55e6a01Smrg aix_use_runtimelinking=yes 4575f55e6a01Smrg break 4576f55e6a01Smrg fi 4577f55e6a01Smrg done 4578f55e6a01Smrg ;; 4579f55e6a01Smrg esac 4580c35d236eSmrg 4581f55e6a01Smrg exp_sym_flag='-bexport' 4582f55e6a01Smrg no_entry_flag='-bnoentry' 4583f55e6a01Smrg fi 4584c35d236eSmrg 4585f55e6a01Smrg # When large executables or shared objects are built, AIX ld can 4586f55e6a01Smrg # have problems creating the table of contents. If linking a library 4587f55e6a01Smrg # or program results in "error TOC overflow" add -mminimal-toc to 4588f55e6a01Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4589f55e6a01Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4590c35d236eSmrg 4591f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='' 4592f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4593f55e6a01Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4594f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4595f55e6a01Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4596f55e6a01Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4597c35d236eSmrg 4598f55e6a01Smrg if test "$GCC" = yes; then 4599f55e6a01Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4600f55e6a01Smrg # We only want to do this on AIX 4.2 and lower, the check 4601f55e6a01Smrg # below for broken collect2 doesn't work under 4.3+ 4602f55e6a01Smrg collect2name=`${CC} -print-prog-name=collect2` 4603f55e6a01Smrg if test -f "$collect2name" && 4604f55e6a01Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4605f55e6a01Smrg then 4606f55e6a01Smrg # We have reworked collect2 4607f55e6a01Smrg : 4608f55e6a01Smrg else 4609f55e6a01Smrg # We have old collect2 4610f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4611f55e6a01Smrg # It fails to find uninstalled libraries when the uninstalled 4612f55e6a01Smrg # path is not listed in the libpath. Setting hardcode_minus_L 4613f55e6a01Smrg # to unsupported forces relinking 4614f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4615f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4616f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4617f55e6a01Smrg fi 4618f55e6a01Smrg ;; 4619f55e6a01Smrg esac 4620f55e6a01Smrg shared_flag='-shared' 4621f55e6a01Smrg if test "$aix_use_runtimelinking" = yes; then 4622f55e6a01Smrg shared_flag="$shared_flag "'${wl}-G' 4623f55e6a01Smrg fi 4624f55e6a01Smrg else 4625f55e6a01Smrg # not using gcc 4626f55e6a01Smrg if test "$host_cpu" = ia64; then 4627f55e6a01Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4628f55e6a01Smrg # chokes on -Wl,-G. The following line is correct: 4629f55e6a01Smrg shared_flag='-G' 4630f55e6a01Smrg else 4631f55e6a01Smrg if test "$aix_use_runtimelinking" = yes; then 4632f55e6a01Smrg shared_flag='${wl}-G' 4633f55e6a01Smrg else 4634f55e6a01Smrg shared_flag='${wl}-bM:SRE' 4635f55e6a01Smrg fi 4636f55e6a01Smrg fi 4637f55e6a01Smrg fi 4638c35d236eSmrg 4639f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4640f55e6a01Smrg # It seems that -bexpall does not export symbols beginning with 4641f55e6a01Smrg # underscore (_), so it is better to generate a list of symbols to export. 4642f55e6a01Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4643f55e6a01Smrg if test "$aix_use_runtimelinking" = yes; then 4644f55e6a01Smrg # Warning - without using the other runtime loading flags (-brtl), 4645f55e6a01Smrg # -berok will link without error, but may produce a broken library. 4646f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 4647f55e6a01Smrg # Determine the default libpath from the value encoded in an 4648f55e6a01Smrg # empty executable. 4649f55e6a01Smrg _LT_SYS_MODULE_PATH_AIX 4650f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4651f55e6a01Smrg _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" 4652f55e6a01Smrg else 4653f55e6a01Smrg if test "$host_cpu" = ia64; then 4654f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4655f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4656f55e6a01Smrg _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" 4657f55e6a01Smrg else 4658f55e6a01Smrg # Determine the default libpath from the value encoded in an 4659f55e6a01Smrg # empty executable. 4660f55e6a01Smrg _LT_SYS_MODULE_PATH_AIX 4661f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4662f55e6a01Smrg # Warning - without using the other run time loading flags, 4663f55e6a01Smrg # -berok will link without error, but may produce a broken library. 4664f55e6a01Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4665f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 4666f55e6a01Smrg # Exported symbols can be pulled into shared objects from archives 4667f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 4668f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 4669f55e6a01Smrg # This is similar to how AIX traditionally builds its shared libraries. 4670f55e6a01Smrg _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' 4671f55e6a01Smrg fi 4672f55e6a01Smrg fi 4673f55e6a01Smrg ;; 4674c35d236eSmrg 4675f55e6a01Smrg amigaos*) 4676f55e6a01Smrg case $host_cpu in 4677f55e6a01Smrg powerpc) 4678f55e6a01Smrg # see comment about AmigaOS4 .so support 4679f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4680f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4681f55e6a01Smrg ;; 4682f55e6a01Smrg m68k) 4683f55e6a01Smrg _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)' 4684f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4685f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4686f55e6a01Smrg ;; 4687f55e6a01Smrg esac 4688f55e6a01Smrg ;; 4689c35d236eSmrg 4690f55e6a01Smrg bsdi[[45]]*) 4691f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 4692f55e6a01Smrg ;; 4693c35d236eSmrg 4694f55e6a01Smrg cygwin* | mingw* | pw32* | cegcc*) 4695f55e6a01Smrg # When not using gcc, we currently assume that we are using 4696f55e6a01Smrg # Microsoft Visual C++. 4697f55e6a01Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 4698f55e6a01Smrg # no search path for DLLs. 4699f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 4700f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4701f55e6a01Smrg # Tell ltmain to make .lib files, not .a files. 4702f55e6a01Smrg libext=lib 4703f55e6a01Smrg # Tell ltmain to make .dll files, not .so files. 4704f55e6a01Smrg shrext_cmds=".dll" 4705f55e6a01Smrg # FIXME: Setting linknames here is a bad hack. 4706f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 4707f55e6a01Smrg # The linker will automatically build a .lib file if we build a DLL. 4708f55e6a01Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 4709f55e6a01Smrg # FIXME: Should let the user specify the lib program. 4710f55e6a01Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 4711f55e6a01Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 4712f55e6a01Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4713f55e6a01Smrg ;; 4714c35d236eSmrg 4715f55e6a01Smrg darwin* | rhapsody*) 4716f55e6a01Smrg _LT_DARWIN_LINKER_FEATURES($1) 4717f55e6a01Smrg ;; 4718c35d236eSmrg 4719f55e6a01Smrg dgux*) 4720f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4721f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4722f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4723f55e6a01Smrg ;; 4724c35d236eSmrg 4725f55e6a01Smrg freebsd1*) 4726f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4727f55e6a01Smrg ;; 4728c35d236eSmrg 4729f55e6a01Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 4730f55e6a01Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 4731f55e6a01Smrg # does not break anything, and helps significantly (at the cost of a little 4732f55e6a01Smrg # extra space). 4733f55e6a01Smrg freebsd2.2*) 4734f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 4735f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4736f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4737f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4738f55e6a01Smrg ;; 4739c35d236eSmrg 4740f55e6a01Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 4741f55e6a01Smrg freebsd2*) 4742f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4743f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4744f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4745f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4746f55e6a01Smrg ;; 4747c35d236eSmrg 4748f55e6a01Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 4749f55e6a01Smrg freebsd* | dragonfly*) 4750f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 4751f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4752f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4753f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4754f55e6a01Smrg ;; 4755c35d236eSmrg 4756f55e6a01Smrg hpux9*) 4757f55e6a01Smrg if test "$GCC" = yes; then 4758f55e6a01Smrg _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' 4759f55e6a01Smrg else 4760f55e6a01Smrg _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' 4761f55e6a01Smrg fi 4762f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4763f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4764f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4765c35d236eSmrg 4766f55e6a01Smrg # hardcode_minus_L: Not really in the search PATH, 4767f55e6a01Smrg # but as the default location of the library. 4768f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4769f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4770f55e6a01Smrg ;; 4771c35d236eSmrg 4772f55e6a01Smrg hpux10*) 4773f55e6a01Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4774f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4775f55e6a01Smrg else 4776f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 4777f55e6a01Smrg fi 4778f55e6a01Smrg if test "$with_gnu_ld" = no; then 4779f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4780f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4781f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4782f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4783f55e6a01Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4784f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4785f55e6a01Smrg # hardcode_minus_L: Not really in the search PATH, 4786f55e6a01Smrg # but as the default location of the library. 4787f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4788f55e6a01Smrg fi 4789f55e6a01Smrg ;; 4790c35d236eSmrg 4791f55e6a01Smrg hpux11*) 4792f55e6a01Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4793f55e6a01Smrg case $host_cpu in 4794f55e6a01Smrg hppa*64*) 4795f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4796f55e6a01Smrg ;; 4797f55e6a01Smrg ia64*) 4798f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4799f55e6a01Smrg ;; 4800f55e6a01Smrg *) 4801f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4802f55e6a01Smrg ;; 4803f55e6a01Smrg esac 4804f55e6a01Smrg else 4805f55e6a01Smrg case $host_cpu in 4806f55e6a01Smrg hppa*64*) 4807f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4808f55e6a01Smrg ;; 4809f55e6a01Smrg ia64*) 4810f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4811f55e6a01Smrg ;; 4812f55e6a01Smrg *) 4813f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4814f55e6a01Smrg ;; 4815f55e6a01Smrg esac 4816f55e6a01Smrg fi 4817f55e6a01Smrg if test "$with_gnu_ld" = no; then 4818f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4819f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4820c35d236eSmrg 4821f55e6a01Smrg case $host_cpu in 4822f55e6a01Smrg hppa*64*|ia64*) 4823f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4824f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4825f55e6a01Smrg ;; 4826f55e6a01Smrg *) 4827f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4828f55e6a01Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4829f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4830c35d236eSmrg 4831f55e6a01Smrg # hardcode_minus_L: Not really in the search PATH, 4832f55e6a01Smrg # but as the default location of the library. 4833f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4834f55e6a01Smrg ;; 4835f55e6a01Smrg esac 4836f55e6a01Smrg fi 4837f55e6a01Smrg ;; 4838c35d236eSmrg 4839f55e6a01Smrg irix5* | irix6* | nonstopux*) 4840f55e6a01Smrg if test "$GCC" = yes; then 4841f55e6a01Smrg _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' 4842f55e6a01Smrg # Try to use the -exported_symbol ld option, if it does not 4843f55e6a01Smrg # work, assume that -exports_file does not work either and 4844f55e6a01Smrg # implicitly export all symbols. 4845f55e6a01Smrg save_LDFLAGS="$LDFLAGS" 4846f55e6a01Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 4847f55e6a01Smrg AC_LINK_IFELSE(int foo(void) {}, 4848f55e6a01Smrg _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' 4849f55e6a01Smrg ) 4850f55e6a01Smrg LDFLAGS="$save_LDFLAGS" 4851f55e6a01Smrg else 4852f55e6a01Smrg _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' 4853f55e6a01Smrg _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' 4854f55e6a01Smrg fi 4855f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4856f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4857f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4858f55e6a01Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 4859f55e6a01Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4860f55e6a01Smrg ;; 4861c35d236eSmrg 4862f55e6a01Smrg netbsd*) 4863f55e6a01Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4864f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 4865f55e6a01Smrg else 4866f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 4867f55e6a01Smrg fi 4868f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4869f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4870f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4871f55e6a01Smrg ;; 4872c35d236eSmrg 4873f55e6a01Smrg newsos6) 4874f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4875f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4876f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4877f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4878f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4879f55e6a01Smrg ;; 4880c35d236eSmrg 4881f55e6a01Smrg *nto* | *qnx*) 4882f55e6a01Smrg ;; 4883c35d236eSmrg 4884f55e6a01Smrg openbsd*) 4885f55e6a01Smrg if test -f /usr/libexec/ld.so; then 4886f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4887f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4888f55e6a01Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4889f55e6a01Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4890f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4891f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 4892f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4893f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4894f55e6a01Smrg else 4895f55e6a01Smrg case $host_os in 4896f55e6a01Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 4897f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4898f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4899f55e6a01Smrg ;; 4900f55e6a01Smrg *) 4901f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4902f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4903f55e6a01Smrg ;; 4904f55e6a01Smrg esac 4905f55e6a01Smrg fi 4906f55e6a01Smrg else 4907f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4908f55e6a01Smrg fi 4909f55e6a01Smrg ;; 4910c35d236eSmrg 4911f55e6a01Smrg os2*) 4912f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4913f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4914f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4915f55e6a01Smrg _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' 4916f55e6a01Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 4917f55e6a01Smrg ;; 4918c35d236eSmrg 4919f55e6a01Smrg osf3*) 4920f55e6a01Smrg if test "$GCC" = yes; then 4921f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4922f55e6a01Smrg _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' 4923f55e6a01Smrg else 4924f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4925f55e6a01Smrg _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' 4926f55e6a01Smrg fi 4927f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4928f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4929f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4930f55e6a01Smrg ;; 4931c35d236eSmrg 4932f55e6a01Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 4933f55e6a01Smrg if test "$GCC" = yes; then 4934f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4935f55e6a01Smrg _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' 4936f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4937f55e6a01Smrg else 4938f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4939f55e6a01Smrg _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' 4940f55e6a01Smrg _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~ 4941f55e6a01Smrg $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' 4942c35d236eSmrg 4943f55e6a01Smrg # Both c and cxx compiler support -rpath directly 4944f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4945f55e6a01Smrg fi 4946f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4947f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4948f55e6a01Smrg ;; 4949c35d236eSmrg 4950f55e6a01Smrg solaris*) 4951f55e6a01Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 4952f55e6a01Smrg if test "$GCC" = yes; then 4953f55e6a01Smrg wlarc='${wl}' 4954f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4955f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4956f55e6a01Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4957f55e6a01Smrg else 4958f55e6a01Smrg case `$CC -V 2>&1` in 4959f55e6a01Smrg *"Compilers 5.0"*) 4960f55e6a01Smrg wlarc='' 4961f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 4962f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4963f55e6a01Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 4964f55e6a01Smrg ;; 4965f55e6a01Smrg *) 4966f55e6a01Smrg wlarc='${wl}' 4967f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 4968f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4969f55e6a01Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4970f55e6a01Smrg ;; 4971f55e6a01Smrg esac 4972f55e6a01Smrg fi 4973f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4974f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4975f55e6a01Smrg case $host_os in 4976f55e6a01Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 4977f55e6a01Smrg *) 4978f55e6a01Smrg # The compiler driver will combine and reorder linker options, 4979f55e6a01Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 4980f55e6a01Smrg # but is careful enough not to reorder. 4981f55e6a01Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 4982f55e6a01Smrg if test "$GCC" = yes; then 4983f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 4984f55e6a01Smrg else 4985f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 4986f55e6a01Smrg fi 4987f55e6a01Smrg ;; 4988f55e6a01Smrg esac 4989f55e6a01Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4990f55e6a01Smrg ;; 4991c35d236eSmrg 4992f55e6a01Smrg sunos4*) 4993f55e6a01Smrg if test "x$host_vendor" = xsequent; then 4994f55e6a01Smrg # Use $CC to link under sequent, because it throws in some extra .o 4995f55e6a01Smrg # files that make .init and .fini sections work. 4996f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 4997f55e6a01Smrg else 4998f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 4999f55e6a01Smrg fi 5000f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5001f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5002f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5003f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5004f55e6a01Smrg ;; 5005c35d236eSmrg 5006f55e6a01Smrg sysv4) 5007f55e6a01Smrg case $host_vendor in 5008f55e6a01Smrg sni) 5009f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5010f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5011f55e6a01Smrg ;; 5012f55e6a01Smrg siemens) 5013f55e6a01Smrg ## LD is ld it makes a PLAMLIB 5014f55e6a01Smrg ## CC just makes a GrossModule. 5015f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5016f55e6a01Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5017f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5018f55e6a01Smrg ;; 5019f55e6a01Smrg motorola) 5020f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5021f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5022f55e6a01Smrg ;; 5023f55e6a01Smrg esac 5024f55e6a01Smrg runpath_var='LD_RUN_PATH' 5025f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5026f55e6a01Smrg ;; 5027c35d236eSmrg 5028f55e6a01Smrg sysv4.3*) 5029f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5030f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5031f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5032f55e6a01Smrg ;; 5033c35d236eSmrg 5034f55e6a01Smrg sysv4*MP*) 5035f55e6a01Smrg if test -d /usr/nec; then 5036f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5037f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5038f55e6a01Smrg runpath_var=LD_RUN_PATH 5039f55e6a01Smrg hardcode_runpath_var=yes 5040f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5041f55e6a01Smrg fi 5042f55e6a01Smrg ;; 5043c35d236eSmrg 5044f55e6a01Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5045f55e6a01Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5046f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5047f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5048f55e6a01Smrg runpath_var='LD_RUN_PATH' 5049c35d236eSmrg 5050f55e6a01Smrg if test "$GCC" = yes; then 5051f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5052f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5053f55e6a01Smrg else 5054f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5055f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5056f55e6a01Smrg fi 5057f55e6a01Smrg ;; 5058c35d236eSmrg 5059f55e6a01Smrg sysv5* | sco3.2v5* | sco5v6*) 5060f55e6a01Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5061f55e6a01Smrg # link with -lc, and that would cause any symbols used from libc to 5062f55e6a01Smrg # always be unresolved, which means just about no library would 5063f55e6a01Smrg # ever link correctly. If we're not using GNU ld we use -z text 5064f55e6a01Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5065f55e6a01Smrg # as -z defs. 5066f55e6a01Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5067f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5068f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5069f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5070f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5071f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5072f55e6a01Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5073f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5074f55e6a01Smrg runpath_var='LD_RUN_PATH' 5075c35d236eSmrg 5076f55e6a01Smrg if test "$GCC" = yes; then 5077f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5078f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5079f55e6a01Smrg else 5080f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5081f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5082f55e6a01Smrg fi 5083f55e6a01Smrg ;; 5084c35d236eSmrg 5085f55e6a01Smrg uts4*) 5086f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5087f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5088f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5089f55e6a01Smrg ;; 5090c35d236eSmrg 5091f55e6a01Smrg *) 5092f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5093f55e6a01Smrg ;; 5094f55e6a01Smrg esac 5095c35d236eSmrg 5096f55e6a01Smrg if test x$host_vendor = xsni; then 5097f55e6a01Smrg case $host in 5098f55e6a01Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5099f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5100f55e6a01Smrg ;; 5101f55e6a01Smrg esac 5102f55e6a01Smrg fi 5103f55e6a01Smrg fi 5104f55e6a01Smrg]) 5105f55e6a01SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5106f55e6a01Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5107c35d236eSmrg 5108f55e6a01Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5109c35d236eSmrg 5110f55e6a01Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5111f55e6a01Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5112f55e6a01Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 5113f55e6a01Smrg [The commands to extract the exported symbol list from a shared archive]) 5114c35d236eSmrg 5115f55e6a01Smrg# 5116f55e6a01Smrg# Do we need to explicitly link libc? 5117f55e6a01Smrg# 5118f55e6a01Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5119f55e6a01Smrgx|xyes) 5120f55e6a01Smrg # Assume -lc should be added 5121f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5122c35d236eSmrg 5123f55e6a01Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5124f55e6a01Smrg case $_LT_TAGVAR(archive_cmds, $1) in 5125f55e6a01Smrg *'~'*) 5126f55e6a01Smrg # FIXME: we may have to deal with multi-command sequences. 5127f55e6a01Smrg ;; 5128f55e6a01Smrg '$CC '*) 5129f55e6a01Smrg # Test whether the compiler implicitly links with -lc since on some 5130f55e6a01Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5131f55e6a01Smrg # to ld, don't add -lc before -lgcc. 5132f55e6a01Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 5133f55e6a01Smrg $RM conftest* 5134f55e6a01Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5135c35d236eSmrg 5136f55e6a01Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5137f55e6a01Smrg soname=conftest 5138f55e6a01Smrg lib=conftest 5139f55e6a01Smrg libobjs=conftest.$ac_objext 5140f55e6a01Smrg deplibs= 5141f55e6a01Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5142f55e6a01Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5143f55e6a01Smrg compiler_flags=-v 5144f55e6a01Smrg linker_flags=-v 5145f55e6a01Smrg verstring= 5146f55e6a01Smrg output_objdir=. 5147f55e6a01Smrg libname=conftest 5148f55e6a01Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5149f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5150f55e6a01Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5151f55e6a01Smrg then 5152f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5153f55e6a01Smrg else 5154f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5155f55e6a01Smrg fi 5156f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5157f55e6a01Smrg else 5158f55e6a01Smrg cat conftest.err 1>&5 5159f55e6a01Smrg fi 5160f55e6a01Smrg $RM conftest* 5161f55e6a01Smrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 5162f55e6a01Smrg ;; 5163f55e6a01Smrg esac 5164f55e6a01Smrg fi 5165f55e6a01Smrg ;; 5166f55e6a01Smrgesac 5167c35d236eSmrg 5168f55e6a01Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5169f55e6a01Smrg [Whether or not to add -lc for building shared libraries]) 5170f55e6a01Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5171f55e6a01Smrg [enable_shared_with_static_runtimes], [0], 5172f55e6a01Smrg [Whether or not to disallow shared libs when runtime libs are static]) 5173f55e6a01Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5174f55e6a01Smrg [Compiler flag to allow reflexive dlopens]) 5175f55e6a01Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5176f55e6a01Smrg [Compiler flag to generate shared objects directly from archives]) 5177f55e6a01Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 5178f55e6a01Smrg [Whether the compiler copes with passing no objects directly]) 5179f55e6a01Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5180f55e6a01Smrg [Create an old-style archive from a shared archive]) 5181f55e6a01Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5182f55e6a01Smrg [Create a temporary old-style archive to link instead of a shared archive]) 5183f55e6a01Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5184f55e6a01Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5185f55e6a01Smrg_LT_TAGDECL([], [module_cmds], [2], 5186f55e6a01Smrg [Commands used to build a loadable module if different from building 5187f55e6a01Smrg a shared archive.]) 5188f55e6a01Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5189f55e6a01Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 5190f55e6a01Smrg [Whether we are building with GNU ld or not]) 5191f55e6a01Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5192f55e6a01Smrg [Flag that allows shared libraries with undefined symbols to be built]) 5193f55e6a01Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 5194f55e6a01Smrg [Flag that enforces no undefined symbols]) 5195f55e6a01Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5196f55e6a01Smrg [Flag to hardcode $libdir into a binary during linking. 5197f55e6a01Smrg This must work even if $libdir does not exist]) 5198f55e6a01Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5199f55e6a01Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5200f55e6a01Smrg during linking. This must work even if $libdir does not exist]]) 5201f55e6a01Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5202f55e6a01Smrg [Whether we need a single "-rpath" flag with a separated argument]) 5203f55e6a01Smrg_LT_TAGDECL([], [hardcode_direct], [0], 5204f55e6a01Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5205f55e6a01Smrg DIR into the resulting binary]) 5206f55e6a01Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5207f55e6a01Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5208f55e6a01Smrg DIR into the resulting binary and the resulting library dependency is 5209f55e6a01Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5210f55e6a01Smrg library is relocated]) 5211f55e6a01Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5212f55e6a01Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5213f55e6a01Smrg into the resulting binary]) 5214f55e6a01Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5215f55e6a01Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5216f55e6a01Smrg into the resulting binary]) 5217f55e6a01Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 5218f55e6a01Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 5219f55e6a01Smrg into the library and all subsequent libraries and executables linked 5220f55e6a01Smrg against it]) 5221f55e6a01Smrg_LT_TAGDECL([], [inherit_rpath], [0], 5222f55e6a01Smrg [Set to yes if linker adds runtime paths of dependent libraries 5223f55e6a01Smrg to runtime path list]) 5224f55e6a01Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 5225f55e6a01Smrg [Whether libtool must link a program against all its dependency libraries]) 5226f55e6a01Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 5227f55e6a01Smrg [Fix the shell variable $srcfile for the compiler]) 5228f55e6a01Smrg_LT_TAGDECL([], [always_export_symbols], [0], 5229f55e6a01Smrg [Set to "yes" if exported symbols are required]) 5230f55e6a01Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5231f55e6a01Smrg [The commands to list exported symbols]) 5232f55e6a01Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 5233f55e6a01Smrg [Symbols that should not be listed in the preloaded symbols]) 5234f55e6a01Smrg_LT_TAGDECL([], [include_expsyms], [1], 5235f55e6a01Smrg [Symbols that must always be exported]) 5236f55e6a01Smrg_LT_TAGDECL([], [prelink_cmds], [2], 5237f55e6a01Smrg [Commands necessary for linking programs (against libraries) with templates]) 5238f55e6a01Smrg_LT_TAGDECL([], [file_list_spec], [1], 5239f55e6a01Smrg [Specify filename containing input files]) 5240f55e6a01Smrgdnl FIXME: Not yet implemented 5241f55e6a01Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5242f55e6a01Smrgdnl [Compiler flag to generate thread safe objects]) 5243f55e6a01Smrg])# _LT_LINKER_SHLIBS 5244f55e6a01Smrg 5245f55e6a01Smrg 5246f55e6a01Smrg# _LT_LANG_C_CONFIG([TAG]) 5247f55e6a01Smrg# ------------------------ 5248f55e6a01Smrg# Ensure that the configuration variables for a C compiler are suitably 5249f55e6a01Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5250f55e6a01Smrg# the compiler configuration to `libtool'. 5251f55e6a01Smrgm4_defun([_LT_LANG_C_CONFIG], 5252f55e6a01Smrg[m4_require([_LT_DECL_EGREP])dnl 5253f55e6a01Smrglt_save_CC="$CC" 5254f55e6a01SmrgAC_LANG_PUSH(C) 5255c35d236eSmrg 5256f55e6a01Smrg# Source file extension for C test sources. 5257f55e6a01Smrgac_ext=c 5258c35d236eSmrg 5259f55e6a01Smrg# Object file extension for compiled C test sources. 5260f55e6a01Smrgobjext=o 5261f55e6a01Smrg_LT_TAGVAR(objext, $1)=$objext 5262c35d236eSmrg 5263f55e6a01Smrg# Code to be used in simple compile tests 5264f55e6a01Smrglt_simple_compile_test_code="int some_variable = 0;" 5265c35d236eSmrg 5266f55e6a01Smrg# Code to be used in simple link tests 5267f55e6a01Smrglt_simple_link_test_code='int main(){return(0);}' 5268c35d236eSmrg 5269f55e6a01Smrg_LT_TAG_COMPILER 5270f55e6a01Smrg# Save the default compiler, since it gets overwritten when the other 5271f55e6a01Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5272f55e6a01Smrgcompiler_DEFAULT=$CC 5273c35d236eSmrg 5274f55e6a01Smrg# save warnings/boilerplate of simple test code 5275f55e6a01Smrg_LT_COMPILER_BOILERPLATE 5276f55e6a01Smrg_LT_LINKER_BOILERPLATE 5277c35d236eSmrg 5278f55e6a01Smrgif test -n "$compiler"; then 5279f55e6a01Smrg _LT_COMPILER_NO_RTTI($1) 5280f55e6a01Smrg _LT_COMPILER_PIC($1) 5281f55e6a01Smrg _LT_COMPILER_C_O($1) 5282f55e6a01Smrg _LT_COMPILER_FILE_LOCKS($1) 5283f55e6a01Smrg _LT_LINKER_SHLIBS($1) 5284f55e6a01Smrg _LT_SYS_DYNAMIC_LINKER($1) 5285f55e6a01Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 5286f55e6a01Smrg LT_SYS_DLOPEN_SELF 5287f55e6a01Smrg _LT_CMD_STRIPLIB 5288f55e6a01Smrg 5289f55e6a01Smrg # Report which library types will actually be built 5290f55e6a01Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5291f55e6a01Smrg AC_MSG_RESULT([$can_build_shared]) 5292f55e6a01Smrg 5293f55e6a01Smrg AC_MSG_CHECKING([whether to build shared libraries]) 5294f55e6a01Smrg test "$can_build_shared" = "no" && enable_shared=no 5295f55e6a01Smrg 5296f55e6a01Smrg # On AIX, shared libraries and static libraries use the same namespace, and 5297f55e6a01Smrg # are all built from PIC. 5298f55e6a01Smrg case $host_os in 5299f55e6a01Smrg aix3*) 5300f55e6a01Smrg test "$enable_shared" = yes && enable_static=no 5301f55e6a01Smrg if test -n "$RANLIB"; then 5302f55e6a01Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5303f55e6a01Smrg postinstall_cmds='$RANLIB $lib' 5304f55e6a01Smrg fi 5305f55e6a01Smrg ;; 5306c35d236eSmrg 5307f55e6a01Smrg aix[[4-9]]*) 5308f55e6a01Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5309f55e6a01Smrg test "$enable_shared" = yes && enable_static=no 5310f55e6a01Smrg fi 5311f55e6a01Smrg ;; 5312f55e6a01Smrg esac 5313f55e6a01Smrg AC_MSG_RESULT([$enable_shared]) 5314c35d236eSmrg 5315f55e6a01Smrg AC_MSG_CHECKING([whether to build static libraries]) 5316f55e6a01Smrg # Make sure either enable_shared or enable_static is yes. 5317f55e6a01Smrg test "$enable_shared" = yes || enable_static=yes 5318f55e6a01Smrg AC_MSG_RESULT([$enable_static]) 5319c35d236eSmrg 5320f55e6a01Smrg _LT_CONFIG($1) 5321f55e6a01Smrgfi 5322f55e6a01SmrgAC_LANG_POP 5323f55e6a01SmrgCC="$lt_save_CC" 5324f55e6a01Smrg])# _LT_LANG_C_CONFIG 5325c35d236eSmrg 5326c35d236eSmrg 5327f55e6a01Smrg# _LT_PROG_CXX 5328f55e6a01Smrg# ------------ 5329f55e6a01Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 5330f55e6a01Smrg# compiler, we have our own version here. 5331f55e6a01Smrgm4_defun([_LT_PROG_CXX], 5332f55e6a01Smrg[ 5333f55e6a01Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 5334f55e6a01SmrgAC_PROG_CXX 5335f55e6a01Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5336f55e6a01Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5337f55e6a01Smrg (test "X$CXX" != "Xg++"))) ; then 5338f55e6a01Smrg AC_PROG_CXXCPP 5339f55e6a01Smrgelse 5340f55e6a01Smrg _lt_caught_CXX_error=yes 5341f55e6a01Smrgfi 5342f55e6a01Smrgpopdef([AC_MSG_ERROR]) 5343f55e6a01Smrg])# _LT_PROG_CXX 5344c35d236eSmrg 5345f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 5346f55e6a01Smrgdnl AC_DEFUN([_LT_PROG_CXX], []) 53474f6cd06fSmrg 5348c35d236eSmrg 5349f55e6a01Smrg# _LT_LANG_CXX_CONFIG([TAG]) 5350f55e6a01Smrg# -------------------------- 5351f55e6a01Smrg# Ensure that the configuration variables for a C++ compiler are suitably 5352f55e6a01Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5353f55e6a01Smrg# the compiler configuration to `libtool'. 5354f55e6a01Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5355f55e6a01Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl 5356f55e6a01Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5357f55e6a01Smrgm4_require([_LT_DECL_EGREP])dnl 5358f55e6a01Smrg 5359f55e6a01SmrgAC_LANG_PUSH(C++) 5360f55e6a01Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5361f55e6a01Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5362f55e6a01Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5363f55e6a01Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5364f55e6a01Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5365f55e6a01Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5366f55e6a01Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5367f55e6a01Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5368f55e6a01Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5369f55e6a01Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5370f55e6a01Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5371f55e6a01Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5372f55e6a01Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5373f55e6a01Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5374f55e6a01Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5375f55e6a01Smrg_LT_TAGVAR(module_cmds, $1)= 5376f55e6a01Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5377f55e6a01Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5378f55e6a01Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5379f55e6a01Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5380f55e6a01Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5381f55e6a01Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5382c35d236eSmrg 5383f55e6a01Smrg# Source file extension for C++ test sources. 5384f55e6a01Smrgac_ext=cpp 5385c35d236eSmrg 5386f55e6a01Smrg# Object file extension for compiled C++ test sources. 5387f55e6a01Smrgobjext=o 5388f55e6a01Smrg_LT_TAGVAR(objext, $1)=$objext 5389f55e6a01Smrg 5390f55e6a01Smrg# No sense in running all these tests if we already determined that 5391f55e6a01Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5392f55e6a01Smrg# are currently assumed to apply to all compilers on this platform, 5393f55e6a01Smrg# and will be corrupted by setting them based on a non-working compiler. 5394f55e6a01Smrgif test "$_lt_caught_CXX_error" != yes; then 5395f55e6a01Smrg # Code to be used in simple compile tests 5396f55e6a01Smrg lt_simple_compile_test_code="int some_variable = 0;" 5397f55e6a01Smrg 5398f55e6a01Smrg # Code to be used in simple link tests 5399f55e6a01Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5400f55e6a01Smrg 5401f55e6a01Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5402f55e6a01Smrg _LT_TAG_COMPILER 5403f55e6a01Smrg 5404f55e6a01Smrg # save warnings/boilerplate of simple test code 5405f55e6a01Smrg _LT_COMPILER_BOILERPLATE 5406f55e6a01Smrg _LT_LINKER_BOILERPLATE 5407f55e6a01Smrg 5408f55e6a01Smrg # Allow CC to be a program name with arguments. 5409f55e6a01Smrg lt_save_CC=$CC 5410f55e6a01Smrg lt_save_LD=$LD 5411f55e6a01Smrg lt_save_GCC=$GCC 5412f55e6a01Smrg GCC=$GXX 5413f55e6a01Smrg lt_save_with_gnu_ld=$with_gnu_ld 5414f55e6a01Smrg lt_save_path_LD=$lt_cv_path_LD 5415f55e6a01Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5416f55e6a01Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5417f55e6a01Smrg else 5418f55e6a01Smrg $as_unset lt_cv_prog_gnu_ld 5419f55e6a01Smrg fi 5420f55e6a01Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 5421f55e6a01Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 5422f55e6a01Smrg else 5423f55e6a01Smrg $as_unset lt_cv_path_LD 5424f55e6a01Smrg fi 5425f55e6a01Smrg test -z "${LDCXX+set}" || LD=$LDCXX 5426f55e6a01Smrg CC=${CXX-"c++"} 5427f55e6a01Smrg compiler=$CC 5428f55e6a01Smrg _LT_TAGVAR(compiler, $1)=$CC 5429f55e6a01Smrg _LT_CC_BASENAME([$compiler]) 5430c35d236eSmrg 5431f55e6a01Smrg if test -n "$compiler"; then 5432f55e6a01Smrg # We don't want -fno-exception when compiling C++ code, so set the 5433f55e6a01Smrg # no_builtin_flag separately 5434f55e6a01Smrg if test "$GXX" = yes; then 5435f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5436f55e6a01Smrg else 5437f55e6a01Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5438f55e6a01Smrg fi 5439c35d236eSmrg 5440f55e6a01Smrg if test "$GXX" = yes; then 5441f55e6a01Smrg # Set up default GNU C++ configuration 5442c35d236eSmrg 5443f55e6a01Smrg LT_PATH_LD 5444c35d236eSmrg 5445f55e6a01Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5446f55e6a01Smrg # archiving commands below assume that GNU ld is being used. 5447f55e6a01Smrg if test "$with_gnu_ld" = yes; then 5448f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5449f55e6a01Smrg _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' 5450c35d236eSmrg 5451f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5452f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5453c35d236eSmrg 5454f55e6a01Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5455f55e6a01Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5456f55e6a01Smrg # investigate it a little bit more. (MM) 5457f55e6a01Smrg wlarc='${wl}' 5458c35d236eSmrg 5459f55e6a01Smrg # ancient GNU ld didn't support --whole-archive et. al. 5460f55e6a01Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5461f55e6a01Smrg $GREP 'no-whole-archive' > /dev/null; then 5462f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5463f55e6a01Smrg else 5464f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5465f55e6a01Smrg fi 5466f55e6a01Smrg else 5467f55e6a01Smrg with_gnu_ld=no 5468f55e6a01Smrg wlarc= 5469f55e6a01Smrg 5470f55e6a01Smrg # A generic and very simple default shared library creation 5471f55e6a01Smrg # command for GNU C++ for the case where it uses the native 5472f55e6a01Smrg # linker, instead of GNU ld. If possible, this setting should 5473f55e6a01Smrg # overridden to take advantage of the native linker features on 5474f55e6a01Smrg # the platform it is being used on. 5475f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5476f55e6a01Smrg fi 5477c35d236eSmrg 5478f55e6a01Smrg # Commands to make compiler produce verbose output that lists 5479f55e6a01Smrg # what "hidden" libraries, object files and flags are used when 5480f55e6a01Smrg # linking a shared library. 5481f55e6a01Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 5482c35d236eSmrg 5483f55e6a01Smrg else 5484f55e6a01Smrg GXX=no 5485f55e6a01Smrg with_gnu_ld=no 5486f55e6a01Smrg wlarc= 5487f55e6a01Smrg fi 5488c35d236eSmrg 5489f55e6a01Smrg # PORTME: fill in a description of your system's C++ link characteristics 5490f55e6a01Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5491f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5492f55e6a01Smrg case $host_os in 5493f55e6a01Smrg aix3*) 5494f55e6a01Smrg # FIXME: insert proper C++ library support 5495f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5496f55e6a01Smrg ;; 5497f55e6a01Smrg aix[[4-9]]*) 5498f55e6a01Smrg if test "$host_cpu" = ia64; then 5499f55e6a01Smrg # On IA64, the linker does run time linking by default, so we don't 5500f55e6a01Smrg # have to do anything special. 5501f55e6a01Smrg aix_use_runtimelinking=no 5502f55e6a01Smrg exp_sym_flag='-Bexport' 5503f55e6a01Smrg no_entry_flag="" 5504f55e6a01Smrg else 5505f55e6a01Smrg aix_use_runtimelinking=no 5506f55e6a01Smrg 5507f55e6a01Smrg # Test if we are trying to use run time linking or normal 5508f55e6a01Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5509f55e6a01Smrg # need to do runtime linking. 5510f55e6a01Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5511f55e6a01Smrg for ld_flag in $LDFLAGS; do 5512f55e6a01Smrg case $ld_flag in 5513f55e6a01Smrg *-brtl*) 5514f55e6a01Smrg aix_use_runtimelinking=yes 5515f55e6a01Smrg break 5516f55e6a01Smrg ;; 5517f55e6a01Smrg esac 5518f55e6a01Smrg done 5519f55e6a01Smrg ;; 5520f55e6a01Smrg esac 5521c35d236eSmrg 5522f55e6a01Smrg exp_sym_flag='-bexport' 5523f55e6a01Smrg no_entry_flag='-bnoentry' 5524f55e6a01Smrg fi 5525c35d236eSmrg 5526f55e6a01Smrg # When large executables or shared objects are built, AIX ld can 5527f55e6a01Smrg # have problems creating the table of contents. If linking a library 5528f55e6a01Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5529f55e6a01Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5530f55e6a01Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5531f55e6a01Smrg 5532f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='' 5533f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5534f55e6a01Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5535f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5536f55e6a01Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5537f55e6a01Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5538f55e6a01Smrg 5539f55e6a01Smrg if test "$GXX" = yes; then 5540f55e6a01Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5541f55e6a01Smrg # We only want to do this on AIX 4.2 and lower, the check 5542f55e6a01Smrg # below for broken collect2 doesn't work under 4.3+ 5543f55e6a01Smrg collect2name=`${CC} -print-prog-name=collect2` 5544f55e6a01Smrg if test -f "$collect2name" && 5545f55e6a01Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5546f55e6a01Smrg then 5547f55e6a01Smrg # We have reworked collect2 5548f55e6a01Smrg : 5549f55e6a01Smrg else 5550f55e6a01Smrg # We have old collect2 5551f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5552f55e6a01Smrg # It fails to find uninstalled libraries when the uninstalled 5553f55e6a01Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5554f55e6a01Smrg # to unsupported forces relinking 5555f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5556f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5557f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5558f55e6a01Smrg fi 5559f55e6a01Smrg esac 5560f55e6a01Smrg shared_flag='-shared' 5561f55e6a01Smrg if test "$aix_use_runtimelinking" = yes; then 5562f55e6a01Smrg shared_flag="$shared_flag "'${wl}-G' 5563f55e6a01Smrg fi 5564f55e6a01Smrg else 5565f55e6a01Smrg # not using gcc 5566f55e6a01Smrg if test "$host_cpu" = ia64; then 5567f55e6a01Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5568f55e6a01Smrg # chokes on -Wl,-G. The following line is correct: 5569f55e6a01Smrg shared_flag='-G' 5570f55e6a01Smrg else 5571f55e6a01Smrg if test "$aix_use_runtimelinking" = yes; then 5572f55e6a01Smrg shared_flag='${wl}-G' 5573f55e6a01Smrg else 5574f55e6a01Smrg shared_flag='${wl}-bM:SRE' 5575f55e6a01Smrg fi 5576f55e6a01Smrg fi 5577f55e6a01Smrg fi 5578c35d236eSmrg 5579f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5580f55e6a01Smrg # It seems that -bexpall does not export symbols beginning with 5581f55e6a01Smrg # underscore (_), so it is better to generate a list of symbols to 5582f55e6a01Smrg # export. 5583f55e6a01Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5584f55e6a01Smrg if test "$aix_use_runtimelinking" = yes; then 5585f55e6a01Smrg # Warning - without using the other runtime loading flags (-brtl), 5586f55e6a01Smrg # -berok will link without error, but may produce a broken library. 5587f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5588f55e6a01Smrg # Determine the default libpath from the value encoded in an empty 5589f55e6a01Smrg # executable. 5590f55e6a01Smrg _LT_SYS_MODULE_PATH_AIX 5591f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5592f55e6a01Smrg 5593f55e6a01Smrg _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" 5594f55e6a01Smrg else 5595f55e6a01Smrg if test "$host_cpu" = ia64; then 5596f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5597f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5598f55e6a01Smrg _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" 5599f55e6a01Smrg else 5600f55e6a01Smrg # Determine the default libpath from the value encoded in an 5601f55e6a01Smrg # empty executable. 5602f55e6a01Smrg _LT_SYS_MODULE_PATH_AIX 5603f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5604f55e6a01Smrg # Warning - without using the other run time loading flags, 5605f55e6a01Smrg # -berok will link without error, but may produce a broken library. 5606f55e6a01Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5607f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5608f55e6a01Smrg # Exported symbols can be pulled into shared objects from archives 5609f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5610f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5611f55e6a01Smrg # This is similar to how AIX traditionally builds its shared 5612f55e6a01Smrg # libraries. 5613f55e6a01Smrg _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' 5614f55e6a01Smrg fi 5615f55e6a01Smrg fi 5616f55e6a01Smrg ;; 5617c35d236eSmrg 5618f55e6a01Smrg beos*) 5619f55e6a01Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5620f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5621f55e6a01Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5622f55e6a01Smrg # support --undefined. This deserves some investigation. FIXME 5623f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5624f55e6a01Smrg else 5625f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5626f55e6a01Smrg fi 5627f55e6a01Smrg ;; 5628c35d236eSmrg 5629f55e6a01Smrg chorus*) 5630f55e6a01Smrg case $cc_basename in 5631f55e6a01Smrg *) 5632f55e6a01Smrg # FIXME: insert proper C++ library support 5633f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5634f55e6a01Smrg ;; 5635f55e6a01Smrg esac 5636f55e6a01Smrg ;; 5637c35d236eSmrg 5638f55e6a01Smrg cygwin* | mingw* | pw32* | cegcc*) 5639f55e6a01Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5640f55e6a01Smrg # as there is no search path for DLLs. 5641f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5642f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5643f55e6a01Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5644f55e6a01Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5645f55e6a01Smrg 5646f55e6a01Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5647f55e6a01Smrg _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' 5648f55e6a01Smrg # If the export-symbols file already is a .def file (1st line 5649f55e6a01Smrg # is EXPORTS), use it as is; otherwise, prepend... 5650f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5651f55e6a01Smrg cp $export_symbols $output_objdir/$soname.def; 5652f55e6a01Smrg else 5653f55e6a01Smrg echo EXPORTS > $output_objdir/$soname.def; 5654f55e6a01Smrg cat $export_symbols >> $output_objdir/$soname.def; 5655f55e6a01Smrg fi~ 5656f55e6a01Smrg $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' 5657f55e6a01Smrg else 5658f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5659f55e6a01Smrg fi 5660f55e6a01Smrg ;; 5661f55e6a01Smrg darwin* | rhapsody*) 5662f55e6a01Smrg _LT_DARWIN_LINKER_FEATURES($1) 5663f55e6a01Smrg ;; 5664c35d236eSmrg 5665f55e6a01Smrg dgux*) 5666f55e6a01Smrg case $cc_basename in 5667f55e6a01Smrg ec++*) 5668f55e6a01Smrg # FIXME: insert proper C++ library support 5669f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5670f55e6a01Smrg ;; 5671f55e6a01Smrg ghcx*) 5672f55e6a01Smrg # Green Hills C++ Compiler 5673f55e6a01Smrg # FIXME: insert proper C++ library support 5674f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5675f55e6a01Smrg ;; 5676f55e6a01Smrg *) 5677f55e6a01Smrg # FIXME: insert proper C++ library support 5678f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5679f55e6a01Smrg ;; 5680f55e6a01Smrg esac 5681f55e6a01Smrg ;; 5682c35d236eSmrg 5683f55e6a01Smrg freebsd[[12]]*) 5684f55e6a01Smrg # C++ shared libraries reported to be fairly broken before 5685f55e6a01Smrg # switch to ELF 5686f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5687f55e6a01Smrg ;; 5688c35d236eSmrg 5689f55e6a01Smrg freebsd-elf*) 5690f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5691f55e6a01Smrg ;; 5692c35d236eSmrg 5693f55e6a01Smrg freebsd* | dragonfly*) 5694f55e6a01Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 5695f55e6a01Smrg # conventions 5696f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5697f55e6a01Smrg ;; 5698c35d236eSmrg 5699f55e6a01Smrg gnu*) 5700f55e6a01Smrg ;; 5701c35d236eSmrg 5702f55e6a01Smrg hpux9*) 5703f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5704f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5705f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5706f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5707f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5708f55e6a01Smrg # but as the default 5709f55e6a01Smrg # location of the library. 5710f55e6a01Smrg 5711f55e6a01Smrg case $cc_basename in 5712f55e6a01Smrg CC*) 5713f55e6a01Smrg # FIXME: insert proper C++ library support 5714f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5715f55e6a01Smrg ;; 5716f55e6a01Smrg aCC*) 5717f55e6a01Smrg _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' 5718f55e6a01Smrg # Commands to make compiler produce verbose output that lists 5719f55e6a01Smrg # what "hidden" libraries, object files and flags are used when 5720f55e6a01Smrg # linking a shared library. 5721f55e6a01Smrg # 5722f55e6a01Smrg # There doesn't appear to be a way to prevent this compiler from 5723f55e6a01Smrg # explicitly linking system object files so we need to strip them 5724f55e6a01Smrg # from the output so that they don't get included in the library 5725f55e6a01Smrg # dependencies. 5726f55e6a01Smrg 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' 5727f55e6a01Smrg ;; 5728f55e6a01Smrg *) 5729f55e6a01Smrg if test "$GXX" = yes; then 5730f55e6a01Smrg _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' 5731f55e6a01Smrg else 5732f55e6a01Smrg # FIXME: insert proper C++ library support 5733f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5734f55e6a01Smrg fi 5735f55e6a01Smrg ;; 5736f55e6a01Smrg esac 5737f55e6a01Smrg ;; 5738c35d236eSmrg 5739f55e6a01Smrg hpux10*|hpux11*) 5740f55e6a01Smrg if test $with_gnu_ld = no; then 5741f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5742f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5743f55e6a01Smrg 5744f55e6a01Smrg case $host_cpu in 5745f55e6a01Smrg hppa*64*|ia64*) 5746f55e6a01Smrg ;; 5747f55e6a01Smrg *) 5748f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749f55e6a01Smrg ;; 5750f55e6a01Smrg esac 5751f55e6a01Smrg fi 5752f55e6a01Smrg case $host_cpu in 5753f55e6a01Smrg hppa*64*|ia64*) 5754f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5755f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5756f55e6a01Smrg ;; 5757f55e6a01Smrg *) 5758f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5759f55e6a01Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5760f55e6a01Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5761f55e6a01Smrg # but as the default 5762f55e6a01Smrg # location of the library. 5763f55e6a01Smrg ;; 5764f55e6a01Smrg esac 5765f55e6a01Smrg 5766f55e6a01Smrg case $cc_basename in 5767f55e6a01Smrg CC*) 5768f55e6a01Smrg # FIXME: insert proper C++ library support 5769f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5770f55e6a01Smrg ;; 5771f55e6a01Smrg aCC*) 5772f55e6a01Smrg case $host_cpu in 5773f55e6a01Smrg hppa*64*) 5774f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5775f55e6a01Smrg ;; 5776f55e6a01Smrg ia64*) 5777f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5778f55e6a01Smrg ;; 5779f55e6a01Smrg *) 5780f55e6a01Smrg _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' 5781f55e6a01Smrg ;; 5782f55e6a01Smrg esac 5783f55e6a01Smrg # Commands to make compiler produce verbose output that lists 5784f55e6a01Smrg # what "hidden" libraries, object files and flags are used when 5785f55e6a01Smrg # linking a shared library. 5786f55e6a01Smrg # 5787f55e6a01Smrg # There doesn't appear to be a way to prevent this compiler from 5788f55e6a01Smrg # explicitly linking system object files so we need to strip them 5789f55e6a01Smrg # from the output so that they don't get included in the library 5790f55e6a01Smrg # dependencies. 5791f55e6a01Smrg 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' 5792f55e6a01Smrg ;; 5793f55e6a01Smrg *) 5794f55e6a01Smrg if test "$GXX" = yes; then 5795f55e6a01Smrg if test $with_gnu_ld = no; then 5796f55e6a01Smrg case $host_cpu in 5797f55e6a01Smrg hppa*64*) 5798f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5799f55e6a01Smrg ;; 5800f55e6a01Smrg ia64*) 5801f55e6a01Smrg _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' 5802f55e6a01Smrg ;; 5803f55e6a01Smrg *) 5804f55e6a01Smrg _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' 5805f55e6a01Smrg ;; 5806f55e6a01Smrg esac 5807f55e6a01Smrg fi 5808f55e6a01Smrg else 5809f55e6a01Smrg # FIXME: insert proper C++ library support 5810f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5811f55e6a01Smrg fi 5812f55e6a01Smrg ;; 5813f55e6a01Smrg esac 5814f55e6a01Smrg ;; 5815c35d236eSmrg 5816f55e6a01Smrg interix[[3-9]]*) 5817f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5818f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5819f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5820f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5821f55e6a01Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5822f55e6a01Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5823f55e6a01Smrg # default) and relocated if they conflict, which is a slow very memory 5824f55e6a01Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5825f55e6a01Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5826f55e6a01Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5827f55e6a01Smrg _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' 5828f55e6a01Smrg _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' 5829f55e6a01Smrg ;; 5830f55e6a01Smrg irix5* | irix6*) 5831f55e6a01Smrg case $cc_basename in 5832f55e6a01Smrg CC*) 5833f55e6a01Smrg # SGI C++ 5834f55e6a01Smrg _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' 5835f55e6a01Smrg 5836f55e6a01Smrg # Archives containing C++ object files must be created using 5837f55e6a01Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 5838f55e6a01Smrg # necessary to make sure instantiated templates are included 5839f55e6a01Smrg # in the archive. 5840f55e6a01Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 5841f55e6a01Smrg ;; 5842f55e6a01Smrg *) 5843f55e6a01Smrg if test "$GXX" = yes; then 5844f55e6a01Smrg if test "$with_gnu_ld" = no; then 5845f55e6a01Smrg _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' 5846f55e6a01Smrg else 5847f55e6a01Smrg _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' 5848f55e6a01Smrg fi 5849f55e6a01Smrg fi 5850f55e6a01Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5851f55e6a01Smrg ;; 5852f55e6a01Smrg esac 5853f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5854f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5855f55e6a01Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5856f55e6a01Smrg ;; 5857c35d236eSmrg 5858f55e6a01Smrg linux* | k*bsd*-gnu) 5859f55e6a01Smrg case $cc_basename in 5860f55e6a01Smrg KCC*) 5861f55e6a01Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5862f55e6a01Smrg 5863f55e6a01Smrg # KCC will only create a shared library if the output file 5864f55e6a01Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5865f55e6a01Smrg # to its proper name (with version) after linking. 5866f55e6a01Smrg _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' 5867f55e6a01Smrg _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' 5868f55e6a01Smrg # Commands to make compiler produce verbose output that lists 5869f55e6a01Smrg # what "hidden" libraries, object files and flags are used when 5870f55e6a01Smrg # linking a shared library. 5871f55e6a01Smrg # 5872f55e6a01Smrg # There doesn't appear to be a way to prevent this compiler from 5873f55e6a01Smrg # explicitly linking system object files so we need to strip them 5874f55e6a01Smrg # from the output so that they don't get included in the library 5875f55e6a01Smrg # dependencies. 5876f55e6a01Smrg 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' 5877f55e6a01Smrg 5878f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5879f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5880f55e6a01Smrg 5881f55e6a01Smrg # Archives containing C++ object files must be created using 5882f55e6a01Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5883f55e6a01Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5884f55e6a01Smrg ;; 5885f55e6a01Smrg icpc* | ecpc* ) 5886f55e6a01Smrg # Intel C++ 5887f55e6a01Smrg with_gnu_ld=yes 5888f55e6a01Smrg # version 8.0 and above of icpc choke on multiply defined symbols 5889f55e6a01Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 5890f55e6a01Smrg # earlier do not add the objects themselves. 5891f55e6a01Smrg case `$CC -V 2>&1` in 5892f55e6a01Smrg *"Version 7."*) 5893f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5894f55e6a01Smrg _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' 5895f55e6a01Smrg ;; 5896f55e6a01Smrg *) # Version 8.0 or newer 5897f55e6a01Smrg tmp_idyn= 5898f55e6a01Smrg case $host_cpu in 5899f55e6a01Smrg ia64*) tmp_idyn=' -i_dynamic';; 5900f55e6a01Smrg esac 5901f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5902f55e6a01Smrg _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' 5903f55e6a01Smrg ;; 5904f55e6a01Smrg esac 5905f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5906f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5907f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5908f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5909f55e6a01Smrg ;; 5910f55e6a01Smrg pgCC* | pgcpp*) 5911f55e6a01Smrg # Portland Group C++ compiler 5912f55e6a01Smrg case `$CC -V` in 5913f55e6a01Smrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 5914f55e6a01Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 5915f55e6a01Smrg rm -rf $tpldir~ 5916f55e6a01Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 5917f55e6a01Smrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 5918f55e6a01Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 5919f55e6a01Smrg rm -rf $tpldir~ 5920f55e6a01Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 5921f55e6a01Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 5922f55e6a01Smrg $RANLIB $oldlib' 5923f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 5924f55e6a01Smrg rm -rf $tpldir~ 5925f55e6a01Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5926f55e6a01Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5927f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 5928f55e6a01Smrg rm -rf $tpldir~ 5929f55e6a01Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5930f55e6a01Smrg $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' 5931f55e6a01Smrg ;; 5932f55e6a01Smrg *) # Version 6 will use weak symbols 5933f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5934f55e6a01Smrg _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' 5935f55e6a01Smrg ;; 5936f55e6a01Smrg esac 5937c35d236eSmrg 5938f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5939f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5940f55e6a01Smrg _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' 5941f55e6a01Smrg ;; 5942f55e6a01Smrg cxx*) 5943f55e6a01Smrg # Compaq C++ 5944f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5945f55e6a01Smrg _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' 5946c35d236eSmrg 5947f55e6a01Smrg runpath_var=LD_RUN_PATH 5948f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5949f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5950c35d236eSmrg 5951f55e6a01Smrg # Commands to make compiler produce verbose output that lists 5952f55e6a01Smrg # what "hidden" libraries, object files and flags are used when 5953f55e6a01Smrg # linking a shared library. 5954f55e6a01Smrg # 5955f55e6a01Smrg # There doesn't appear to be a way to prevent this compiler from 5956f55e6a01Smrg # explicitly linking system object files so we need to strip them 5957f55e6a01Smrg # from the output so that they don't get included in the library 5958f55e6a01Smrg # dependencies. 5959f55e6a01Smrg 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' 5960f55e6a01Smrg ;; 5961f55e6a01Smrg xl*) 5962f55e6a01Smrg # IBM XL 8.0 on PPC, with GNU ld 5963f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5964f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5965f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5966f55e6a01Smrg if test "x$supports_anon_versioning" = xyes; then 5967f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5968f55e6a01Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5969f55e6a01Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5970f55e6a01Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5971f55e6a01Smrg fi 5972f55e6a01Smrg ;; 5973f55e6a01Smrg *) 5974f55e6a01Smrg case `$CC -V 2>&1 | sed 5q` in 5975f55e6a01Smrg *Sun\ C*) 5976f55e6a01Smrg # Sun C++ 5.9 5977f55e6a01Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 5978f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5979f55e6a01Smrg _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' 5980f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5981f55e6a01Smrg _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' 5982f55e6a01Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5983f55e6a01Smrg 5984f55e6a01Smrg # Not sure whether something based on 5985f55e6a01Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 5986f55e6a01Smrg # would be better. 5987f55e6a01Smrg output_verbose_link_cmd='echo' 5988f55e6a01Smrg 5989f55e6a01Smrg # Archives containing C++ object files must be created using 5990f55e6a01Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 5991f55e6a01Smrg # necessary to make sure instantiated templates are included 5992f55e6a01Smrg # in the archive. 5993f55e6a01Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 5994f55e6a01Smrg ;; 5995f55e6a01Smrg esac 5996f55e6a01Smrg ;; 5997f55e6a01Smrg esac 5998f55e6a01Smrg ;; 5999c35d236eSmrg 6000f55e6a01Smrg lynxos*) 6001f55e6a01Smrg # FIXME: insert proper C++ library support 6002f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6003f55e6a01Smrg ;; 6004c35d236eSmrg 6005f55e6a01Smrg m88k*) 6006f55e6a01Smrg # FIXME: insert proper C++ library support 6007f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6008f55e6a01Smrg ;; 6009c35d236eSmrg 6010f55e6a01Smrg mvs*) 6011f55e6a01Smrg case $cc_basename in 6012f55e6a01Smrg cxx*) 6013f55e6a01Smrg # FIXME: insert proper C++ library support 6014f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6015f55e6a01Smrg ;; 6016f55e6a01Smrg *) 6017f55e6a01Smrg # FIXME: insert proper C++ library support 6018f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6019f55e6a01Smrg ;; 6020f55e6a01Smrg esac 6021f55e6a01Smrg ;; 6022c35d236eSmrg 6023f55e6a01Smrg netbsd*) 6024f55e6a01Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6025f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6026f55e6a01Smrg wlarc= 6027f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6028f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6029f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6030f55e6a01Smrg fi 6031f55e6a01Smrg # Workaround some broken pre-1.5 toolchains 6032f55e6a01Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6033f55e6a01Smrg ;; 6034c35d236eSmrg 6035f55e6a01Smrg *nto* | *qnx*) 6036f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6037f55e6a01Smrg ;; 6038c35d236eSmrg 6039f55e6a01Smrg openbsd2*) 6040f55e6a01Smrg # C++ shared libraries are fairly broken 6041f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6042f55e6a01Smrg ;; 6043c35d236eSmrg 6044f55e6a01Smrg openbsd*) 6045f55e6a01Smrg if test -f /usr/libexec/ld.so; then 6046f55e6a01Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6047f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6048f55e6a01Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6049f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6050f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6051f55e6a01Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6052f55e6a01Smrg _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' 6053f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6054f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6055f55e6a01Smrg fi 6056f55e6a01Smrg output_verbose_link_cmd=echo 6057f55e6a01Smrg else 6058f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6059f55e6a01Smrg fi 6060f55e6a01Smrg ;; 6061c35d236eSmrg 6062f55e6a01Smrg osf3* | osf4* | osf5*) 6063f55e6a01Smrg case $cc_basename in 6064f55e6a01Smrg KCC*) 6065f55e6a01Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6066f55e6a01Smrg 6067f55e6a01Smrg # KCC will only create a shared library if the output file 6068f55e6a01Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6069f55e6a01Smrg # to its proper name (with version) after linking. 6070f55e6a01Smrg _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' 6071f55e6a01Smrg 6072f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6073f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6074f55e6a01Smrg 6075f55e6a01Smrg # Archives containing C++ object files must be created using 6076f55e6a01Smrg # the KAI C++ compiler. 6077f55e6a01Smrg case $host in 6078f55e6a01Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6079f55e6a01Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6080f55e6a01Smrg esac 6081f55e6a01Smrg ;; 6082f55e6a01Smrg RCC*) 6083f55e6a01Smrg # Rational C++ 2.4.1 6084f55e6a01Smrg # FIXME: insert proper C++ library support 6085f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6086f55e6a01Smrg ;; 6087f55e6a01Smrg cxx*) 6088f55e6a01Smrg case $host in 6089f55e6a01Smrg osf3*) 6090f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6091f55e6a01Smrg _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' 6092f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6093f55e6a01Smrg ;; 6094f55e6a01Smrg *) 6095f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6096f55e6a01Smrg _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' 6097f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6098f55e6a01Smrg echo "-hidden">> $lib.exp~ 6099f55e6a01Smrg $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~ 6100f55e6a01Smrg $RM $lib.exp' 6101f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6102f55e6a01Smrg ;; 6103f55e6a01Smrg esac 6104c35d236eSmrg 6105f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6106c35d236eSmrg 6107f55e6a01Smrg # Commands to make compiler produce verbose output that lists 6108f55e6a01Smrg # what "hidden" libraries, object files and flags are used when 6109f55e6a01Smrg # linking a shared library. 6110f55e6a01Smrg # 6111f55e6a01Smrg # There doesn't appear to be a way to prevent this compiler from 6112f55e6a01Smrg # explicitly linking system object files so we need to strip them 6113f55e6a01Smrg # from the output so that they don't get included in the library 6114f55e6a01Smrg # dependencies. 6115f55e6a01Smrg 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' 6116f55e6a01Smrg ;; 6117f55e6a01Smrg *) 6118f55e6a01Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6119f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6120f55e6a01Smrg case $host in 6121f55e6a01Smrg osf3*) 6122f55e6a01Smrg _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' 6123f55e6a01Smrg ;; 6124f55e6a01Smrg *) 6125f55e6a01Smrg _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' 6126f55e6a01Smrg ;; 6127f55e6a01Smrg esac 6128f55e6a01Smrg 6129f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6130f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6131f55e6a01Smrg 6132f55e6a01Smrg # Commands to make compiler produce verbose output that lists 6133f55e6a01Smrg # what "hidden" libraries, object files and flags are used when 6134f55e6a01Smrg # linking a shared library. 6135f55e6a01Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6136f55e6a01Smrg 6137f55e6a01Smrg else 6138f55e6a01Smrg # FIXME: insert proper C++ library support 6139f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6140f55e6a01Smrg fi 6141f55e6a01Smrg ;; 6142f55e6a01Smrg esac 6143f55e6a01Smrg ;; 6144c35d236eSmrg 6145f55e6a01Smrg psos*) 6146f55e6a01Smrg # FIXME: insert proper C++ library support 6147f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6148f55e6a01Smrg ;; 6149c35d236eSmrg 6150f55e6a01Smrg sunos4*) 6151f55e6a01Smrg case $cc_basename in 6152f55e6a01Smrg CC*) 6153f55e6a01Smrg # Sun C++ 4.x 6154f55e6a01Smrg # FIXME: insert proper C++ library support 6155f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6156f55e6a01Smrg ;; 6157f55e6a01Smrg lcc*) 6158f55e6a01Smrg # Lucid 6159f55e6a01Smrg # FIXME: insert proper C++ library support 6160f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6161f55e6a01Smrg ;; 6162f55e6a01Smrg *) 6163f55e6a01Smrg # FIXME: insert proper C++ library support 6164f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6165f55e6a01Smrg ;; 6166f55e6a01Smrg esac 6167f55e6a01Smrg ;; 6168c35d236eSmrg 6169f55e6a01Smrg solaris*) 6170f55e6a01Smrg case $cc_basename in 6171f55e6a01Smrg CC*) 6172f55e6a01Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6173f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6174f55e6a01Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6175f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6176f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6177f55e6a01Smrg $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' 6178f55e6a01Smrg 6179f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6180f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6181f55e6a01Smrg case $host_os in 6182f55e6a01Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6183f55e6a01Smrg *) 6184f55e6a01Smrg # The compiler driver will combine and reorder linker options, 6185f55e6a01Smrg # but understands `-z linker_flag'. 6186f55e6a01Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6187f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6188f55e6a01Smrg ;; 6189f55e6a01Smrg esac 6190f55e6a01Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6191c35d236eSmrg 6192f55e6a01Smrg output_verbose_link_cmd='echo' 6193c35d236eSmrg 6194f55e6a01Smrg # Archives containing C++ object files must be created using 6195f55e6a01Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6196f55e6a01Smrg # necessary to make sure instantiated templates are included 6197f55e6a01Smrg # in the archive. 6198f55e6a01Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6199f55e6a01Smrg ;; 6200f55e6a01Smrg gcx*) 6201f55e6a01Smrg # Green Hills C++ Compiler 6202f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6203c35d236eSmrg 6204f55e6a01Smrg # The C++ compiler must be used to create the archive. 6205f55e6a01Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6206f55e6a01Smrg ;; 6207f55e6a01Smrg *) 6208f55e6a01Smrg # GNU C++ compiler with Solaris linker 6209f55e6a01Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6210f55e6a01Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6211f55e6a01Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6212f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6213f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6214f55e6a01Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6215f55e6a01Smrg 6216f55e6a01Smrg # Commands to make compiler produce verbose output that lists 6217f55e6a01Smrg # what "hidden" libraries, object files and flags are used when 6218f55e6a01Smrg # linking a shared library. 6219f55e6a01Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6220f55e6a01Smrg else 6221f55e6a01Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6222f55e6a01Smrg # platform. 6223f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6224f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6225f55e6a01Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6226f55e6a01Smrg 6227f55e6a01Smrg # Commands to make compiler produce verbose output that lists 6228f55e6a01Smrg # what "hidden" libraries, object files and flags are used when 6229f55e6a01Smrg # linking a shared library. 6230f55e6a01Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6231f55e6a01Smrg fi 6232f55e6a01Smrg 6233f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6234f55e6a01Smrg case $host_os in 6235f55e6a01Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6236f55e6a01Smrg *) 6237f55e6a01Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6238f55e6a01Smrg ;; 6239f55e6a01Smrg esac 6240f55e6a01Smrg fi 6241f55e6a01Smrg ;; 6242f55e6a01Smrg esac 6243f55e6a01Smrg ;; 6244c35d236eSmrg 6245f55e6a01Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6246f55e6a01Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6247f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6248f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6249f55e6a01Smrg runpath_var='LD_RUN_PATH' 6250c35d236eSmrg 6251f55e6a01Smrg case $cc_basename in 6252f55e6a01Smrg CC*) 6253f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6254f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6255f55e6a01Smrg ;; 6256f55e6a01Smrg *) 6257f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6258f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6259f55e6a01Smrg ;; 6260f55e6a01Smrg esac 6261f55e6a01Smrg ;; 6262c35d236eSmrg 6263f55e6a01Smrg sysv5* | sco3.2v5* | sco5v6*) 6264f55e6a01Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6265f55e6a01Smrg # link with -lc, and that would cause any symbols used from libc to 6266f55e6a01Smrg # always be unresolved, which means just about no library would 6267f55e6a01Smrg # ever link correctly. If we're not using GNU ld we use -z text 6268f55e6a01Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6269f55e6a01Smrg # as -z defs. 6270f55e6a01Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6271f55e6a01Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6272f55e6a01Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6273f55e6a01Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6274f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6275f55e6a01Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6276f55e6a01Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6277f55e6a01Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6278f55e6a01Smrg runpath_var='LD_RUN_PATH' 6279c35d236eSmrg 6280f55e6a01Smrg case $cc_basename in 6281f55e6a01Smrg CC*) 6282f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6283f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6284f55e6a01Smrg ;; 6285f55e6a01Smrg *) 6286f55e6a01Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6287f55e6a01Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6288f55e6a01Smrg ;; 6289f55e6a01Smrg esac 6290f55e6a01Smrg ;; 6291c35d236eSmrg 6292f55e6a01Smrg tandem*) 6293f55e6a01Smrg case $cc_basename in 6294f55e6a01Smrg NCC*) 6295f55e6a01Smrg # NonStop-UX NCC 3.20 6296f55e6a01Smrg # FIXME: insert proper C++ library support 6297f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6298f55e6a01Smrg ;; 6299f55e6a01Smrg *) 6300f55e6a01Smrg # FIXME: insert proper C++ library support 6301f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6302f55e6a01Smrg ;; 6303f55e6a01Smrg esac 6304f55e6a01Smrg ;; 6305c35d236eSmrg 6306f55e6a01Smrg vxworks*) 6307f55e6a01Smrg # FIXME: insert proper C++ library support 6308f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6309f55e6a01Smrg ;; 6310c35d236eSmrg 6311f55e6a01Smrg *) 6312f55e6a01Smrg # FIXME: insert proper C++ library support 6313f55e6a01Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6314f55e6a01Smrg ;; 6315f55e6a01Smrg esac 6316c35d236eSmrg 6317f55e6a01Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6318f55e6a01Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6319f55e6a01Smrg 6320f55e6a01Smrg _LT_TAGVAR(GCC, $1)="$GXX" 6321f55e6a01Smrg _LT_TAGVAR(LD, $1)="$LD" 6322f55e6a01Smrg 6323f55e6a01Smrg ## CAVEAT EMPTOR: 6324f55e6a01Smrg ## There is no encapsulation within the following macros, do not change 6325f55e6a01Smrg ## the running order or otherwise move them around unless you know exactly 6326f55e6a01Smrg ## what you are doing... 6327f55e6a01Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6328f55e6a01Smrg _LT_COMPILER_PIC($1) 6329f55e6a01Smrg _LT_COMPILER_C_O($1) 6330f55e6a01Smrg _LT_COMPILER_FILE_LOCKS($1) 6331f55e6a01Smrg _LT_LINKER_SHLIBS($1) 6332f55e6a01Smrg _LT_SYS_DYNAMIC_LINKER($1) 6333f55e6a01Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6334f55e6a01Smrg 6335f55e6a01Smrg _LT_CONFIG($1) 6336f55e6a01Smrg fi # test -n "$compiler" 6337f55e6a01Smrg 6338f55e6a01Smrg CC=$lt_save_CC 6339f55e6a01Smrg LDCXX=$LD 6340f55e6a01Smrg LD=$lt_save_LD 6341f55e6a01Smrg GCC=$lt_save_GCC 6342f55e6a01Smrg with_gnu_ld=$lt_save_with_gnu_ld 6343f55e6a01Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 6344f55e6a01Smrg lt_cv_path_LD=$lt_save_path_LD 6345f55e6a01Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6346f55e6a01Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6347f55e6a01Smrgfi # test "$_lt_caught_CXX_error" != yes 6348c35d236eSmrg 6349f55e6a01SmrgAC_LANG_POP 6350f55e6a01Smrg])# _LT_LANG_CXX_CONFIG 6351c35d236eSmrg 6352c35d236eSmrg 6353f55e6a01Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6354f55e6a01Smrg# --------------------------------- 6355f55e6a01Smrg# Figure out "hidden" library dependencies from verbose 6356f55e6a01Smrg# compiler output when linking a shared library. 6357f55e6a01Smrg# Parse the compiler output and extract the necessary 6358f55e6a01Smrg# objects, libraries and library flags. 6359f55e6a01Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6360f55e6a01Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6361f55e6a01Smrg# Dependencies to place before and after the object being linked: 6362f55e6a01Smrg_LT_TAGVAR(predep_objects, $1)= 6363f55e6a01Smrg_LT_TAGVAR(postdep_objects, $1)= 6364f55e6a01Smrg_LT_TAGVAR(predeps, $1)= 6365f55e6a01Smrg_LT_TAGVAR(postdeps, $1)= 6366f55e6a01Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6367c35d236eSmrg 6368f55e6a01Smrgdnl we can't use the lt_simple_compile_test_code here, 6369f55e6a01Smrgdnl because it contains code intended for an executable, 6370f55e6a01Smrgdnl not a library. It's possible we should let each 6371f55e6a01Smrgdnl tag define a new lt_????_link_test_code variable, 6372f55e6a01Smrgdnl but it's only used here... 6373f55e6a01Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6374f55e6a01Smrgint a; 6375f55e6a01Smrgvoid foo (void) { a = 0; } 6376f55e6a01Smrg_LT_EOF 6377f55e6a01Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6378f55e6a01Smrgclass Foo 6379c35d236eSmrg{ 6380f55e6a01Smrgpublic: 6381f55e6a01Smrg Foo (void) { a = 0; } 6382f55e6a01Smrgprivate: 6383f55e6a01Smrg int a; 6384f55e6a01Smrg}; 6385f55e6a01Smrg_LT_EOF 6386f55e6a01Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6387f55e6a01Smrg subroutine foo 6388f55e6a01Smrg implicit none 6389f55e6a01Smrg integer*4 a 6390f55e6a01Smrg a=0 6391f55e6a01Smrg return 6392f55e6a01Smrg end 6393f55e6a01Smrg_LT_EOF 6394f55e6a01Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6395f55e6a01Smrg subroutine foo 6396f55e6a01Smrg implicit none 6397f55e6a01Smrg integer a 6398f55e6a01Smrg a=0 6399f55e6a01Smrg return 6400f55e6a01Smrg end 6401f55e6a01Smrg_LT_EOF 6402f55e6a01Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6403f55e6a01Smrgpublic class foo { 6404f55e6a01Smrg private int a; 6405f55e6a01Smrg public void bar (void) { 6406f55e6a01Smrg a = 0; 6407f55e6a01Smrg } 6408c35d236eSmrg}; 6409f55e6a01Smrg_LT_EOF 6410f55e6a01Smrg]) 6411f55e6a01Smrgdnl Parse the compiler output and extract the necessary 6412f55e6a01Smrgdnl objects, libraries and library flags. 6413f55e6a01Smrgif AC_TRY_EVAL(ac_compile); then 6414f55e6a01Smrg # Parse the compiler output and extract the necessary 6415f55e6a01Smrg # objects, libraries and library flags. 6416c35d236eSmrg 6417f55e6a01Smrg # Sentinel used to keep track of whether or not we are before 6418f55e6a01Smrg # the conftest object file. 6419f55e6a01Smrg pre_test_object_deps_done=no 6420c35d236eSmrg 6421f55e6a01Smrg for p in `eval "$output_verbose_link_cmd"`; do 6422f55e6a01Smrg case $p in 6423f55e6a01Smrg 6424f55e6a01Smrg -L* | -R* | -l*) 6425f55e6a01Smrg # Some compilers place space between "-{L,R}" and the path. 6426f55e6a01Smrg # Remove the space. 6427f55e6a01Smrg if test $p = "-L" || 6428f55e6a01Smrg test $p = "-R"; then 6429f55e6a01Smrg prev=$p 6430f55e6a01Smrg continue 6431f55e6a01Smrg else 6432f55e6a01Smrg prev= 6433f55e6a01Smrg fi 6434f55e6a01Smrg 6435f55e6a01Smrg if test "$pre_test_object_deps_done" = no; then 6436f55e6a01Smrg case $p in 6437f55e6a01Smrg -L* | -R*) 6438f55e6a01Smrg # Internal compiler library paths should come after those 6439f55e6a01Smrg # provided the user. The postdeps already come after the 6440f55e6a01Smrg # user supplied libs so there is no need to process them. 6441f55e6a01Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6442f55e6a01Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6443f55e6a01Smrg else 6444f55e6a01Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6445f55e6a01Smrg fi 6446f55e6a01Smrg ;; 6447f55e6a01Smrg # The "-l" case would never come before the object being 6448f55e6a01Smrg # linked, so don't bother handling this case. 6449f55e6a01Smrg esac 6450f55e6a01Smrg else 6451f55e6a01Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6452f55e6a01Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6453f55e6a01Smrg else 6454f55e6a01Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6455f55e6a01Smrg fi 6456f55e6a01Smrg fi 6457f55e6a01Smrg ;; 6458f55e6a01Smrg 6459f55e6a01Smrg *.$objext) 6460f55e6a01Smrg # This assumes that the test object file only shows up 6461f55e6a01Smrg # once in the compiler output. 6462f55e6a01Smrg if test "$p" = "conftest.$objext"; then 6463f55e6a01Smrg pre_test_object_deps_done=yes 6464f55e6a01Smrg continue 6465f55e6a01Smrg fi 6466f55e6a01Smrg 6467f55e6a01Smrg if test "$pre_test_object_deps_done" = no; then 6468f55e6a01Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6469f55e6a01Smrg _LT_TAGVAR(predep_objects, $1)="$p" 6470f55e6a01Smrg else 6471f55e6a01Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6472f55e6a01Smrg fi 6473f55e6a01Smrg else 6474f55e6a01Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6475f55e6a01Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 6476f55e6a01Smrg else 6477f55e6a01Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 6478f55e6a01Smrg fi 6479f55e6a01Smrg fi 6480f55e6a01Smrg ;; 6481f55e6a01Smrg 6482f55e6a01Smrg *) ;; # Ignore the rest. 6483f55e6a01Smrg 6484f55e6a01Smrg esac 6485f55e6a01Smrg done 6486f55e6a01Smrg 6487f55e6a01Smrg # Clean up. 6488f55e6a01Smrg rm -f a.out a.exe 6489c35d236eSmrgelse 6490f55e6a01Smrg echo "libtool.m4: error: problem compiling $1 test program" 6491c35d236eSmrgfi 6492c35d236eSmrg 6493f55e6a01Smrg$RM -f confest.$objext 6494c35d236eSmrg 6495f55e6a01Smrg# PORTME: override above test on systems where it is broken 6496f55e6a01Smrgm4_if([$1], [CXX], 6497f55e6a01Smrg[case $host_os in 6498f55e6a01Smrginterix[[3-9]]*) 6499f55e6a01Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 6500f55e6a01Smrg # hack all around it, let's just trust "g++" to DTRT. 6501f55e6a01Smrg _LT_TAGVAR(predep_objects,$1)= 6502f55e6a01Smrg _LT_TAGVAR(postdep_objects,$1)= 6503f55e6a01Smrg _LT_TAGVAR(postdeps,$1)= 6504f55e6a01Smrg ;; 6505c35d236eSmrg 6506f55e6a01Smrglinux*) 6507f55e6a01Smrg case `$CC -V 2>&1 | sed 5q` in 6508f55e6a01Smrg *Sun\ C*) 6509f55e6a01Smrg # Sun C++ 5.9 6510c35d236eSmrg 6511f55e6a01Smrg # The more standards-conforming stlport4 library is 6512f55e6a01Smrg # incompatible with the Cstd library. Avoid specifying 6513f55e6a01Smrg # it if it's in CXXFLAGS. Ignore libCrun as 6514f55e6a01Smrg # -library=stlport4 depends on it. 6515f55e6a01Smrg case " $CXX $CXXFLAGS " in 6516f55e6a01Smrg *" -library=stlport4 "*) 6517f55e6a01Smrg solaris_use_stlport4=yes 6518c35d236eSmrg ;; 6519f55e6a01Smrg esac 6520f55e6a01Smrg 6521f55e6a01Smrg if test "$solaris_use_stlport4" != yes; then 6522f55e6a01Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6523f55e6a01Smrg fi 6524f55e6a01Smrg ;; 6525f55e6a01Smrg esac 6526f55e6a01Smrg ;; 6527f55e6a01Smrg 6528f55e6a01Smrgsolaris*) 6529f55e6a01Smrg case $cc_basename in 6530f55e6a01Smrg CC*) 6531f55e6a01Smrg # The more standards-conforming stlport4 library is 6532f55e6a01Smrg # incompatible with the Cstd library. Avoid specifying 6533f55e6a01Smrg # it if it's in CXXFLAGS. Ignore libCrun as 6534f55e6a01Smrg # -library=stlport4 depends on it. 6535f55e6a01Smrg case " $CXX $CXXFLAGS " in 6536f55e6a01Smrg *" -library=stlport4 "*) 6537f55e6a01Smrg solaris_use_stlport4=yes 6538c35d236eSmrg ;; 6539c35d236eSmrg esac 6540f55e6a01Smrg 6541f55e6a01Smrg # Adding this requires a known-good setup of shared libraries for 6542f55e6a01Smrg # Sun compiler versions before 5.6, else PIC objects from an old 6543f55e6a01Smrg # archive will be linked into the output, leading to subtle bugs. 6544f55e6a01Smrg if test "$solaris_use_stlport4" != yes; then 6545f55e6a01Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6546f55e6a01Smrg fi 6547f55e6a01Smrg ;; 6548f55e6a01Smrg esac 6549f55e6a01Smrg ;; 6550f55e6a01Smrgesac 6551f55e6a01Smrg]) 6552f55e6a01Smrg 6553f55e6a01Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 6554f55e6a01Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 6555f55e6a01Smrgesac 6556f55e6a01Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 6557f55e6a01Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 6558f55e6a01Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 6559f55e6a01Smrgfi 6560f55e6a01Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 6561f55e6a01Smrg [The directories searched by this compiler when creating a shared library]) 6562f55e6a01Smrg_LT_TAGDECL([], [predep_objects], [1], 6563f55e6a01Smrg [Dependencies to place before and after the objects being linked to 6564f55e6a01Smrg create a shared library]) 6565f55e6a01Smrg_LT_TAGDECL([], [postdep_objects], [1]) 6566f55e6a01Smrg_LT_TAGDECL([], [predeps], [1]) 6567f55e6a01Smrg_LT_TAGDECL([], [postdeps], [1]) 6568f55e6a01Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 6569f55e6a01Smrg [The library search path used internally by the compiler when linking 6570f55e6a01Smrg a shared library]) 6571f55e6a01Smrg])# _LT_SYS_HIDDEN_LIBDEPS 6572f55e6a01Smrg 6573f55e6a01Smrg 6574f55e6a01Smrg# _LT_PROG_F77 6575f55e6a01Smrg# ------------ 6576f55e6a01Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string 6577f55e6a01Smrg# if there is no fortran compiler, we have our own version here. 6578f55e6a01Smrgm4_defun([_LT_PROG_F77], 6579f55e6a01Smrg[ 6580f55e6a01Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 6581f55e6a01SmrgAC_PROG_F77 6582f55e6a01Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 6583f55e6a01Smrg _lt_disable_F77=yes 6584f55e6a01Smrgfi 6585f55e6a01Smrgpopdef([AC_MSG_ERROR]) 6586f55e6a01Smrg])# _LT_PROG_F77 6587f55e6a01Smrg 6588f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 6589f55e6a01Smrgdnl AC_DEFUN([_LT_PROG_F77], []) 6590f55e6a01Smrg 6591f55e6a01Smrg 6592f55e6a01Smrg# _LT_LANG_F77_CONFIG([TAG]) 6593f55e6a01Smrg# -------------------------- 6594f55e6a01Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 6595f55e6a01Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6596f55e6a01Smrg# to write the compiler configuration to `libtool'. 6597f55e6a01Smrgm4_defun([_LT_LANG_F77_CONFIG], 6598f55e6a01Smrg[AC_REQUIRE([_LT_PROG_F77])dnl 6599f55e6a01SmrgAC_LANG_PUSH(Fortran 77) 6600f55e6a01Smrg 6601f55e6a01Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6602f55e6a01Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6603f55e6a01Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6604f55e6a01Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6605f55e6a01Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6606f55e6a01Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6607f55e6a01Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6608f55e6a01Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6609f55e6a01Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6610f55e6a01Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6611f55e6a01Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6612f55e6a01Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6613f55e6a01Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6614f55e6a01Smrg_LT_TAGVAR(module_cmds, $1)= 6615f55e6a01Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6616f55e6a01Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6617f55e6a01Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6618f55e6a01Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6619f55e6a01Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6620f55e6a01Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6621f55e6a01Smrg 6622f55e6a01Smrg# Source file extension for f77 test sources. 6623f55e6a01Smrgac_ext=f 6624f55e6a01Smrg 6625f55e6a01Smrg# Object file extension for compiled f77 test sources. 6626f55e6a01Smrgobjext=o 6627f55e6a01Smrg_LT_TAGVAR(objext, $1)=$objext 6628f55e6a01Smrg 6629f55e6a01Smrg# No sense in running all these tests if we already determined that 6630f55e6a01Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 6631f55e6a01Smrg# are currently assumed to apply to all compilers on this platform, 6632f55e6a01Smrg# and will be corrupted by setting them based on a non-working compiler. 6633f55e6a01Smrgif test "$_lt_disable_F77" != yes; then 6634f55e6a01Smrg # Code to be used in simple compile tests 6635f55e6a01Smrg lt_simple_compile_test_code="\ 6636f55e6a01Smrg subroutine t 6637f55e6a01Smrg return 6638f55e6a01Smrg end 6639f55e6a01Smrg" 6640f55e6a01Smrg 6641f55e6a01Smrg # Code to be used in simple link tests 6642f55e6a01Smrg lt_simple_link_test_code="\ 6643f55e6a01Smrg program t 6644f55e6a01Smrg end 6645f55e6a01Smrg" 6646f55e6a01Smrg 6647f55e6a01Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6648f55e6a01Smrg _LT_TAG_COMPILER 6649f55e6a01Smrg 6650f55e6a01Smrg # save warnings/boilerplate of simple test code 6651f55e6a01Smrg _LT_COMPILER_BOILERPLATE 6652f55e6a01Smrg _LT_LINKER_BOILERPLATE 6653f55e6a01Smrg 6654f55e6a01Smrg # Allow CC to be a program name with arguments. 6655f55e6a01Smrg lt_save_CC="$CC" 6656f55e6a01Smrg lt_save_GCC=$GCC 6657f55e6a01Smrg CC=${F77-"f77"} 6658f55e6a01Smrg compiler=$CC 6659f55e6a01Smrg _LT_TAGVAR(compiler, $1)=$CC 6660f55e6a01Smrg _LT_CC_BASENAME([$compiler]) 6661f55e6a01Smrg GCC=$G77 6662f55e6a01Smrg if test -n "$compiler"; then 6663f55e6a01Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6664f55e6a01Smrg AC_MSG_RESULT([$can_build_shared]) 6665f55e6a01Smrg 6666f55e6a01Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6667f55e6a01Smrg test "$can_build_shared" = "no" && enable_shared=no 6668f55e6a01Smrg 6669f55e6a01Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6670f55e6a01Smrg # are all built from PIC. 6671f55e6a01Smrg case $host_os in 6672f55e6a01Smrg aix3*) 6673f55e6a01Smrg test "$enable_shared" = yes && enable_static=no 6674f55e6a01Smrg if test -n "$RANLIB"; then 6675f55e6a01Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6676f55e6a01Smrg postinstall_cmds='$RANLIB $lib' 6677f55e6a01Smrg fi 6678f55e6a01Smrg ;; 6679f55e6a01Smrg aix[[4-9]]*) 6680f55e6a01Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6681f55e6a01Smrg test "$enable_shared" = yes && enable_static=no 6682f55e6a01Smrg fi 6683f55e6a01Smrg ;; 6684c35d236eSmrg esac 6685f55e6a01Smrg AC_MSG_RESULT([$enable_shared]) 6686f55e6a01Smrg 6687f55e6a01Smrg AC_MSG_CHECKING([whether to build static libraries]) 6688f55e6a01Smrg # Make sure either enable_shared or enable_static is yes. 6689f55e6a01Smrg test "$enable_shared" = yes || enable_static=yes 6690f55e6a01Smrg AC_MSG_RESULT([$enable_static]) 6691f55e6a01Smrg 6692f55e6a01Smrg _LT_TAGVAR(GCC, $1)="$G77" 6693f55e6a01Smrg _LT_TAGVAR(LD, $1)="$LD" 6694f55e6a01Smrg 6695f55e6a01Smrg ## CAVEAT EMPTOR: 6696f55e6a01Smrg ## There is no encapsulation within the following macros, do not change 6697f55e6a01Smrg ## the running order or otherwise move them around unless you know exactly 6698f55e6a01Smrg ## what you are doing... 6699f55e6a01Smrg _LT_COMPILER_PIC($1) 6700f55e6a01Smrg _LT_COMPILER_C_O($1) 6701f55e6a01Smrg _LT_COMPILER_FILE_LOCKS($1) 6702f55e6a01Smrg _LT_LINKER_SHLIBS($1) 6703f55e6a01Smrg _LT_SYS_DYNAMIC_LINKER($1) 6704f55e6a01Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6705f55e6a01Smrg 6706f55e6a01Smrg _LT_CONFIG($1) 6707f55e6a01Smrg fi # test -n "$compiler" 6708f55e6a01Smrg 6709f55e6a01Smrg GCC=$lt_save_GCC 6710f55e6a01Smrg CC="$lt_save_CC" 6711f55e6a01Smrgfi # test "$_lt_disable_F77" != yes 6712f55e6a01Smrg 6713f55e6a01SmrgAC_LANG_POP 6714f55e6a01Smrg])# _LT_LANG_F77_CONFIG 6715f55e6a01Smrg 6716f55e6a01Smrg 6717f55e6a01Smrg# _LT_PROG_FC 6718f55e6a01Smrg# ----------- 6719f55e6a01Smrg# Since AC_PROG_FC is broken, in that it returns the empty string 6720f55e6a01Smrg# if there is no fortran compiler, we have our own version here. 6721f55e6a01Smrgm4_defun([_LT_PROG_FC], 6722c35d236eSmrg[ 6723f55e6a01Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 6724f55e6a01SmrgAC_PROG_FC 6725f55e6a01Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 6726f55e6a01Smrg _lt_disable_FC=yes 6727f55e6a01Smrgfi 6728f55e6a01Smrgpopdef([AC_MSG_ERROR]) 6729f55e6a01Smrg])# _LT_PROG_FC 6730f55e6a01Smrg 6731f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 6732f55e6a01Smrgdnl AC_DEFUN([_LT_PROG_FC], []) 6733f55e6a01Smrg 6734f55e6a01Smrg 6735f55e6a01Smrg# _LT_LANG_FC_CONFIG([TAG]) 6736f55e6a01Smrg# ------------------------- 6737f55e6a01Smrg# Ensure that the configuration variables for a Fortran compiler are 6738f55e6a01Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6739f55e6a01Smrg# to write the compiler configuration to `libtool'. 6740f55e6a01Smrgm4_defun([_LT_LANG_FC_CONFIG], 6741f55e6a01Smrg[AC_REQUIRE([_LT_PROG_FC])dnl 6742f55e6a01SmrgAC_LANG_PUSH(Fortran) 6743f55e6a01Smrg 6744f55e6a01Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6745f55e6a01Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6746f55e6a01Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6747f55e6a01Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6748f55e6a01Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6749f55e6a01Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6750f55e6a01Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6751f55e6a01Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6752f55e6a01Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6753f55e6a01Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6754f55e6a01Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6755f55e6a01Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6756f55e6a01Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6757f55e6a01Smrg_LT_TAGVAR(module_cmds, $1)= 6758f55e6a01Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6759f55e6a01Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6760f55e6a01Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6761f55e6a01Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6762f55e6a01Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6763f55e6a01Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6764f55e6a01Smrg 6765f55e6a01Smrg# Source file extension for fc test sources. 6766f55e6a01Smrgac_ext=${ac_fc_srcext-f} 6767f55e6a01Smrg 6768f55e6a01Smrg# Object file extension for compiled fc test sources. 6769f55e6a01Smrgobjext=o 6770f55e6a01Smrg_LT_TAGVAR(objext, $1)=$objext 6771f55e6a01Smrg 6772f55e6a01Smrg# No sense in running all these tests if we already determined that 6773f55e6a01Smrg# the FC compiler isn't working. Some variables (like enable_shared) 6774f55e6a01Smrg# are currently assumed to apply to all compilers on this platform, 6775f55e6a01Smrg# and will be corrupted by setting them based on a non-working compiler. 6776f55e6a01Smrgif test "$_lt_disable_FC" != yes; then 6777f55e6a01Smrg # Code to be used in simple compile tests 6778f55e6a01Smrg lt_simple_compile_test_code="\ 6779f55e6a01Smrg subroutine t 6780f55e6a01Smrg return 6781f55e6a01Smrg end 6782f55e6a01Smrg" 6783c35d236eSmrg 6784f55e6a01Smrg # Code to be used in simple link tests 6785f55e6a01Smrg lt_simple_link_test_code="\ 6786f55e6a01Smrg program t 6787f55e6a01Smrg end 6788f55e6a01Smrg" 6789f55e6a01Smrg 6790f55e6a01Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6791f55e6a01Smrg _LT_TAG_COMPILER 6792f55e6a01Smrg 6793f55e6a01Smrg # save warnings/boilerplate of simple test code 6794f55e6a01Smrg _LT_COMPILER_BOILERPLATE 6795f55e6a01Smrg _LT_LINKER_BOILERPLATE 6796f55e6a01Smrg 6797f55e6a01Smrg # Allow CC to be a program name with arguments. 6798f55e6a01Smrg lt_save_CC="$CC" 6799f55e6a01Smrg lt_save_GCC=$GCC 6800f55e6a01Smrg CC=${FC-"f95"} 6801f55e6a01Smrg compiler=$CC 6802f55e6a01Smrg GCC=$ac_cv_fc_compiler_gnu 6803f55e6a01Smrg 6804f55e6a01Smrg _LT_TAGVAR(compiler, $1)=$CC 6805f55e6a01Smrg _LT_CC_BASENAME([$compiler]) 6806f55e6a01Smrg 6807f55e6a01Smrg if test -n "$compiler"; then 6808f55e6a01Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6809f55e6a01Smrg AC_MSG_RESULT([$can_build_shared]) 6810f55e6a01Smrg 6811f55e6a01Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6812f55e6a01Smrg test "$can_build_shared" = "no" && enable_shared=no 6813f55e6a01Smrg 6814f55e6a01Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6815f55e6a01Smrg # are all built from PIC. 6816c35d236eSmrg case $host_os in 6817f55e6a01Smrg aix3*) 6818f55e6a01Smrg test "$enable_shared" = yes && enable_static=no 6819f55e6a01Smrg if test -n "$RANLIB"; then 6820f55e6a01Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6821f55e6a01Smrg postinstall_cmds='$RANLIB $lib' 6822f55e6a01Smrg fi 6823f55e6a01Smrg ;; 6824f55e6a01Smrg aix[[4-9]]*) 6825f55e6a01Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6826f55e6a01Smrg test "$enable_shared" = yes && enable_static=no 6827f55e6a01Smrg fi 6828f55e6a01Smrg ;; 6829f55e6a01Smrg esac 6830f55e6a01Smrg AC_MSG_RESULT([$enable_shared]) 6831f55e6a01Smrg 6832f55e6a01Smrg AC_MSG_CHECKING([whether to build static libraries]) 6833f55e6a01Smrg # Make sure either enable_shared or enable_static is yes. 6834f55e6a01Smrg test "$enable_shared" = yes || enable_static=yes 6835f55e6a01Smrg AC_MSG_RESULT([$enable_static]) 6836f55e6a01Smrg 6837f55e6a01Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 6838f55e6a01Smrg _LT_TAGVAR(LD, $1)="$LD" 6839f55e6a01Smrg 6840f55e6a01Smrg ## CAVEAT EMPTOR: 6841f55e6a01Smrg ## There is no encapsulation within the following macros, do not change 6842f55e6a01Smrg ## the running order or otherwise move them around unless you know exactly 6843f55e6a01Smrg ## what you are doing... 6844f55e6a01Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6845f55e6a01Smrg _LT_COMPILER_PIC($1) 6846f55e6a01Smrg _LT_COMPILER_C_O($1) 6847f55e6a01Smrg _LT_COMPILER_FILE_LOCKS($1) 6848f55e6a01Smrg _LT_LINKER_SHLIBS($1) 6849f55e6a01Smrg _LT_SYS_DYNAMIC_LINKER($1) 6850f55e6a01Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6851f55e6a01Smrg 6852f55e6a01Smrg _LT_CONFIG($1) 6853f55e6a01Smrg fi # test -n "$compiler" 6854f55e6a01Smrg 6855f55e6a01Smrg GCC=$lt_save_GCC 6856f55e6a01Smrg CC="$lt_save_CC" 6857f55e6a01Smrgfi # test "$_lt_disable_FC" != yes 6858c35d236eSmrg 6859f55e6a01SmrgAC_LANG_POP 6860f55e6a01Smrg])# _LT_LANG_FC_CONFIG 6861c35d236eSmrg 6862c35d236eSmrg 6863f55e6a01Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 6864f55e6a01Smrg# -------------------------- 6865f55e6a01Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 6866f55e6a01Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6867f55e6a01Smrg# to write the compiler configuration to `libtool'. 6868f55e6a01Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 6869f55e6a01Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 6870f55e6a01SmrgAC_LANG_SAVE 6871c35d236eSmrg 6872f55e6a01Smrg# Source file extension for Java test sources. 6873f55e6a01Smrgac_ext=java 6874c35d236eSmrg 6875f55e6a01Smrg# Object file extension for compiled Java test sources. 6876f55e6a01Smrgobjext=o 6877f55e6a01Smrg_LT_TAGVAR(objext, $1)=$objext 6878c35d236eSmrg 6879f55e6a01Smrg# Code to be used in simple compile tests 6880f55e6a01Smrglt_simple_compile_test_code="class foo {}" 6881c35d236eSmrg 6882f55e6a01Smrg# Code to be used in simple link tests 6883f55e6a01Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 6884c35d236eSmrg 6885f55e6a01Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6886f55e6a01Smrg_LT_TAG_COMPILER 6887f55e6a01Smrg 6888f55e6a01Smrg# save warnings/boilerplate of simple test code 6889f55e6a01Smrg_LT_COMPILER_BOILERPLATE 6890f55e6a01Smrg_LT_LINKER_BOILERPLATE 6891f55e6a01Smrg 6892f55e6a01Smrg# Allow CC to be a program name with arguments. 6893f55e6a01Smrglt_save_CC="$CC" 6894f55e6a01Smrglt_save_GCC=$GCC 6895f55e6a01SmrgGCC=yes 6896f55e6a01SmrgCC=${GCJ-"gcj"} 6897f55e6a01Smrgcompiler=$CC 6898f55e6a01Smrg_LT_TAGVAR(compiler, $1)=$CC 6899f55e6a01Smrg_LT_TAGVAR(LD, $1)="$LD" 6900f55e6a01Smrg_LT_CC_BASENAME([$compiler]) 6901f55e6a01Smrg 6902f55e6a01Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 6903f55e6a01Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6904f55e6a01Smrg 6905f55e6a01Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6906f55e6a01Smrg 6907f55e6a01Smrgif test -n "$compiler"; then 6908f55e6a01Smrg _LT_COMPILER_NO_RTTI($1) 6909f55e6a01Smrg _LT_COMPILER_PIC($1) 6910f55e6a01Smrg _LT_COMPILER_C_O($1) 6911f55e6a01Smrg _LT_COMPILER_FILE_LOCKS($1) 6912f55e6a01Smrg _LT_LINKER_SHLIBS($1) 6913f55e6a01Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6914f55e6a01Smrg 6915f55e6a01Smrg _LT_CONFIG($1) 6916f55e6a01Smrgfi 6917f55e6a01Smrg 6918f55e6a01SmrgAC_LANG_RESTORE 6919f55e6a01Smrg 6920f55e6a01SmrgGCC=$lt_save_GCC 6921f55e6a01SmrgCC="$lt_save_CC" 6922f55e6a01Smrg])# _LT_LANG_GCJ_CONFIG 6923f55e6a01Smrg 6924f55e6a01Smrg 6925f55e6a01Smrg# _LT_LANG_RC_CONFIG([TAG]) 6926f55e6a01Smrg# ------------------------- 6927f55e6a01Smrg# Ensure that the configuration variables for the Windows resource compiler 6928f55e6a01Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6929f55e6a01Smrg# to write the compiler configuration to `libtool'. 6930f55e6a01Smrgm4_defun([_LT_LANG_RC_CONFIG], 6931f55e6a01Smrg[AC_REQUIRE([LT_PROG_RC])dnl 6932f55e6a01SmrgAC_LANG_SAVE 6933f55e6a01Smrg 6934f55e6a01Smrg# Source file extension for RC test sources. 6935f55e6a01Smrgac_ext=rc 6936f55e6a01Smrg 6937f55e6a01Smrg# Object file extension for compiled RC test sources. 6938f55e6a01Smrgobjext=o 6939f55e6a01Smrg_LT_TAGVAR(objext, $1)=$objext 6940f55e6a01Smrg 6941f55e6a01Smrg# Code to be used in simple compile tests 6942f55e6a01Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 6943f55e6a01Smrg 6944f55e6a01Smrg# Code to be used in simple link tests 6945f55e6a01Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 6946f55e6a01Smrg 6947f55e6a01Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6948f55e6a01Smrg_LT_TAG_COMPILER 6949f55e6a01Smrg 6950f55e6a01Smrg# save warnings/boilerplate of simple test code 6951f55e6a01Smrg_LT_COMPILER_BOILERPLATE 6952f55e6a01Smrg_LT_LINKER_BOILERPLATE 6953f55e6a01Smrg 6954f55e6a01Smrg# Allow CC to be a program name with arguments. 6955f55e6a01Smrglt_save_CC="$CC" 6956f55e6a01Smrglt_save_GCC=$GCC 6957f55e6a01SmrgGCC= 6958f55e6a01SmrgCC=${RC-"windres"} 6959f55e6a01Smrgcompiler=$CC 6960f55e6a01Smrg_LT_TAGVAR(compiler, $1)=$CC 6961f55e6a01Smrg_LT_CC_BASENAME([$compiler]) 6962f55e6a01Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6963c35d236eSmrg 6964f55e6a01Smrgif test -n "$compiler"; then 6965f55e6a01Smrg : 6966f55e6a01Smrg _LT_CONFIG($1) 6967f55e6a01Smrgfi 6968c35d236eSmrg 6969f55e6a01SmrgGCC=$lt_save_GCC 6970f55e6a01SmrgAC_LANG_RESTORE 6971f55e6a01SmrgCC="$lt_save_CC" 6972f55e6a01Smrg])# _LT_LANG_RC_CONFIG 6973c35d236eSmrg 6974c35d236eSmrg 6975f55e6a01Smrg# LT_PROG_GCJ 6976f55e6a01Smrg# ----------- 6977f55e6a01SmrgAC_DEFUN([LT_PROG_GCJ], 6978f55e6a01Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 6979f55e6a01Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 6980f55e6a01Smrg [AC_CHECK_TOOL(GCJ, gcj,) 6981f55e6a01Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6982f55e6a01Smrg AC_SUBST(GCJFLAGS)])])[]dnl 6983f55e6a01Smrg]) 6984c35d236eSmrg 6985f55e6a01Smrg# Old name: 6986f55e6a01SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 6987f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 6988f55e6a01Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 6989c35d236eSmrg 6990c35d236eSmrg 6991f55e6a01Smrg# LT_PROG_RC 6992f55e6a01Smrg# ---------- 6993f55e6a01SmrgAC_DEFUN([LT_PROG_RC], 6994f55e6a01Smrg[AC_CHECK_TOOL(RC, windres,) 6995f55e6a01Smrg]) 6996c35d236eSmrg 6997f55e6a01Smrg# Old name: 6998f55e6a01SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 6999f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 7000f55e6a01Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 70014f6cd06fSmrg 7002c35d236eSmrg 7003f55e6a01Smrg# _LT_DECL_EGREP 7004f55e6a01Smrg# -------------- 7005f55e6a01Smrg# If we don't have a new enough Autoconf to choose the best grep 7006f55e6a01Smrg# available, choose the one first in the user's PATH. 7007f55e6a01Smrgm4_defun([_LT_DECL_EGREP], 7008f55e6a01Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7009f55e6a01SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7010f55e6a01Smrgtest -z "$GREP" && GREP=grep 7011f55e6a01Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7012f55e6a01Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7013f55e6a01Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7014f55e6a01Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7015f55e6a01SmrgAC_SUBST([GREP]) 7016f55e6a01Smrg]) 7017c35d236eSmrg 7018c35d236eSmrg 7019f55e6a01Smrg# _LT_DECL_OBJDUMP 7020f55e6a01Smrg# -------------- 7021f55e6a01Smrg# If we don't have a new enough Autoconf to choose the best objdump 7022f55e6a01Smrg# available, choose the one first in the user's PATH. 7023f55e6a01Smrgm4_defun([_LT_DECL_OBJDUMP], 7024f55e6a01Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7025f55e6a01Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7026f55e6a01Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7027f55e6a01SmrgAC_SUBST([OBJDUMP]) 7028f55e6a01Smrg]) 7029c35d236eSmrg 7030c35d236eSmrg 7031f55e6a01Smrg# _LT_DECL_SED 7032f55e6a01Smrg# ------------ 7033f55e6a01Smrg# Check for a fully-functional sed program, that truncates 7034f55e6a01Smrg# as few characters as possible. Prefer GNU sed if found. 7035f55e6a01Smrgm4_defun([_LT_DECL_SED], 7036f55e6a01Smrg[AC_PROG_SED 7037f55e6a01Smrgtest -z "$SED" && SED=sed 7038f55e6a01SmrgXsed="$SED -e 1s/^X//" 7039f55e6a01Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7040f55e6a01Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7041f55e6a01Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7042f55e6a01Smrg])# _LT_DECL_SED 7043c35d236eSmrg 7044f55e6a01Smrgm4_ifndef([AC_PROG_SED], [ 7045f55e6a01Smrg# NOTE: This macro has been submitted for inclusion into # 7046f55e6a01Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7047f55e6a01Smrg# a released version of Autoconf we should remove this # 7048f55e6a01Smrg# macro and use it instead. # 7049c35d236eSmrg 7050f55e6a01Smrgm4_defun([AC_PROG_SED], 7051f55e6a01Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7052f55e6a01SmrgAC_CACHE_VAL(lt_cv_path_SED, 7053f55e6a01Smrg[# Loop through the user's path and test for sed and gsed. 7054f55e6a01Smrg# Then use that list of sed's as ones to test for truncation. 7055f55e6a01Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7056f55e6a01Smrgfor as_dir in $PATH 7057f55e6a01Smrgdo 7058f55e6a01Smrg IFS=$as_save_IFS 7059f55e6a01Smrg test -z "$as_dir" && as_dir=. 7060f55e6a01Smrg for lt_ac_prog in sed gsed; do 7061f55e6a01Smrg for ac_exec_ext in '' $ac_executable_extensions; do 7062f55e6a01Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7063f55e6a01Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7064f55e6a01Smrg fi 7065f55e6a01Smrg done 7066f55e6a01Smrg done 7067f55e6a01Smrgdone 7068f55e6a01SmrgIFS=$as_save_IFS 7069f55e6a01Smrglt_ac_max=0 7070f55e6a01Smrglt_ac_count=0 7071f55e6a01Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7072f55e6a01Smrg# along with /bin/sed that truncates output. 7073f55e6a01Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7074f55e6a01Smrg test ! -f $lt_ac_sed && continue 7075f55e6a01Smrg cat /dev/null > conftest.in 7076f55e6a01Smrg lt_ac_count=0 7077f55e6a01Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7078f55e6a01Smrg # Check for GNU sed and select it if it is found. 7079f55e6a01Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7080f55e6a01Smrg lt_cv_path_SED=$lt_ac_sed 7081f55e6a01Smrg break 7082c35d236eSmrg fi 7083f55e6a01Smrg while true; do 7084f55e6a01Smrg cat conftest.in conftest.in >conftest.tmp 7085f55e6a01Smrg mv conftest.tmp conftest.in 7086f55e6a01Smrg cp conftest.in conftest.nl 7087f55e6a01Smrg echo >>conftest.nl 7088f55e6a01Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7089f55e6a01Smrg cmp -s conftest.out conftest.nl || break 7090f55e6a01Smrg # 10000 chars as input seems more than enough 7091f55e6a01Smrg test $lt_ac_count -gt 10 && break 7092f55e6a01Smrg lt_ac_count=`expr $lt_ac_count + 1` 7093f55e6a01Smrg if test $lt_ac_count -gt $lt_ac_max; then 7094f55e6a01Smrg lt_ac_max=$lt_ac_count 7095f55e6a01Smrg lt_cv_path_SED=$lt_ac_sed 7096f55e6a01Smrg fi 7097f55e6a01Smrg done 7098f55e6a01Smrgdone 7099c35d236eSmrg]) 7100f55e6a01SmrgSED=$lt_cv_path_SED 7101f55e6a01SmrgAC_SUBST([SED]) 7102f55e6a01SmrgAC_MSG_RESULT([$SED]) 7103f55e6a01Smrg])#AC_PROG_SED 7104f55e6a01Smrg])#m4_ifndef 7105c35d236eSmrg 7106f55e6a01Smrg# Old name: 7107f55e6a01SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7108f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 7109f55e6a01Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7110f55e6a01Smrg 7111f55e6a01Smrg 7112f55e6a01Smrg# _LT_CHECK_SHELL_FEATURES 7113f55e6a01Smrg# ------------------------ 7114f55e6a01Smrg# Find out whether the shell is Bourne or XSI compatible, 7115f55e6a01Smrg# or has some other useful features. 7116f55e6a01Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7117f55e6a01Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7118f55e6a01Smrg# Try some XSI features 7119f55e6a01Smrgxsi_shell=no 7120f55e6a01Smrg( _lt_dummy="a/b/c" 7121f55e6a01Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 7122f55e6a01Smrg = c,a/b,, \ 7123f55e6a01Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7124f55e6a01Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7125f55e6a01Smrg && xsi_shell=yes 7126f55e6a01SmrgAC_MSG_RESULT([$xsi_shell]) 7127f55e6a01Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7128f55e6a01Smrg 7129f55e6a01SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7130f55e6a01Smrglt_shell_append=no 7131f55e6a01Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7132f55e6a01Smrg >/dev/null 2>&1 \ 7133f55e6a01Smrg && lt_shell_append=yes 7134f55e6a01SmrgAC_MSG_RESULT([$lt_shell_append]) 7135f55e6a01Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7136f55e6a01Smrg 7137f55e6a01Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7138f55e6a01Smrg lt_unset=unset 7139f55e6a01Smrgelse 7140f55e6a01Smrg lt_unset=false 7141c35d236eSmrgfi 7142f55e6a01Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7143f55e6a01Smrg 7144f55e6a01Smrg# test EBCDIC or ASCII 7145f55e6a01Smrgcase `echo X|tr X '\101'` in 7146f55e6a01Smrg A) # ASCII based system 7147f55e6a01Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7148f55e6a01Smrg lt_SP2NL='tr \040 \012' 7149f55e6a01Smrg lt_NL2SP='tr \015\012 \040\040' 7150f55e6a01Smrg ;; 7151f55e6a01Smrg *) # EBCDIC based system 7152f55e6a01Smrg lt_SP2NL='tr \100 \n' 7153f55e6a01Smrg lt_NL2SP='tr \r\n \100\100' 7154f55e6a01Smrg ;; 7155c35d236eSmrgesac 7156f55e6a01Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7157f55e6a01Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7158f55e6a01Smrg])# _LT_CHECK_SHELL_FEATURES 7159f55e6a01Smrg 7160f55e6a01Smrg 7161f55e6a01Smrg# _LT_PROG_XSI_SHELLFNS 7162f55e6a01Smrg# --------------------- 7163f55e6a01Smrg# Bourne and XSI compatible variants of some useful shell functions. 7164f55e6a01Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 7165f55e6a01Smrg[case $xsi_shell in 7166f55e6a01Smrg yes) 7167f55e6a01Smrg cat << \_LT_EOF >> "$cfgfile" 7168f55e6a01Smrg 7169f55e6a01Smrg# func_dirname file append nondir_replacement 7170f55e6a01Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7171f55e6a01Smrg# otherwise set result to NONDIR_REPLACEMENT. 7172f55e6a01Smrgfunc_dirname () 7173f55e6a01Smrg{ 7174f55e6a01Smrg case ${1} in 7175f55e6a01Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7176f55e6a01Smrg * ) func_dirname_result="${3}" ;; 7177f55e6a01Smrg esac 7178f55e6a01Smrg} 7179c35d236eSmrg 7180f55e6a01Smrg# func_basename file 7181f55e6a01Smrgfunc_basename () 7182f55e6a01Smrg{ 7183f55e6a01Smrg func_basename_result="${1##*/}" 7184f55e6a01Smrg} 7185c35d236eSmrg 7186f55e6a01Smrg# func_dirname_and_basename file append nondir_replacement 7187f55e6a01Smrg# perform func_basename and func_dirname in a single function 7188f55e6a01Smrg# call: 7189f55e6a01Smrg# dirname: Compute the dirname of FILE. If nonempty, 7190f55e6a01Smrg# add APPEND to the result, otherwise set result 7191f55e6a01Smrg# to NONDIR_REPLACEMENT. 7192f55e6a01Smrg# value returned in "$func_dirname_result" 7193f55e6a01Smrg# basename: Compute filename of FILE. 7194f55e6a01Smrg# value retuned in "$func_basename_result" 7195f55e6a01Smrg# Implementation must be kept synchronized with func_dirname 7196f55e6a01Smrg# and func_basename. For efficiency, we do not delegate to 7197f55e6a01Smrg# those functions but instead duplicate the functionality here. 7198f55e6a01Smrgfunc_dirname_and_basename () 7199f55e6a01Smrg{ 7200f55e6a01Smrg case ${1} in 7201f55e6a01Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7202f55e6a01Smrg * ) func_dirname_result="${3}" ;; 7203f55e6a01Smrg esac 7204f55e6a01Smrg func_basename_result="${1##*/}" 7205f55e6a01Smrg} 7206c35d236eSmrg 7207f55e6a01Smrg# func_stripname prefix suffix name 7208f55e6a01Smrg# strip PREFIX and SUFFIX off of NAME. 7209f55e6a01Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7210f55e6a01Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7211f55e6a01Smrg# dot (in which case that matches only a dot). 7212f55e6a01Smrgfunc_stripname () 7213f55e6a01Smrg{ 7214f55e6a01Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7215f55e6a01Smrg # positional parameters, so assign one to ordinary parameter first. 7216f55e6a01Smrg func_stripname_result=${3} 7217f55e6a01Smrg func_stripname_result=${func_stripname_result#"${1}"} 7218f55e6a01Smrg func_stripname_result=${func_stripname_result%"${2}"} 7219f55e6a01Smrg} 7220f55e6a01Smrg 7221f55e6a01Smrg# func_opt_split 7222f55e6a01Smrgfunc_opt_split () 7223f55e6a01Smrg{ 7224f55e6a01Smrg func_opt_split_opt=${1%%=*} 7225f55e6a01Smrg func_opt_split_arg=${1#*=} 7226f55e6a01Smrg} 7227f55e6a01Smrg 7228f55e6a01Smrg# func_lo2o object 7229f55e6a01Smrgfunc_lo2o () 7230f55e6a01Smrg{ 7231f55e6a01Smrg case ${1} in 7232f55e6a01Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7233f55e6a01Smrg *) func_lo2o_result=${1} ;; 7234c35d236eSmrg esac 7235f55e6a01Smrg} 7236f55e6a01Smrg 7237f55e6a01Smrg# func_xform libobj-or-source 7238f55e6a01Smrgfunc_xform () 7239f55e6a01Smrg{ 7240f55e6a01Smrg func_xform_result=${1%.*}.lo 7241f55e6a01Smrg} 7242f55e6a01Smrg 7243f55e6a01Smrg# func_arith arithmetic-term... 7244f55e6a01Smrgfunc_arith () 7245f55e6a01Smrg{ 7246f55e6a01Smrg func_arith_result=$(( $[*] )) 7247f55e6a01Smrg} 7248f55e6a01Smrg 7249f55e6a01Smrg# func_len string 7250f55e6a01Smrg# STRING may not start with a hyphen. 7251f55e6a01Smrgfunc_len () 7252f55e6a01Smrg{ 7253f55e6a01Smrg func_len_result=${#1} 7254f55e6a01Smrg} 7255f55e6a01Smrg 7256f55e6a01Smrg_LT_EOF 7257c35d236eSmrg ;; 7258f55e6a01Smrg *) # Bourne compatible functions. 7259f55e6a01Smrg cat << \_LT_EOF >> "$cfgfile" 7260f55e6a01Smrg 7261f55e6a01Smrg# func_dirname file append nondir_replacement 7262f55e6a01Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7263f55e6a01Smrg# otherwise set result to NONDIR_REPLACEMENT. 7264f55e6a01Smrgfunc_dirname () 7265f55e6a01Smrg{ 7266f55e6a01Smrg # Extract subdirectory from the argument. 7267f55e6a01Smrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 7268f55e6a01Smrg if test "X$func_dirname_result" = "X${1}"; then 7269f55e6a01Smrg func_dirname_result="${3}" 7270f55e6a01Smrg else 7271f55e6a01Smrg func_dirname_result="$func_dirname_result${2}" 7272f55e6a01Smrg fi 7273f55e6a01Smrg} 7274f55e6a01Smrg 7275f55e6a01Smrg# func_basename file 7276f55e6a01Smrgfunc_basename () 7277f55e6a01Smrg{ 7278f55e6a01Smrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 7279f55e6a01Smrg} 7280f55e6a01Smrg 7281f55e6a01Smrgdnl func_dirname_and_basename 7282f55e6a01Smrgdnl A portable version of this function is already defined in general.m4sh 7283f55e6a01Smrgdnl so there is no need for it here. 7284f55e6a01Smrg 7285f55e6a01Smrg# func_stripname prefix suffix name 7286f55e6a01Smrg# strip PREFIX and SUFFIX off of NAME. 7287f55e6a01Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7288f55e6a01Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7289f55e6a01Smrg# dot (in which case that matches only a dot). 7290f55e6a01Smrg# func_strip_suffix prefix name 7291f55e6a01Smrgfunc_stripname () 7292f55e6a01Smrg{ 7293f55e6a01Smrg case ${2} in 7294f55e6a01Smrg .*) func_stripname_result=`$ECHO "X${3}" \ 7295f55e6a01Smrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 7296f55e6a01Smrg *) func_stripname_result=`$ECHO "X${3}" \ 7297f55e6a01Smrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 7298c35d236eSmrg esac 7299f55e6a01Smrg} 7300c35d236eSmrg 7301f55e6a01Smrg# sed scripts: 7302f55e6a01Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 7303f55e6a01Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 7304c35d236eSmrg 7305f55e6a01Smrg# func_opt_split 7306f55e6a01Smrgfunc_opt_split () 7307f55e6a01Smrg{ 7308f55e6a01Smrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 7309f55e6a01Smrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 7310f55e6a01Smrg} 7311c35d236eSmrg 7312f55e6a01Smrg# func_lo2o object 7313f55e6a01Smrgfunc_lo2o () 7314f55e6a01Smrg{ 7315f55e6a01Smrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 7316f55e6a01Smrg} 7317c35d236eSmrg 7318f55e6a01Smrg# func_xform libobj-or-source 7319f55e6a01Smrgfunc_xform () 7320f55e6a01Smrg{ 7321f55e6a01Smrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 7322f55e6a01Smrg} 7323c35d236eSmrg 7324f55e6a01Smrg# func_arith arithmetic-term... 7325f55e6a01Smrgfunc_arith () 7326f55e6a01Smrg{ 7327f55e6a01Smrg func_arith_result=`expr "$[@]"` 7328f55e6a01Smrg} 7329c35d236eSmrg 7330f55e6a01Smrg# func_len string 7331f55e6a01Smrg# STRING may not start with a hyphen. 7332f55e6a01Smrgfunc_len () 7333f55e6a01Smrg{ 7334f55e6a01Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 7335f55e6a01Smrg} 7336c35d236eSmrg 7337f55e6a01Smrg_LT_EOF 7338f55e6a01Smrgesac 7339c35d236eSmrg 7340f55e6a01Smrgcase $lt_shell_append in 7341f55e6a01Smrg yes) 7342f55e6a01Smrg cat << \_LT_EOF >> "$cfgfile" 7343c35d236eSmrg 7344f55e6a01Smrg# func_append var value 7345f55e6a01Smrg# Append VALUE to the end of shell variable VAR. 7346f55e6a01Smrgfunc_append () 7347f55e6a01Smrg{ 7348f55e6a01Smrg eval "$[1]+=\$[2]" 7349f55e6a01Smrg} 7350f55e6a01Smrg_LT_EOF 7351f55e6a01Smrg ;; 7352f55e6a01Smrg *) 7353f55e6a01Smrg cat << \_LT_EOF >> "$cfgfile" 7354c35d236eSmrg 7355f55e6a01Smrg# func_append var value 7356f55e6a01Smrg# Append VALUE to the end of shell variable VAR. 7357f55e6a01Smrgfunc_append () 7358f55e6a01Smrg{ 7359f55e6a01Smrg eval "$[1]=\$$[1]\$[2]" 7360f55e6a01Smrg} 7361c35d236eSmrg 7362f55e6a01Smrg_LT_EOF 7363f55e6a01Smrg ;; 7364f55e6a01Smrg esac 7365f55e6a01Smrg]) 7366c35d236eSmrg 7367f55e6a01Smrg# Helper functions for option handling. -*- Autoconf -*- 7368f55e6a01Smrg# 7369f55e6a01Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7370f55e6a01Smrg# Written by Gary V. Vaughan, 2004 7371f55e6a01Smrg# 7372f55e6a01Smrg# This file is free software; the Free Software Foundation gives 7373f55e6a01Smrg# unlimited permission to copy and/or distribute it, with or without 7374f55e6a01Smrg# modifications, as long as this notice is preserved. 7375c35d236eSmrg 7376f55e6a01Smrg# serial 6 ltoptions.m4 7377c35d236eSmrg 7378f55e6a01Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7379f55e6a01SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7380c35d236eSmrg 7381c35d236eSmrg 7382f55e6a01Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7383f55e6a01Smrg# ------------------------------------------ 7384f55e6a01Smrgm4_define([_LT_MANGLE_OPTION], 7385f55e6a01Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7386c35d236eSmrg 7387c35d236eSmrg 7388f55e6a01Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7389f55e6a01Smrg# --------------------------------------- 7390f55e6a01Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7391f55e6a01Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7392f55e6a01Smrg# saved as a flag. 7393f55e6a01Smrgm4_define([_LT_SET_OPTION], 7394f55e6a01Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7395f55e6a01Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7396f55e6a01Smrg _LT_MANGLE_DEFUN([$1], [$2]), 7397f55e6a01Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7398f55e6a01Smrg]) 7399c35d236eSmrg 7400c35d236eSmrg 7401f55e6a01Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7402f55e6a01Smrg# ------------------------------------------------------------ 7403f55e6a01Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7404f55e6a01Smrgm4_define([_LT_IF_OPTION], 7405f55e6a01Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7406f55e6a01Smrg 7407f55e6a01Smrg 7408f55e6a01Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7409f55e6a01Smrg# ------------------------------------------------------- 7410f55e6a01Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7411f55e6a01Smrg# are set. 7412f55e6a01Smrgm4_define([_LT_UNLESS_OPTIONS], 7413f55e6a01Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7414f55e6a01Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7415f55e6a01Smrg [m4_define([$0_found])])])[]dnl 7416f55e6a01Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7417f55e6a01Smrg])[]dnl 7418f55e6a01Smrg]) 7419c35d236eSmrg 7420c35d236eSmrg 7421f55e6a01Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7422f55e6a01Smrg# ---------------------------------------- 7423f55e6a01Smrg# OPTION-LIST is a space-separated list of Libtool options associated 7424f55e6a01Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7425f55e6a01Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7426f55e6a01Smrg# the unknown option and exit. 7427f55e6a01Smrgm4_defun([_LT_SET_OPTIONS], 7428f55e6a01Smrg[# Set options 7429f55e6a01Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7430f55e6a01Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 7431f55e6a01Smrg 7432f55e6a01Smrgm4_if([$1],[LT_INIT],[ 7433f55e6a01Smrg dnl 7434f55e6a01Smrg dnl Simply set some default values (i.e off) if boolean options were not 7435f55e6a01Smrg dnl specified: 7436f55e6a01Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7437f55e6a01Smrg ]) 7438f55e6a01Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7439f55e6a01Smrg ]) 7440f55e6a01Smrg dnl 7441f55e6a01Smrg dnl If no reference was made to various pairs of opposing options, then 7442f55e6a01Smrg dnl we run the default mode handler for the pair. For example, if neither 7443f55e6a01Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7444f55e6a01Smrg dnl archives by default: 7445f55e6a01Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7446f55e6a01Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7447f55e6a01Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7448f55e6a01Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7449f55e6a01Smrg [_LT_ENABLE_FAST_INSTALL]) 7450f55e6a01Smrg ]) 7451f55e6a01Smrg])# _LT_SET_OPTIONS 7452c35d236eSmrg 7453c35d236eSmrg 7454c35d236eSmrg 7455f55e6a01Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7456f55e6a01Smrg# ----------------------------------------- 7457f55e6a01Smrgm4_define([_LT_MANGLE_DEFUN], 7458f55e6a01Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7459c35d236eSmrg 7460c35d236eSmrg 7461f55e6a01Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7462f55e6a01Smrg# ----------------------------------------------- 7463f55e6a01Smrgm4_define([LT_OPTION_DEFINE], 7464f55e6a01Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7465f55e6a01Smrg])# LT_OPTION_DEFINE 7466c35d236eSmrg 7467c35d236eSmrg 7468f55e6a01Smrg# dlopen 7469f55e6a01Smrg# ------ 7470f55e6a01SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7471f55e6a01Smrg]) 7472f55e6a01Smrg 7473f55e6a01SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7474f55e6a01Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7475f55e6a01SmrgAC_DIAGNOSE([obsolete], 7476f55e6a01Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7477f55e6a01Smrgput the `dlopen' option into LT_INIT's first parameter.]) 7478f55e6a01Smrg]) 7479f55e6a01Smrg 7480f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 7481f55e6a01Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 7482f55e6a01Smrg 7483f55e6a01Smrg 7484f55e6a01Smrg# win32-dll 7485f55e6a01Smrg# --------- 7486f55e6a01Smrg# Declare package support for building win32 dll's. 7487f55e6a01SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7488f55e6a01Smrg[enable_win32_dll=yes 7489c35d236eSmrg 7490f55e6a01Smrgcase $host in 7491f55e6a01Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 7492f55e6a01Smrg AC_CHECK_TOOL(AS, as, false) 7493f55e6a01Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7494f55e6a01Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7495f55e6a01Smrg ;; 7496f55e6a01Smrgesac 7497c35d236eSmrg 7498f55e6a01Smrgtest -z "$AS" && AS=as 7499f55e6a01Smrg_LT_DECL([], [AS], [0], [Assembler program])dnl 7500c35d236eSmrg 7501f55e6a01Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7502f55e6a01Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 7503c35d236eSmrg 7504f55e6a01Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7505f55e6a01Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 7506f55e6a01Smrg])# win32-dll 7507c35d236eSmrg 7508f55e6a01SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7509f55e6a01Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7510f55e6a01Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7511f55e6a01SmrgAC_DIAGNOSE([obsolete], 7512f55e6a01Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7513f55e6a01Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 7514f55e6a01Smrg]) 7515c35d236eSmrg 7516f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 7517f55e6a01Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 7518c35d236eSmrg 7519c35d236eSmrg 7520f55e6a01Smrg# _LT_ENABLE_SHARED([DEFAULT]) 7521f55e6a01Smrg# ---------------------------- 7522f55e6a01Smrg# implement the --enable-shared flag, and supports the `shared' and 7523f55e6a01Smrg# `disable-shared' LT_INIT options. 7524f55e6a01Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7525f55e6a01Smrgm4_define([_LT_ENABLE_SHARED], 7526f55e6a01Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 7527f55e6a01SmrgAC_ARG_ENABLE([shared], 7528f55e6a01Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 7529f55e6a01Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 7530f55e6a01Smrg [p=${PACKAGE-default} 7531f55e6a01Smrg case $enableval in 7532f55e6a01Smrg yes) enable_shared=yes ;; 7533f55e6a01Smrg no) enable_shared=no ;; 7534f55e6a01Smrg *) 7535f55e6a01Smrg enable_shared=no 7536f55e6a01Smrg # Look at the argument we got. We use all the common list separators. 7537f55e6a01Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7538f55e6a01Smrg for pkg in $enableval; do 7539f55e6a01Smrg IFS="$lt_save_ifs" 7540f55e6a01Smrg if test "X$pkg" = "X$p"; then 7541f55e6a01Smrg enable_shared=yes 7542f55e6a01Smrg fi 7543f55e6a01Smrg done 7544f55e6a01Smrg IFS="$lt_save_ifs" 7545c35d236eSmrg ;; 7546f55e6a01Smrg esac], 7547f55e6a01Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 7548c35d236eSmrg 7549f55e6a01Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 7550f55e6a01Smrg [Whether or not to build shared libraries]) 7551f55e6a01Smrg])# _LT_ENABLE_SHARED 7552c35d236eSmrg 7553f55e6a01SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 7554f55e6a01SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 7555c35d236eSmrg 7556f55e6a01Smrg# Old names: 7557f55e6a01SmrgAC_DEFUN([AC_ENABLE_SHARED], 7558f55e6a01Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 7559f55e6a01Smrg]) 7560c35d236eSmrg 7561f55e6a01SmrgAC_DEFUN([AC_DISABLE_SHARED], 7562f55e6a01Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 7563f55e6a01Smrg]) 7564c35d236eSmrg 7565f55e6a01SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7566f55e6a01SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7567c35d236eSmrg 7568f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 7569f55e6a01Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 7570f55e6a01Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 7571c35d236eSmrg 7572c35d236eSmrg 7573c35d236eSmrg 7574f55e6a01Smrg# _LT_ENABLE_STATIC([DEFAULT]) 7575f55e6a01Smrg# ---------------------------- 7576f55e6a01Smrg# implement the --enable-static flag, and support the `static' and 7577f55e6a01Smrg# `disable-static' LT_INIT options. 7578f55e6a01Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7579f55e6a01Smrgm4_define([_LT_ENABLE_STATIC], 7580f55e6a01Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 7581f55e6a01SmrgAC_ARG_ENABLE([static], 7582f55e6a01Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 7583f55e6a01Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 7584f55e6a01Smrg [p=${PACKAGE-default} 7585f55e6a01Smrg case $enableval in 7586f55e6a01Smrg yes) enable_static=yes ;; 7587f55e6a01Smrg no) enable_static=no ;; 7588f55e6a01Smrg *) 7589f55e6a01Smrg enable_static=no 7590f55e6a01Smrg # Look at the argument we got. We use all the common list separators. 7591f55e6a01Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7592f55e6a01Smrg for pkg in $enableval; do 7593f55e6a01Smrg IFS="$lt_save_ifs" 7594f55e6a01Smrg if test "X$pkg" = "X$p"; then 7595f55e6a01Smrg enable_static=yes 7596f55e6a01Smrg fi 7597f55e6a01Smrg done 7598f55e6a01Smrg IFS="$lt_save_ifs" 7599c35d236eSmrg ;; 7600f55e6a01Smrg esac], 7601f55e6a01Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 7602c35d236eSmrg 7603f55e6a01Smrg _LT_DECL([build_old_libs], [enable_static], [0], 7604f55e6a01Smrg [Whether or not to build static libraries]) 7605f55e6a01Smrg])# _LT_ENABLE_STATIC 7606c35d236eSmrg 7607f55e6a01SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 7608f55e6a01SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 7609c35d236eSmrg 7610f55e6a01Smrg# Old names: 7611f55e6a01SmrgAC_DEFUN([AC_ENABLE_STATIC], 7612f55e6a01Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 7613f55e6a01Smrg]) 7614c35d236eSmrg 7615f55e6a01SmrgAC_DEFUN([AC_DISABLE_STATIC], 7616f55e6a01Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 7617f55e6a01Smrg]) 7618c35d236eSmrg 7619f55e6a01SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7620f55e6a01SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7621c35d236eSmrg 7622f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 7623f55e6a01Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 7624f55e6a01Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 7625c35d236eSmrg 7626c35d236eSmrg 7627f55e6a01Smrg 7628f55e6a01Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 7629f55e6a01Smrg# ---------------------------------- 7630f55e6a01Smrg# implement the --enable-fast-install flag, and support the `fast-install' 7631f55e6a01Smrg# and `disable-fast-install' LT_INIT options. 7632f55e6a01Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7633f55e6a01Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 7634f55e6a01Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 7635f55e6a01SmrgAC_ARG_ENABLE([fast-install], 7636f55e6a01Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 7637f55e6a01Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 7638f55e6a01Smrg [p=${PACKAGE-default} 7639f55e6a01Smrg case $enableval in 7640f55e6a01Smrg yes) enable_fast_install=yes ;; 7641f55e6a01Smrg no) enable_fast_install=no ;; 7642f55e6a01Smrg *) 7643f55e6a01Smrg enable_fast_install=no 7644f55e6a01Smrg # Look at the argument we got. We use all the common list separators. 7645f55e6a01Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7646f55e6a01Smrg for pkg in $enableval; do 7647f55e6a01Smrg IFS="$lt_save_ifs" 7648f55e6a01Smrg if test "X$pkg" = "X$p"; then 7649f55e6a01Smrg enable_fast_install=yes 76504f6cd06fSmrg fi 7651f55e6a01Smrg done 7652f55e6a01Smrg IFS="$lt_save_ifs" 7653c35d236eSmrg ;; 7654f55e6a01Smrg esac], 7655f55e6a01Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 7656c35d236eSmrg 7657f55e6a01Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 7658f55e6a01Smrg [Whether or not to optimize for fast installation])dnl 7659f55e6a01Smrg])# _LT_ENABLE_FAST_INSTALL 7660c35d236eSmrg 7661f55e6a01SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 7662f55e6a01SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 7663c35d236eSmrg 7664f55e6a01Smrg# Old names: 7665f55e6a01SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 7666f55e6a01Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 7667f55e6a01SmrgAC_DIAGNOSE([obsolete], 7668f55e6a01Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7669f55e6a01Smrgthe `fast-install' option into LT_INIT's first parameter.]) 7670f55e6a01Smrg]) 7671c35d236eSmrg 7672f55e6a01SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 7673f55e6a01Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 7674f55e6a01SmrgAC_DIAGNOSE([obsolete], 7675f55e6a01Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7676f55e6a01Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 7677f55e6a01Smrg]) 7678c35d236eSmrg 7679f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 7680f55e6a01Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 7681f55e6a01Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 7682c35d236eSmrg 7683c35d236eSmrg 7684f55e6a01Smrg# _LT_WITH_PIC([MODE]) 7685f55e6a01Smrg# -------------------- 7686f55e6a01Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 7687f55e6a01Smrg# LT_INIT options. 7688f55e6a01Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 7689f55e6a01Smrgm4_define([_LT_WITH_PIC], 7690f55e6a01Smrg[AC_ARG_WITH([pic], 7691f55e6a01Smrg [AS_HELP_STRING([--with-pic], 7692f55e6a01Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 7693f55e6a01Smrg [pic_mode="$withval"], 7694f55e6a01Smrg [pic_mode=default]) 7695c35d236eSmrg 7696f55e6a01Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 7697c35d236eSmrg 7698f55e6a01Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 7699f55e6a01Smrg])# _LT_WITH_PIC 7700c35d236eSmrg 7701f55e6a01SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 7702f55e6a01SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 7703f55e6a01Smrg 7704f55e6a01Smrg# Old name: 7705f55e6a01SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 7706f55e6a01Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 7707f55e6a01SmrgAC_DIAGNOSE([obsolete], 7708f55e6a01Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7709f55e6a01Smrgput the `pic-only' option into LT_INIT's first parameter.]) 7710c35d236eSmrg]) 7711c35d236eSmrg 7712f55e6a01Smrgdnl aclocal-1.4 backwards compatibility: 7713f55e6a01Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 7714c35d236eSmrg 7715c35d236eSmrg 7716f55e6a01Smrgm4_define([_LTDL_MODE], []) 7717f55e6a01SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 7718f55e6a01Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 7719f55e6a01SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 7720f55e6a01Smrg [m4_define([_LTDL_MODE], [recursive])]) 7721f55e6a01SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 7722f55e6a01Smrg [m4_define([_LTDL_MODE], [subproject])]) 7723c35d236eSmrg 7724f55e6a01Smrgm4_define([_LTDL_TYPE], []) 7725f55e6a01SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 7726f55e6a01Smrg [m4_define([_LTDL_TYPE], [installable])]) 7727f55e6a01SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 7728f55e6a01Smrg [m4_define([_LTDL_TYPE], [convenience])]) 7729c35d236eSmrg 7730f55e6a01Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 7731c35d236eSmrg# 7732f55e6a01Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7733f55e6a01Smrg# Written by Gary V. Vaughan, 2004 7734c35d236eSmrg# 7735f55e6a01Smrg# This file is free software; the Free Software Foundation gives 7736f55e6a01Smrg# unlimited permission to copy and/or distribute it, with or without 7737f55e6a01Smrg# modifications, as long as this notice is preserved. 7738f55e6a01Smrg 7739f55e6a01Smrg# serial 6 ltsugar.m4 7740f55e6a01Smrg 7741f55e6a01Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7742f55e6a01SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 7743f55e6a01Smrg 7744f55e6a01Smrg 7745f55e6a01Smrg# lt_join(SEP, ARG1, [ARG2...]) 7746f55e6a01Smrg# ----------------------------- 7747f55e6a01Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 7748f55e6a01Smrg# associated separator. 7749f55e6a01Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 7750f55e6a01Smrg# versions in m4sugar had bugs. 7751f55e6a01Smrgm4_define([lt_join], 7752f55e6a01Smrg[m4_if([$#], [1], [], 7753f55e6a01Smrg [$#], [2], [[$2]], 7754f55e6a01Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 7755f55e6a01Smrgm4_define([_lt_join], 7756f55e6a01Smrg[m4_if([$#$2], [2], [], 7757f55e6a01Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 7758f55e6a01Smrg 7759f55e6a01Smrg 7760f55e6a01Smrg# lt_car(LIST) 7761f55e6a01Smrg# lt_cdr(LIST) 7762f55e6a01Smrg# ------------ 7763f55e6a01Smrg# Manipulate m4 lists. 7764f55e6a01Smrg# These macros are necessary as long as will still need to support 7765f55e6a01Smrg# Autoconf-2.59 which quotes differently. 7766f55e6a01Smrgm4_define([lt_car], [[$1]]) 7767f55e6a01Smrgm4_define([lt_cdr], 7768f55e6a01Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 7769f55e6a01Smrg [$#], 1, [], 7770f55e6a01Smrg [m4_dquote(m4_shift($@))])]) 7771f55e6a01Smrgm4_define([lt_unquote], $1) 7772f55e6a01Smrg 7773f55e6a01Smrg 7774f55e6a01Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 7775f55e6a01Smrg# ------------------------------------------ 7776f55e6a01Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 7777f55e6a01Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 7778f55e6a01Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 7779f55e6a01Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 7780f55e6a01Smrg# than defined and empty). 7781c35d236eSmrg# 7782f55e6a01Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 7783f55e6a01Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 7784f55e6a01Smrgm4_define([lt_append], 7785f55e6a01Smrg[m4_define([$1], 7786f55e6a01Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 7787f55e6a01Smrg 7788f55e6a01Smrg 7789f55e6a01Smrg 7790f55e6a01Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 7791f55e6a01Smrg# ---------------------------------------------------------- 7792f55e6a01Smrg# Produce a SEP delimited list of all paired combinations of elements of 7793f55e6a01Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 7794f55e6a01Smrg# has the form PREFIXmINFIXSUFFIXn. 7795f55e6a01Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 7796f55e6a01Smrgm4_define([lt_combine], 7797f55e6a01Smrg[m4_if(m4_eval([$# > 3]), [1], 7798f55e6a01Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 7799f55e6a01Smrg[[m4_foreach([_Lt_prefix], [$2], 7800f55e6a01Smrg [m4_foreach([_Lt_suffix], 7801f55e6a01Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 7802f55e6a01Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 7803f55e6a01Smrg 7804f55e6a01Smrg 7805f55e6a01Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 7806f55e6a01Smrg# ----------------------------------------------------------------------- 7807f55e6a01Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 7808f55e6a01Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 7809f55e6a01Smrgm4_define([lt_if_append_uniq], 7810f55e6a01Smrg[m4_ifdef([$1], 7811f55e6a01Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 7812f55e6a01Smrg [lt_append([$1], [$2], [$3])$4], 7813f55e6a01Smrg [$5])], 7814f55e6a01Smrg [lt_append([$1], [$2], [$3])$4])]) 7815f55e6a01Smrg 7816f55e6a01Smrg 7817f55e6a01Smrg# lt_dict_add(DICT, KEY, VALUE) 7818f55e6a01Smrg# ----------------------------- 7819f55e6a01Smrgm4_define([lt_dict_add], 7820f55e6a01Smrg[m4_define([$1($2)], [$3])]) 7821c35d236eSmrg 7822c35d236eSmrg 7823f55e6a01Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 7824f55e6a01Smrg# -------------------------------------------- 7825f55e6a01Smrgm4_define([lt_dict_add_subkey], 7826f55e6a01Smrg[m4_define([$1($2:$3)], [$4])]) 7827f55e6a01Smrg 7828c35d236eSmrg 7829f55e6a01Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 7830f55e6a01Smrg# ---------------------------------- 7831f55e6a01Smrgm4_define([lt_dict_fetch], 7832f55e6a01Smrg[m4_ifval([$3], 7833f55e6a01Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 7834f55e6a01Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 7835c35d236eSmrg 7836c35d236eSmrg 7837f55e6a01Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 7838f55e6a01Smrg# ----------------------------------------------------------------- 7839f55e6a01Smrgm4_define([lt_if_dict_fetch], 7840f55e6a01Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 7841f55e6a01Smrg [$5], 7842f55e6a01Smrg [$6])]) 7843c35d236eSmrg 7844c35d236eSmrg 7845f55e6a01Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 7846f55e6a01Smrg# -------------------------------------------------------------- 7847f55e6a01Smrgm4_define([lt_dict_filter], 7848f55e6a01Smrg[m4_if([$5], [], [], 7849f55e6a01Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 7850f55e6a01Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 7851f55e6a01Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 7852c35d236eSmrg]) 7853c35d236eSmrg 7854f55e6a01Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 7855f55e6a01Smrg# 7856f55e6a01Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 7857f55e6a01Smrg# Written by Scott James Remnant, 2004 7858f55e6a01Smrg# 7859f55e6a01Smrg# This file is free software; the Free Software Foundation gives 7860f55e6a01Smrg# unlimited permission to copy and/or distribute it, with or without 7861f55e6a01Smrg# modifications, as long as this notice is preserved. 78624f6cd06fSmrg 7863f55e6a01Smrg# Generated from ltversion.in. 78644f6cd06fSmrg 7865f55e6a01Smrg# serial 3012 ltversion.m4 7866f55e6a01Smrg# This file is part of GNU Libtool 78674f6cd06fSmrg 7868f55e6a01Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6]) 7869f55e6a01Smrgm4_define([LT_PACKAGE_REVISION], [1.3012]) 78704f6cd06fSmrg 7871f55e6a01SmrgAC_DEFUN([LTVERSION_VERSION], 7872f55e6a01Smrg[macro_version='2.2.6' 7873f55e6a01Smrgmacro_revision='1.3012' 7874f55e6a01Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 7875f55e6a01Smrg_LT_DECL(, macro_revision, 0) 7876c35d236eSmrg]) 7877c35d236eSmrg 7878f55e6a01Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 7879f55e6a01Smrg# 7880f55e6a01Smrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 7881f55e6a01Smrg# Written by Scott James Remnant, 2004. 7882f55e6a01Smrg# 7883f55e6a01Smrg# This file is free software; the Free Software Foundation gives 7884f55e6a01Smrg# unlimited permission to copy and/or distribute it, with or without 7885f55e6a01Smrg# modifications, as long as this notice is preserved. 7886f55e6a01Smrg 7887f55e6a01Smrg# serial 4 lt~obsolete.m4 7888f55e6a01Smrg 7889f55e6a01Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 7890f55e6a01Smrg# 7891f55e6a01Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 7892f55e6a01Smrg# which have later been changed to m4_define as they aren't part of the 7893f55e6a01Smrg# exported API, or moved to Autoconf or Automake where they belong. 7894f55e6a01Smrg# 7895f55e6a01Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 7896f55e6a01Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 7897f55e6a01Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 7898f55e6a01Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 7899f55e6a01Smrg# and doesn't know about Autoconf macros at all.) 7900f55e6a01Smrg# 7901f55e6a01Smrg# So we provide this file, which has a silly filename so it's always 7902f55e6a01Smrg# included after everything else. This provides aclocal with the 7903f55e6a01Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 7904f55e6a01Smrg# because those macros already exist, or will be overwritten later. 7905f55e6a01Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 7906f55e6a01Smrg# 7907f55e6a01Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 7908f55e6a01Smrg# Yes, that means every name once taken will need to remain here until 7909f55e6a01Smrg# we give up compatibility with versions before 1.7, at which point 7910f55e6a01Smrg# we need to keep only those names which we still refer to. 7911f55e6a01Smrg 7912f55e6a01Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7913f55e6a01SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 7914f55e6a01Smrg 7915f55e6a01Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 7916f55e6a01Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 7917f55e6a01Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 7918f55e6a01Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 7919f55e6a01Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 7920f55e6a01Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 7921f55e6a01Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 7922f55e6a01Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 7923f55e6a01Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 7924f55e6a01Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 7925f55e6a01Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 7926f55e6a01Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 7927f55e6a01Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 7928f55e6a01Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 7929f55e6a01Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 7930f55e6a01Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 7931f55e6a01Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 7932f55e6a01Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 7933f55e6a01Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 7934f55e6a01Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 7935f55e6a01Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 7936f55e6a01Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 7937f55e6a01Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 7938f55e6a01Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 7939f55e6a01Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 7940f55e6a01Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 7941f55e6a01Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 7942f55e6a01Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 7943f55e6a01Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 7944f55e6a01Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 7945f55e6a01Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 7946f55e6a01Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 7947f55e6a01Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 7948f55e6a01Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 7949f55e6a01Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 7950f55e6a01Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 7951f55e6a01Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 7952f55e6a01Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 7953f55e6a01Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 7954f55e6a01Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 7955f55e6a01Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 7956f55e6a01Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 7957f55e6a01Smrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 7958f55e6a01Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 7959f55e6a01Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 7960f55e6a01Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 7961f55e6a01Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 7962f55e6a01Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 7963f55e6a01Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 7964f55e6a01Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 7965f55e6a01Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 7966f55e6a01Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 7967f55e6a01Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 7968f55e6a01Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 7969f55e6a01Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 7970f55e6a01Smrg 7971c35d236eSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 7972c35d236eSmrg# 7973c35d236eSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 7974c35d236eSmrg# 7975c35d236eSmrg# This program is free software; you can redistribute it and/or modify 7976c35d236eSmrg# it under the terms of the GNU General Public License as published by 7977c35d236eSmrg# the Free Software Foundation; either version 2 of the License, or 7978c35d236eSmrg# (at your option) any later version. 7979c35d236eSmrg# 7980c35d236eSmrg# This program is distributed in the hope that it will be useful, but 7981c35d236eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 7982c35d236eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 7983c35d236eSmrg# General Public License for more details. 7984c35d236eSmrg# 7985c35d236eSmrg# You should have received a copy of the GNU General Public License 7986c35d236eSmrg# along with this program; if not, write to the Free Software 7987c35d236eSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 7988c35d236eSmrg# 7989c35d236eSmrg# As a special exception to the GNU General Public License, if you 7990c35d236eSmrg# distribute this file as part of a program that contains a 7991c35d236eSmrg# configuration script generated by Autoconf, you may include it under 7992c35d236eSmrg# the same distribution terms that you use for the rest of that program. 7993c35d236eSmrg 7994c35d236eSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 7995c35d236eSmrg# ---------------------------------- 7996c35d236eSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 7997c35d236eSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 7998c35d236eSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 7999c35d236eSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 8000c35d236eSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8001c35d236eSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8002c35d236eSmrgfi 8003c35d236eSmrgif test -n "$PKG_CONFIG"; then 8004c35d236eSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 8005c35d236eSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8006c35d236eSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8007c35d236eSmrg AC_MSG_RESULT([yes]) 8008c35d236eSmrg else 8009c35d236eSmrg AC_MSG_RESULT([no]) 8010c35d236eSmrg PKG_CONFIG="" 8011c35d236eSmrg fi 8012c35d236eSmrg 8013c35d236eSmrgfi[]dnl 8014c35d236eSmrg])# PKG_PROG_PKG_CONFIG 8015c35d236eSmrg 8016c35d236eSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8017c35d236eSmrg# 8018c35d236eSmrg# Check to see whether a particular set of modules exists. Similar 8019c35d236eSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8020c35d236eSmrg# 8021c35d236eSmrg# 8022c35d236eSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 8023c35d236eSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 8024c35d236eSmrg# PKG_CHECK_EXISTS manually 8025c35d236eSmrg# -------------------------------------------------------------- 8026c35d236eSmrgAC_DEFUN([PKG_CHECK_EXISTS], 8027c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8028c35d236eSmrgif test -n "$PKG_CONFIG" && \ 8029c35d236eSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8030c35d236eSmrg m4_ifval([$2], [$2], [:]) 8031c35d236eSmrgm4_ifvaln([$3], [else 8032c35d236eSmrg $3])dnl 8033c35d236eSmrgfi]) 8034c35d236eSmrg 8035c35d236eSmrg 8036c35d236eSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8037c35d236eSmrg# --------------------------------------------- 8038c35d236eSmrgm4_define([_PKG_CONFIG], 80394f6cd06fSmrg[if test -n "$$1"; then 80404f6cd06fSmrg pkg_cv_[]$1="$$1" 80414f6cd06fSmrg elif test -n "$PKG_CONFIG"; then 80424f6cd06fSmrg PKG_CHECK_EXISTS([$3], 80434f6cd06fSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 80444f6cd06fSmrg [pkg_failed=yes]) 80454f6cd06fSmrg else 80464f6cd06fSmrg pkg_failed=untried 8047c35d236eSmrgfi[]dnl 8048c35d236eSmrg])# _PKG_CONFIG 8049c35d236eSmrg 8050c35d236eSmrg# _PKG_SHORT_ERRORS_SUPPORTED 8051c35d236eSmrg# ----------------------------- 8052c35d236eSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8053c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8054c35d236eSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8055c35d236eSmrg _pkg_short_errors_supported=yes 8056c35d236eSmrgelse 8057c35d236eSmrg _pkg_short_errors_supported=no 8058c35d236eSmrgfi[]dnl 8059c35d236eSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 8060c35d236eSmrg 8061c35d236eSmrg 8062c35d236eSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8063c35d236eSmrg# [ACTION-IF-NOT-FOUND]) 8064c35d236eSmrg# 8065c35d236eSmrg# 8066c35d236eSmrg# Note that if there is a possibility the first call to 8067c35d236eSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8068c35d236eSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8069c35d236eSmrg# 8070c35d236eSmrg# 8071c35d236eSmrg# -------------------------------------------------------------- 8072c35d236eSmrgAC_DEFUN([PKG_CHECK_MODULES], 8073c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8074c35d236eSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8075c35d236eSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8076c35d236eSmrg 8077c35d236eSmrgpkg_failed=no 8078c35d236eSmrgAC_MSG_CHECKING([for $1]) 8079c35d236eSmrg 8080c35d236eSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8081c35d236eSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8082c35d236eSmrg 8083c35d236eSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8084c35d236eSmrgand $1[]_LIBS to avoid the need to call pkg-config. 8085c35d236eSmrgSee the pkg-config man page for more details.]) 8086c35d236eSmrg 8087c35d236eSmrgif test $pkg_failed = yes; then 8088c35d236eSmrg _PKG_SHORT_ERRORS_SUPPORTED 8089c35d236eSmrg if test $_pkg_short_errors_supported = yes; then 80904f6cd06fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8091c35d236eSmrg else 80924f6cd06fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8093c35d236eSmrg fi 8094c35d236eSmrg # Put the nasty error message in config.log where it belongs 8095c35d236eSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8096c35d236eSmrg 8097c35d236eSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 8098c35d236eSmrg[Package requirements ($2) were not met: 8099c35d236eSmrg 8100c35d236eSmrg$$1_PKG_ERRORS 8101c35d236eSmrg 8102c35d236eSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8103c35d236eSmrginstalled software in a non-standard prefix. 8104c35d236eSmrg 8105c35d236eSmrg_PKG_TEXT 8106c35d236eSmrg])], 81074f6cd06fSmrg [AC_MSG_RESULT([no]) 81084f6cd06fSmrg $4]) 8109c35d236eSmrgelif test $pkg_failed = untried; then 8110c35d236eSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 8111c35d236eSmrg[The pkg-config script could not be found or is too old. Make sure it 8112c35d236eSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 8113c35d236eSmrgpath to pkg-config. 8114c35d236eSmrg 8115c35d236eSmrg_PKG_TEXT 8116c35d236eSmrg 81174f6cd06fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 8118c35d236eSmrg [$4]) 8119c35d236eSmrgelse 8120c35d236eSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8121c35d236eSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8122c35d236eSmrg AC_MSG_RESULT([yes]) 8123c35d236eSmrg ifelse([$3], , :, [$3]) 8124c35d236eSmrgfi[]dnl 8125c35d236eSmrg])# PKG_CHECK_MODULES 8126c35d236eSmrg 8127f55e6a01Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 8128c35d236eSmrgdnl 81294f6cd06fSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 8130c35d236eSmrgdnl 81314f6cd06fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 81324f6cd06fSmrgdnl copy of this software and associated documentation files (the 81334f6cd06fSmrgdnl "Software"), to deal in the Software without restriction, including 81344f6cd06fSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 81354f6cd06fSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 81364f6cd06fSmrgdnl to whom the Software is furnished to do so, provided that the above 81374f6cd06fSmrgdnl copyright notice(s) and this permission notice appear in all copies of 81384f6cd06fSmrgdnl the Software and that both the above copyright notice(s) and this 81394f6cd06fSmrgdnl permission notice appear in supporting documentation. 81404f6cd06fSmrgdnl 8141c35d236eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8142c35d236eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 81434f6cd06fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81444f6cd06fSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 81454f6cd06fSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 81464f6cd06fSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 81474f6cd06fSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 81484f6cd06fSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 81494f6cd06fSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 81504f6cd06fSmrgdnl 81514f6cd06fSmrgdnl Except as contained in this notice, the name of a copyright holder 81524f6cd06fSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 81534f6cd06fSmrgdnl or other dealings in this Software without prior written authorization 81544f6cd06fSmrgdnl of the copyright holder. 81554f6cd06fSmrg 81564f6cd06fSmrg# XORG_MACROS_VERSION(required-version) 81574f6cd06fSmrg# ------------------------------------- 81584f6cd06fSmrg# Minimum version: 1.1.0 81594f6cd06fSmrg# 81604f6cd06fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 81614f6cd06fSmrg# your configure.ac with the minimum required version, such as: 81624f6cd06fSmrg# XORG_MACROS_VERSION(1.1) 81634f6cd06fSmrg# 81644f6cd06fSmrg# To force at least a version with this macro defined, also add: 81654f6cd06fSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 81664f6cd06fSmrg# 81674f6cd06fSmrg# 81684f6cd06fSmrg# See the "minimum version" comment for each macro you use to see what 81694f6cd06fSmrg# version you require. 81704f6cd06fSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 81714f6cd06fSmrg [XORG_MACROS_needed_version=$1 81724f6cd06fSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 81734f6cd06fSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 81744f6cd06fSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 8175f55e6a01Smrg [XORG_MACROS_version=1.2.1 81764f6cd06fSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 81774f6cd06fSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 81784f6cd06fSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 81794f6cd06fSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 81804f6cd06fSmrg fi 81814f6cd06fSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 81824f6cd06fSmrg AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 81834f6cd06fSmrg fi 81844f6cd06fSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 81854f6cd06fSmrg]) # XORG_MACROS_VERSION 8186c35d236eSmrg 8187c35d236eSmrg# XORG_PROG_RAWCPP() 8188c35d236eSmrg# ------------------ 81894f6cd06fSmrg# Minimum version: 1.0.0 81904f6cd06fSmrg# 8191c35d236eSmrg# Find cpp program and necessary flags for use in pre-processing text files 8192c35d236eSmrg# such as man pages and config files 8193c35d236eSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 8194c35d236eSmrgAC_REQUIRE([AC_PROG_CPP]) 8195c35d236eSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8196c35d236eSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8197c35d236eSmrg 8198c35d236eSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 8199c35d236eSmrg# which is not the best choice for supporting other OS'es, but covers most 8200c35d236eSmrg# of the ones we need for now. 8201c35d236eSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8202c35d236eSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 8203c35d236eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8204c35d236eSmrg AC_MSG_RESULT([no]) 8205c35d236eSmrgelse 8206c35d236eSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8207c35d236eSmrg RAWCPPFLAGS=-undef 8208c35d236eSmrg AC_MSG_RESULT([yes]) 8209f55e6a01Smrg # under Cygwin unix is still defined even with -undef 8210f55e6a01Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8211f55e6a01Smrg RAWCPPFLAGS="-undef -ansi" 8212f55e6a01Smrg AC_MSG_RESULT([yes, with -ansi]) 8213c35d236eSmrg else 8214c35d236eSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8215c35d236eSmrg fi 8216c35d236eSmrgfi 8217c35d236eSmrgrm -f conftest.$ac_ext 8218c35d236eSmrg 8219c35d236eSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8220c35d236eSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 8221c35d236eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8222c35d236eSmrg AC_MSG_RESULT([no]) 8223c35d236eSmrgelse 8224c35d236eSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8225c35d236eSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8226c35d236eSmrg AC_MSG_RESULT([yes]) 8227c35d236eSmrg else 8228c35d236eSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8229c35d236eSmrg fi 8230c35d236eSmrgfi 8231c35d236eSmrgrm -f conftest.$ac_ext 8232c35d236eSmrgAC_SUBST(RAWCPPFLAGS) 8233c35d236eSmrg]) # XORG_PROG_RAWCPP 8234c35d236eSmrg 8235c35d236eSmrg# XORG_MANPAGE_SECTIONS() 8236c35d236eSmrg# ----------------------- 82374f6cd06fSmrg# Minimum version: 1.0.0 82384f6cd06fSmrg# 8239c35d236eSmrg# Determine which sections man pages go in for the different man page types 8240c35d236eSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8241c35d236eSmrg# Not sure if there's any better way than just hardcoding by OS name. 8242c35d236eSmrg# Override default settings by setting environment variables 8243c35d236eSmrg 8244c35d236eSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8245c35d236eSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 8246c35d236eSmrg 8247c35d236eSmrgif test x$APP_MAN_SUFFIX = x ; then 82484f6cd06fSmrg APP_MAN_SUFFIX=1 8249c35d236eSmrgfi 8250c35d236eSmrgif test x$APP_MAN_DIR = x ; then 82514f6cd06fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8252c35d236eSmrgfi 8253c35d236eSmrg 8254c35d236eSmrgif test x$LIB_MAN_SUFFIX = x ; then 82554f6cd06fSmrg LIB_MAN_SUFFIX=3 8256c35d236eSmrgfi 8257c35d236eSmrgif test x$LIB_MAN_DIR = x ; then 82584f6cd06fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8259c35d236eSmrgfi 8260c35d236eSmrg 8261c35d236eSmrgif test x$FILE_MAN_SUFFIX = x ; then 8262c35d236eSmrg case $host_os in 8263c35d236eSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 8264c35d236eSmrg *) FILE_MAN_SUFFIX=5 ;; 8265c35d236eSmrg esac 8266c35d236eSmrgfi 8267c35d236eSmrgif test x$FILE_MAN_DIR = x ; then 82684f6cd06fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8269c35d236eSmrgfi 8270c35d236eSmrg 8271c35d236eSmrgif test x$MISC_MAN_SUFFIX = x ; then 8272c35d236eSmrg case $host_os in 8273c35d236eSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 8274c35d236eSmrg *) MISC_MAN_SUFFIX=7 ;; 8275c35d236eSmrg esac 8276c35d236eSmrgfi 8277c35d236eSmrgif test x$MISC_MAN_DIR = x ; then 82784f6cd06fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8279c35d236eSmrgfi 8280c35d236eSmrg 8281c35d236eSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 8282c35d236eSmrg case $host_os in 8283c35d236eSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 8284c35d236eSmrg *) DRIVER_MAN_SUFFIX=4 ;; 8285c35d236eSmrg esac 8286c35d236eSmrgfi 8287c35d236eSmrgif test x$DRIVER_MAN_DIR = x ; then 82884f6cd06fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8289c35d236eSmrgfi 8290c35d236eSmrg 8291c35d236eSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 8292c35d236eSmrg case $host_os in 8293c35d236eSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 8294c35d236eSmrg *) ADMIN_MAN_SUFFIX=8 ;; 8295c35d236eSmrg esac 8296c35d236eSmrgfi 8297c35d236eSmrgif test x$ADMIN_MAN_DIR = x ; then 8298c35d236eSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 8299c35d236eSmrgfi 8300c35d236eSmrg 8301c35d236eSmrg 8302c35d236eSmrgAC_SUBST([APP_MAN_SUFFIX]) 8303c35d236eSmrgAC_SUBST([LIB_MAN_SUFFIX]) 8304c35d236eSmrgAC_SUBST([FILE_MAN_SUFFIX]) 8305c35d236eSmrgAC_SUBST([MISC_MAN_SUFFIX]) 8306c35d236eSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 8307c35d236eSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 8308c35d236eSmrgAC_SUBST([APP_MAN_DIR]) 8309c35d236eSmrgAC_SUBST([LIB_MAN_DIR]) 8310c35d236eSmrgAC_SUBST([FILE_MAN_DIR]) 8311c35d236eSmrgAC_SUBST([MISC_MAN_DIR]) 8312c35d236eSmrgAC_SUBST([DRIVER_MAN_DIR]) 8313c35d236eSmrgAC_SUBST([ADMIN_MAN_DIR]) 8314c35d236eSmrg]) # XORG_MANPAGE_SECTIONS 8315c35d236eSmrg 8316c35d236eSmrg# XORG_CHECK_LINUXDOC 8317c35d236eSmrg# ------------------- 83184f6cd06fSmrg# Minimum version: 1.0.0 83194f6cd06fSmrg# 8320c35d236eSmrg# Defines the variable MAKE_TEXT if the necessary tools and 8321c35d236eSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 8322c35d236eSmrg# Whether or not the necessary tools and files are found can be checked 8323c35d236eSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 8324c35d236eSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 8325f55e6a01Smrgif test x$XORG_SGML_PATH = x ; then 8326f55e6a01Smrg XORG_SGML_PATH=$prefix/share/sgml 8327f55e6a01Smrgfi 83284f6cd06fSmrgHAVE_DEFS_ENT= 83294f6cd06fSmrg 83304f6cd06fSmrgif test x"$cross_compiling" = x"yes" ; then 83314f6cd06fSmrg HAVE_DEFS_ENT=no 83324f6cd06fSmrgelse 83334f6cd06fSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 83344f6cd06fSmrgfi 8335c35d236eSmrg 8336c35d236eSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 8337c35d236eSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 8338c35d236eSmrg 8339c35d236eSmrgAC_MSG_CHECKING([Whether to build documentation]) 8340c35d236eSmrg 83414f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 8342c35d236eSmrg BUILDDOC=yes 8343c35d236eSmrgelse 8344c35d236eSmrg BUILDDOC=no 8345c35d236eSmrgfi 8346c35d236eSmrg 8347c35d236eSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 8348c35d236eSmrg 8349c35d236eSmrgAC_MSG_RESULT([$BUILDDOC]) 8350c35d236eSmrg 8351c35d236eSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 8352c35d236eSmrg 83534f6cd06fSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 8354c35d236eSmrg BUILDPDFDOC=yes 8355c35d236eSmrgelse 8356c35d236eSmrg BUILDPDFDOC=no 8357c35d236eSmrgfi 8358c35d236eSmrg 8359c35d236eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8360c35d236eSmrg 8361c35d236eSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 8362c35d236eSmrg 83634f6cd06fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 83644f6cd06fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 8365c35d236eSmrgMAKE_PDF="$PS2PDF" 83664f6cd06fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 8367c35d236eSmrg 8368c35d236eSmrgAC_SUBST(MAKE_TEXT) 8369c35d236eSmrgAC_SUBST(MAKE_PS) 8370c35d236eSmrgAC_SUBST(MAKE_PDF) 8371c35d236eSmrgAC_SUBST(MAKE_HTML) 8372c35d236eSmrg]) # XORG_CHECK_LINUXDOC 8373c35d236eSmrg 83744f6cd06fSmrg# XORG_CHECK_DOCBOOK 83754f6cd06fSmrg# ------------------- 83764f6cd06fSmrg# Minimum version: 1.0.0 83774f6cd06fSmrg# 83784f6cd06fSmrg# Checks for the ability to build output formats from SGML DocBook source. 83794f6cd06fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 83804f6cd06fSmrg# indicates whether the necessary tools and files are found and, if set, 83814f6cd06fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 83824f6cd06fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 8383f55e6a01Smrgif test x$XORG_SGML_PATH = x ; then 8384f55e6a01Smrg XORG_SGML_PATH=$prefix/share/sgml 8385f55e6a01Smrgfi 83864f6cd06fSmrgHAVE_DEFS_ENT= 83874f6cd06fSmrgBUILDTXTDOC=no 83884f6cd06fSmrgBUILDPDFDOC=no 83894f6cd06fSmrgBUILDPSDOC=no 83904f6cd06fSmrgBUILDHTMLDOC=no 83914f6cd06fSmrg 83924f6cd06fSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 83934f6cd06fSmrg 83944f6cd06fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 83954f6cd06fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 83964f6cd06fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 83974f6cd06fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 83984f6cd06fSmrg 83994f6cd06fSmrgAC_MSG_CHECKING([Whether to build text documentation]) 84004f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 84014f6cd06fSmrg test x$BUILD_TXTDOC != xno; then 84024f6cd06fSmrg BUILDTXTDOC=yes 84034f6cd06fSmrgfi 84044f6cd06fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 84054f6cd06fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 84064f6cd06fSmrg 84074f6cd06fSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 84084f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 84094f6cd06fSmrg test x$BUILD_PDFDOC != xno; then 84104f6cd06fSmrg BUILDPDFDOC=yes 84114f6cd06fSmrgfi 84124f6cd06fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 84134f6cd06fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 84144f6cd06fSmrg 84154f6cd06fSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 84164f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 84174f6cd06fSmrg test x$BUILD_PSDOC != xno; then 84184f6cd06fSmrg BUILDPSDOC=yes 84194f6cd06fSmrgfi 84204f6cd06fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 84214f6cd06fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 84224f6cd06fSmrg 84234f6cd06fSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 84244f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 84254f6cd06fSmrg test x$BUILD_HTMLDOC != xno; then 84264f6cd06fSmrg BUILDHTMLDOC=yes 84274f6cd06fSmrgfi 84284f6cd06fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 84294f6cd06fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 84304f6cd06fSmrg 84314f6cd06fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 84324f6cd06fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 84334f6cd06fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 84344f6cd06fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 84354f6cd06fSmrg 84364f6cd06fSmrgAC_SUBST(MAKE_TEXT) 84374f6cd06fSmrgAC_SUBST(MAKE_PS) 84384f6cd06fSmrgAC_SUBST(MAKE_PDF) 84394f6cd06fSmrgAC_SUBST(MAKE_HTML) 84404f6cd06fSmrg]) # XORG_CHECK_DOCBOOK 84414f6cd06fSmrg 8442c35d236eSmrg# XORG_CHECK_MALLOC_ZERO 8443c35d236eSmrg# ---------------------- 84444f6cd06fSmrg# Minimum version: 1.0.0 84454f6cd06fSmrg# 8446c35d236eSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 8447c35d236eSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 8448c35d236eSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 8449c35d236eSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 8450c35d236eSmrgAC_ARG_ENABLE(malloc0returnsnull, 8451c35d236eSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 8452c35d236eSmrg [malloc(0) returns NULL (default: auto)]), 8453c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 8454c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 8455c35d236eSmrg 8456c35d236eSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 8457c35d236eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 8458c35d236eSmrg AC_RUN_IFELSE([ 8459c35d236eSmrgchar *malloc(); 8460c35d236eSmrgchar *realloc(); 8461c35d236eSmrgchar *calloc(); 8462c35d236eSmrgmain() { 8463c35d236eSmrg char *m0, *r0, *c0, *p; 8464c35d236eSmrg m0 = malloc(0); 8465c35d236eSmrg p = malloc(10); 8466c35d236eSmrg r0 = realloc(p,0); 8467c35d236eSmrg c0 = calloc(0); 8468c35d236eSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 8469c35d236eSmrg}], 8470c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 8471c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 8472c35d236eSmrgfi 8473c35d236eSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 8474c35d236eSmrg 8475c35d236eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 8476c35d236eSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 8477c35d236eSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 8478c35d236eSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 8479c35d236eSmrgelse 8480c35d236eSmrg MALLOC_ZERO_CFLAGS="" 8481c35d236eSmrg XMALLOC_ZERO_CFLAGS="" 8482c35d236eSmrg XTMALLOC_ZERO_CFLAGS="" 8483c35d236eSmrgfi 8484c35d236eSmrg 8485c35d236eSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 8486c35d236eSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 8487c35d236eSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 8488c35d236eSmrg]) # XORG_CHECK_MALLOC_ZERO 8489c35d236eSmrg 84904f6cd06fSmrg# XORG_WITH_LINT() 84914f6cd06fSmrg# ---------------- 84924f6cd06fSmrg# Minimum version: 1.1.0 84934f6cd06fSmrg# 84944f6cd06fSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 84954f6cd06fSmrg# is specified. (Use --with-lint=sparse for sparse.) 84964f6cd06fSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 84974f6cd06fSmrg# Sets $LINT_FLAGS to flags to pass to source checker 84984f6cd06fSmrg# Sets LINT automake conditional if enabled (default: disabled) 84994f6cd06fSmrg# 85004f6cd06fSmrgAC_DEFUN([XORG_WITH_LINT],[ 85014f6cd06fSmrg 85024f6cd06fSmrg# Allow checking code with lint, sparse, etc. 85034f6cd06fSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 85044f6cd06fSmrg [Use a lint-style source code checker (default: disabled)])], 85054f6cd06fSmrg [use_lint=$withval], [use_lint=no]) 85064f6cd06fSmrgif test "x$use_lint" = "xyes" ; then 85074f6cd06fSmrg LINT="lint" 85084f6cd06fSmrgelse 85094f6cd06fSmrg LINT="$use_lint" 85104f6cd06fSmrgfi 85114f6cd06fSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 85124f6cd06fSmrg case $LINT in 85134f6cd06fSmrg lint|*/lint) 85144f6cd06fSmrg case $host_os in 85154f6cd06fSmrg solaris*) 85164f6cd06fSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 85174f6cd06fSmrg ;; 85184f6cd06fSmrg esac 85194f6cd06fSmrg ;; 85204f6cd06fSmrg esac 85214f6cd06fSmrgfi 85224f6cd06fSmrg 85234f6cd06fSmrgAC_SUBST(LINT) 85244f6cd06fSmrgAC_SUBST(LINT_FLAGS) 85254f6cd06fSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 85264f6cd06fSmrg 85274f6cd06fSmrg]) # XORG_WITH_LINT 85284f6cd06fSmrg 85294f6cd06fSmrg# XORG_LINT_LIBRARY(LIBNAME) 85304f6cd06fSmrg# -------------------------- 85314f6cd06fSmrg# Minimum version: 1.1.0 85324f6cd06fSmrg# 85334f6cd06fSmrg# Sets up flags for building lint libraries for checking programs that call 85344f6cd06fSmrg# functions in the library. 85354f6cd06fSmrg# Disabled by default, enable with --enable-lint-library 85364f6cd06fSmrg# Sets: 85374f6cd06fSmrg# @LINTLIB@ - name of lint library file to make 85384f6cd06fSmrg# MAKE_LINT_LIB - automake conditional 85394f6cd06fSmrg# 85404f6cd06fSmrg 85414f6cd06fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 85424f6cd06fSmrgAC_REQUIRE([XORG_WITH_LINT]) 85434f6cd06fSmrg# Build lint "library" for more indepth checks of programs calling this library 85444f6cd06fSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 85454f6cd06fSmrg [Create lint library (default: disabled)])], 85464f6cd06fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 85474f6cd06fSmrgif test "x$make_lint_lib" != "xno" ; then 85484f6cd06fSmrg if test "x$LINT" = "xno" ; then 85494f6cd06fSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 85504f6cd06fSmrg fi 85514f6cd06fSmrg if test "x$make_lint_lib" = "xyes" ; then 85524f6cd06fSmrg LINTLIB=llib-l$1.ln 85534f6cd06fSmrg else 85544f6cd06fSmrg LINTLIB=$make_lint_lib 85554f6cd06fSmrg fi 85564f6cd06fSmrgfi 85574f6cd06fSmrgAC_SUBST(LINTLIB) 85584f6cd06fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 85594f6cd06fSmrg 85604f6cd06fSmrg]) # XORG_LINT_LIBRARY 85614f6cd06fSmrg 8562f55e6a01Smrg# XORG_CWARNFLAGS 8563f55e6a01Smrg# --------------- 8564f55e6a01Smrg# Minimum version: 1.2.0 8565f55e6a01Smrg# 8566f55e6a01Smrg# Defines CWARNFLAGS to enable C compiler warnings. 8567f55e6a01Smrg# 8568f55e6a01SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 8569f55e6a01SmrgAC_REQUIRE([AC_PROG_CC]) 8570f55e6a01Smrgif test "x$GCC" = xyes ; then 8571f55e6a01Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 8572f55e6a01Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 8573f55e6a01Smrg-Wbad-function-cast" 8574f55e6a01Smrg case `gcc -dumpversion` in 8575f55e6a01Smrg 3.4.* | 4.*) 8576f55e6a01Smrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 8577f55e6a01Smrg ;; 8578f55e6a01Smrg esac 8579f55e6a01Smrgelse 8580f55e6a01Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 8581f55e6a01Smrg if test "x$SUNCC" = "xyes"; then 8582f55e6a01Smrg CWARNFLAGS="-v" 8583f55e6a01Smrg fi 8584f55e6a01Smrgfi 8585f55e6a01SmrgAC_SUBST(CWARNFLAGS) 8586f55e6a01Smrg]) # XORG_CWARNFLAGS 8587c35d236eSmrgdnl Copyright 2005 Red Hat, Inc 8588c35d236eSmrgdnl 8589c35d236eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 8590c35d236eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 8591c35d236eSmrgdnl the above copyright notice appear in all copies and that both that 8592c35d236eSmrgdnl copyright notice and this permission notice appear in supporting 8593c35d236eSmrgdnl documentation. 8594c35d236eSmrgdnl 8595c35d236eSmrgdnl The above copyright notice and this permission notice shall be included 8596c35d236eSmrgdnl in all copies or substantial portions of the Software. 8597c35d236eSmrgdnl 8598c35d236eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8599c35d236eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 8600c35d236eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 8601c35d236eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 8602c35d236eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 8603c35d236eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 8604c35d236eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 8605c35d236eSmrgdnl 8606c35d236eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 8607c35d236eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 8608c35d236eSmrgdnl other dealings in this Software without prior written authorization 8609c35d236eSmrgdnl from the copyright holders. 8610c35d236eSmrgdnl 8611c35d236eSmrg 8612c35d236eSmrg# XORG_RELEASE_VERSION 8613c35d236eSmrg# -------------------- 8614c35d236eSmrg# Adds --with/without-release-string and changes the PACKAGE and 8615c35d236eSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 86164f6cd06fSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 86174f6cd06fSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 8618c35d236eSmrg 8619c35d236eSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 8620c35d236eSmrg AC_ARG_WITH(release-version, 8621c35d236eSmrg AC_HELP_STRING([--with-release-version=STRING], 8622c35d236eSmrg [Use release version string in package name]), 8623c35d236eSmrg [RELEASE_VERSION="$withval"], 8624c35d236eSmrg [RELEASE_VERSION=""]) 8625c35d236eSmrg if test "x$RELEASE_VERSION" != "x"; then 8626c35d236eSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 8627c35d236eSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 8628c35d236eSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 8629c35d236eSmrg fi 86304f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 86314f6cd06fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 86324f6cd06fSmrg [Major version of this package]) 86334f6cd06fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 86344f6cd06fSmrg if test "x$PVM" = "x"; then 86354f6cd06fSmrg PVM="0" 86364f6cd06fSmrg fi 86374f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 86384f6cd06fSmrg [$PVM], 86394f6cd06fSmrg [Minor version of this package]) 86404f6cd06fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 86414f6cd06fSmrg if test "x$PVP" = "x"; then 86424f6cd06fSmrg PVP="0" 86434f6cd06fSmrg fi 86444f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 86454f6cd06fSmrg [$PVP], 86464f6cd06fSmrg [Patch version of this package]) 8647c35d236eSmrg]) 8648c35d236eSmrg 8649f55e6a01Smrg# XORG_CHANGELOG() 8650f55e6a01Smrg# ---------------- 8651f55e6a01Smrg# Minimum version: 1.2.0 8652f55e6a01Smrg# 8653f55e6a01Smrg# Defines the variable CHANGELOG_CMD as the command to generate 8654f55e6a01Smrg# ChangeLog from git. 8655f55e6a01Smrg# 8656f55e6a01Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 8657f55e6a01Smrg# 8658f55e6a01SmrgAC_DEFUN([XORG_CHANGELOG], [ 8659f55e6a01SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 8660f55e6a01Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 8661f55e6a01Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 8662f55e6a01SmrgAC_SUBST([CHANGELOG_CMD]) 8663f55e6a01SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 8664f55e6a01Smrg]) # XORG_CHANGELOG 8665f55e6a01Smrg 8666f55e6a01Smrgdnl Copyright 2005 Red Hat, Inc 8667f55e6a01Smrgdnl 8668f55e6a01Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 8669f55e6a01Smrgdnl documentation for any purpose is hereby granted without fee, provided that 8670f55e6a01Smrgdnl the above copyright notice appear in all copies and that both that 8671f55e6a01Smrgdnl copyright notice and this permission notice appear in supporting 8672f55e6a01Smrgdnl documentation. 8673f55e6a01Smrgdnl 8674f55e6a01Smrgdnl The above copyright notice and this permission notice shall be included 8675f55e6a01Smrgdnl in all copies or substantial portions of the Software. 8676f55e6a01Smrgdnl 8677f55e6a01Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8678f55e6a01Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 8679f55e6a01Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 8680f55e6a01Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 8681f55e6a01Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 8682f55e6a01Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 8683f55e6a01Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 8684f55e6a01Smrgdnl 8685f55e6a01Smrgdnl Except as contained in this notice, the name of the copyright holders shall 8686f55e6a01Smrgdnl not be used in advertising or otherwise to promote the sale, use or 8687f55e6a01Smrgdnl other dealings in this Software without prior written authorization 8688f55e6a01Smrgdnl from the copyright holders. 8689f55e6a01Smrgdnl 8690f55e6a01Smrg 8691f55e6a01Smrg# XORG_DRIVER_CHECK_EXT() 8692f55e6a01Smrg# -------------------------- 8693f55e6a01Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 8694f55e6a01Smrg# is defined, then add $1 to $REQUIRED_MODULES. 8695f55e6a01Smrg 8696f55e6a01SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 8697f55e6a01Smrg SAVE_CFLAGS="$CFLAGS" 8698f55e6a01Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 8699f55e6a01Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 8700f55e6a01Smrg#include "xorg-server.h" 8701f55e6a01Smrg#if !defined $1 8702f55e6a01Smrg#error $1 not defined 8703f55e6a01Smrg#endif 8704f55e6a01Smrg ]])], 8705f55e6a01Smrg [_EXT_CHECK=yes], 8706f55e6a01Smrg [_EXT_CHECK=no]) 8707f55e6a01Smrg CFLAGS="$SAVE_CFLAGS" 8708f55e6a01Smrg AC_MSG_CHECKING([if $1 is defined]) 8709f55e6a01Smrg AC_MSG_RESULT([$_EXT_CHECK]) 8710f55e6a01Smrg if test "$_EXT_CHECK" != no; then 8711f55e6a01Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 8712f55e6a01Smrg fi 8713f55e6a01Smrg]) 8714f55e6a01Smrg 8715f55e6a01Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 8716c35d236eSmrg# 8717c35d236eSmrg# This file is free software; the Free Software Foundation 8718c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8719c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8720c35d236eSmrg 8721c35d236eSmrg# AM_AUTOMAKE_VERSION(VERSION) 8722c35d236eSmrg# ---------------------------- 8723c35d236eSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 8724c35d236eSmrg# generated from the m4 files accompanying Automake X.Y. 87254f6cd06fSmrg# (This private macro should not be called outside this file.) 87264f6cd06fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 87274f6cd06fSmrg[am__api_version='1.10' 87284f6cd06fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 87294f6cd06fSmrgdnl require some minimum version. Point them to the right macro. 8730f55e6a01Smrgm4_if([$1], [1.10.2], [], 87314f6cd06fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 87324f6cd06fSmrg]) 87334f6cd06fSmrg 87344f6cd06fSmrg# _AM_AUTOCONF_VERSION(VERSION) 87354f6cd06fSmrg# ----------------------------- 87364f6cd06fSmrg# aclocal traces this macro to find the Autoconf version. 87374f6cd06fSmrg# This is a private macro too. Using m4_define simplifies 87384f6cd06fSmrg# the logic in aclocal, which can simply ignore this definition. 87394f6cd06fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 8740c35d236eSmrg 8741c35d236eSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 8742c35d236eSmrg# ------------------------------- 87434f6cd06fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8744f55e6a01Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 8745c35d236eSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8746f55e6a01Smrg[AM_AUTOMAKE_VERSION([1.10.2])dnl 87474f6cd06fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 87484f6cd06fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8749f55e6a01Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 8750c35d236eSmrg 8751c35d236eSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 8752c35d236eSmrg 8753c35d236eSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8754c35d236eSmrg# 8755c35d236eSmrg# This file is free software; the Free Software Foundation 8756c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8757c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8758c35d236eSmrg 8759c35d236eSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8760c35d236eSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 8761c35d236eSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 8762c35d236eSmrg# 8763c35d236eSmrg# Of course, Automake must honor this variable whenever it calls a 8764c35d236eSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 8765c35d236eSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 8766c35d236eSmrg# depending on how configure is run. This is pretty annoying, since 8767c35d236eSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8768c35d236eSmrg# source directory, any form will work fine, but in subdirectories a 8769c35d236eSmrg# relative path needs to be adjusted first. 8770c35d236eSmrg# 8771c35d236eSmrg# $ac_aux_dir/missing 8772c35d236eSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 8773c35d236eSmrg# $top_srcdir/$ac_aux_dir/missing 8774c35d236eSmrg# fails if $ac_aux_dir is absolute, 8775c35d236eSmrg# fails when called from a subdirectory in a VPATH build with 8776c35d236eSmrg# a relative $ac_aux_dir 8777c35d236eSmrg# 8778c35d236eSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8779c35d236eSmrg# are both prefixed by $srcdir. In an in-source build this is usually 8780c35d236eSmrg# harmless because $srcdir is `.', but things will broke when you 8781c35d236eSmrg# start a VPATH build or use an absolute $srcdir. 8782c35d236eSmrg# 8783c35d236eSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 8784c35d236eSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 8785c35d236eSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 8786c35d236eSmrg# and then we would define $MISSING as 8787c35d236eSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 8788c35d236eSmrg# This will work as long as MISSING is not called from configure, because 8789c35d236eSmrg# unfortunately $(top_srcdir) has no meaning in configure. 8790c35d236eSmrg# However there are other variables, like CC, which are often used in 8791c35d236eSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 8792c35d236eSmrg# 8793c35d236eSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 8794c35d236eSmrg# absolute PATH. The drawback is that using absolute paths prevent a 8795c35d236eSmrg# configured tree to be moved without reconfiguration. 8796c35d236eSmrg 8797c35d236eSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 8798c35d236eSmrg[dnl Rely on autoconf to set up CDPATH properly. 8799c35d236eSmrgAC_PREREQ([2.50])dnl 8800c35d236eSmrg# expand $ac_aux_dir to an absolute path 8801c35d236eSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 8802c35d236eSmrg]) 8803c35d236eSmrg 8804c35d236eSmrg# AM_CONDITIONAL -*- Autoconf -*- 8805c35d236eSmrg 88064f6cd06fSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 8807c35d236eSmrg# Free Software Foundation, Inc. 8808c35d236eSmrg# 8809c35d236eSmrg# This file is free software; the Free Software Foundation 8810c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8811c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8812c35d236eSmrg 88134f6cd06fSmrg# serial 8 8814c35d236eSmrg 8815c35d236eSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8816c35d236eSmrg# ------------------------------------- 8817c35d236eSmrg# Define a conditional. 8818c35d236eSmrgAC_DEFUN([AM_CONDITIONAL], 8819c35d236eSmrg[AC_PREREQ(2.52)dnl 8820c35d236eSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8821c35d236eSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 88224f6cd06fSmrgAC_SUBST([$1_TRUE])dnl 88234f6cd06fSmrgAC_SUBST([$1_FALSE])dnl 88244f6cd06fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 88254f6cd06fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8826c35d236eSmrgif $2; then 8827c35d236eSmrg $1_TRUE= 8828c35d236eSmrg $1_FALSE='#' 8829c35d236eSmrgelse 8830c35d236eSmrg $1_TRUE='#' 8831c35d236eSmrg $1_FALSE= 8832c35d236eSmrgfi 8833c35d236eSmrgAC_CONFIG_COMMANDS_PRE( 8834c35d236eSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8835c35d236eSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 8836c35d236eSmrgUsually this means the macro was only invoked conditionally.]]) 8837c35d236eSmrgfi])]) 8838c35d236eSmrg 88394f6cd06fSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 8840c35d236eSmrg# Free Software Foundation, Inc. 8841c35d236eSmrg# 8842c35d236eSmrg# This file is free software; the Free Software Foundation 8843c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8844c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8845c35d236eSmrg 88464f6cd06fSmrg# serial 9 8847c35d236eSmrg 8848c35d236eSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 8849c35d236eSmrg# written in clear, in which case automake, when reading aclocal.m4, 8850c35d236eSmrg# will think it sees a *use*, and therefore will trigger all it's 8851c35d236eSmrg# C support machinery. Also note that it means that autoscan, seeing 8852c35d236eSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 8853c35d236eSmrg 8854c35d236eSmrg 8855c35d236eSmrg# _AM_DEPENDENCIES(NAME) 8856c35d236eSmrg# ---------------------- 8857c35d236eSmrg# See how the compiler implements dependency checking. 8858c35d236eSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 8859c35d236eSmrg# We try a few techniques and use that to set a single cache variable. 8860c35d236eSmrg# 8861c35d236eSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 8862c35d236eSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 8863c35d236eSmrg# dependency, and given that the user is not expected to run this macro, 8864c35d236eSmrg# just rely on AC_PROG_CC. 8865c35d236eSmrgAC_DEFUN([_AM_DEPENDENCIES], 8866c35d236eSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 8867c35d236eSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 8868c35d236eSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 8869c35d236eSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 8870c35d236eSmrg 8871c35d236eSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 8872c35d236eSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 8873c35d236eSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 88744f6cd06fSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 8875c35d236eSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 8876c35d236eSmrg [depcc="$$1" am_compiler_list=]) 8877c35d236eSmrg 8878c35d236eSmrgAC_CACHE_CHECK([dependency style of $depcc], 8879c35d236eSmrg [am_cv_$1_dependencies_compiler_type], 8880c35d236eSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 8881c35d236eSmrg # We make a subdir and do the tests there. Otherwise we can end up 8882c35d236eSmrg # making bogus files that we don't know about and never remove. For 8883c35d236eSmrg # instance it was reported that on HP-UX the gcc test will end up 8884c35d236eSmrg # making a dummy file named `D' -- because `-MD' means `put the output 8885c35d236eSmrg # in D'. 8886c35d236eSmrg mkdir conftest.dir 8887c35d236eSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 8888c35d236eSmrg # using a relative directory. 8889c35d236eSmrg cp "$am_depcomp" conftest.dir 8890c35d236eSmrg cd conftest.dir 8891c35d236eSmrg # We will build objects and dependencies in a subdirectory because 8892c35d236eSmrg # it helps to detect inapplicable dependency modes. For instance 8893c35d236eSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 8894c35d236eSmrg # side effect of compilation, but ICC will put the dependencies in 8895c35d236eSmrg # the current directory while Tru64 will put them in the object 8896c35d236eSmrg # directory. 8897c35d236eSmrg mkdir sub 8898c35d236eSmrg 8899c35d236eSmrg am_cv_$1_dependencies_compiler_type=none 8900c35d236eSmrg if test "$am_compiler_list" = ""; then 8901c35d236eSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 8902c35d236eSmrg fi 8903c35d236eSmrg for depmode in $am_compiler_list; do 8904c35d236eSmrg # Setup a source with many dependencies, because some compilers 8905c35d236eSmrg # like to wrap large dependency lists on column 80 (with \), and 8906c35d236eSmrg # we should not choose a depcomp mode which is confused by this. 8907c35d236eSmrg # 8908c35d236eSmrg # We need to recreate these files for each test, as the compiler may 8909c35d236eSmrg # overwrite some of them when testing with obscure command lines. 8910c35d236eSmrg # This happens at least with the AIX C compiler. 8911c35d236eSmrg : > sub/conftest.c 8912c35d236eSmrg for i in 1 2 3 4 5 6; do 8913c35d236eSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 8914c35d236eSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 8915c35d236eSmrg # Solaris 8's {/usr,}/bin/sh. 8916c35d236eSmrg touch sub/conftst$i.h 8917c35d236eSmrg done 8918c35d236eSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 8919c35d236eSmrg 8920c35d236eSmrg case $depmode in 8921c35d236eSmrg nosideeffect) 8922c35d236eSmrg # after this tag, mechanisms are not by side-effect, so they'll 8923c35d236eSmrg # only be used when explicitly requested 8924c35d236eSmrg if test "x$enable_dependency_tracking" = xyes; then 8925c35d236eSmrg continue 8926c35d236eSmrg else 8927c35d236eSmrg break 8928c35d236eSmrg fi 8929c35d236eSmrg ;; 8930c35d236eSmrg none) break ;; 8931c35d236eSmrg esac 8932c35d236eSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 8933c35d236eSmrg # mode. It turns out that the SunPro C++ compiler does not properly 8934c35d236eSmrg # handle `-M -o', and we need to detect this. 8935c35d236eSmrg if depmode=$depmode \ 8936c35d236eSmrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 8937c35d236eSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 8938c35d236eSmrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 8939c35d236eSmrg >/dev/null 2>conftest.err && 89404f6cd06fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 8941c35d236eSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 8942c35d236eSmrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 8943c35d236eSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 8944c35d236eSmrg # icc doesn't choke on unknown options, it will just issue warnings 8945c35d236eSmrg # or remarks (even with -Werror). So we grep stderr for any message 8946c35d236eSmrg # that says an option was ignored or not supported. 8947c35d236eSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 8948c35d236eSmrg # icc: Command line warning: ignoring option '-M'; no argument required 8949c35d236eSmrg # The diagnosis changed in icc 8.0: 8950c35d236eSmrg # icc: Command line remark: option '-MP' not supported 8951c35d236eSmrg if (grep 'ignoring option' conftest.err || 8952c35d236eSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 8953c35d236eSmrg am_cv_$1_dependencies_compiler_type=$depmode 8954c35d236eSmrg break 8955c35d236eSmrg fi 8956c35d236eSmrg fi 8957c35d236eSmrg done 8958c35d236eSmrg 8959c35d236eSmrg cd .. 8960c35d236eSmrg rm -rf conftest.dir 8961c35d236eSmrgelse 8962c35d236eSmrg am_cv_$1_dependencies_compiler_type=none 8963c35d236eSmrgfi 8964c35d236eSmrg]) 8965c35d236eSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 8966c35d236eSmrgAM_CONDITIONAL([am__fastdep$1], [ 8967c35d236eSmrg test "x$enable_dependency_tracking" != xno \ 8968c35d236eSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 8969c35d236eSmrg]) 8970c35d236eSmrg 8971c35d236eSmrg 8972c35d236eSmrg# AM_SET_DEPDIR 8973c35d236eSmrg# ------------- 8974c35d236eSmrg# Choose a directory name for dependency files. 8975c35d236eSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 8976c35d236eSmrgAC_DEFUN([AM_SET_DEPDIR], 8977c35d236eSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 8978c35d236eSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 8979c35d236eSmrg]) 8980c35d236eSmrg 8981c35d236eSmrg 8982c35d236eSmrg# AM_DEP_TRACK 8983c35d236eSmrg# ------------ 8984c35d236eSmrgAC_DEFUN([AM_DEP_TRACK], 8985c35d236eSmrg[AC_ARG_ENABLE(dependency-tracking, 8986c35d236eSmrg[ --disable-dependency-tracking speeds up one-time build 8987c35d236eSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 8988c35d236eSmrgif test "x$enable_dependency_tracking" != xno; then 8989c35d236eSmrg am_depcomp="$ac_aux_dir/depcomp" 8990c35d236eSmrg AMDEPBACKSLASH='\' 8991c35d236eSmrgfi 8992c35d236eSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 89934f6cd06fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 89944f6cd06fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 8995c35d236eSmrg]) 8996c35d236eSmrg 8997c35d236eSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 8998c35d236eSmrg 8999f55e6a01Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 9000c35d236eSmrg# Free Software Foundation, Inc. 9001c35d236eSmrg# 9002c35d236eSmrg# This file is free software; the Free Software Foundation 9003c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9004c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9005c35d236eSmrg 9006f55e6a01Smrg#serial 4 9007c35d236eSmrg 9008c35d236eSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 9009c35d236eSmrg# ------------------------------ 9010c35d236eSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 9011f55e6a01Smrg[# Autoconf 2.62 quotes --file arguments for eval, but not when files 9012f55e6a01Smrg# are listed without --file. Let's play safe and only enable the eval 9013f55e6a01Smrg# if we detect the quoting. 9014f55e6a01Smrgcase $CONFIG_FILES in 9015f55e6a01Smrg*\'*) eval set x "$CONFIG_FILES" ;; 9016f55e6a01Smrg*) set x $CONFIG_FILES ;; 9017f55e6a01Smrgesac 9018f55e6a01Smrgshift 9019f55e6a01Smrgfor mf 9020f55e6a01Smrgdo 9021c35d236eSmrg # Strip MF so we end up with the name of the file. 9022c35d236eSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 9023c35d236eSmrg # Check whether this is an Automake generated Makefile or not. 9024c35d236eSmrg # We used to match only the files named `Makefile.in', but 9025c35d236eSmrg # some people rename them; so instead we look at the file content. 9026c35d236eSmrg # Grep'ing the first line is not enough: some people post-process 9027c35d236eSmrg # each Makefile.in and add a new line on top of each file to say so. 90284f6cd06fSmrg # Grep'ing the whole file is not good either: AIX grep has a line 90294f6cd06fSmrg # limit of 2048, but all sed's we know have understand at least 4000. 90304f6cd06fSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 9031c35d236eSmrg dirpart=`AS_DIRNAME("$mf")` 9032c35d236eSmrg else 9033c35d236eSmrg continue 9034c35d236eSmrg fi 9035c35d236eSmrg # Extract the definition of DEPDIR, am__include, and am__quote 9036c35d236eSmrg # from the Makefile without running `make'. 9037c35d236eSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 9038c35d236eSmrg test -z "$DEPDIR" && continue 9039c35d236eSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 9040c35d236eSmrg test -z "am__include" && continue 9041c35d236eSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 9042c35d236eSmrg # When using ansi2knr, U may be empty or an underscore; expand it 9043c35d236eSmrg U=`sed -n 's/^U = //p' < "$mf"` 9044c35d236eSmrg # Find all dependency output files, they are included files with 9045c35d236eSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 9046c35d236eSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 9047c35d236eSmrg # expansion. 9048c35d236eSmrg for file in `sed -n " 9049c35d236eSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 9050c35d236eSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 9051c35d236eSmrg # Make sure the directory exists. 9052c35d236eSmrg test -f "$dirpart/$file" && continue 9053c35d236eSmrg fdir=`AS_DIRNAME(["$file"])` 9054c35d236eSmrg AS_MKDIR_P([$dirpart/$fdir]) 9055c35d236eSmrg # echo "creating $dirpart/$file" 9056c35d236eSmrg echo '# dummy' > "$dirpart/$file" 9057c35d236eSmrg done 9058c35d236eSmrgdone 9059c35d236eSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 9060c35d236eSmrg 9061c35d236eSmrg 9062c35d236eSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 9063c35d236eSmrg# ----------------------------- 9064c35d236eSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 9065c35d236eSmrg# 9066c35d236eSmrg# This code is only required when automatic dependency tracking 9067c35d236eSmrg# is enabled. FIXME. This creates each `.P' file that we will 9068c35d236eSmrg# need in order to bootstrap the dependency handling code. 9069c35d236eSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 9070c35d236eSmrg[AC_CONFIG_COMMANDS([depfiles], 9071c35d236eSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 9072c35d236eSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 9073c35d236eSmrg]) 9074c35d236eSmrg 9075c35d236eSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 9076c35d236eSmrg# Free Software Foundation, Inc. 9077c35d236eSmrg# 9078c35d236eSmrg# This file is free software; the Free Software Foundation 9079c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9080c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9081c35d236eSmrg 9082c35d236eSmrg# serial 8 9083c35d236eSmrg 9084c35d236eSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 9085c35d236eSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 9086c35d236eSmrg 9087c35d236eSmrg# Do all the work for Automake. -*- Autoconf -*- 9088c35d236eSmrg 90894f6cd06fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 90904f6cd06fSmrg# 2005, 2006, 2008 Free Software Foundation, Inc. 9091c35d236eSmrg# 9092c35d236eSmrg# This file is free software; the Free Software Foundation 9093c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9094c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9095c35d236eSmrg 90964f6cd06fSmrg# serial 13 9097c35d236eSmrg 9098c35d236eSmrg# This macro actually does too much. Some checks are only needed if 9099c35d236eSmrg# your package does certain things. But this isn't really a big deal. 9100c35d236eSmrg 9101c35d236eSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 9102c35d236eSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 9103c35d236eSmrg# ----------------------------------------------- 9104c35d236eSmrg# The call with PACKAGE and VERSION arguments is the old style 9105c35d236eSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 9106c35d236eSmrg# and VERSION should now be passed to AC_INIT and removed from 9107c35d236eSmrg# the call to AM_INIT_AUTOMAKE. 9108c35d236eSmrg# We support both call styles for the transition. After 9109c35d236eSmrg# the next Automake release, Autoconf can make the AC_INIT 9110c35d236eSmrg# arguments mandatory, and then we can depend on a new Autoconf 9111c35d236eSmrg# release and drop the old call support. 9112c35d236eSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 91134f6cd06fSmrg[AC_PREREQ([2.60])dnl 9114c35d236eSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 9115c35d236eSmrgdnl the ones we care about. 9116c35d236eSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 9117c35d236eSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 9118c35d236eSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 91194f6cd06fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 91204f6cd06fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 91214f6cd06fSmrg # is not polluted with repeated "-I." 91224f6cd06fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 91234f6cd06fSmrg # test to see if srcdir already configured 91244f6cd06fSmrg if test -f $srcdir/config.status; then 91254f6cd06fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 91264f6cd06fSmrg fi 9127c35d236eSmrgfi 9128c35d236eSmrg 9129c35d236eSmrg# test whether we have cygpath 9130c35d236eSmrgif test -z "$CYGPATH_W"; then 9131c35d236eSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 9132c35d236eSmrg CYGPATH_W='cygpath -w' 9133c35d236eSmrg else 9134c35d236eSmrg CYGPATH_W=echo 9135c35d236eSmrg fi 9136c35d236eSmrgfi 9137c35d236eSmrgAC_SUBST([CYGPATH_W]) 9138c35d236eSmrg 9139c35d236eSmrg# Define the identity of the package. 9140c35d236eSmrgdnl Distinguish between old-style and new-style calls. 9141c35d236eSmrgm4_ifval([$2], 9142c35d236eSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 9143c35d236eSmrg AC_SUBST([PACKAGE], [$1])dnl 9144c35d236eSmrg AC_SUBST([VERSION], [$2])], 9145c35d236eSmrg[_AM_SET_OPTIONS([$1])dnl 91464f6cd06fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 91474f6cd06fSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 91484f6cd06fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 9149c35d236eSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 9150c35d236eSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9151c35d236eSmrg 9152c35d236eSmrg_AM_IF_OPTION([no-define],, 9153c35d236eSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 9154c35d236eSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 9155c35d236eSmrg 9156c35d236eSmrg# Some tools Automake needs. 9157c35d236eSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 9158c35d236eSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 9159c35d236eSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 9160c35d236eSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 9161c35d236eSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 9162c35d236eSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 9163c35d236eSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 9164c35d236eSmrgAM_PROG_INSTALL_SH 9165c35d236eSmrgAM_PROG_INSTALL_STRIP 9166c35d236eSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 9167c35d236eSmrg# We need awk for the "check" target. The system "awk" is bad on 9168c35d236eSmrg# some platforms. 9169c35d236eSmrgAC_REQUIRE([AC_PROG_AWK])dnl 9170c35d236eSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 9171c35d236eSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 9172c35d236eSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9173c35d236eSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9174c35d236eSmrg [_AM_PROG_TAR([v7])])]) 9175c35d236eSmrg_AM_IF_OPTION([no-dependencies],, 9176c35d236eSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 9177c35d236eSmrg [_AM_DEPENDENCIES(CC)], 9178c35d236eSmrg [define([AC_PROG_CC], 9179c35d236eSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 9180c35d236eSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 9181c35d236eSmrg [_AM_DEPENDENCIES(CXX)], 9182c35d236eSmrg [define([AC_PROG_CXX], 9183c35d236eSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 91844f6cd06fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 91854f6cd06fSmrg [_AM_DEPENDENCIES(OBJC)], 91864f6cd06fSmrg [define([AC_PROG_OBJC], 91874f6cd06fSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 9188c35d236eSmrg]) 9189c35d236eSmrg]) 9190c35d236eSmrg 9191c35d236eSmrg 9192c35d236eSmrg# When config.status generates a header, we must update the stamp-h file. 9193c35d236eSmrg# This file resides in the same directory as the config header 9194c35d236eSmrg# that is generated. The stamp files are numbered to have different names. 9195c35d236eSmrg 9196c35d236eSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 9197c35d236eSmrg# loop where config.status creates the headers, so we can generate 9198c35d236eSmrg# our stamp files there. 9199c35d236eSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 9200c35d236eSmrg[# Compute $1's index in $config_headers. 92014f6cd06fSmrg_am_arg=$1 9202c35d236eSmrg_am_stamp_count=1 9203c35d236eSmrgfor _am_header in $config_headers :; do 9204c35d236eSmrg case $_am_header in 92054f6cd06fSmrg $_am_arg | $_am_arg:* ) 9206c35d236eSmrg break ;; 9207c35d236eSmrg * ) 9208c35d236eSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 9209c35d236eSmrg esac 9210c35d236eSmrgdone 92114f6cd06fSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9212c35d236eSmrg 9213c35d236eSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9214c35d236eSmrg# 9215c35d236eSmrg# This file is free software; the Free Software Foundation 9216c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9217c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9218c35d236eSmrg 9219c35d236eSmrg# AM_PROG_INSTALL_SH 9220c35d236eSmrg# ------------------ 9221c35d236eSmrg# Define $install_sh. 9222c35d236eSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 9223c35d236eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 92244f6cd06fSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 9225c35d236eSmrgAC_SUBST(install_sh)]) 9226c35d236eSmrg 9227c35d236eSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 9228c35d236eSmrg# 9229c35d236eSmrg# This file is free software; the Free Software Foundation 9230c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9231c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9232c35d236eSmrg 9233c35d236eSmrg# serial 2 9234c35d236eSmrg 9235c35d236eSmrg# Check whether the underlying file-system supports filenames 9236c35d236eSmrg# with a leading dot. For instance MS-DOS doesn't. 9237c35d236eSmrgAC_DEFUN([AM_SET_LEADING_DOT], 9238c35d236eSmrg[rm -rf .tst 2>/dev/null 9239c35d236eSmrgmkdir .tst 2>/dev/null 9240c35d236eSmrgif test -d .tst; then 9241c35d236eSmrg am__leading_dot=. 9242c35d236eSmrgelse 9243c35d236eSmrg am__leading_dot=_ 9244c35d236eSmrgfi 9245c35d236eSmrgrmdir .tst 2>/dev/null 9246c35d236eSmrgAC_SUBST([am__leading_dot])]) 9247c35d236eSmrg 9248c35d236eSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 9249c35d236eSmrg# From Jim Meyering 9250c35d236eSmrg 9251c35d236eSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 9252c35d236eSmrg# Free Software Foundation, Inc. 9253c35d236eSmrg# 9254c35d236eSmrg# This file is free software; the Free Software Foundation 9255c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9256c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9257c35d236eSmrg 9258c35d236eSmrg# serial 4 9259c35d236eSmrg 9260c35d236eSmrgAC_DEFUN([AM_MAINTAINER_MODE], 9261c35d236eSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 9262c35d236eSmrg dnl maintainer-mode is disabled by default 9263c35d236eSmrg AC_ARG_ENABLE(maintainer-mode, 9264c35d236eSmrg[ --enable-maintainer-mode enable make rules and dependencies not useful 9265c35d236eSmrg (and sometimes confusing) to the casual installer], 9266c35d236eSmrg USE_MAINTAINER_MODE=$enableval, 9267c35d236eSmrg USE_MAINTAINER_MODE=no) 9268c35d236eSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 9269c35d236eSmrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 9270c35d236eSmrg MAINT=$MAINTAINER_MODE_TRUE 9271c35d236eSmrg AC_SUBST(MAINT)dnl 9272c35d236eSmrg] 9273c35d236eSmrg) 9274c35d236eSmrg 9275c35d236eSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 9276c35d236eSmrg 9277c35d236eSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 9278c35d236eSmrg 9279c35d236eSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 9280c35d236eSmrg# 9281c35d236eSmrg# This file is free software; the Free Software Foundation 9282c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9283c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9284c35d236eSmrg 9285c35d236eSmrg# serial 3 9286c35d236eSmrg 9287c35d236eSmrg# AM_MAKE_INCLUDE() 9288c35d236eSmrg# ----------------- 9289c35d236eSmrg# Check to see how make treats includes. 9290c35d236eSmrgAC_DEFUN([AM_MAKE_INCLUDE], 9291c35d236eSmrg[am_make=${MAKE-make} 9292c35d236eSmrgcat > confinc << 'END' 9293c35d236eSmrgam__doit: 9294c35d236eSmrg @echo done 9295c35d236eSmrg.PHONY: am__doit 9296c35d236eSmrgEND 9297c35d236eSmrg# If we don't find an include directive, just comment out the code. 9298c35d236eSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 9299c35d236eSmrgam__include="#" 9300c35d236eSmrgam__quote= 9301c35d236eSmrg_am_result=none 9302c35d236eSmrg# First try GNU make style include. 9303c35d236eSmrgecho "include confinc" > confmf 9304c35d236eSmrg# We grep out `Entering directory' and `Leaving directory' 9305c35d236eSmrg# messages which can occur if `w' ends up in MAKEFLAGS. 9306c35d236eSmrg# In particular we don't look at `^make:' because GNU make might 9307c35d236eSmrg# be invoked under some other name (usually "gmake"), in which 9308c35d236eSmrg# case it prints its new name instead of `make'. 9309c35d236eSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 9310c35d236eSmrg am__include=include 9311c35d236eSmrg am__quote= 9312c35d236eSmrg _am_result=GNU 9313c35d236eSmrgfi 9314c35d236eSmrg# Now try BSD make style include. 9315c35d236eSmrgif test "$am__include" = "#"; then 9316c35d236eSmrg echo '.include "confinc"' > confmf 9317c35d236eSmrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 9318c35d236eSmrg am__include=.include 9319c35d236eSmrg am__quote="\"" 9320c35d236eSmrg _am_result=BSD 9321c35d236eSmrg fi 9322c35d236eSmrgfi 9323c35d236eSmrgAC_SUBST([am__include]) 9324c35d236eSmrgAC_SUBST([am__quote]) 9325c35d236eSmrgAC_MSG_RESULT([$_am_result]) 9326c35d236eSmrgrm -f confinc confmf 9327c35d236eSmrg]) 9328c35d236eSmrg 9329c35d236eSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9330c35d236eSmrg 93314f6cd06fSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 9332c35d236eSmrg# Free Software Foundation, Inc. 9333c35d236eSmrg# 9334c35d236eSmrg# This file is free software; the Free Software Foundation 9335c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9336c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9337c35d236eSmrg 93384f6cd06fSmrg# serial 5 9339c35d236eSmrg 9340c35d236eSmrg# AM_MISSING_PROG(NAME, PROGRAM) 9341c35d236eSmrg# ------------------------------ 9342c35d236eSmrgAC_DEFUN([AM_MISSING_PROG], 9343c35d236eSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 9344c35d236eSmrg$1=${$1-"${am_missing_run}$2"} 9345c35d236eSmrgAC_SUBST($1)]) 9346c35d236eSmrg 9347c35d236eSmrg 9348c35d236eSmrg# AM_MISSING_HAS_RUN 9349c35d236eSmrg# ------------------ 9350c35d236eSmrg# Define MISSING if not defined so far and test if it supports --run. 9351c35d236eSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 9352c35d236eSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 9353c35d236eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 93544f6cd06fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 9355c35d236eSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 9356c35d236eSmrg# Use eval to expand $SHELL 9357c35d236eSmrgif eval "$MISSING --run true"; then 9358c35d236eSmrg am_missing_run="$MISSING --run " 9359c35d236eSmrgelse 9360c35d236eSmrg am_missing_run= 9361c35d236eSmrg AC_MSG_WARN([`missing' script is too old or missing]) 9362c35d236eSmrgfi 9363c35d236eSmrg]) 9364c35d236eSmrg 93654f6cd06fSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 9366c35d236eSmrg# 9367c35d236eSmrg# This file is free software; the Free Software Foundation 9368c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9369c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9370c35d236eSmrg 9371c35d236eSmrg# AM_PROG_MKDIR_P 9372c35d236eSmrg# --------------- 93734f6cd06fSmrg# Check for `mkdir -p'. 9374c35d236eSmrgAC_DEFUN([AM_PROG_MKDIR_P], 93754f6cd06fSmrg[AC_PREREQ([2.60])dnl 93764f6cd06fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 93774f6cd06fSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 93784f6cd06fSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 93794f6cd06fSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 93804f6cd06fSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 93814f6cd06fSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 93824f6cd06fSmrgdnl adjustment using top_builddir (which is defined more often than 93834f6cd06fSmrgdnl MKDIR_P). 93844f6cd06fSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 93854f6cd06fSmrgcase $mkdir_p in 93864f6cd06fSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 93874f6cd06fSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 93884f6cd06fSmrgesac 93894f6cd06fSmrg]) 9390c35d236eSmrg 9391c35d236eSmrg# Helper functions for option handling. -*- Autoconf -*- 9392c35d236eSmrg 9393f55e6a01Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 9394c35d236eSmrg# 9395c35d236eSmrg# This file is free software; the Free Software Foundation 9396c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9397c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9398c35d236eSmrg 9399f55e6a01Smrg# serial 4 9400c35d236eSmrg 9401c35d236eSmrg# _AM_MANGLE_OPTION(NAME) 9402c35d236eSmrg# ----------------------- 9403c35d236eSmrgAC_DEFUN([_AM_MANGLE_OPTION], 9404c35d236eSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 9405c35d236eSmrg 9406c35d236eSmrg# _AM_SET_OPTION(NAME) 9407c35d236eSmrg# ------------------------------ 9408c35d236eSmrg# Set option NAME. Presently that only means defining a flag for this option. 9409c35d236eSmrgAC_DEFUN([_AM_SET_OPTION], 9410c35d236eSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 9411c35d236eSmrg 9412c35d236eSmrg# _AM_SET_OPTIONS(OPTIONS) 9413c35d236eSmrg# ---------------------------------- 9414c35d236eSmrg# OPTIONS is a space-separated list of Automake options. 9415c35d236eSmrgAC_DEFUN([_AM_SET_OPTIONS], 9416f55e6a01Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 9417c35d236eSmrg 9418c35d236eSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 9419c35d236eSmrg# ------------------------------------------- 9420c35d236eSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9421c35d236eSmrgAC_DEFUN([_AM_IF_OPTION], 9422c35d236eSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 9423c35d236eSmrg 9424c35d236eSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 9425c35d236eSmrg 9426c35d236eSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 9427c35d236eSmrg# Free Software Foundation, Inc. 9428c35d236eSmrg# 9429c35d236eSmrg# This file is free software; the Free Software Foundation 9430c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9431c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9432c35d236eSmrg 9433c35d236eSmrg# serial 4 9434c35d236eSmrg 9435c35d236eSmrg# AM_SANITY_CHECK 9436c35d236eSmrg# --------------- 9437c35d236eSmrgAC_DEFUN([AM_SANITY_CHECK], 9438c35d236eSmrg[AC_MSG_CHECKING([whether build environment is sane]) 9439c35d236eSmrg# Just in case 9440c35d236eSmrgsleep 1 9441c35d236eSmrgecho timestamp > conftest.file 9442c35d236eSmrg# Do `set' in a subshell so we don't clobber the current shell's 9443c35d236eSmrg# arguments. Must try -L first in case configure is actually a 9444c35d236eSmrg# symlink; some systems play weird games with the mod time of symlinks 9445c35d236eSmrg# (eg FreeBSD returns the mod time of the symlink's containing 9446c35d236eSmrg# directory). 9447c35d236eSmrgif ( 9448c35d236eSmrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 9449c35d236eSmrg if test "$[*]" = "X"; then 9450c35d236eSmrg # -L didn't work. 9451c35d236eSmrg set X `ls -t $srcdir/configure conftest.file` 9452c35d236eSmrg fi 9453c35d236eSmrg rm -f conftest.file 9454c35d236eSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 9455c35d236eSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 9456c35d236eSmrg 9457c35d236eSmrg # If neither matched, then we have a broken ls. This can happen 9458c35d236eSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 9459c35d236eSmrg # broken ls alias from the environment. This has actually 9460c35d236eSmrg # happened. Such a system could not be considered "sane". 9461c35d236eSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 9462c35d236eSmrgalias in your environment]) 9463c35d236eSmrg fi 9464c35d236eSmrg 9465c35d236eSmrg test "$[2]" = conftest.file 9466c35d236eSmrg ) 9467c35d236eSmrgthen 9468c35d236eSmrg # Ok. 9469c35d236eSmrg : 9470c35d236eSmrgelse 9471c35d236eSmrg AC_MSG_ERROR([newly created file is older than distributed files! 9472c35d236eSmrgCheck your system clock]) 9473c35d236eSmrgfi 9474c35d236eSmrgAC_MSG_RESULT(yes)]) 9475c35d236eSmrg 9476c35d236eSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9477c35d236eSmrg# 9478c35d236eSmrg# This file is free software; the Free Software Foundation 9479c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9480c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9481c35d236eSmrg 9482c35d236eSmrg# AM_PROG_INSTALL_STRIP 9483c35d236eSmrg# --------------------- 9484c35d236eSmrg# One issue with vendor `install' (even GNU) is that you can't 9485c35d236eSmrg# specify the program used to strip binaries. This is especially 9486c35d236eSmrg# annoying in cross-compiling environments, where the build's strip 9487c35d236eSmrg# is unlikely to handle the host's binaries. 9488c35d236eSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9489c35d236eSmrg# always use install-sh in `make install-strip', and initialize 9490c35d236eSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9491c35d236eSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9492c35d236eSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9493c35d236eSmrg# Installed binaries are usually stripped using `strip' when the user 9494c35d236eSmrg# run `make install-strip'. However `strip' might not be the right 9495c35d236eSmrg# tool to use in cross-compilation environments, therefore Automake 9496c35d236eSmrg# will honor the `STRIP' environment variable to overrule this program. 9497c35d236eSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9498c35d236eSmrgif test "$cross_compiling" != no; then 9499c35d236eSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9500c35d236eSmrgfi 95014f6cd06fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9502c35d236eSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9503c35d236eSmrg 95044f6cd06fSmrg# Copyright (C) 2006 Free Software Foundation, Inc. 95054f6cd06fSmrg# 95064f6cd06fSmrg# This file is free software; the Free Software Foundation 95074f6cd06fSmrg# gives unlimited permission to copy and/or distribute it, 95084f6cd06fSmrg# with or without modifications, as long as this notice is preserved. 95094f6cd06fSmrg 95104f6cd06fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 95114f6cd06fSmrg# --------------------------- 95124f6cd06fSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 95134f6cd06fSmrg# This macro is traced by Automake. 95144f6cd06fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 95154f6cd06fSmrg 9516c35d236eSmrg# Check how to create a tarball. -*- Autoconf -*- 9517c35d236eSmrg 9518c35d236eSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9519c35d236eSmrg# 9520c35d236eSmrg# This file is free software; the Free Software Foundation 9521c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 9522c35d236eSmrg# with or without modifications, as long as this notice is preserved. 9523c35d236eSmrg 9524c35d236eSmrg# serial 2 9525c35d236eSmrg 9526c35d236eSmrg# _AM_PROG_TAR(FORMAT) 9527c35d236eSmrg# -------------------- 9528c35d236eSmrg# Check how to create a tarball in format FORMAT. 9529c35d236eSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 9530c35d236eSmrg# 9531c35d236eSmrg# Substitute a variable $(am__tar) that is a command 9532c35d236eSmrg# writing to stdout a FORMAT-tarball containing the directory 9533c35d236eSmrg# $tardir. 9534c35d236eSmrg# tardir=directory && $(am__tar) > result.tar 9535c35d236eSmrg# 9536c35d236eSmrg# Substitute a variable $(am__untar) that extract such 9537c35d236eSmrg# a tarball read from stdin. 9538c35d236eSmrg# $(am__untar) < result.tar 9539c35d236eSmrgAC_DEFUN([_AM_PROG_TAR], 9540c35d236eSmrg[# Always define AMTAR for backward compatibility. 9541c35d236eSmrgAM_MISSING_PROG([AMTAR], [tar]) 9542c35d236eSmrgm4_if([$1], [v7], 9543c35d236eSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9544c35d236eSmrg [m4_case([$1], [ustar],, [pax],, 9545c35d236eSmrg [m4_fatal([Unknown tar format])]) 9546c35d236eSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9547c35d236eSmrg# Loop over all known methods to create a tar archive until one works. 9548c35d236eSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9549c35d236eSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9550c35d236eSmrg# Do not fold the above two line into one, because Tru64 sh and 9551c35d236eSmrg# Solaris sh will not grok spaces in the rhs of `-'. 9552c35d236eSmrgfor _am_tool in $_am_tools 9553c35d236eSmrgdo 9554c35d236eSmrg case $_am_tool in 9555c35d236eSmrg gnutar) 9556c35d236eSmrg for _am_tar in tar gnutar gtar; 9557c35d236eSmrg do 9558c35d236eSmrg AM_RUN_LOG([$_am_tar --version]) && break 9559c35d236eSmrg done 9560c35d236eSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9561c35d236eSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9562c35d236eSmrg am__untar="$_am_tar -xf -" 9563c35d236eSmrg ;; 9564c35d236eSmrg plaintar) 9565c35d236eSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 9566c35d236eSmrg # ustar tarball either. 9567c35d236eSmrg (tar --version) >/dev/null 2>&1 && continue 9568c35d236eSmrg am__tar='tar chf - "$$tardir"' 9569c35d236eSmrg am__tar_='tar chf - "$tardir"' 9570c35d236eSmrg am__untar='tar xf -' 9571c35d236eSmrg ;; 9572c35d236eSmrg pax) 9573c35d236eSmrg am__tar='pax -L -x $1 -w "$$tardir"' 9574c35d236eSmrg am__tar_='pax -L -x $1 -w "$tardir"' 9575c35d236eSmrg am__untar='pax -r' 9576c35d236eSmrg ;; 9577c35d236eSmrg cpio) 9578c35d236eSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9579c35d236eSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9580c35d236eSmrg am__untar='cpio -i -H $1 -d' 9581c35d236eSmrg ;; 9582c35d236eSmrg none) 9583c35d236eSmrg am__tar=false 9584c35d236eSmrg am__tar_=false 9585c35d236eSmrg am__untar=false 9586c35d236eSmrg ;; 9587c35d236eSmrg esac 9588c35d236eSmrg 9589c35d236eSmrg # If the value was cached, stop now. We just wanted to have am__tar 9590c35d236eSmrg # and am__untar set. 9591c35d236eSmrg test -n "${am_cv_prog_tar_$1}" && break 9592c35d236eSmrg 9593c35d236eSmrg # tar/untar a dummy directory, and stop if the command works 9594c35d236eSmrg rm -rf conftest.dir 9595c35d236eSmrg mkdir conftest.dir 9596c35d236eSmrg echo GrepMe > conftest.dir/file 9597c35d236eSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 9598c35d236eSmrg rm -rf conftest.dir 9599c35d236eSmrg if test -s conftest.tar; then 9600c35d236eSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 9601c35d236eSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 9602c35d236eSmrg fi 9603c35d236eSmrgdone 9604c35d236eSmrgrm -rf conftest.dir 9605c35d236eSmrg 9606c35d236eSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 9607c35d236eSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 9608c35d236eSmrgAC_SUBST([am__tar]) 9609c35d236eSmrgAC_SUBST([am__untar]) 9610c35d236eSmrg]) # _AM_PROG_TAR 9611c35d236eSmrg 9612