aclocal.m4 revision dc9477be
1dc9477beSmrg# generated automatically by aclocal 1.13.4 -*- Autoconf -*- 2f1ee322dSmrg 306c34b88Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4c43cc173Smrg 5c43cc173Smrg# This file is free software; the Free Software Foundation 6c43cc173Smrg# gives unlimited permission to copy and/or distribute it, 7c43cc173Smrg# with or without modifications, as long as this notice is preserved. 8c43cc173Smrg 9c43cc173Smrg# This program is distributed in the hope that it will be useful, 10c43cc173Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11c43cc173Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12c43cc173Smrg# PARTICULAR PURPOSE. 13c43cc173Smrg 1406c34b88Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1521e67964Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1621e67964Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17f1ee322dSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18f1ee322dSmrg[m4_warning([this file was generated for autoconf 2.69. 1921e67964SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2021e67964SmrgIf you have problems, you may need to regenerate the build system entirely. 21f1ee322dSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22c43cc173Smrg 23dc9477beSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24c27c18e8Smrg# 25dc9477beSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 26dc9477beSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 27dc9477beSmrg# Foundation, Inc. 28dc9477beSmrg# Written by Gordon Matzigkeit, 1996 29c27c18e8Smrg# 30dc9477beSmrg# This file is free software; the Free Software Foundation gives 31dc9477beSmrg# unlimited permission to copy and/or distribute it, with or without 32dc9477beSmrg# modifications, as long as this notice is preserved. 33c27c18e8Smrg 34dc9477beSmrgm4_define([_LT_COPYING], [dnl 35dc9477beSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 36dc9477beSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 37dc9477beSmrg# Foundation, Inc. 38dc9477beSmrg# Written by Gordon Matzigkeit, 1996 39c27c18e8Smrg# 40dc9477beSmrg# This file is part of GNU Libtool. 41c27c18e8Smrg# 42dc9477beSmrg# GNU Libtool is free software; you can redistribute it and/or 43dc9477beSmrg# modify it under the terms of the GNU General Public License as 44dc9477beSmrg# published by the Free Software Foundation; either version 2 of 45dc9477beSmrg# the License, or (at your option) any later version. 46c27c18e8Smrg# 47dc9477beSmrg# As a special exception to the GNU General Public License, 48dc9477beSmrg# if you distribute this file as part of a program or library that 49dc9477beSmrg# is built using GNU Libtool, you may include this file under the 50dc9477beSmrg# same distribution terms that you use for the rest of that program. 51c27c18e8Smrg# 52dc9477beSmrg# GNU Libtool is distributed in the hope that it will be useful, 53dc9477beSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 54dc9477beSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55dc9477beSmrg# GNU General Public License for more details. 56c27c18e8Smrg# 57dc9477beSmrg# You should have received a copy of the GNU General Public License 58dc9477beSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 59dc9477beSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 60dc9477beSmrg# obtained by writing to the Free Software Foundation, Inc., 61dc9477beSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62c27c18e8Smrg]) 63c27c18e8Smrg 64dc9477beSmrg# serial 57 LT_INIT 65c27c18e8Smrg 66c43cc173Smrg 67dc9477beSmrg# LT_PREREQ(VERSION) 68dc9477beSmrg# ------------------ 69dc9477beSmrg# Complain and exit if this libtool version is less that VERSION. 70dc9477beSmrgm4_defun([LT_PREREQ], 71dc9477beSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 72dc9477beSmrg [m4_default([$3], 73dc9477beSmrg [m4_fatal([Libtool version $1 or higher is required], 74dc9477beSmrg 63)])], 75dc9477beSmrg [$2])]) 76c43cc173Smrg 77c27c18e8Smrg 78dc9477beSmrg# _LT_CHECK_BUILDDIR 79dc9477beSmrg# ------------------ 80dc9477beSmrg# Complain if the absolute build directory name contains unusual characters 81dc9477beSmrgm4_defun([_LT_CHECK_BUILDDIR], 82dc9477beSmrg[case `pwd` in 83dc9477beSmrg *\ * | *\ *) 84dc9477beSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 85dc9477beSmrgesac 86dc9477beSmrg]) 87c27c18e8Smrg 88c27c18e8Smrg 89dc9477beSmrg# LT_INIT([OPTIONS]) 90dc9477beSmrg# ------------------ 91dc9477beSmrgAC_DEFUN([LT_INIT], 92dc9477beSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 93dc9477beSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 94dc9477beSmrgAC_BEFORE([$0], [LT_LANG])dnl 95dc9477beSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 96dc9477beSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 97dc9477beSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 98c27c18e8Smrg 99dc9477beSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 100dc9477beSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 101dc9477beSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 102dc9477beSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 103dc9477beSmrgdnl unless we require an AC_DEFUNed macro: 104dc9477beSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 105dc9477beSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 106dc9477beSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 107dc9477beSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 108dc9477beSmrgm4_require([_LT_PROG_LTMAIN])dnl 109c27c18e8Smrg 110dc9477beSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 111c27c18e8Smrg 112dc9477beSmrgdnl Parse OPTIONS 113dc9477beSmrg_LT_SET_OPTIONS([$0], [$1]) 114c43cc173Smrg 115dc9477beSmrg# This can be used to rebuild libtool when needed 116dc9477beSmrgLIBTOOL_DEPS="$ltmain" 117c43cc173Smrg 118dc9477beSmrg# Always use our own libtool. 119dc9477beSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 120dc9477beSmrgAC_SUBST(LIBTOOL)dnl 121c43cc173Smrg 122dc9477beSmrg_LT_SETUP 123c43cc173Smrg 124dc9477beSmrg# Only expand once: 125dc9477beSmrgm4_define([LT_INIT]) 126dc9477beSmrg])# LT_INIT 127c43cc173Smrg 128dc9477beSmrg# Old names: 129dc9477beSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 130dc9477beSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 131dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 132dc9477beSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 133dc9477beSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 134c43cc173Smrg 135c43cc173Smrg 136dc9477beSmrg# _LT_CC_BASENAME(CC) 137dc9477beSmrg# ------------------- 138dc9477beSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 139dc9477beSmrgm4_defun([_LT_CC_BASENAME], 140dc9477beSmrg[for cc_temp in $1""; do 141dc9477beSmrg case $cc_temp in 142dc9477beSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 143dc9477beSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 144dc9477beSmrg \-*) ;; 145dc9477beSmrg *) break;; 146dc9477beSmrg esac 147dc9477beSmrgdone 148dc9477beSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 14906c34b88Smrg]) 15037eb1ca1Smrg 15137eb1ca1Smrg 152dc9477beSmrg# _LT_FILEUTILS_DEFAULTS 153dc9477beSmrg# ---------------------- 154dc9477beSmrg# It is okay to use these file commands and assume they have been set 155dc9477beSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 156dc9477beSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 157dc9477beSmrg[: ${CP="cp -f"} 158dc9477beSmrg: ${MV="mv -f"} 159dc9477beSmrg: ${RM="rm -f"} 160dc9477beSmrg])# _LT_FILEUTILS_DEFAULTS 16137eb1ca1Smrg 162c43cc173Smrg 163dc9477beSmrg# _LT_SETUP 164dc9477beSmrg# --------- 165dc9477beSmrgm4_defun([_LT_SETUP], 166dc9477beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 167dc9477beSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 168dc9477beSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 169dc9477beSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170c43cc173Smrg 171dc9477beSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 172dc9477beSmrgdnl 173dc9477beSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 174dc9477beSmrg_LT_DECL([], [host], [0])dnl 175dc9477beSmrg_LT_DECL([], [host_os], [0])dnl 176dc9477beSmrgdnl 177dc9477beSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 178dc9477beSmrg_LT_DECL([], [build], [0])dnl 179dc9477beSmrg_LT_DECL([], [build_os], [0])dnl 180dc9477beSmrgdnl 181dc9477beSmrgAC_REQUIRE([AC_PROG_CC])dnl 182dc9477beSmrgAC_REQUIRE([LT_PATH_LD])dnl 183dc9477beSmrgAC_REQUIRE([LT_PATH_NM])dnl 184dc9477beSmrgdnl 185dc9477beSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 186dc9477beSmrgtest -z "$LN_S" && LN_S="ln -s" 187dc9477beSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 188dc9477beSmrgdnl 189dc9477beSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 190dc9477beSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 191dc9477beSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 192dc9477beSmrgdnl 193dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 194dc9477beSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 195dc9477beSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 196dc9477beSmrgm4_require([_LT_CMD_RELOAD])dnl 197dc9477beSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 198dc9477beSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 199dc9477beSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 200dc9477beSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 201dc9477beSmrgm4_require([_LT_WITH_SYSROOT])dnl 202c27c18e8Smrg 203dc9477beSmrg_LT_CONFIG_LIBTOOL_INIT([ 204dc9477beSmrg# See if we are running on zsh, and set the options which allow our 205dc9477beSmrg# commands through without removal of \ escapes INIT. 206dc9477beSmrgif test -n "\${ZSH_VERSION+set}" ; then 207dc9477beSmrg setopt NO_GLOB_SUBST 208dc9477beSmrgfi 20906c34b88Smrg]) 210dc9477beSmrgif test -n "${ZSH_VERSION+set}" ; then 211dc9477beSmrg setopt NO_GLOB_SUBST 212dc9477beSmrgfi 213c27c18e8Smrg 214dc9477beSmrg_LT_CHECK_OBJDIR 215c27c18e8Smrg 216dc9477beSmrgm4_require([_LT_TAG_COMPILER])dnl 217c27c18e8Smrg 218dc9477beSmrgcase $host_os in 219dc9477beSmrgaix3*) 220dc9477beSmrg # AIX sometimes has problems with the GCC collect2 program. For some 221dc9477beSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 222dc9477beSmrg # vanish in a puff of smoke. 223dc9477beSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 224dc9477beSmrg COLLECT_NAMES= 225dc9477beSmrg export COLLECT_NAMES 22606c34b88Smrg fi 227dc9477beSmrg ;; 228dc9477beSmrgesac 229c27c18e8Smrg 230dc9477beSmrg# Global variables: 231dc9477beSmrgofile=libtool 232dc9477beSmrgcan_build_shared=yes 233c27c18e8Smrg 234dc9477beSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 235dc9477beSmrg# which needs '.lib'). 236dc9477beSmrglibext=a 237c27c18e8Smrg 238dc9477beSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 239c27c18e8Smrg 240dc9477beSmrgold_CC="$CC" 241dc9477beSmrgold_CFLAGS="$CFLAGS" 242c27c18e8Smrg 243dc9477beSmrg# Set sane defaults for various variables 244dc9477beSmrgtest -z "$CC" && CC=cc 245dc9477beSmrgtest -z "$LTCC" && LTCC=$CC 246dc9477beSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 247dc9477beSmrgtest -z "$LD" && LD=ld 248dc9477beSmrgtest -z "$ac_objext" && ac_objext=o 249c27c18e8Smrg 250dc9477beSmrg_LT_CC_BASENAME([$compiler]) 251c27c18e8Smrg 252dc9477beSmrg# Only perform the check for file, if the check method requires it 253dc9477beSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 254dc9477beSmrgcase $deplibs_check_method in 255dc9477beSmrgfile_magic*) 256dc9477beSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 257dc9477beSmrg _LT_PATH_MAGIC 258dc9477beSmrg fi 259dc9477beSmrg ;; 260dc9477beSmrgesac 261c27c18e8Smrg 262dc9477beSmrg# Use C for the default configuration in the libtool script 263dc9477beSmrgLT_SUPPORTED_TAG([CC]) 264dc9477beSmrg_LT_LANG_C_CONFIG 265dc9477beSmrg_LT_LANG_DEFAULT_CONFIG 266dc9477beSmrg_LT_CONFIG_COMMANDS 267dc9477beSmrg])# _LT_SETUP 268c27c18e8Smrg 269c27c18e8Smrg 270dc9477beSmrg# _LT_PREPARE_SED_QUOTE_VARS 271dc9477beSmrg# -------------------------- 272dc9477beSmrg# Define a few sed substitution that help us do robust quoting. 273dc9477beSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 274dc9477beSmrg[# Backslashify metacharacters that are still active within 275dc9477beSmrg# double-quoted strings. 276dc9477beSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 277c27c18e8Smrg 278dc9477beSmrg# Same as above, but do not quote variable references. 279dc9477beSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280c27c18e8Smrg 281dc9477beSmrg# Sed substitution to delay expansion of an escaped shell variable in a 282dc9477beSmrg# double_quote_subst'ed string. 283dc9477beSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284c27c18e8Smrg 285dc9477beSmrg# Sed substitution to delay expansion of an escaped single quote. 286dc9477beSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287c27c18e8Smrg 288dc9477beSmrg# Sed substitution to avoid accidental globbing in evaled expressions 289dc9477beSmrgno_glob_subst='s/\*/\\\*/g' 290dc9477beSmrg]) 291c27c18e8Smrg 292dc9477beSmrg# _LT_PROG_LTMAIN 293dc9477beSmrg# --------------- 294dc9477beSmrg# Note that this code is called both from `configure', and `config.status' 295dc9477beSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 296dc9477beSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 297dc9477beSmrg# so we pass a copy along to make sure it has a sensible value anyway. 298dc9477beSmrgm4_defun([_LT_PROG_LTMAIN], 299dc9477beSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 300dc9477beSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 301dc9477beSmrgltmain="$ac_aux_dir/ltmain.sh" 302dc9477beSmrg])# _LT_PROG_LTMAIN 303c27c18e8Smrg 304c27c18e8Smrg 305c43cc173Smrg 306dc9477beSmrg# So that we can recreate a full libtool script including additional 307dc9477beSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 308dc9477beSmrg# in macros and then make a single call at the end using the `libtool' 309dc9477beSmrg# label. 310dc9477beSmrg 311dc9477beSmrg 312dc9477beSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 313dc9477beSmrg# ---------------------------------------- 314dc9477beSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 315dc9477beSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 316dc9477beSmrg[m4_ifval([$1], 317dc9477beSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 318dc9477beSmrg [$1 319dc9477beSmrg])])]) 320dc9477beSmrg 321dc9477beSmrg# Initialize. 322dc9477beSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 323dc9477beSmrg 324dc9477beSmrg 325dc9477beSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 32606c34b88Smrg# ------------------------------ 327dc9477beSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 328dc9477beSmrgm4_define([_LT_CONFIG_LIBTOOL], 329dc9477beSmrg[m4_ifval([$1], 330dc9477beSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 331dc9477beSmrg [$1 332dc9477beSmrg])])]) 333c43cc173Smrg 334dc9477beSmrg# Initialize. 335dc9477beSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 336dc9477beSmrg 337dc9477beSmrg 338dc9477beSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 339dc9477beSmrg# ----------------------------------------------------- 340dc9477beSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 341dc9477beSmrg[_LT_CONFIG_LIBTOOL([$1]) 342dc9477beSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 343c27c18e8Smrg]) 344c27c18e8Smrg 345c27c18e8Smrg 346dc9477beSmrg# _LT_FORMAT_COMMENT([COMMENT]) 347dc9477beSmrg# ----------------------------- 348dc9477beSmrg# Add leading comment marks to the start of each line, and a trailing 349dc9477beSmrg# full-stop to the whole comment if one is not present already. 350dc9477beSmrgm4_define([_LT_FORMAT_COMMENT], 351dc9477beSmrg[m4_ifval([$1], [ 352dc9477beSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 353dc9477beSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 354dc9477beSmrg)]) 355c27c18e8Smrg 356c27c18e8Smrg 357c27c18e8Smrg 358c27c18e8Smrg 359c27c18e8Smrg 360dc9477beSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 361dc9477beSmrg# ------------------------------------------------------------------- 362dc9477beSmrg# CONFIGNAME is the name given to the value in the libtool script. 363dc9477beSmrg# VARNAME is the (base) name used in the configure script. 364dc9477beSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 365dc9477beSmrg# VARNAME. Any other value will be used directly. 366dc9477beSmrgm4_define([_LT_DECL], 367dc9477beSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 368dc9477beSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 369dc9477beSmrg [m4_ifval([$1], [$1], [$2])]) 370dc9477beSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 371dc9477beSmrg m4_ifval([$4], 372dc9477beSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 373dc9477beSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 374dc9477beSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 375dc9477beSmrg]) 376c27c18e8Smrg 377c27c18e8Smrg 378dc9477beSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 379dc9477beSmrg# -------------------------------------------------------- 380dc9477beSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 381c27c18e8Smrg 382c27c18e8Smrg 383dc9477beSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 384dc9477beSmrg# ------------------------------------------------ 385dc9477beSmrgm4_define([lt_decl_tag_varnames], 386dc9477beSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 387dc9477beSmrg 388dc9477beSmrg 389dc9477beSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 390dc9477beSmrg# --------------------------------------------------------- 391dc9477beSmrgm4_define([_lt_decl_filter], 392dc9477beSmrg[m4_case([$#], 393dc9477beSmrg [0], [m4_fatal([$0: too few arguments: $#])], 394dc9477beSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 395dc9477beSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 396dc9477beSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 397dc9477beSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 39806c34b88Smrg]) 399c27c18e8Smrg 400c27c18e8Smrg 401dc9477beSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 402dc9477beSmrg# -------------------------------------------------- 403dc9477beSmrgm4_define([lt_decl_quote_varnames], 404dc9477beSmrg[_lt_decl_filter([value], [1], $@)]) 405dc9477beSmrg 406dc9477beSmrg 407dc9477beSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 408dc9477beSmrg# --------------------------------------------------- 409dc9477beSmrgm4_define([lt_decl_dquote_varnames], 410dc9477beSmrg[_lt_decl_filter([value], [2], $@)]) 411dc9477beSmrg 412dc9477beSmrg 413dc9477beSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 414dc9477beSmrg# --------------------------------------------------- 415dc9477beSmrgm4_define([lt_decl_varnames_tagged], 416dc9477beSmrg[m4_assert([$# <= 2])dnl 417dc9477beSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 418dc9477beSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 419dc9477beSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 420dc9477beSmrgm4_define([_lt_decl_varnames_tagged], 421dc9477beSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 422dc9477beSmrg 423dc9477beSmrg 424dc9477beSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 425dc9477beSmrg# ------------------------------------------------ 426dc9477beSmrgm4_define([lt_decl_all_varnames], 427dc9477beSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 428dc9477beSmrg m4_if([$2], [], 429dc9477beSmrg m4_quote(lt_decl_varnames), 430dc9477beSmrg m4_quote(m4_shift($@))))[]dnl 43106c34b88Smrg]) 432dc9477beSmrgm4_define([_lt_decl_all_varnames], 433dc9477beSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 434dc9477beSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 43506c34b88Smrg]) 436c27c18e8Smrg 43737eb1ca1Smrg 438dc9477beSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 439dc9477beSmrg# ------------------------------------ 440dc9477beSmrg# Quote a variable value, and forward it to `config.status' so that its 441dc9477beSmrg# declaration there will have the same value as in `configure'. VARNAME 442dc9477beSmrg# must have a single quote delimited value for this to work. 443dc9477beSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 444dc9477beSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 44506c34b88Smrg 44606c34b88Smrg 447dc9477beSmrg# _LT_CONFIG_STATUS_DECLARATIONS 448dc9477beSmrg# ------------------------------ 449dc9477beSmrg# We delimit libtool config variables with single quotes, so when 450dc9477beSmrg# we write them to config.status, we have to be sure to quote all 451dc9477beSmrg# embedded single quotes properly. In configure, this macro expands 452dc9477beSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 453dc9477beSmrg# 454dc9477beSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 455dc9477beSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 456dc9477beSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 457dc9477beSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 45806c34b88Smrg 45906c34b88Smrg 460dc9477beSmrg# _LT_LIBTOOL_TAGS 461dc9477beSmrg# ---------------- 462dc9477beSmrg# Output comment and list of tags supported by the script 463dc9477beSmrgm4_defun([_LT_LIBTOOL_TAGS], 464dc9477beSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 465dc9477beSmrgavailable_tags="_LT_TAGS"dnl 466dc9477beSmrg]) 46706c34b88Smrg 46806c34b88Smrg 469dc9477beSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 470dc9477beSmrg# ----------------------------------- 471dc9477beSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 472dc9477beSmrg# expand to a commented shell variable setting: 47306c34b88Smrg# 474dc9477beSmrg# # Some comment about what VAR is for. 475dc9477beSmrg# visible_name=$lt_internal_name 476dc9477beSmrgm4_define([_LT_LIBTOOL_DECLARE], 477dc9477beSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 478dc9477beSmrg [description])))[]dnl 479dc9477beSmrgm4_pushdef([_libtool_name], 480dc9477beSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 481dc9477beSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 482dc9477beSmrg [0], [_libtool_name=[$]$1], 483dc9477beSmrg [1], [_libtool_name=$lt_[]$1], 484dc9477beSmrg [2], [_libtool_name=$lt_[]$1], 485dc9477beSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 486dc9477beSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 487dc9477beSmrg]) 48806c34b88Smrg 48906c34b88Smrg 490dc9477beSmrg# _LT_LIBTOOL_CONFIG_VARS 491dc9477beSmrg# ----------------------- 492dc9477beSmrg# Produce commented declarations of non-tagged libtool config variables 493dc9477beSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 494dc9477beSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 495dc9477beSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 496dc9477beSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 497dc9477beSmrg[m4_foreach([_lt_var], 498dc9477beSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 499dc9477beSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 50006c34b88Smrg 50106c34b88Smrg 502dc9477beSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 503dc9477beSmrg# ------------------------- 504dc9477beSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 505dc9477beSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 506dc9477beSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 50706c34b88Smrg 50806c34b88Smrg 509dc9477beSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 510dc9477beSmrg# ------------------------------ 511dc9477beSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 51206c34b88Smrg 51306c34b88Smrg 514dc9477beSmrg# _LT_CONFIG_COMMANDS 515dc9477beSmrg# ------------------- 516dc9477beSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 517dc9477beSmrg# variables for single and double quote escaping we saved from calls 518dc9477beSmrg# to _LT_DECL, we can put quote escaped variables declarations 519dc9477beSmrg# into `config.status', and then the shell code to quote escape them in 520dc9477beSmrg# for loops in `config.status'. Finally, any additional code accumulated 521dc9477beSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 522dc9477beSmrgm4_defun([_LT_CONFIG_COMMANDS], 523dc9477beSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 524dc9477beSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 525dc9477beSmrg dnl instead of duplicating it all over again into config.status, 526dc9477beSmrg dnl then we will have config.status run $CONFIG_LT later, so it 527dc9477beSmrg dnl needs to know what name is stored there: 528dc9477beSmrg [AC_CONFIG_COMMANDS([libtool], 529dc9477beSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 530dc9477beSmrg dnl If the libtool generation code is destined for config.status, 531dc9477beSmrg dnl expand the accumulated commands and init code now: 532dc9477beSmrg [AC_CONFIG_COMMANDS([libtool], 533dc9477beSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 534dc9477beSmrg])#_LT_CONFIG_COMMANDS 535c27c18e8Smrg 536c27c18e8Smrg 537dc9477beSmrg# Initialize. 538dc9477beSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 539dc9477beSmrg[ 540c27c18e8Smrg 541dc9477beSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 542dc9477beSmrg# if CDPATH is set. 543dc9477beSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 544c27c18e8Smrg 545dc9477beSmrgsed_quote_subst='$sed_quote_subst' 546dc9477beSmrgdouble_quote_subst='$double_quote_subst' 547dc9477beSmrgdelay_variable_subst='$delay_variable_subst' 548dc9477beSmrg_LT_CONFIG_STATUS_DECLARATIONS 549dc9477beSmrgLTCC='$LTCC' 550dc9477beSmrgLTCFLAGS='$LTCFLAGS' 551dc9477beSmrgcompiler='$compiler_DEFAULT' 552c27c18e8Smrg 553dc9477beSmrg# A function that is used when there is no print builtin or printf. 554dc9477beSmrgfunc_fallback_echo () 555dc9477beSmrg{ 556dc9477beSmrg eval 'cat <<_LTECHO_EOF 557dc9477beSmrg\$[]1 558dc9477beSmrg_LTECHO_EOF' 559dc9477beSmrg} 560c27c18e8Smrg 561dc9477beSmrg# Quote evaled strings. 562dc9477beSmrgfor var in lt_decl_all_varnames([[ \ 563dc9477beSmrg]], lt_decl_quote_varnames); do 564dc9477beSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 565dc9477beSmrg *[[\\\\\\\`\\"\\\$]]*) 566dc9477beSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 567dc9477beSmrg ;; 568dc9477beSmrg *) 569dc9477beSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 570dc9477beSmrg ;; 571dc9477beSmrg esac 572dc9477beSmrgdone 573c27c18e8Smrg 574dc9477beSmrg# Double-quote double-evaled strings. 575dc9477beSmrgfor var in lt_decl_all_varnames([[ \ 576dc9477beSmrg]], lt_decl_dquote_varnames); do 577dc9477beSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 578dc9477beSmrg *[[\\\\\\\`\\"\\\$]]*) 579dc9477beSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 580dc9477beSmrg ;; 581dc9477beSmrg *) 582dc9477beSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 583dc9477beSmrg ;; 584dc9477beSmrg esac 585dc9477beSmrgdone 586c27c18e8Smrg 587dc9477beSmrg_LT_OUTPUT_LIBTOOL_INIT 58806c34b88Smrg]) 589c27c18e8Smrg 590dc9477beSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 591dc9477beSmrg# ------------------------------------ 592dc9477beSmrg# Generate a child script FILE with all initialization necessary to 593dc9477beSmrg# reuse the environment learned by the parent script, and make the 594dc9477beSmrg# file executable. If COMMENT is supplied, it is inserted after the 595dc9477beSmrg# `#!' sequence but before initialization text begins. After this 596dc9477beSmrg# macro, additional text can be appended to FILE to form the body of 597dc9477beSmrg# the child script. The macro ends with non-zero status if the 598dc9477beSmrg# file could not be fully written (such as if the disk is full). 599dc9477beSmrgm4_ifdef([AS_INIT_GENERATED], 600dc9477beSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 601dc9477beSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 602dc9477beSmrg[m4_require([AS_PREPARE])]dnl 603dc9477beSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 604dc9477beSmrg[lt_write_fail=0 605dc9477beSmrgcat >$1 <<_ASEOF || lt_write_fail=1 606dc9477beSmrg#! $SHELL 607dc9477beSmrg# Generated by $as_me. 608dc9477beSmrg$2 609dc9477beSmrgSHELL=\${CONFIG_SHELL-$SHELL} 610dc9477beSmrgexport SHELL 611dc9477beSmrg_ASEOF 612dc9477beSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 613dc9477beSmrgAS_SHELL_SANITIZE 614dc9477beSmrg_AS_PREPARE 615dc9477beSmrgexec AS_MESSAGE_FD>&1 616dc9477beSmrg_ASEOF 617dc9477beSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 618dc9477beSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 619c27c18e8Smrg 620dc9477beSmrg# LT_OUTPUT 621dc9477beSmrg# --------- 622dc9477beSmrg# This macro allows early generation of the libtool script (before 623dc9477beSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 624dc9477beSmrg# tests. 625dc9477beSmrgAC_DEFUN([LT_OUTPUT], 626dc9477beSmrg[: ${CONFIG_LT=./config.lt} 627dc9477beSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 628dc9477beSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 629dc9477beSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 630c27c18e8Smrg 631dc9477beSmrgcat >>"$CONFIG_LT" <<\_LTEOF 632dc9477beSmrglt_cl_silent=false 633dc9477beSmrgexec AS_MESSAGE_LOG_FD>>config.log 634dc9477beSmrg{ 635dc9477beSmrg echo 636dc9477beSmrg AS_BOX([Running $as_me.]) 637dc9477beSmrg} >&AS_MESSAGE_LOG_FD 638c27c18e8Smrg 639dc9477beSmrglt_cl_help="\ 640dc9477beSmrg\`$as_me' creates a local libtool stub from the current configuration, 641dc9477beSmrgfor use in further configure time tests before the real libtool is 642dc9477beSmrggenerated. 643c27c18e8Smrg 644dc9477beSmrgUsage: $[0] [[OPTIONS]] 645c27c18e8Smrg 646dc9477beSmrg -h, --help print this help, then exit 647dc9477beSmrg -V, --version print version number, then exit 648dc9477beSmrg -q, --quiet do not print progress messages 649dc9477beSmrg -d, --debug don't remove temporary files 650c27c18e8Smrg 651dc9477beSmrgReport bugs to <bug-libtool@gnu.org>." 652c27c18e8Smrg 653dc9477beSmrglt_cl_version="\ 654dc9477beSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 655dc9477beSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 656dc9477beSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 657c27c18e8Smrg 658dc9477beSmrgCopyright (C) 2011 Free Software Foundation, Inc. 659dc9477beSmrgThis config.lt script is free software; the Free Software Foundation 660dc9477beSmrggives unlimited permision to copy, distribute and modify it." 661dc9477beSmrg 662dc9477beSmrgwhile test $[#] != 0 663dc9477beSmrgdo 664dc9477beSmrg case $[1] in 665dc9477beSmrg --version | --v* | -V ) 666dc9477beSmrg echo "$lt_cl_version"; exit 0 ;; 667dc9477beSmrg --help | --h* | -h ) 668dc9477beSmrg echo "$lt_cl_help"; exit 0 ;; 669dc9477beSmrg --debug | --d* | -d ) 670dc9477beSmrg debug=: ;; 671dc9477beSmrg --quiet | --q* | --silent | --s* | -q ) 672dc9477beSmrg lt_cl_silent=: ;; 673c27c18e8Smrg 674dc9477beSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 675dc9477beSmrgTry \`$[0] --help' for more information.]) ;; 676c27c18e8Smrg 677dc9477beSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 678dc9477beSmrgTry \`$[0] --help' for more information.]) ;; 67906c34b88Smrg esac 680dc9477beSmrg shift 68106c34b88Smrgdone 682c27c18e8Smrg 683dc9477beSmrgif $lt_cl_silent; then 684dc9477beSmrg exec AS_MESSAGE_FD>/dev/null 685dc9477beSmrgfi 686dc9477beSmrg_LTEOF 687c27c18e8Smrg 688dc9477beSmrgcat >>"$CONFIG_LT" <<_LTEOF 689dc9477beSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 690dc9477beSmrg_LTEOF 691c27c18e8Smrg 692dc9477beSmrgcat >>"$CONFIG_LT" <<\_LTEOF 693dc9477beSmrgAC_MSG_NOTICE([creating $ofile]) 694dc9477beSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 695dc9477beSmrgAS_EXIT(0) 696dc9477beSmrg_LTEOF 697dc9477beSmrgchmod +x "$CONFIG_LT" 698c27c18e8Smrg 699dc9477beSmrg# configure is writing to config.log, but config.lt does its own redirection, 700dc9477beSmrg# appending to config.log, which fails on DOS, as config.log is still kept 701dc9477beSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 702dc9477beSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 703dc9477beSmrglt_cl_success=: 704dc9477beSmrgtest "$silent" = yes && 705dc9477beSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 706dc9477beSmrgexec AS_MESSAGE_LOG_FD>/dev/null 707dc9477beSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 708dc9477beSmrgexec AS_MESSAGE_LOG_FD>>config.log 709dc9477beSmrg$lt_cl_success || AS_EXIT(1) 710dc9477beSmrg])# LT_OUTPUT 71106c34b88Smrg 71206c34b88Smrg 713dc9477beSmrg# _LT_CONFIG(TAG) 714dc9477beSmrg# --------------- 715dc9477beSmrg# If TAG is the built-in tag, create an initial libtool script with a 716dc9477beSmrg# default configuration from the untagged config vars. Otherwise add code 717dc9477beSmrg# to config.status for appending the configuration named by TAG from the 718dc9477beSmrg# matching tagged config vars. 719dc9477beSmrgm4_defun([_LT_CONFIG], 720dc9477beSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 721dc9477beSmrg_LT_CONFIG_SAVE_COMMANDS([ 722dc9477beSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 723dc9477beSmrg m4_if(_LT_TAG, [C], [ 724dc9477beSmrg # See if we are running on zsh, and set the options which allow our 725dc9477beSmrg # commands through without removal of \ escapes. 726dc9477beSmrg if test -n "${ZSH_VERSION+set}" ; then 727dc9477beSmrg setopt NO_GLOB_SUBST 728dc9477beSmrg fi 729c27c18e8Smrg 730dc9477beSmrg cfgfile="${ofile}T" 731dc9477beSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 732dc9477beSmrg $RM "$cfgfile" 733c27c18e8Smrg 734dc9477beSmrg cat <<_LT_EOF >> "$cfgfile" 735dc9477beSmrg#! $SHELL 736c27c18e8Smrg 737dc9477beSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 738dc9477beSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 739dc9477beSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 740dc9477beSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 741dc9477beSmrg# 742dc9477beSmrg_LT_COPYING 743dc9477beSmrg_LT_LIBTOOL_TAGS 744c27c18e8Smrg 745dc9477beSmrg# ### BEGIN LIBTOOL CONFIG 746dc9477beSmrg_LT_LIBTOOL_CONFIG_VARS 747dc9477beSmrg_LT_LIBTOOL_TAG_VARS 748dc9477beSmrg# ### END LIBTOOL CONFIG 749c27c18e8Smrg 750dc9477beSmrg_LT_EOF 751c27c18e8Smrg 752dc9477beSmrg case $host_os in 753dc9477beSmrg aix3*) 754dc9477beSmrg cat <<\_LT_EOF >> "$cfgfile" 755dc9477beSmrg# AIX sometimes has problems with the GCC collect2 program. For some 756dc9477beSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 757dc9477beSmrg# vanish in a puff of smoke. 758dc9477beSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 759dc9477beSmrg COLLECT_NAMES= 760dc9477beSmrg export COLLECT_NAMES 761dc9477beSmrgfi 762dc9477beSmrg_LT_EOF 763dc9477beSmrg ;; 764dc9477beSmrg esac 765c27c18e8Smrg 766dc9477beSmrg _LT_PROG_LTMAIN 767c27c18e8Smrg 768dc9477beSmrg # We use sed instead of cat because bash on DJGPP gets confused if 769dc9477beSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 770dc9477beSmrg # text mode, it properly converts lines to CR/LF. This bash problem 771dc9477beSmrg # is reportedly fixed, but why not run on old versions too? 772dc9477beSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 773dc9477beSmrg || (rm -f "$cfgfile"; exit 1) 774c27c18e8Smrg 775dc9477beSmrg _LT_PROG_REPLACE_SHELLFNS 776c27c18e8Smrg 777dc9477beSmrg mv -f "$cfgfile" "$ofile" || 778dc9477beSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 779dc9477beSmrg chmod +x "$ofile" 780dc9477beSmrg], 781dc9477beSmrg[cat <<_LT_EOF >> "$ofile" 782c27c18e8Smrg 783dc9477beSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 784dc9477beSmrgdnl in a comment (ie after a #). 785dc9477beSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 786dc9477beSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 787dc9477beSmrg# ### END LIBTOOL TAG CONFIG: $1 788dc9477beSmrg_LT_EOF 789dc9477beSmrg])dnl /m4_if 790dc9477beSmrg], 791dc9477beSmrg[m4_if([$1], [], [ 792dc9477beSmrg PACKAGE='$PACKAGE' 793dc9477beSmrg VERSION='$VERSION' 794dc9477beSmrg TIMESTAMP='$TIMESTAMP' 795dc9477beSmrg RM='$RM' 796dc9477beSmrg ofile='$ofile'], []) 797dc9477beSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 798dc9477beSmrg])# _LT_CONFIG 799c27c18e8Smrg 800c27c18e8Smrg 801dc9477beSmrg# LT_SUPPORTED_TAG(TAG) 802dc9477beSmrg# --------------------- 803dc9477beSmrg# Trace this macro to discover what tags are supported by the libtool 804dc9477beSmrg# --tag option, using: 805dc9477beSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 806dc9477beSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 807c27c18e8Smrg 808c27c18e8Smrg 809dc9477beSmrg# C support is built-in for now 810dc9477beSmrgm4_define([_LT_LANG_C_enabled], []) 811dc9477beSmrgm4_define([_LT_TAGS], []) 812c27c18e8Smrg 813c27c18e8Smrg 814dc9477beSmrg# LT_LANG(LANG) 815dc9477beSmrg# ------------- 816dc9477beSmrg# Enable libtool support for the given language if not already enabled. 817dc9477beSmrgAC_DEFUN([LT_LANG], 818dc9477beSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 819dc9477beSmrgm4_case([$1], 820dc9477beSmrg [C], [_LT_LANG(C)], 821dc9477beSmrg [C++], [_LT_LANG(CXX)], 822dc9477beSmrg [Go], [_LT_LANG(GO)], 823dc9477beSmrg [Java], [_LT_LANG(GCJ)], 824dc9477beSmrg [Fortran 77], [_LT_LANG(F77)], 825dc9477beSmrg [Fortran], [_LT_LANG(FC)], 826dc9477beSmrg [Windows Resource], [_LT_LANG(RC)], 827dc9477beSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 828dc9477beSmrg [_LT_LANG($1)], 829dc9477beSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 830dc9477beSmrg])# LT_LANG 831c27c18e8Smrg 832c43cc173Smrg 833dc9477beSmrg# _LT_LANG(LANGNAME) 834dc9477beSmrg# ------------------ 835dc9477beSmrgm4_defun([_LT_LANG], 836dc9477beSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 837dc9477beSmrg [LT_SUPPORTED_TAG([$1])dnl 838dc9477beSmrg m4_append([_LT_TAGS], [$1 ])dnl 839dc9477beSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 840dc9477beSmrg _LT_LANG_$1_CONFIG($1)])dnl 841dc9477beSmrg])# _LT_LANG 842c27c18e8Smrg 843c43cc173Smrg 844dc9477beSmrgm4_ifndef([AC_PROG_GO], [ 845dc9477beSmrg# NOTE: This macro has been submitted for inclusion into # 846dc9477beSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 847dc9477beSmrg# a released version of Autoconf we should remove this # 848dc9477beSmrg# macro and use it instead. # 849dc9477beSmrgm4_defun([AC_PROG_GO], 850dc9477beSmrg[AC_LANG_PUSH(Go)dnl 851dc9477beSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 852dc9477beSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 853dc9477beSmrg_AC_ARG_VAR_LDFLAGS()dnl 854dc9477beSmrgAC_CHECK_TOOL(GOC, gccgo) 855dc9477beSmrgif test -z "$GOC"; then 856dc9477beSmrg if test -n "$ac_tool_prefix"; then 857dc9477beSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 858dc9477beSmrg fi 859dc9477beSmrgfi 860dc9477beSmrgif test -z "$GOC"; then 861dc9477beSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 862dc9477beSmrgfi 863dc9477beSmrg])#m4_defun 864dc9477beSmrg])#m4_ifndef 865c43cc173Smrg 866c43cc173Smrg 867dc9477beSmrg# _LT_LANG_DEFAULT_CONFIG 868dc9477beSmrg# ----------------------- 869dc9477beSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 870dc9477beSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 871dc9477beSmrg [LT_LANG(CXX)], 872dc9477beSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 873c43cc173Smrg 874dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 875dc9477beSmrg [LT_LANG(F77)], 876dc9477beSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 877c43cc173Smrg 878dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 879dc9477beSmrg [LT_LANG(FC)], 880dc9477beSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 881c43cc173Smrg 882dc9477beSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 883dc9477beSmrgdnl pulling things in needlessly. 884dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 885dc9477beSmrg [LT_LANG(GCJ)], 886dc9477beSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 887dc9477beSmrg [LT_LANG(GCJ)], 888dc9477beSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 889dc9477beSmrg [LT_LANG(GCJ)], 890dc9477beSmrg [m4_ifdef([AC_PROG_GCJ], 891dc9477beSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 892dc9477beSmrg m4_ifdef([A][M_PROG_GCJ], 893dc9477beSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 894dc9477beSmrg m4_ifdef([LT_PROG_GCJ], 895dc9477beSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 896c43cc173Smrg 897dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 898dc9477beSmrg [LT_LANG(GO)], 899dc9477beSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 90021e67964Smrg 901dc9477beSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 902dc9477beSmrg [LT_LANG(RC)], 903dc9477beSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 904dc9477beSmrg])# _LT_LANG_DEFAULT_CONFIG 905f1ee322dSmrg 906dc9477beSmrg# Obsolete macros: 907dc9477beSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 908dc9477beSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 909dc9477beSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 910dc9477beSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 911dc9477beSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 912dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 913dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 914dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 915dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 916dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 917dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 918f1ee322dSmrg 919c43cc173Smrg 920dc9477beSmrg# _LT_TAG_COMPILER 921dc9477beSmrg# ---------------- 922dc9477beSmrgm4_defun([_LT_TAG_COMPILER], 923dc9477beSmrg[AC_REQUIRE([AC_PROG_CC])dnl 924c27c18e8Smrg 925dc9477beSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 926dc9477beSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 927dc9477beSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 928dc9477beSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 92906c34b88Smrg 930dc9477beSmrg# If no C compiler was specified, use CC. 931dc9477beSmrgLTCC=${LTCC-"$CC"} 93206c34b88Smrg 933dc9477beSmrg# If no C compiler flags were specified, use CFLAGS. 934dc9477beSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 93506c34b88Smrg 936dc9477beSmrg# Allow CC to be a program name with arguments. 937dc9477beSmrgcompiler=$CC 938dc9477beSmrg])# _LT_TAG_COMPILER 93906c34b88Smrg 940c27c18e8Smrg 941dc9477beSmrg# _LT_COMPILER_BOILERPLATE 942dc9477beSmrg# ------------------------ 943dc9477beSmrg# Check for compiler boilerplate output or warnings with 944dc9477beSmrg# the simple compiler test code. 945dc9477beSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 946dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 947dc9477beSmrgac_outfile=conftest.$ac_objext 948dc9477beSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 949dc9477beSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 950dc9477beSmrg_lt_compiler_boilerplate=`cat conftest.err` 951dc9477beSmrg$RM conftest* 952dc9477beSmrg])# _LT_COMPILER_BOILERPLATE 953c43cc173Smrg 954c43cc173Smrg 955dc9477beSmrg# _LT_LINKER_BOILERPLATE 956dc9477beSmrg# ---------------------- 957dc9477beSmrg# Check for linker boilerplate output or warnings with 958dc9477beSmrg# the simple link test code. 959dc9477beSmrgm4_defun([_LT_LINKER_BOILERPLATE], 960dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 961dc9477beSmrgac_outfile=conftest.$ac_objext 962dc9477beSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 963dc9477beSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 964dc9477beSmrg_lt_linker_boilerplate=`cat conftest.err` 965dc9477beSmrg$RM -r conftest* 966dc9477beSmrg])# _LT_LINKER_BOILERPLATE 96737eb1ca1Smrg 968dc9477beSmrg# _LT_REQUIRED_DARWIN_CHECKS 969dc9477beSmrg# ------------------------- 970dc9477beSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 971dc9477beSmrg case $host_os in 972dc9477beSmrg rhapsody* | darwin*) 973dc9477beSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 974dc9477beSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 975dc9477beSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 976dc9477beSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 977dc9477beSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 978dc9477beSmrg _LT_DECL([], [DSYMUTIL], [1], 979dc9477beSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 980dc9477beSmrg _LT_DECL([], [NMEDIT], [1], 981dc9477beSmrg [Tool to change global to local symbols on Mac OS X]) 982dc9477beSmrg _LT_DECL([], [LIPO], [1], 983dc9477beSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 984dc9477beSmrg _LT_DECL([], [OTOOL], [1], 985dc9477beSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 986dc9477beSmrg _LT_DECL([], [OTOOL64], [1], 987dc9477beSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 988c43cc173Smrg 989dc9477beSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 990dc9477beSmrg [lt_cv_apple_cc_single_mod=no 991dc9477beSmrg if test -z "${LT_MULTI_MODULE}"; then 992dc9477beSmrg # By default we will add the -single_module flag. You can override 993dc9477beSmrg # by either setting the environment variable LT_MULTI_MODULE 994dc9477beSmrg # non-empty at configure time, or by adding -multi_module to the 995dc9477beSmrg # link flags. 996dc9477beSmrg rm -rf libconftest.dylib* 997dc9477beSmrg echo "int foo(void){return 1;}" > conftest.c 998dc9477beSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 999dc9477beSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1000dc9477beSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1001dc9477beSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1002dc9477beSmrg _lt_result=$? 1003dc9477beSmrg # If there is a non-empty error log, and "single_module" 1004dc9477beSmrg # appears in it, assume the flag caused a linker warning 1005dc9477beSmrg if test -s conftest.err && $GREP single_module conftest.err; then 1006dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1007dc9477beSmrg # Otherwise, if the output was created with a 0 exit code from 1008dc9477beSmrg # the compiler, it worked. 1009dc9477beSmrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 1010dc9477beSmrg lt_cv_apple_cc_single_mod=yes 1011dc9477beSmrg else 1012dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1013dc9477beSmrg fi 1014dc9477beSmrg rm -rf libconftest.dylib* 1015dc9477beSmrg rm -f conftest.* 1016dc9477beSmrg fi]) 1017c43cc173Smrg 1018dc9477beSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1019dc9477beSmrg [lt_cv_ld_exported_symbols_list], 1020dc9477beSmrg [lt_cv_ld_exported_symbols_list=no 1021dc9477beSmrg save_LDFLAGS=$LDFLAGS 1022dc9477beSmrg echo "_main" > conftest.sym 1023dc9477beSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1024dc9477beSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1025dc9477beSmrg [lt_cv_ld_exported_symbols_list=yes], 1026dc9477beSmrg [lt_cv_ld_exported_symbols_list=no]) 1027dc9477beSmrg LDFLAGS="$save_LDFLAGS" 1028dc9477beSmrg ]) 1029c43cc173Smrg 1030dc9477beSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1031dc9477beSmrg [lt_cv_ld_force_load=no 1032dc9477beSmrg cat > conftest.c << _LT_EOF 1033dc9477beSmrgint forced_loaded() { return 2;} 1034dc9477beSmrg_LT_EOF 1035dc9477beSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1036dc9477beSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1037dc9477beSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1038dc9477beSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1039dc9477beSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1040dc9477beSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1041dc9477beSmrg cat > conftest.c << _LT_EOF 1042dc9477beSmrgint main() { return 0;} 1043dc9477beSmrg_LT_EOF 1044dc9477beSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1045dc9477beSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1046dc9477beSmrg _lt_result=$? 1047dc9477beSmrg if test -s conftest.err && $GREP force_load conftest.err; then 1048dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1049dc9477beSmrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1050dc9477beSmrg lt_cv_ld_force_load=yes 1051dc9477beSmrg else 1052dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1053dc9477beSmrg fi 1054dc9477beSmrg rm -f conftest.err libconftest.a conftest conftest.c 1055dc9477beSmrg rm -rf conftest.dSYM 1056dc9477beSmrg ]) 1057dc9477beSmrg case $host_os in 1058dc9477beSmrg rhapsody* | darwin1.[[012]]) 1059dc9477beSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1060dc9477beSmrg darwin1.*) 1061dc9477beSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1062dc9477beSmrg darwin*) # darwin 5.x on 1063dc9477beSmrg # if running on 10.5 or later, the deployment target defaults 1064dc9477beSmrg # to the OS version, if on x86, and 10.4, the deployment 1065dc9477beSmrg # target defaults to 10.4. Don't you love it? 1066dc9477beSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1067dc9477beSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1068dc9477beSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1069dc9477beSmrg 10.[[012]]*) 1070dc9477beSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1071dc9477beSmrg 10.*) 1072dc9477beSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1073dc9477beSmrg esac 1074dc9477beSmrg ;; 1075dc9477beSmrg esac 1076dc9477beSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1077dc9477beSmrg _lt_dar_single_mod='$single_module' 1078dc9477beSmrg fi 1079dc9477beSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1080dc9477beSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1081dc9477beSmrg else 1082dc9477beSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1083dc9477beSmrg fi 1084dc9477beSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1085dc9477beSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1086dc9477beSmrg else 1087dc9477beSmrg _lt_dsymutil= 1088dc9477beSmrg fi 1089dc9477beSmrg ;; 1090dc9477beSmrg esac 109106c34b88Smrg]) 1092c43cc173Smrg 1093c43cc173Smrg 1094dc9477beSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1095dc9477beSmrg# --------------------------------- 1096dc9477beSmrg# Checks for linker and compiler features on darwin 1097dc9477beSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1098dc9477beSmrg[ 1099dc9477beSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1100dc9477beSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1101dc9477beSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1102dc9477beSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1103dc9477beSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1104dc9477beSmrg if test "$lt_cv_ld_force_load" = "yes"; then 1105dc9477beSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 1106dc9477beSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1107dc9477beSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1108dc9477beSmrg else 1109dc9477beSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1110dc9477beSmrg fi 1111dc9477beSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1112dc9477beSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1113dc9477beSmrg case $cc_basename in 1114dc9477beSmrg ifort*) _lt_dar_can_shared=yes ;; 1115dc9477beSmrg *) _lt_dar_can_shared=$GCC ;; 1116dc9477beSmrg esac 1117dc9477beSmrg if test "$_lt_dar_can_shared" = "yes"; then 1118dc9477beSmrg output_verbose_link_cmd=func_echo_all 1119dc9477beSmrg _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}" 1120dc9477beSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1121dc9477beSmrg _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}" 1122dc9477beSmrg _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}" 1123dc9477beSmrg m4_if([$1], [CXX], 1124dc9477beSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1125dc9477beSmrg _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}" 1126dc9477beSmrg _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}" 1127dc9477beSmrg fi 1128dc9477beSmrg],[]) 1129dc9477beSmrg else 1130dc9477beSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1131dc9477beSmrg fi 1132dc9477beSmrg]) 1133c43cc173Smrg 1134dc9477beSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1135dc9477beSmrg# ---------------------------------- 1136dc9477beSmrg# Links a minimal program and checks the executable 1137dc9477beSmrg# for the system default hardcoded library path. In most cases, 1138dc9477beSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1139dc9477beSmrg# the location of the communication and MPI libs are included too. 1140dc9477beSmrg# If we don't find anything, use the default library path according 1141dc9477beSmrg# to the aix ld manual. 1142dc9477beSmrg# Store the results from the different compilers for each TAGNAME. 1143dc9477beSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1144dc9477beSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1145dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 1146dc9477beSmrgif test "${lt_cv_aix_libpath+set}" = set; then 1147dc9477beSmrg aix_libpath=$lt_cv_aix_libpath 1148dc9477beSmrgelse 1149dc9477beSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1150dc9477beSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1151dc9477beSmrg lt_aix_libpath_sed='[ 1152dc9477beSmrg /Import File Strings/,/^$/ { 1153dc9477beSmrg /^0/ { 1154dc9477beSmrg s/^0 *\([^ ]*\) *$/\1/ 1155dc9477beSmrg p 1156dc9477beSmrg } 1157dc9477beSmrg }]' 1158dc9477beSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1159dc9477beSmrg # Check for a 64-bit object if we didn't find anything. 1160dc9477beSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1161dc9477beSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1162dc9477beSmrg fi],[]) 1163dc9477beSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1164dc9477beSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1165dc9477beSmrg fi 1166dc9477beSmrg ]) 1167dc9477beSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1168dc9477beSmrgfi 1169dc9477beSmrg])# _LT_SYS_MODULE_PATH_AIX 1170c43cc173Smrg 1171b789ec8aSmrg 1172dc9477beSmrg# _LT_SHELL_INIT(ARG) 1173dc9477beSmrg# ------------------- 1174dc9477beSmrgm4_define([_LT_SHELL_INIT], 1175dc9477beSmrg[m4_divert_text([M4SH-INIT], [$1 1176dc9477beSmrg])])# _LT_SHELL_INIT 1177b789ec8aSmrg 1178b789ec8aSmrg 1179c43cc173Smrg 1180dc9477beSmrg# _LT_PROG_ECHO_BACKSLASH 118106c34b88Smrg# ----------------------- 1182dc9477beSmrg# Find how we can fake an echo command that does not interpret backslash. 1183dc9477beSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1184dc9477beSmrg# of the generated configure script which will find a shell with a builtin 1185dc9477beSmrg# printf (which we can use as an echo command). 1186dc9477beSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1187dc9477beSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1188dc9477beSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1189dc9477beSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1190c43cc173Smrg 1191dc9477beSmrgAC_MSG_CHECKING([how to print strings]) 1192dc9477beSmrg# Test print first, because it will be a builtin if present. 1193dc9477beSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1194dc9477beSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1195dc9477beSmrg ECHO='print -r --' 1196dc9477beSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1197dc9477beSmrg ECHO='printf %s\n' 1198dc9477beSmrgelse 1199dc9477beSmrg # Use this function as a fallback that always works. 1200dc9477beSmrg func_fallback_echo () 1201dc9477beSmrg { 1202dc9477beSmrg eval 'cat <<_LTECHO_EOF 1203dc9477beSmrg$[]1 1204dc9477beSmrg_LTECHO_EOF' 1205dc9477beSmrg } 1206dc9477beSmrg ECHO='func_fallback_echo' 1207dc9477beSmrgfi 1208c43cc173Smrg 1209dc9477beSmrg# func_echo_all arg... 1210dc9477beSmrg# Invoke $ECHO with all args, space-separated. 1211dc9477beSmrgfunc_echo_all () 1212dc9477beSmrg{ 1213dc9477beSmrg $ECHO "$*" 1214dc9477beSmrg} 1215c27c18e8Smrg 1216dc9477beSmrgcase "$ECHO" in 1217dc9477beSmrg printf*) AC_MSG_RESULT([printf]) ;; 1218dc9477beSmrg print*) AC_MSG_RESULT([print -r]) ;; 1219dc9477beSmrg *) AC_MSG_RESULT([cat]) ;; 1220dc9477beSmrgesac 1221c27c18e8Smrg 1222dc9477beSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1223dc9477beSmrg[_AS_DETECT_SUGGESTED([ 1224dc9477beSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1225dc9477beSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1226dc9477beSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1227dc9477beSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1228dc9477beSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1229dc9477beSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1230dc9477beSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1231b789ec8aSmrg 1232dc9477beSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1233dc9477beSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1234dc9477beSmrg])# _LT_PROG_ECHO_BACKSLASH 1235b789ec8aSmrg 1236b789ec8aSmrg 1237dc9477beSmrg# _LT_WITH_SYSROOT 1238dc9477beSmrg# ---------------- 1239dc9477beSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1240dc9477beSmrg[AC_MSG_CHECKING([for sysroot]) 1241dc9477beSmrgAC_ARG_WITH([sysroot], 1242dc9477beSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243dc9477beSmrg (or the compiler's sysroot if not specified).], 1244dc9477beSmrg[], [with_sysroot=no]) 1245b789ec8aSmrg 1246dc9477beSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 1247dc9477beSmrgdnl in case the user passed a directory name. 1248dc9477beSmrglt_sysroot= 1249dc9477beSmrgcase ${with_sysroot} in #( 1250dc9477beSmrg yes) 1251dc9477beSmrg if test "$GCC" = yes; then 1252dc9477beSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1253dc9477beSmrg fi 1254dc9477beSmrg ;; #( 1255dc9477beSmrg /*) 1256dc9477beSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1257dc9477beSmrg ;; #( 1258dc9477beSmrg no|'') 1259dc9477beSmrg ;; #( 1260dc9477beSmrg *) 1261dc9477beSmrg AC_MSG_RESULT([${with_sysroot}]) 1262dc9477beSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1263dc9477beSmrg ;; 1264dc9477beSmrgesac 1265c27c18e8Smrg 1266dc9477beSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1267dc9477beSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1268dc9477beSmrg[dependent libraries, and in which our libraries should be installed.])]) 1269c27c18e8Smrg 1270dc9477beSmrg# _LT_ENABLE_LOCK 1271dc9477beSmrg# --------------- 1272dc9477beSmrgm4_defun([_LT_ENABLE_LOCK], 1273dc9477beSmrg[AC_ARG_ENABLE([libtool-lock], 1274dc9477beSmrg [AS_HELP_STRING([--disable-libtool-lock], 1275dc9477beSmrg [avoid locking (might break parallel builds)])]) 1276dc9477beSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1277c27c18e8Smrg 1278dc9477beSmrg# Some flags need to be propagated to the compiler or linker for good 1279dc9477beSmrg# libtool support. 1280dc9477beSmrgcase $host in 1281dc9477beSmrgia64-*-hpux*) 1282dc9477beSmrg # Find out which ABI we are using. 1283dc9477beSmrg echo 'int i;' > conftest.$ac_ext 1284dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 1285dc9477beSmrg case `/usr/bin/file conftest.$ac_objext` in 1286dc9477beSmrg *ELF-32*) 1287dc9477beSmrg HPUX_IA64_MODE="32" 1288dc9477beSmrg ;; 1289dc9477beSmrg *ELF-64*) 1290dc9477beSmrg HPUX_IA64_MODE="64" 1291dc9477beSmrg ;; 129206c34b88Smrg esac 1293dc9477beSmrg fi 1294dc9477beSmrg rm -rf conftest* 1295dc9477beSmrg ;; 1296dc9477beSmrg*-*-irix6*) 1297dc9477beSmrg # Find out which ABI we are using. 1298dc9477beSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1299dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 1300dc9477beSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1301dc9477beSmrg case `/usr/bin/file conftest.$ac_objext` in 1302dc9477beSmrg *32-bit*) 1303dc9477beSmrg LD="${LD-ld} -melf32bsmip" 1304dc9477beSmrg ;; 1305dc9477beSmrg *N32*) 1306dc9477beSmrg LD="${LD-ld} -melf32bmipn32" 1307dc9477beSmrg ;; 1308dc9477beSmrg *64-bit*) 1309dc9477beSmrg LD="${LD-ld} -melf64bmip" 1310dc9477beSmrg ;; 1311dc9477beSmrg esac 1312dc9477beSmrg else 1313dc9477beSmrg case `/usr/bin/file conftest.$ac_objext` in 1314dc9477beSmrg *32-bit*) 1315dc9477beSmrg LD="${LD-ld} -32" 1316dc9477beSmrg ;; 1317dc9477beSmrg *N32*) 1318dc9477beSmrg LD="${LD-ld} -n32" 1319dc9477beSmrg ;; 1320dc9477beSmrg *64-bit*) 1321dc9477beSmrg LD="${LD-ld} -64" 1322dc9477beSmrg ;; 1323dc9477beSmrg esac 1324dc9477beSmrg fi 1325dc9477beSmrg fi 1326dc9477beSmrg rm -rf conftest* 1327dc9477beSmrg ;; 1328c43cc173Smrg 1329dc9477beSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1330dc9477beSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1331dc9477beSmrg # Find out which ABI we are using. 1332dc9477beSmrg echo 'int i;' > conftest.$ac_ext 1333dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 1334dc9477beSmrg case `/usr/bin/file conftest.o` in 1335dc9477beSmrg *32-bit*) 1336dc9477beSmrg case $host in 1337dc9477beSmrg x86_64-*kfreebsd*-gnu) 1338dc9477beSmrg LD="${LD-ld} -m elf_i386_fbsd" 1339dc9477beSmrg ;; 1340dc9477beSmrg x86_64-*linux*) 1341dc9477beSmrg LD="${LD-ld} -m elf_i386" 1342dc9477beSmrg ;; 1343dc9477beSmrg powerpc64le-*linux*) 1344dc9477beSmrg LD="${LD-ld} -m elf32lppclinux" 1345dc9477beSmrg ;; 1346dc9477beSmrg powerpc64-*linux*) 1347dc9477beSmrg LD="${LD-ld} -m elf32ppclinux" 1348dc9477beSmrg ;; 1349dc9477beSmrg s390x-*linux*) 1350dc9477beSmrg LD="${LD-ld} -m elf_s390" 1351dc9477beSmrg ;; 1352dc9477beSmrg sparc64-*linux*) 1353dc9477beSmrg LD="${LD-ld} -m elf32_sparc" 1354dc9477beSmrg ;; 1355dc9477beSmrg esac 1356dc9477beSmrg ;; 1357dc9477beSmrg *64-bit*) 1358dc9477beSmrg case $host in 1359dc9477beSmrg x86_64-*kfreebsd*-gnu) 1360dc9477beSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1361dc9477beSmrg ;; 1362dc9477beSmrg x86_64-*linux*) 1363dc9477beSmrg LD="${LD-ld} -m elf_x86_64" 1364dc9477beSmrg ;; 1365dc9477beSmrg powerpcle-*linux*) 1366dc9477beSmrg LD="${LD-ld} -m elf64lppc" 1367dc9477beSmrg ;; 1368dc9477beSmrg powerpc-*linux*) 1369dc9477beSmrg LD="${LD-ld} -m elf64ppc" 1370dc9477beSmrg ;; 1371dc9477beSmrg s390*-*linux*|s390*-*tpf*) 1372dc9477beSmrg LD="${LD-ld} -m elf64_s390" 1373dc9477beSmrg ;; 1374dc9477beSmrg sparc*-*linux*) 1375dc9477beSmrg LD="${LD-ld} -m elf64_sparc" 1376dc9477beSmrg ;; 1377dc9477beSmrg esac 1378dc9477beSmrg ;; 137906c34b88Smrg esac 1380dc9477beSmrg fi 1381dc9477beSmrg rm -rf conftest* 1382dc9477beSmrg ;; 1383c43cc173Smrg 1384dc9477beSmrg*-*-sco3.2v5*) 1385dc9477beSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1386dc9477beSmrg SAVE_CFLAGS="$CFLAGS" 1387dc9477beSmrg CFLAGS="$CFLAGS -belf" 1388dc9477beSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1389dc9477beSmrg [AC_LANG_PUSH(C) 1390dc9477beSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1391dc9477beSmrg AC_LANG_POP]) 1392dc9477beSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1393dc9477beSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1394dc9477beSmrg CFLAGS="$SAVE_CFLAGS" 1395dc9477beSmrg fi 1396dc9477beSmrg ;; 1397dc9477beSmrg*-*solaris*) 1398dc9477beSmrg # Find out which ABI we are using. 1399dc9477beSmrg echo 'int i;' > conftest.$ac_ext 1400dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 1401dc9477beSmrg case `/usr/bin/file conftest.o` in 1402dc9477beSmrg *64-bit*) 1403dc9477beSmrg case $lt_cv_prog_gnu_ld in 1404dc9477beSmrg yes*) 1405dc9477beSmrg case $host in 1406dc9477beSmrg i?86-*-solaris*) 1407dc9477beSmrg LD="${LD-ld} -m elf_x86_64" 1408dc9477beSmrg ;; 1409dc9477beSmrg sparc*-*-solaris*) 1410dc9477beSmrg LD="${LD-ld} -m elf64_sparc" 1411dc9477beSmrg ;; 1412dc9477beSmrg esac 1413dc9477beSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1414dc9477beSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1415dc9477beSmrg LD="${LD-ld}_sol2" 1416dc9477beSmrg fi 1417dc9477beSmrg ;; 1418dc9477beSmrg *) 1419dc9477beSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1420dc9477beSmrg LD="${LD-ld} -64" 1421dc9477beSmrg fi 1422dc9477beSmrg ;; 1423dc9477beSmrg esac 1424dc9477beSmrg ;; 1425dc9477beSmrg esac 1426dc9477beSmrg fi 1427dc9477beSmrg rm -rf conftest* 1428dc9477beSmrg ;; 1429dc9477beSmrgesac 1430c43cc173Smrg 1431dc9477beSmrgneed_locks="$enable_libtool_lock" 1432dc9477beSmrg])# _LT_ENABLE_LOCK 1433c43cc173Smrg 1434c27c18e8Smrg 1435dc9477beSmrg# _LT_PROG_AR 1436dc9477beSmrg# ----------- 1437dc9477beSmrgm4_defun([_LT_PROG_AR], 1438dc9477beSmrg[AC_CHECK_TOOLS(AR, [ar], false) 1439dc9477beSmrg: ${AR=ar} 1440dc9477beSmrg: ${AR_FLAGS=cru} 1441dc9477beSmrg_LT_DECL([], [AR], [1], [The archiver]) 1442dc9477beSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1443c43cc173Smrg 1444dc9477beSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1445dc9477beSmrg [lt_cv_ar_at_file=no 1446dc9477beSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1447dc9477beSmrg [echo conftest.$ac_objext > conftest.lst 1448dc9477beSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1449dc9477beSmrg AC_TRY_EVAL([lt_ar_try]) 1450dc9477beSmrg if test "$ac_status" -eq 0; then 1451dc9477beSmrg # Ensure the archiver fails upon bogus file names. 1452dc9477beSmrg rm -f conftest.$ac_objext libconftest.a 1453dc9477beSmrg AC_TRY_EVAL([lt_ar_try]) 1454dc9477beSmrg if test "$ac_status" -ne 0; then 1455dc9477beSmrg lt_cv_ar_at_file=@ 1456dc9477beSmrg fi 1457dc9477beSmrg fi 1458dc9477beSmrg rm -f conftest.* libconftest.a 1459dc9477beSmrg ]) 1460dc9477beSmrg ]) 1461c43cc173Smrg 1462dc9477beSmrgif test "x$lt_cv_ar_at_file" = xno; then 1463dc9477beSmrg archiver_list_spec= 1464dc9477beSmrgelse 1465dc9477beSmrg archiver_list_spec=$lt_cv_ar_at_file 1466dc9477beSmrgfi 1467dc9477beSmrg_LT_DECL([], [archiver_list_spec], [1], 1468dc9477beSmrg [How to feed a file listing to the archiver]) 1469dc9477beSmrg])# _LT_PROG_AR 1470c43cc173Smrg 1471c27c18e8Smrg 1472dc9477beSmrg# _LT_CMD_OLD_ARCHIVE 1473dc9477beSmrg# ------------------- 1474dc9477beSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1475dc9477beSmrg[_LT_PROG_AR 1476c43cc173Smrg 1477dc9477beSmrgAC_CHECK_TOOL(STRIP, strip, :) 1478dc9477beSmrgtest -z "$STRIP" && STRIP=: 1479dc9477beSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1480c43cc173Smrg 1481dc9477beSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1482dc9477beSmrgtest -z "$RANLIB" && RANLIB=: 1483dc9477beSmrg_LT_DECL([], [RANLIB], [1], 1484dc9477beSmrg [Commands used to install an old-style archive]) 1485c43cc173Smrg 1486dc9477beSmrg# Determine commands to create old-style static archives. 1487dc9477beSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1488dc9477beSmrgold_postinstall_cmds='chmod 644 $oldlib' 1489dc9477beSmrgold_postuninstall_cmds= 1490c43cc173Smrg 1491dc9477beSmrgif test -n "$RANLIB"; then 1492dc9477beSmrg case $host_os in 1493dc9477beSmrg openbsd*) 1494dc9477beSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1495dc9477beSmrg ;; 1496dc9477beSmrg *) 1497dc9477beSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1498dc9477beSmrg ;; 149906c34b88Smrg esac 1500dc9477beSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 150106c34b88Smrgfi 1502c43cc173Smrg 1503dc9477beSmrgcase $host_os in 1504dc9477beSmrg darwin*) 1505dc9477beSmrg lock_old_archive_extraction=yes ;; 1506dc9477beSmrg *) 1507dc9477beSmrg lock_old_archive_extraction=no ;; 1508dc9477beSmrgesac 1509dc9477beSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1510dc9477beSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1511dc9477beSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1512dc9477beSmrg [Commands used to build an old-style archive]) 1513dc9477beSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1514dc9477beSmrg [Whether to use a lock for old archive extraction]) 1515dc9477beSmrg])# _LT_CMD_OLD_ARCHIVE 1516f1ee322dSmrg 151706c34b88Smrg 1518dc9477beSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1519dc9477beSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1520dc9477beSmrg# ---------------------------------------------------------------- 1521dc9477beSmrg# Check whether the given compiler option works 1522dc9477beSmrgAC_DEFUN([_LT_COMPILER_OPTION], 152306c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1524dc9477beSmrgm4_require([_LT_DECL_SED])dnl 1525dc9477beSmrgAC_CACHE_CHECK([$1], [$2], 1526dc9477beSmrg [$2=no 1527dc9477beSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1528dc9477beSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1529dc9477beSmrg lt_compiler_flag="$3" 1530dc9477beSmrg # Insert the option either (1) after the last *FLAGS variable, or 1531dc9477beSmrg # (2) before a word containing "conftest.", or (3) at the end. 1532dc9477beSmrg # Note that $ac_compile itself does not contain backslashes and begins 1533dc9477beSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1534dc9477beSmrg # The option is referenced via a variable to avoid confusing sed. 1535dc9477beSmrg lt_compile=`echo "$ac_compile" | $SED \ 1536dc9477beSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1537dc9477beSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1538dc9477beSmrg -e 's:$: $lt_compiler_flag:'` 1539dc9477beSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1540dc9477beSmrg (eval "$lt_compile" 2>conftest.err) 1541dc9477beSmrg ac_status=$? 1542dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1543dc9477beSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1544dc9477beSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1545dc9477beSmrg # The compiler can only warn and ignore the option if not recognized 1546dc9477beSmrg # So say no if there are warnings other than the usual output. 1547dc9477beSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1548dc9477beSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1549dc9477beSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1550dc9477beSmrg $2=yes 1551dc9477beSmrg fi 1552dc9477beSmrg fi 1553dc9477beSmrg $RM conftest* 1554dc9477beSmrg]) 1555c43cc173Smrg 1556dc9477beSmrgif test x"[$]$2" = xyes; then 1557dc9477beSmrg m4_if([$5], , :, [$5]) 1558dc9477beSmrgelse 1559dc9477beSmrg m4_if([$6], , :, [$6]) 156006c34b88Smrgfi 1561dc9477beSmrg])# _LT_COMPILER_OPTION 1562c43cc173Smrg 1563dc9477beSmrg# Old name: 1564dc9477beSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1565dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 1566dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1567c43cc173Smrg 156821e67964Smrg 1569dc9477beSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1570dc9477beSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1571dc9477beSmrg# ---------------------------------------------------- 1572dc9477beSmrg# Check whether the given linker option works 1573dc9477beSmrgAC_DEFUN([_LT_LINKER_OPTION], 1574dc9477beSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1575dc9477beSmrgm4_require([_LT_DECL_SED])dnl 1576dc9477beSmrgAC_CACHE_CHECK([$1], [$2], 1577dc9477beSmrg [$2=no 1578dc9477beSmrg save_LDFLAGS="$LDFLAGS" 1579dc9477beSmrg LDFLAGS="$LDFLAGS $3" 1580dc9477beSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1581dc9477beSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1582dc9477beSmrg # The linker can only warn and ignore the option if not recognized 1583dc9477beSmrg # So say no if there are warnings 1584dc9477beSmrg if test -s conftest.err; then 1585dc9477beSmrg # Append any errors to the config.log. 1586dc9477beSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1587dc9477beSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1588dc9477beSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1589dc9477beSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1590dc9477beSmrg $2=yes 1591dc9477beSmrg fi 1592dc9477beSmrg else 1593dc9477beSmrg $2=yes 1594dc9477beSmrg fi 1595dc9477beSmrg fi 1596dc9477beSmrg $RM -r conftest* 1597dc9477beSmrg LDFLAGS="$save_LDFLAGS" 1598dc9477beSmrg]) 159937eb1ca1Smrg 1600dc9477beSmrgif test x"[$]$2" = xyes; then 1601dc9477beSmrg m4_if([$4], , :, [$4]) 1602dc9477beSmrgelse 1603dc9477beSmrg m4_if([$5], , :, [$5]) 1604dc9477beSmrgfi 1605dc9477beSmrg])# _LT_LINKER_OPTION 160621e67964Smrg 1607dc9477beSmrg# Old name: 1608dc9477beSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1609dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 1610dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 161121e67964Smrg 1612c43cc173Smrg 1613dc9477beSmrg# LT_CMD_MAX_LEN 1614dc9477beSmrg#--------------- 1615dc9477beSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1616dc9477beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1617dc9477beSmrg# find the maximum length of command line arguments 1618dc9477beSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1619dc9477beSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1620dc9477beSmrg i=0 1621dc9477beSmrg teststring="ABCD" 1622c43cc173Smrg 1623dc9477beSmrg case $build_os in 1624dc9477beSmrg msdosdjgpp*) 1625dc9477beSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1626dc9477beSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1627dc9477beSmrg # during glob expansion). Even if it were fixed, the result of this 1628dc9477beSmrg # check would be larger than it should be. 1629dc9477beSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1630dc9477beSmrg ;; 1631c43cc173Smrg 1632dc9477beSmrg gnu*) 1633dc9477beSmrg # Under GNU Hurd, this test is not required because there is 1634dc9477beSmrg # no limit to the length of command line arguments. 1635dc9477beSmrg # Libtool will interpret -1 as no limit whatsoever 1636dc9477beSmrg lt_cv_sys_max_cmd_len=-1; 1637dc9477beSmrg ;; 1638c43cc173Smrg 1639dc9477beSmrg cygwin* | mingw* | cegcc*) 1640dc9477beSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1641dc9477beSmrg # about 5 minutes as the teststring grows exponentially. 1642dc9477beSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1643dc9477beSmrg # you end up with a "frozen" computer, even though with patience 1644dc9477beSmrg # the test eventually succeeds (with a max line length of 256k). 1645dc9477beSmrg # Instead, let's just punt: use the minimum linelength reported by 1646dc9477beSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1647dc9477beSmrg lt_cv_sys_max_cmd_len=8192; 1648dc9477beSmrg ;; 1649c43cc173Smrg 1650dc9477beSmrg mint*) 1651dc9477beSmrg # On MiNT this can take a long time and run out of memory. 1652dc9477beSmrg lt_cv_sys_max_cmd_len=8192; 1653dc9477beSmrg ;; 1654c43cc173Smrg 1655dc9477beSmrg amigaos*) 1656dc9477beSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1657dc9477beSmrg # So we just punt and use a minimum line length of 8192. 1658dc9477beSmrg lt_cv_sys_max_cmd_len=8192; 1659dc9477beSmrg ;; 166021e67964Smrg 1661dc9477beSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1662dc9477beSmrg # This has been around since 386BSD, at least. Likely further. 1663dc9477beSmrg if test -x /sbin/sysctl; then 1664dc9477beSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1665dc9477beSmrg elif test -x /usr/sbin/sysctl; then 1666dc9477beSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1667dc9477beSmrg else 1668dc9477beSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1669dc9477beSmrg fi 1670dc9477beSmrg # And add a safety zone 1671dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1672dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1673dc9477beSmrg ;; 1674c43cc173Smrg 1675dc9477beSmrg interix*) 1676dc9477beSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1677dc9477beSmrg lt_cv_sys_max_cmd_len=196608 1678dc9477beSmrg ;; 1679c43cc173Smrg 1680dc9477beSmrg os2*) 1681dc9477beSmrg # The test takes a long time on OS/2. 1682dc9477beSmrg lt_cv_sys_max_cmd_len=8192 1683dc9477beSmrg ;; 1684c43cc173Smrg 1685dc9477beSmrg osf*) 1686dc9477beSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1687dc9477beSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1688dc9477beSmrg # nice to cause kernel panics so lets avoid the loop below. 1689dc9477beSmrg # First set a reasonable default. 1690dc9477beSmrg lt_cv_sys_max_cmd_len=16384 1691dc9477beSmrg # 1692dc9477beSmrg if test -x /sbin/sysconfig; then 1693dc9477beSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1694dc9477beSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1695dc9477beSmrg esac 1696dc9477beSmrg fi 1697dc9477beSmrg ;; 1698dc9477beSmrg sco3.2v5*) 1699dc9477beSmrg lt_cv_sys_max_cmd_len=102400 1700dc9477beSmrg ;; 1701dc9477beSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1702dc9477beSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1703dc9477beSmrg if test -n "$kargmax"; then 1704dc9477beSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1705dc9477beSmrg else 1706dc9477beSmrg lt_cv_sys_max_cmd_len=32768 1707dc9477beSmrg fi 1708dc9477beSmrg ;; 1709dc9477beSmrg *) 1710dc9477beSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1711dc9477beSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 1712dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1713dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1714dc9477beSmrg else 1715dc9477beSmrg # Make teststring a little bigger before we do anything with it. 1716dc9477beSmrg # a 1K string should be a reasonable start. 1717dc9477beSmrg for i in 1 2 3 4 5 6 7 8 ; do 1718dc9477beSmrg teststring=$teststring$teststring 1719dc9477beSmrg done 1720dc9477beSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1721dc9477beSmrg # If test is not a shell built-in, we'll probably end up computing a 1722dc9477beSmrg # maximum length that is only half of the actual maximum length, but 1723dc9477beSmrg # we can't tell. 1724dc9477beSmrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1725dc9477beSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1726dc9477beSmrg test $i != 17 # 1/2 MB should be enough 1727dc9477beSmrg do 1728dc9477beSmrg i=`expr $i + 1` 1729dc9477beSmrg teststring=$teststring$teststring 1730dc9477beSmrg done 1731dc9477beSmrg # Only check the string length outside the loop. 1732dc9477beSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1733dc9477beSmrg teststring= 1734dc9477beSmrg # Add a significant safety factor because C++ compilers can tack on 1735dc9477beSmrg # massive amounts of additional arguments before passing them to the 1736dc9477beSmrg # linker. It appears as though 1/2 is a usable value. 1737dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1738dc9477beSmrg fi 1739dc9477beSmrg ;; 1740dc9477beSmrg esac 1741dc9477beSmrg]) 1742dc9477beSmrgif test -n $lt_cv_sys_max_cmd_len ; then 1743dc9477beSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1744dc9477beSmrgelse 1745dc9477beSmrg AC_MSG_RESULT(none) 1746dc9477beSmrgfi 1747dc9477beSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1748dc9477beSmrg_LT_DECL([], [max_cmd_len], [0], 1749dc9477beSmrg [What is the maximum length of a command?]) 1750dc9477beSmrg])# LT_CMD_MAX_LEN 1751c43cc173Smrg 1752dc9477beSmrg# Old name: 1753dc9477beSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1754dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 1755dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1756c43cc173Smrg 1757c43cc173Smrg 1758dc9477beSmrg# _LT_HEADER_DLFCN 1759dc9477beSmrg# ---------------- 1760dc9477beSmrgm4_defun([_LT_HEADER_DLFCN], 1761dc9477beSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1762dc9477beSmrg])# _LT_HEADER_DLFCN 1763c43cc173Smrg 1764c43cc173Smrg 1765dc9477beSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1766dc9477beSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1767dc9477beSmrg# ---------------------------------------------------------------- 1768dc9477beSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1769dc9477beSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1770dc9477beSmrgif test "$cross_compiling" = yes; then : 1771dc9477beSmrg [$4] 1772dc9477beSmrgelse 1773dc9477beSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1774dc9477beSmrg lt_status=$lt_dlunknown 1775dc9477beSmrg cat > conftest.$ac_ext <<_LT_EOF 1776dc9477beSmrg[#line $LINENO "configure" 1777dc9477beSmrg#include "confdefs.h" 1778c43cc173Smrg 1779dc9477beSmrg#if HAVE_DLFCN_H 1780dc9477beSmrg#include <dlfcn.h> 1781dc9477beSmrg#endif 1782c27c18e8Smrg 1783dc9477beSmrg#include <stdio.h> 1784c43cc173Smrg 1785dc9477beSmrg#ifdef RTLD_GLOBAL 1786dc9477beSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1787dc9477beSmrg#else 1788dc9477beSmrg# ifdef DL_GLOBAL 1789dc9477beSmrg# define LT_DLGLOBAL DL_GLOBAL 1790dc9477beSmrg# else 1791dc9477beSmrg# define LT_DLGLOBAL 0 1792dc9477beSmrg# endif 1793dc9477beSmrg#endif 1794c43cc173Smrg 1795dc9477beSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1796dc9477beSmrg find out it does not work in some platform. */ 1797dc9477beSmrg#ifndef LT_DLLAZY_OR_NOW 1798dc9477beSmrg# ifdef RTLD_LAZY 1799dc9477beSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1800dc9477beSmrg# else 1801dc9477beSmrg# ifdef DL_LAZY 1802dc9477beSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1803dc9477beSmrg# else 1804dc9477beSmrg# ifdef RTLD_NOW 1805dc9477beSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1806dc9477beSmrg# else 1807dc9477beSmrg# ifdef DL_NOW 1808dc9477beSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1809dc9477beSmrg# else 1810dc9477beSmrg# define LT_DLLAZY_OR_NOW 0 1811dc9477beSmrg# endif 1812dc9477beSmrg# endif 1813dc9477beSmrg# endif 1814dc9477beSmrg# endif 1815dc9477beSmrg#endif 1816c43cc173Smrg 1817dc9477beSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 1818dc9477beSmrg correspondingly for the symbols needed. */ 1819dc9477beSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1820dc9477beSmrgint fnord () __attribute__((visibility("default"))); 1821dc9477beSmrg#endif 1822c43cc173Smrg 1823dc9477beSmrgint fnord () { return 42; } 1824dc9477beSmrgint main () 1825dc9477beSmrg{ 1826dc9477beSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1827dc9477beSmrg int status = $lt_dlunknown; 1828c43cc173Smrg 1829dc9477beSmrg if (self) 1830dc9477beSmrg { 1831dc9477beSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1832dc9477beSmrg else 1833dc9477beSmrg { 1834dc9477beSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1835dc9477beSmrg else puts (dlerror ()); 1836dc9477beSmrg } 1837dc9477beSmrg /* dlclose (self); */ 1838dc9477beSmrg } 1839dc9477beSmrg else 1840dc9477beSmrg puts (dlerror ()); 1841c43cc173Smrg 1842dc9477beSmrg return status; 1843dc9477beSmrg}] 1844dc9477beSmrg_LT_EOF 1845dc9477beSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1846dc9477beSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1847dc9477beSmrg lt_status=$? 1848dc9477beSmrg case x$lt_status in 1849dc9477beSmrg x$lt_dlno_uscore) $1 ;; 1850dc9477beSmrg x$lt_dlneed_uscore) $2 ;; 1851dc9477beSmrg x$lt_dlunknown|x*) $3 ;; 1852dc9477beSmrg esac 1853dc9477beSmrg else : 1854dc9477beSmrg # compilation failed 1855dc9477beSmrg $3 1856dc9477beSmrg fi 1857dc9477beSmrgfi 1858dc9477beSmrgrm -fr conftest* 1859dc9477beSmrg])# _LT_TRY_DLOPEN_SELF 1860c43cc173Smrg 1861c43cc173Smrg 1862dc9477beSmrg# LT_SYS_DLOPEN_SELF 1863dc9477beSmrg# ------------------ 1864dc9477beSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1865dc9477beSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1866dc9477beSmrgif test "x$enable_dlopen" != xyes; then 1867dc9477beSmrg enable_dlopen=unknown 1868dc9477beSmrg enable_dlopen_self=unknown 1869dc9477beSmrg enable_dlopen_self_static=unknown 1870dc9477beSmrgelse 1871dc9477beSmrg lt_cv_dlopen=no 1872dc9477beSmrg lt_cv_dlopen_libs= 1873c43cc173Smrg 1874c43cc173Smrg case $host_os in 1875dc9477beSmrg beos*) 1876dc9477beSmrg lt_cv_dlopen="load_add_on" 1877dc9477beSmrg lt_cv_dlopen_libs= 1878dc9477beSmrg lt_cv_dlopen_self=yes 1879dc9477beSmrg ;; 1880c43cc173Smrg 1881dc9477beSmrg mingw* | pw32* | cegcc*) 1882dc9477beSmrg lt_cv_dlopen="LoadLibrary" 1883dc9477beSmrg lt_cv_dlopen_libs= 1884dc9477beSmrg ;; 1885c43cc173Smrg 1886dc9477beSmrg cygwin*) 1887dc9477beSmrg lt_cv_dlopen="dlopen" 1888dc9477beSmrg lt_cv_dlopen_libs= 1889dc9477beSmrg ;; 189006c34b88Smrg 1891dc9477beSmrg darwin*) 1892dc9477beSmrg # if libdl is installed we need to link against it 1893dc9477beSmrg AC_CHECK_LIB([dl], [dlopen], 1894dc9477beSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1895dc9477beSmrg lt_cv_dlopen="dyld" 1896dc9477beSmrg lt_cv_dlopen_libs= 1897dc9477beSmrg lt_cv_dlopen_self=yes 189806c34b88Smrg ]) 189937eb1ca1Smrg ;; 1900dc9477beSmrg 1901dc9477beSmrg *) 1902dc9477beSmrg AC_CHECK_FUNC([shl_load], 1903dc9477beSmrg [lt_cv_dlopen="shl_load"], 1904dc9477beSmrg [AC_CHECK_LIB([dld], [shl_load], 1905dc9477beSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1906dc9477beSmrg [AC_CHECK_FUNC([dlopen], 1907dc9477beSmrg [lt_cv_dlopen="dlopen"], 1908dc9477beSmrg [AC_CHECK_LIB([dl], [dlopen], 1909dc9477beSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1910dc9477beSmrg [AC_CHECK_LIB([svld], [dlopen], 1911dc9477beSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1912dc9477beSmrg [AC_CHECK_LIB([dld], [dld_link], 1913dc9477beSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1914dc9477beSmrg ]) 1915dc9477beSmrg ]) 1916dc9477beSmrg ]) 1917dc9477beSmrg ]) 1918dc9477beSmrg ]) 1919c27c18e8Smrg ;; 1920c27c18e8Smrg esac 1921c43cc173Smrg 1922dc9477beSmrg if test "x$lt_cv_dlopen" != xno; then 1923dc9477beSmrg enable_dlopen=yes 192406c34b88Smrg else 1925dc9477beSmrg enable_dlopen=no 192606c34b88Smrg fi 1927b789ec8aSmrg 1928dc9477beSmrg case $lt_cv_dlopen in 1929dc9477beSmrg dlopen) 1930dc9477beSmrg save_CPPFLAGS="$CPPFLAGS" 1931dc9477beSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1932b789ec8aSmrg 1933dc9477beSmrg save_LDFLAGS="$LDFLAGS" 1934dc9477beSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1935b789ec8aSmrg 1936dc9477beSmrg save_LIBS="$LIBS" 1937dc9477beSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1938c43cc173Smrg 1939dc9477beSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1940dc9477beSmrg lt_cv_dlopen_self, [dnl 1941dc9477beSmrg _LT_TRY_DLOPEN_SELF( 1942dc9477beSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1943dc9477beSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1944dc9477beSmrg ]) 1945c43cc173Smrg 1946dc9477beSmrg if test "x$lt_cv_dlopen_self" = xyes; then 1947dc9477beSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1948dc9477beSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1949dc9477beSmrg lt_cv_dlopen_self_static, [dnl 1950dc9477beSmrg _LT_TRY_DLOPEN_SELF( 1951dc9477beSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1952dc9477beSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1953dc9477beSmrg ]) 1954dc9477beSmrg fi 1955c43cc173Smrg 1956dc9477beSmrg CPPFLAGS="$save_CPPFLAGS" 1957dc9477beSmrg LDFLAGS="$save_LDFLAGS" 1958dc9477beSmrg LIBS="$save_LIBS" 1959dc9477beSmrg ;; 1960dc9477beSmrg esac 1961c43cc173Smrg 1962dc9477beSmrg case $lt_cv_dlopen_self in 1963dc9477beSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1964dc9477beSmrg *) enable_dlopen_self=unknown ;; 1965dc9477beSmrg esac 196621e67964Smrg 1967dc9477beSmrg case $lt_cv_dlopen_self_static in 1968dc9477beSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1969dc9477beSmrg *) enable_dlopen_self_static=unknown ;; 1970dc9477beSmrg esac 1971dc9477beSmrgfi 1972dc9477beSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1973dc9477beSmrg [Whether dlopen is supported]) 1974dc9477beSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1975dc9477beSmrg [Whether dlopen of programs is supported]) 1976dc9477beSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1977dc9477beSmrg [Whether dlopen of statically linked programs is supported]) 1978dc9477beSmrg])# LT_SYS_DLOPEN_SELF 1979c43cc173Smrg 1980dc9477beSmrg# Old name: 1981dc9477beSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1982dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 1983dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1984c43cc173Smrg 198537eb1ca1Smrg 1986dc9477beSmrg# _LT_COMPILER_C_O([TAGNAME]) 1987dc9477beSmrg# --------------------------- 1988dc9477beSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 1989dc9477beSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1990dc9477beSmrgm4_defun([_LT_COMPILER_C_O], 1991dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 1992dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1993dc9477beSmrgm4_require([_LT_TAG_COMPILER])dnl 1994dc9477beSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1995dc9477beSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1996dc9477beSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1997dc9477beSmrg $RM -r conftest 2>/dev/null 1998dc9477beSmrg mkdir conftest 1999dc9477beSmrg cd conftest 2000dc9477beSmrg mkdir out 2001dc9477beSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2002c27c18e8Smrg 2003dc9477beSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2004dc9477beSmrg # Insert the option either (1) after the last *FLAGS variable, or 2005dc9477beSmrg # (2) before a word containing "conftest.", or (3) at the end. 2006dc9477beSmrg # Note that $ac_compile itself does not contain backslashes and begins 2007dc9477beSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2008dc9477beSmrg lt_compile=`echo "$ac_compile" | $SED \ 2009dc9477beSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2010dc9477beSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2011dc9477beSmrg -e 's:$: $lt_compiler_flag:'` 2012dc9477beSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2013dc9477beSmrg (eval "$lt_compile" 2>out/conftest.err) 2014dc9477beSmrg ac_status=$? 2015dc9477beSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2016dc9477beSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2017dc9477beSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2018dc9477beSmrg then 2019dc9477beSmrg # The compiler can only warn and ignore the option if not recognized 2020dc9477beSmrg # So say no if there are warnings 2021dc9477beSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2022dc9477beSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2023dc9477beSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2024dc9477beSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2025dc9477beSmrg fi 202606c34b88Smrg fi 2027dc9477beSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2028dc9477beSmrg $RM conftest* 2029dc9477beSmrg # SGI C++ compiler will create directory out/ii_files/ for 2030dc9477beSmrg # template instantiation 2031dc9477beSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2032dc9477beSmrg $RM out/* && rmdir out 2033dc9477beSmrg cd .. 2034dc9477beSmrg $RM -r conftest 2035dc9477beSmrg $RM conftest* 2036dc9477beSmrg]) 2037dc9477beSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2038dc9477beSmrg [Does compiler simultaneously support -c and -o options?]) 2039dc9477beSmrg])# _LT_COMPILER_C_O 2040c27c18e8Smrg 2041c43cc173Smrg 2042dc9477beSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2043dc9477beSmrg# ---------------------------------- 2044dc9477beSmrg# Check to see if we can do hard links to lock some files if needed 2045dc9477beSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2046dc9477beSmrg[m4_require([_LT_ENABLE_LOCK])dnl 2047dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2048dc9477beSmrg_LT_COMPILER_C_O([$1]) 204937eb1ca1Smrg 2050dc9477beSmrghard_links="nottested" 2051dc9477beSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2052dc9477beSmrg # do not overwrite the value of need_locks provided by the user 2053dc9477beSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2054dc9477beSmrg hard_links=yes 2055dc9477beSmrg $RM conftest* 2056dc9477beSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2057dc9477beSmrg touch conftest.a 2058dc9477beSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2059dc9477beSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2060dc9477beSmrg AC_MSG_RESULT([$hard_links]) 2061dc9477beSmrg if test "$hard_links" = no; then 2062dc9477beSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2063dc9477beSmrg need_locks=warn 2064c43cc173Smrg fi 2065dc9477beSmrgelse 2066dc9477beSmrg need_locks=no 2067dc9477beSmrgfi 2068dc9477beSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2069dc9477beSmrg])# _LT_COMPILER_FILE_LOCKS 2070c43cc173Smrg 2071c43cc173Smrg 2072dc9477beSmrg# _LT_CHECK_OBJDIR 2073dc9477beSmrg# ---------------- 2074dc9477beSmrgm4_defun([_LT_CHECK_OBJDIR], 2075dc9477beSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2076dc9477beSmrg[rm -f .libs 2>/dev/null 2077dc9477beSmrgmkdir .libs 2>/dev/null 2078dc9477beSmrgif test -d .libs; then 2079dc9477beSmrg lt_cv_objdir=.libs 208006c34b88Smrgelse 2081dc9477beSmrg # MS-DOS does not allow filenames that begin with a dot. 2082dc9477beSmrg lt_cv_objdir=_libs 208306c34b88Smrgfi 2084dc9477beSmrgrmdir .libs 2>/dev/null]) 2085dc9477beSmrgobjdir=$lt_cv_objdir 2086dc9477beSmrg_LT_DECL([], [objdir], [0], 2087dc9477beSmrg [The name of the directory that contains temporary libtool files])dnl 2088dc9477beSmrgm4_pattern_allow([LT_OBJDIR])dnl 2089dc9477beSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2090dc9477beSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2091dc9477beSmrg])# _LT_CHECK_OBJDIR 2092c43cc173Smrg 2093c43cc173Smrg 2094dc9477beSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2095dc9477beSmrg# -------------------------------------- 2096dc9477beSmrg# Check hardcoding attributes. 2097dc9477beSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2098dc9477beSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2099dc9477beSmrg_LT_TAGVAR(hardcode_action, $1)= 2100dc9477beSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2101dc9477beSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2102dc9477beSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2103c43cc173Smrg 2104dc9477beSmrg # We can hardcode non-existent directories. 2105dc9477beSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2106dc9477beSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2107dc9477beSmrg # have to relink, otherwise we might link with an installed library 2108dc9477beSmrg # when we should be linking with a yet-to-be-installed one 2109dc9477beSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2110dc9477beSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2111dc9477beSmrg # Linking always hardcodes the temporary library directory. 2112dc9477beSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2113dc9477beSmrg else 2114dc9477beSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2115dc9477beSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2116dc9477beSmrg fi 2117dc9477beSmrgelse 2118dc9477beSmrg # We cannot hardcode anything, or else we can only hardcode existing 2119dc9477beSmrg # directories. 2120dc9477beSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2121dc9477beSmrgfi 2122dc9477beSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2123c43cc173Smrg 2124dc9477beSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2125dc9477beSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2126dc9477beSmrg # Fast installation is not supported 2127dc9477beSmrg enable_fast_install=no 2128dc9477beSmrgelif test "$shlibpath_overrides_runpath" = yes || 2129dc9477beSmrg test "$enable_shared" = no; then 2130dc9477beSmrg # Fast installation is not necessary 2131dc9477beSmrg enable_fast_install=needless 2132dc9477beSmrgfi 2133dc9477beSmrg_LT_TAGDECL([], [hardcode_action], [0], 2134dc9477beSmrg [How to hardcode a shared library path into an executable]) 2135dc9477beSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2136c27c18e8Smrg 2137c43cc173Smrg 2138dc9477beSmrg# _LT_CMD_STRIPLIB 2139dc9477beSmrg# ---------------- 2140dc9477beSmrgm4_defun([_LT_CMD_STRIPLIB], 2141dc9477beSmrg[m4_require([_LT_DECL_EGREP]) 2142dc9477beSmrgstriplib= 2143dc9477beSmrgold_striplib= 2144dc9477beSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2145dc9477beSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2146dc9477beSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2147dc9477beSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2148dc9477beSmrg AC_MSG_RESULT([yes]) 2149dc9477beSmrgelse 2150dc9477beSmrg# FIXME - insert some real tests, host_os isn't really good enough 215106c34b88Smrg case $host_os in 2152dc9477beSmrg darwin*) 2153dc9477beSmrg if test -n "$STRIP" ; then 2154dc9477beSmrg striplib="$STRIP -x" 2155dc9477beSmrg old_striplib="$STRIP -S" 2156dc9477beSmrg AC_MSG_RESULT([yes]) 2157dc9477beSmrg else 2158dc9477beSmrg AC_MSG_RESULT([no]) 2159dc9477beSmrg fi 216006c34b88Smrg ;; 216106c34b88Smrg *) 2162dc9477beSmrg AC_MSG_RESULT([no]) 216306c34b88Smrg ;; 216406c34b88Smrg esac 216506c34b88Smrgfi 2166dc9477beSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2167dc9477beSmrg_LT_DECL([], [striplib], [1]) 2168dc9477beSmrg])# _LT_CMD_STRIPLIB 2169c43cc173Smrg 2170c43cc173Smrg 2171dc9477beSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2172dc9477beSmrg# ----------------------------- 2173dc9477beSmrg# PORTME Fill in your ld.so characteristics 2174dc9477beSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2175dc9477beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2176dc9477beSmrgm4_require([_LT_DECL_EGREP])dnl 2177dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2178dc9477beSmrgm4_require([_LT_DECL_OBJDUMP])dnl 217906c34b88Smrgm4_require([_LT_DECL_SED])dnl 2180dc9477beSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2181dc9477beSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2182dc9477beSmrgm4_if([$1], 2183dc9477beSmrg [], [ 2184dc9477beSmrgif test "$GCC" = yes; then 2185dc9477beSmrg case $host_os in 2186dc9477beSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2187dc9477beSmrg *) lt_awk_arg="/^libraries:/" ;; 2188dc9477beSmrg esac 2189dc9477beSmrg case $host_os in 2190dc9477beSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2191dc9477beSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2192dc9477beSmrg esac 2193dc9477beSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2194dc9477beSmrg case $lt_search_path_spec in 2195dc9477beSmrg *\;*) 2196dc9477beSmrg # if the path contains ";" then we assume it to be the separator 2197dc9477beSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2198dc9477beSmrg # assumed that no part of a normal pathname contains ";" but that should 2199dc9477beSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2200dc9477beSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2201dc9477beSmrg ;; 2202dc9477beSmrg *) 2203dc9477beSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2204dc9477beSmrg ;; 2205dc9477beSmrg esac 2206dc9477beSmrg # Ok, now we have the path, separated by spaces, we can step through it 2207dc9477beSmrg # and add multilib dir if necessary. 2208dc9477beSmrg lt_tmp_lt_search_path_spec= 2209dc9477beSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2210dc9477beSmrg for lt_sys_path in $lt_search_path_spec; do 2211dc9477beSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2212dc9477beSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2213dc9477beSmrg else 2214dc9477beSmrg test -d "$lt_sys_path" && \ 2215dc9477beSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2216dc9477beSmrg fi 2217dc9477beSmrg done 2218dc9477beSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2219dc9477beSmrgBEGIN {RS=" "; FS="/|\n";} { 2220dc9477beSmrg lt_foo=""; 2221dc9477beSmrg lt_count=0; 2222dc9477beSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2223dc9477beSmrg if ($lt_i != "" && $lt_i != ".") { 2224dc9477beSmrg if ($lt_i == "..") { 2225dc9477beSmrg lt_count++; 2226dc9477beSmrg } else { 2227dc9477beSmrg if (lt_count == 0) { 2228dc9477beSmrg lt_foo="/" $lt_i lt_foo; 2229dc9477beSmrg } else { 2230dc9477beSmrg lt_count--; 2231dc9477beSmrg } 2232dc9477beSmrg } 2233dc9477beSmrg } 2234dc9477beSmrg } 2235dc9477beSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2236dc9477beSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2237dc9477beSmrg}'` 2238dc9477beSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2239dc9477beSmrg # for these hosts. 2240dc9477beSmrg case $host_os in 2241dc9477beSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2242dc9477beSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2243dc9477beSmrg esac 2244dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2245c43cc173Smrgelse 2246dc9477beSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2247dc9477beSmrgfi]) 2248dc9477beSmrglibrary_names_spec= 2249dc9477beSmrglibname_spec='lib$name' 2250dc9477beSmrgsoname_spec= 2251dc9477beSmrgshrext_cmds=".so" 2252dc9477beSmrgpostinstall_cmds= 2253dc9477beSmrgpostuninstall_cmds= 2254dc9477beSmrgfinish_cmds= 2255dc9477beSmrgfinish_eval= 2256dc9477beSmrgshlibpath_var= 2257dc9477beSmrgshlibpath_overrides_runpath=unknown 2258dc9477beSmrgversion_type=none 2259dc9477beSmrgdynamic_linker="$host_os ld.so" 2260dc9477beSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2261dc9477beSmrgneed_lib_prefix=unknown 2262dc9477beSmrghardcode_into_libs=no 2263c43cc173Smrg 2264dc9477beSmrg# when you set need_version to no, make sure it does not cause -set_version 2265dc9477beSmrg# flags to be left without arguments 2266dc9477beSmrgneed_version=unknown 2267c43cc173Smrg 2268dc9477beSmrgcase $host_os in 2269dc9477beSmrgaix3*) 2270dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2271dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2272dc9477beSmrg shlibpath_var=LIBPATH 2273c27c18e8Smrg 2274dc9477beSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2275dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2276dc9477beSmrg ;; 2277c43cc173Smrg 2278dc9477beSmrgaix[[4-9]]*) 2279dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2280dc9477beSmrg need_lib_prefix=no 2281dc9477beSmrg need_version=no 2282dc9477beSmrg hardcode_into_libs=yes 2283dc9477beSmrg if test "$host_cpu" = ia64; then 2284dc9477beSmrg # AIX 5 supports IA64 2285dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2286dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2287dc9477beSmrg else 2288dc9477beSmrg # With GCC up to 2.95.x, collect2 would create an import file 2289dc9477beSmrg # for dependence libraries. The import file would start with 2290dc9477beSmrg # the line `#! .'. This would cause the generated library to 2291dc9477beSmrg # depend on `.', always an invalid library. This was fixed in 2292dc9477beSmrg # development snapshots of GCC prior to 3.0. 2293dc9477beSmrg case $host_os in 2294dc9477beSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2295dc9477beSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2296dc9477beSmrg echo ' yes ' 2297dc9477beSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2298dc9477beSmrg : 2299dc9477beSmrg else 2300dc9477beSmrg can_build_shared=no 2301dc9477beSmrg fi 2302dc9477beSmrg ;; 2303dc9477beSmrg esac 2304dc9477beSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2305dc9477beSmrg # soname into executable. Probably we can add versioning support to 2306dc9477beSmrg # collect2, so additional links can be useful in future. 2307dc9477beSmrg if test "$aix_use_runtimelinking" = yes; then 2308dc9477beSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2309dc9477beSmrg # instead of lib<name>.a to let people know that these are not 2310dc9477beSmrg # typical AIX shared libraries. 2311dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2312dc9477beSmrg else 2313dc9477beSmrg # We preserve .a as extension for shared libraries through AIX4.2 2314dc9477beSmrg # and later when we are not doing run time linking. 2315dc9477beSmrg library_names_spec='${libname}${release}.a $libname.a' 2316dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2317dc9477beSmrg fi 2318dc9477beSmrg shlibpath_var=LIBPATH 2319dc9477beSmrg fi 2320dc9477beSmrg ;; 2321c43cc173Smrg 2322dc9477beSmrgamigaos*) 2323dc9477beSmrg case $host_cpu in 2324dc9477beSmrg powerpc) 2325dc9477beSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2326dc9477beSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2327dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 232806c34b88Smrg ;; 2329dc9477beSmrg m68k) 2330dc9477beSmrg library_names_spec='$libname.ixlibrary $libname.a' 2331dc9477beSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2332dc9477beSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 233306c34b88Smrg ;; 2334dc9477beSmrg esac 2335dc9477beSmrg ;; 2336c27c18e8Smrg 2337dc9477beSmrgbeos*) 2338dc9477beSmrg library_names_spec='${libname}${shared_ext}' 2339dc9477beSmrg dynamic_linker="$host_os ld.so" 2340dc9477beSmrg shlibpath_var=LIBRARY_PATH 2341dc9477beSmrg ;; 234206c34b88Smrg 2343dc9477beSmrgbsdi[[45]]*) 2344dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2345dc9477beSmrg need_version=no 2346dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2347dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2348dc9477beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2349dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2350dc9477beSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2351dc9477beSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2352dc9477beSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2353dc9477beSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2354dc9477beSmrg # libtool to hard-code these into programs 2355dc9477beSmrg ;; 235606c34b88Smrg 2357dc9477beSmrgcygwin* | mingw* | pw32* | cegcc*) 2358dc9477beSmrg version_type=windows 2359dc9477beSmrg shrext_cmds=".dll" 2360dc9477beSmrg need_version=no 2361dc9477beSmrg need_lib_prefix=no 236206c34b88Smrg 2363dc9477beSmrg case $GCC,$cc_basename in 2364dc9477beSmrg yes,*) 2365dc9477beSmrg # gcc 2366dc9477beSmrg library_names_spec='$libname.dll.a' 2367dc9477beSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2368dc9477beSmrg postinstall_cmds='base_file=`basename \${file}`~ 2369dc9477beSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2370dc9477beSmrg dldir=$destdir/`dirname \$dlpath`~ 2371dc9477beSmrg test -d \$dldir || mkdir -p \$dldir~ 2372dc9477beSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2373dc9477beSmrg chmod a+x \$dldir/$dlname~ 2374dc9477beSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2375dc9477beSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2376dc9477beSmrg fi' 2377dc9477beSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2378dc9477beSmrg dlpath=$dir/\$dldll~ 2379dc9477beSmrg $RM \$dlpath' 2380dc9477beSmrg shlibpath_overrides_runpath=yes 238106c34b88Smrg 2382dc9477beSmrg case $host_os in 2383dc9477beSmrg cygwin*) 2384dc9477beSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2385dc9477beSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2386dc9477beSmrgm4_if([$1], [],[ 2387dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2388dc9477beSmrg ;; 2389dc9477beSmrg mingw* | cegcc*) 2390dc9477beSmrg # MinGW DLLs use traditional 'lib' prefix 2391dc9477beSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2392dc9477beSmrg ;; 2393dc9477beSmrg pw32*) 2394dc9477beSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2395dc9477beSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2396dc9477beSmrg ;; 2397dc9477beSmrg esac 2398dc9477beSmrg dynamic_linker='Win32 ld.exe' 239906c34b88Smrg ;; 240006c34b88Smrg 2401dc9477beSmrg *,cl*) 2402dc9477beSmrg # Native MSVC 2403dc9477beSmrg libname_spec='$name' 2404dc9477beSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2405dc9477beSmrg library_names_spec='${libname}.dll.lib' 2406dc9477beSmrg 2407dc9477beSmrg case $build_os in 2408dc9477beSmrg mingw*) 2409dc9477beSmrg sys_lib_search_path_spec= 2410dc9477beSmrg lt_save_ifs=$IFS 2411dc9477beSmrg IFS=';' 2412dc9477beSmrg for lt_path in $LIB 241306c34b88Smrg do 2414dc9477beSmrg IFS=$lt_save_ifs 2415dc9477beSmrg # Let DOS variable expansion print the short 8.3 style file name. 2416dc9477beSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2417dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 241806c34b88Smrg done 2419dc9477beSmrg IFS=$lt_save_ifs 2420dc9477beSmrg # Convert to MSYS style. 2421dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2422dc9477beSmrg ;; 2423dc9477beSmrg cygwin*) 2424dc9477beSmrg # Convert to unix form, then to dos form, then back to unix form 2425dc9477beSmrg # but this time dos style (no spaces!) so that the unix form looks 2426dc9477beSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 2427dc9477beSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2428dc9477beSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2429dc9477beSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2430dc9477beSmrg ;; 2431dc9477beSmrg *) 2432dc9477beSmrg sys_lib_search_path_spec="$LIB" 2433dc9477beSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2434dc9477beSmrg # It is most probably a Windows format PATH. 2435dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2436dc9477beSmrg else 2437dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2438dc9477beSmrg fi 2439dc9477beSmrg # FIXME: find the short name or the path components, as spaces are 2440dc9477beSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 2441dc9477beSmrg ;; 2442dc9477beSmrg esac 2443c27c18e8Smrg 2444dc9477beSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2445dc9477beSmrg postinstall_cmds='base_file=`basename \${file}`~ 2446dc9477beSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2447dc9477beSmrg dldir=$destdir/`dirname \$dlpath`~ 2448dc9477beSmrg test -d \$dldir || mkdir -p \$dldir~ 2449dc9477beSmrg $install_prog $dir/$dlname \$dldir/$dlname' 2450dc9477beSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2451dc9477beSmrg dlpath=$dir/\$dldll~ 2452dc9477beSmrg $RM \$dlpath' 2453dc9477beSmrg shlibpath_overrides_runpath=yes 2454dc9477beSmrg dynamic_linker='Win32 link.exe' 2455dc9477beSmrg ;; 2456c27c18e8Smrg 2457dc9477beSmrg *) 2458dc9477beSmrg # Assume MSVC wrapper 2459dc9477beSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2460dc9477beSmrg dynamic_linker='Win32 ld.exe' 2461dc9477beSmrg ;; 2462dc9477beSmrg esac 2463dc9477beSmrg # FIXME: first we should search . and the directory the executable is in 2464dc9477beSmrg shlibpath_var=PATH 2465dc9477beSmrg ;; 2466c43cc173Smrg 2467dc9477beSmrgdarwin* | rhapsody*) 2468dc9477beSmrg dynamic_linker="$host_os dyld" 2469dc9477beSmrg version_type=darwin 2470dc9477beSmrg need_lib_prefix=no 2471dc9477beSmrg need_version=no 2472dc9477beSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2473dc9477beSmrg soname_spec='${libname}${release}${major}$shared_ext' 2474dc9477beSmrg shlibpath_overrides_runpath=yes 2475dc9477beSmrg shlibpath_var=DYLD_LIBRARY_PATH 2476dc9477beSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2477dc9477beSmrgm4_if([$1], [],[ 2478dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2479dc9477beSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2480dc9477beSmrg ;; 248121e67964Smrg 2482dc9477beSmrgdgux*) 2483dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2484dc9477beSmrg need_lib_prefix=no 2485dc9477beSmrg need_version=no 2486dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2487dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2488dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2489dc9477beSmrg ;; 2490c43cc173Smrg 2491dc9477beSmrgfreebsd* | dragonfly*) 2492dc9477beSmrg # DragonFly does not have aout. When/if they implement a new 2493dc9477beSmrg # versioning mechanism, adjust this. 2494dc9477beSmrg if test -x /usr/bin/objformat; then 2495dc9477beSmrg objformat=`/usr/bin/objformat` 249621e67964Smrg else 2497dc9477beSmrg case $host_os in 2498dc9477beSmrg freebsd[[23]].*) objformat=aout ;; 2499dc9477beSmrg *) objformat=elf ;; 2500c43cc173Smrg esac 250121e67964Smrg fi 2502dc9477beSmrg version_type=freebsd-$objformat 2503dc9477beSmrg case $version_type in 2504dc9477beSmrg freebsd-elf*) 2505dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2506dc9477beSmrg need_version=no 2507dc9477beSmrg need_lib_prefix=no 2508dc9477beSmrg ;; 2509dc9477beSmrg freebsd-*) 2510dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2511dc9477beSmrg need_version=yes 2512dc9477beSmrg ;; 2513dc9477beSmrg esac 2514dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 251506c34b88Smrg case $host_os in 2516dc9477beSmrg freebsd2.*) 2517dc9477beSmrg shlibpath_overrides_runpath=yes 251806c34b88Smrg ;; 2519dc9477beSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2520dc9477beSmrg shlibpath_overrides_runpath=yes 2521dc9477beSmrg hardcode_into_libs=yes 252206c34b88Smrg ;; 2523dc9477beSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2524dc9477beSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2525dc9477beSmrg shlibpath_overrides_runpath=no 2526dc9477beSmrg hardcode_into_libs=yes 252721e67964Smrg ;; 2528dc9477beSmrg *) # from 4.6 on, and DragonFly 2529dc9477beSmrg shlibpath_overrides_runpath=yes 2530dc9477beSmrg hardcode_into_libs=yes 2531c43cc173Smrg ;; 2532c43cc173Smrg esac 2533dc9477beSmrg ;; 2534c43cc173Smrg 2535dc9477beSmrggnu*) 2536dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2537dc9477beSmrg need_lib_prefix=no 2538dc9477beSmrg need_version=no 2539dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2540dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2541dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2542dc9477beSmrg shlibpath_overrides_runpath=no 2543dc9477beSmrg hardcode_into_libs=yes 2544dc9477beSmrg ;; 254521e67964Smrg 2546dc9477beSmrghaiku*) 2547dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2548dc9477beSmrg need_lib_prefix=no 2549dc9477beSmrg need_version=no 2550dc9477beSmrg dynamic_linker="$host_os runtime_loader" 2551dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2552dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2553dc9477beSmrg shlibpath_var=LIBRARY_PATH 2554dc9477beSmrg shlibpath_overrides_runpath=yes 2555dc9477beSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2556dc9477beSmrg hardcode_into_libs=yes 2557dc9477beSmrg ;; 255821e67964Smrg 2559dc9477beSmrghpux9* | hpux10* | hpux11*) 2560dc9477beSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2561dc9477beSmrg # link against other versions. 2562dc9477beSmrg version_type=sunos 2563dc9477beSmrg need_lib_prefix=no 2564dc9477beSmrg need_version=no 2565dc9477beSmrg case $host_cpu in 2566dc9477beSmrg ia64*) 2567dc9477beSmrg shrext_cmds='.so' 2568dc9477beSmrg hardcode_into_libs=yes 2569dc9477beSmrg dynamic_linker="$host_os dld.so" 2570dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2571dc9477beSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2572dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2573dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2574dc9477beSmrg if test "X$HPUX_IA64_MODE" = X32; then 2575dc9477beSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2576dc9477beSmrg else 2577dc9477beSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 257806c34b88Smrg fi 2579dc9477beSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2580c43cc173Smrg ;; 2581dc9477beSmrg hppa*64*) 2582dc9477beSmrg shrext_cmds='.sl' 2583dc9477beSmrg hardcode_into_libs=yes 2584dc9477beSmrg dynamic_linker="$host_os dld.sl" 2585dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2586dc9477beSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2587dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2588dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2589dc9477beSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2590dc9477beSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2591dc9477beSmrg ;; 2592dc9477beSmrg *) 2593dc9477beSmrg shrext_cmds='.sl' 2594dc9477beSmrg dynamic_linker="$host_os dld.sl" 2595dc9477beSmrg shlibpath_var=SHLIB_PATH 2596dc9477beSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2597dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2598dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2599dc9477beSmrg ;; 2600dc9477beSmrg esac 2601dc9477beSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2602dc9477beSmrg postinstall_cmds='chmod 555 $lib' 2603dc9477beSmrg # or fails outright, so override atomically: 2604dc9477beSmrg install_override_mode=555 2605dc9477beSmrg ;; 2606c43cc173Smrg 2607dc9477beSmrginterix[[3-9]]*) 2608dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2609dc9477beSmrg need_lib_prefix=no 2610dc9477beSmrg need_version=no 2611dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2612dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2613dc9477beSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2614dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2615dc9477beSmrg shlibpath_overrides_runpath=no 2616dc9477beSmrg hardcode_into_libs=yes 2617dc9477beSmrg ;; 2618c43cc173Smrg 2619dc9477beSmrgirix5* | irix6* | nonstopux*) 2620dc9477beSmrg case $host_os in 2621dc9477beSmrg nonstopux*) version_type=nonstopux ;; 2622dc9477beSmrg *) 2623dc9477beSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2624dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2625dc9477beSmrg else 2626dc9477beSmrg version_type=irix 2627dc9477beSmrg fi ;; 2628dc9477beSmrg esac 2629dc9477beSmrg need_lib_prefix=no 2630dc9477beSmrg need_version=no 2631dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2632dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2633dc9477beSmrg case $host_os in 2634dc9477beSmrg irix5* | nonstopux*) 2635dc9477beSmrg libsuff= shlibsuff= 2636dc9477beSmrg ;; 2637dc9477beSmrg *) 2638dc9477beSmrg case $LD in # libtool.m4 will add one of these switches to LD 2639dc9477beSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2640dc9477beSmrg libsuff= shlibsuff= libmagic=32-bit;; 2641dc9477beSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2642dc9477beSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2643dc9477beSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2644dc9477beSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2645dc9477beSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2646dc9477beSmrg esac 2647dc9477beSmrg ;; 2648dc9477beSmrg esac 2649dc9477beSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2650dc9477beSmrg shlibpath_overrides_runpath=no 2651dc9477beSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2652dc9477beSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2653dc9477beSmrg hardcode_into_libs=yes 2654dc9477beSmrg ;; 2655c27c18e8Smrg 2656dc9477beSmrg# No shared lib support for Linux oldld, aout, or coff. 2657dc9477beSmrglinux*oldld* | linux*aout* | linux*coff*) 2658dc9477beSmrg dynamic_linker=no 2659dc9477beSmrg ;; 266006c34b88Smrg 2661dc9477beSmrg# This must be glibc/ELF. 2662dc9477beSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 2663dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2664dc9477beSmrg need_lib_prefix=no 2665dc9477beSmrg need_version=no 2666dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2667dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2668dc9477beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2669dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2670dc9477beSmrg shlibpath_overrides_runpath=no 267106c34b88Smrg 2672dc9477beSmrg # Some binutils ld are patched to set DT_RUNPATH 2673dc9477beSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2674dc9477beSmrg [lt_cv_shlibpath_overrides_runpath=no 2675dc9477beSmrg save_LDFLAGS=$LDFLAGS 2676dc9477beSmrg save_libdir=$libdir 2677dc9477beSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2678dc9477beSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2679dc9477beSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2680dc9477beSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2681dc9477beSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2682dc9477beSmrg LDFLAGS=$save_LDFLAGS 2683dc9477beSmrg libdir=$save_libdir 2684dc9477beSmrg ]) 2685dc9477beSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 268606c34b88Smrg 2687dc9477beSmrg # This implies no fast_install, which is unacceptable. 2688dc9477beSmrg # Some rework will be needed to allow for fast_install 2689dc9477beSmrg # before this can be enabled. 2690dc9477beSmrg hardcode_into_libs=yes 2691c43cc173Smrg 2692dc9477beSmrg # Add ABI-specific directories to the system library path. 2693dc9477beSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2694b789ec8aSmrg 2695dc9477beSmrg # Append ld.so.conf contents to the search path 2696dc9477beSmrg if test -f /etc/ld.so.conf; then 2697dc9477beSmrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 2698dc9477beSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2699b789ec8aSmrg 2700dc9477beSmrg fi 2701b789ec8aSmrg 2702dc9477beSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2703dc9477beSmrg # powerpc, because MkLinux only supported shared libraries with the 2704dc9477beSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2705dc9477beSmrg # most powerpc-linux boxes support dynamic linking these days and 2706dc9477beSmrg # people can always --disable-shared, the test was removed, and we 2707dc9477beSmrg # assume the GNU/Linux dynamic linker is in use. 2708dc9477beSmrg dynamic_linker='GNU/Linux ld.so' 2709dc9477beSmrg ;; 2710b789ec8aSmrg 2711dc9477beSmrgnetbsd*) 2712dc9477beSmrg version_type=sunos 2713dc9477beSmrg need_lib_prefix=no 2714dc9477beSmrg need_version=no 2715dc9477beSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2716dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2717dc9477beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2718dc9477beSmrg dynamic_linker='NetBSD (a.out) ld.so' 271906c34b88Smrg else 2720dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2721dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2722dc9477beSmrg dynamic_linker='NetBSD ld.elf_so' 2723b789ec8aSmrg fi 2724dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2725dc9477beSmrg shlibpath_overrides_runpath=yes 2726dc9477beSmrg hardcode_into_libs=yes 2727dc9477beSmrg ;; 2728c43cc173Smrg 2729dc9477beSmrgnewsos6) 2730dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2731dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2732dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2733dc9477beSmrg shlibpath_overrides_runpath=yes 2734dc9477beSmrg ;; 2735c43cc173Smrg 2736dc9477beSmrg*nto* | *qnx*) 2737dc9477beSmrg version_type=qnx 2738dc9477beSmrg need_lib_prefix=no 2739dc9477beSmrg need_version=no 2740dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2741dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2742dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2743dc9477beSmrg shlibpath_overrides_runpath=no 2744dc9477beSmrg hardcode_into_libs=yes 2745dc9477beSmrg dynamic_linker='ldqnx.so' 2746dc9477beSmrg ;; 2747c43cc173Smrg 2748dc9477beSmrgopenbsd*) 2749dc9477beSmrg version_type=sunos 2750dc9477beSmrg sys_lib_dlsearch_path_spec="/usr/lib" 2751dc9477beSmrg need_lib_prefix=no 2752dc9477beSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 275306c34b88Smrg case $host_os in 2754dc9477beSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2755dc9477beSmrg *) need_version=no ;; 275606c34b88Smrg esac 2757dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2758dc9477beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2759dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2760dc9477beSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2761dc9477beSmrg case $host_os in 2762dc9477beSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 2763dc9477beSmrg shlibpath_overrides_runpath=no 2764dc9477beSmrg ;; 2765dc9477beSmrg *) 2766dc9477beSmrg shlibpath_overrides_runpath=yes 2767dc9477beSmrg ;; 2768dc9477beSmrg esac 2769dc9477beSmrg else 2770dc9477beSmrg shlibpath_overrides_runpath=yes 2771dc9477beSmrg fi 2772dc9477beSmrg ;; 2773c43cc173Smrg 2774dc9477beSmrgos2*) 2775dc9477beSmrg libname_spec='$name' 2776dc9477beSmrg shrext_cmds=".dll" 2777dc9477beSmrg need_lib_prefix=no 2778dc9477beSmrg library_names_spec='$libname${shared_ext} $libname.a' 2779dc9477beSmrg dynamic_linker='OS/2 ld.exe' 278006c34b88Smrg shlibpath_var=LIBPATH 2781dc9477beSmrg ;; 278206c34b88Smrg 2783dc9477beSmrgosf3* | osf4* | osf5*) 2784dc9477beSmrg version_type=osf 2785dc9477beSmrg need_lib_prefix=no 2786dc9477beSmrg need_version=no 278706c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 2788dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2789dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2790dc9477beSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2791dc9477beSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2792c27c18e8Smrg ;; 279306c34b88Smrg 2794dc9477beSmrgrdos*) 2795dc9477beSmrg dynamic_linker=no 2796dc9477beSmrg ;; 2797dc9477beSmrg 2798dc9477beSmrgsolaris*) 279906c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 280006c34b88Smrg need_lib_prefix=no 280106c34b88Smrg need_version=no 2802dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2803dc9477beSmrg soname_spec='${libname}${release}${shared_ext}$major' 2804dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2805dc9477beSmrg shlibpath_overrides_runpath=yes 280606c34b88Smrg hardcode_into_libs=yes 2807dc9477beSmrg # ldd complains unless libraries are executable 2808dc9477beSmrg postinstall_cmds='chmod +x $lib' 280906c34b88Smrg ;; 2810c43cc173Smrg 2811dc9477beSmrgsunos4*) 2812dc9477beSmrg version_type=sunos 2813dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2814dc9477beSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2815dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2816dc9477beSmrg shlibpath_overrides_runpath=yes 2817dc9477beSmrg if test "$with_gnu_ld" = yes; then 2818dc9477beSmrg need_lib_prefix=no 2819dc9477beSmrg fi 2820dc9477beSmrg need_version=yes 2821c27c18e8Smrg ;; 2822c43cc173Smrg 2823dc9477beSmrgsysv4 | sysv4.3*) 282406c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 282506c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 282606c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 282706c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 2828dc9477beSmrg case $host_vendor in 2829dc9477beSmrg sni) 2830dc9477beSmrg shlibpath_overrides_runpath=no 2831dc9477beSmrg need_lib_prefix=no 2832dc9477beSmrg runpath_var=LD_RUN_PATH 283306c34b88Smrg ;; 2834dc9477beSmrg siemens) 2835dc9477beSmrg need_lib_prefix=no 283606c34b88Smrg ;; 2837dc9477beSmrg motorola) 2838dc9477beSmrg need_lib_prefix=no 2839dc9477beSmrg need_version=no 2840dc9477beSmrg shlibpath_overrides_runpath=no 2841dc9477beSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 284206c34b88Smrg ;; 284306c34b88Smrg esac 284406c34b88Smrg ;; 2845c43cc173Smrg 2846dc9477beSmrgsysv4*MP*) 2847dc9477beSmrg if test -d /usr/nec ;then 2848dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2849dc9477beSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2850dc9477beSmrg soname_spec='$libname${shared_ext}.$major' 2851dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2852dc9477beSmrg fi 285306c34b88Smrg ;; 2854c43cc173Smrg 2855dc9477beSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2856dc9477beSmrg version_type=freebsd-elf 285706c34b88Smrg need_lib_prefix=no 285806c34b88Smrg need_version=no 2859dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 286006c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 286106c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 2862dc9477beSmrg shlibpath_overrides_runpath=yes 2863dc9477beSmrg hardcode_into_libs=yes 2864dc9477beSmrg if test "$with_gnu_ld" = yes; then 2865dc9477beSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2866c27c18e8Smrg else 2867dc9477beSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 286806c34b88Smrg case $host_os in 2869dc9477beSmrg sco3.2v5*) 2870dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2871dc9477beSmrg ;; 287206c34b88Smrg esac 2873c27c18e8Smrg fi 2874dc9477beSmrg sys_lib_dlsearch_path_spec='/usr/lib' 287506c34b88Smrg ;; 2876c43cc173Smrg 2877dc9477beSmrgtpf*) 2878dc9477beSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 287906c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 288006c34b88Smrg need_lib_prefix=no 288106c34b88Smrg need_version=no 2882dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 288306c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 288406c34b88Smrg shlibpath_overrides_runpath=no 288506c34b88Smrg hardcode_into_libs=yes 288606c34b88Smrg ;; 2887c43cc173Smrg 2888dc9477beSmrguts4*) 288906c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 2890dc9477beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 289106c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 2892dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 289306c34b88Smrg ;; 2894c43cc173Smrg 2895dc9477beSmrg*) 289606c34b88Smrg dynamic_linker=no 289706c34b88Smrg ;; 2898dc9477beSmrgesac 2899dc9477beSmrgAC_MSG_RESULT([$dynamic_linker]) 2900dc9477beSmrgtest "$dynamic_linker" = no && can_build_shared=no 2901c43cc173Smrg 2902dc9477beSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2903dc9477beSmrgif test "$GCC" = yes; then 2904dc9477beSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2905dc9477beSmrgfi 2906c43cc173Smrg 2907dc9477beSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2908dc9477beSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2909dc9477beSmrgfi 2910dc9477beSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2911dc9477beSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2912dc9477beSmrgfi 2913c43cc173Smrg 2914dc9477beSmrg_LT_DECL([], [variables_saved_for_relink], [1], 2915dc9477beSmrg [Variables whose values should be saved in libtool wrapper scripts and 2916dc9477beSmrg restored at link time]) 2917dc9477beSmrg_LT_DECL([], [need_lib_prefix], [0], 2918dc9477beSmrg [Do we need the "lib" prefix for modules?]) 2919dc9477beSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2920dc9477beSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2921dc9477beSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2922dc9477beSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2923dc9477beSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2924dc9477beSmrg [Is shlibpath searched before the hard-coded library search path?]) 2925dc9477beSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2926dc9477beSmrg_LT_DECL([], [library_names_spec], [1], 2927dc9477beSmrg [[List of archive names. First name is the real one, the rest are links. 2928dc9477beSmrg The last name is the one that the linker finds with -lNAME]]) 2929dc9477beSmrg_LT_DECL([], [soname_spec], [1], 2930dc9477beSmrg [[The coded name of the library, if different from the real name]]) 2931dc9477beSmrg_LT_DECL([], [install_override_mode], [1], 2932dc9477beSmrg [Permission mode override for installation of shared libraries]) 2933dc9477beSmrg_LT_DECL([], [postinstall_cmds], [2], 2934dc9477beSmrg [Command to use after installation of a shared archive]) 2935dc9477beSmrg_LT_DECL([], [postuninstall_cmds], [2], 2936dc9477beSmrg [Command to use after uninstallation of a shared archive]) 2937dc9477beSmrg_LT_DECL([], [finish_cmds], [2], 2938dc9477beSmrg [Commands used to finish a libtool library installation in a directory]) 2939dc9477beSmrg_LT_DECL([], [finish_eval], [1], 2940dc9477beSmrg [[As "finish_cmds", except a single script fragment to be evaled but 2941dc9477beSmrg not shown]]) 2942dc9477beSmrg_LT_DECL([], [hardcode_into_libs], [0], 2943dc9477beSmrg [Whether we should hardcode library paths into libraries]) 2944dc9477beSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2945dc9477beSmrg [Compile-time system search path for libraries]) 2946dc9477beSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2947dc9477beSmrg [Run-time system search path for libraries]) 2948dc9477beSmrg])# _LT_SYS_DYNAMIC_LINKER 294921e67964Smrg 295021e67964Smrg 2951dc9477beSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 2952dc9477beSmrg# -------------------------- 2953dc9477beSmrg# find a file program which can recognize shared library 2954dc9477beSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2955dc9477beSmrg[m4_require([_LT_DECL_EGREP])dnl 2956dc9477beSmrgAC_MSG_CHECKING([for $1]) 2957dc9477beSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2958dc9477beSmrg[case $MAGIC_CMD in 2959dc9477beSmrg[[\\/*] | ?:[\\/]*]) 2960dc9477beSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2961dc9477beSmrg ;; 2962dc9477beSmrg*) 2963dc9477beSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2964dc9477beSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2965dc9477beSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2966dc9477beSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2967dc9477beSmrgdnl not every word. This closes a longstanding sh security hole. 2968dc9477beSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2969dc9477beSmrg for ac_dir in $ac_dummy; do 2970dc9477beSmrg IFS="$lt_save_ifs" 2971dc9477beSmrg test -z "$ac_dir" && ac_dir=. 2972dc9477beSmrg if test -f $ac_dir/$1; then 2973dc9477beSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2974dc9477beSmrg if test -n "$file_magic_test_file"; then 2975dc9477beSmrg case $deplibs_check_method in 2976dc9477beSmrg "file_magic "*) 2977dc9477beSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2978dc9477beSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2979dc9477beSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2980dc9477beSmrg $EGREP "$file_magic_regex" > /dev/null; then 2981dc9477beSmrg : 2982dc9477beSmrg else 2983dc9477beSmrg cat <<_LT_EOF 1>&2 298421e67964Smrg 2985dc9477beSmrg*** Warning: the command libtool uses to detect shared libraries, 2986dc9477beSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2987dc9477beSmrg*** The result is that libtool may fail to recognize shared libraries 2988dc9477beSmrg*** as such. This will affect the creation of libtool libraries that 2989dc9477beSmrg*** depend on shared libraries, but programs linked with such libtool 2990dc9477beSmrg*** libraries will work regardless of this problem. Nevertheless, you 2991dc9477beSmrg*** may want to report the problem to your system manager and/or to 2992dc9477beSmrg*** bug-libtool@gnu.org 299321e67964Smrg 2994dc9477beSmrg_LT_EOF 2995dc9477beSmrg fi ;; 2996dc9477beSmrg esac 2997dc9477beSmrg fi 2998dc9477beSmrg break 2999dc9477beSmrg fi 3000dc9477beSmrg done 3001dc9477beSmrg IFS="$lt_save_ifs" 3002dc9477beSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 300306c34b88Smrg ;; 3004dc9477beSmrgesac]) 3005dc9477beSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3006dc9477beSmrgif test -n "$MAGIC_CMD"; then 3007dc9477beSmrg AC_MSG_RESULT($MAGIC_CMD) 3008dc9477beSmrgelse 3009dc9477beSmrg AC_MSG_RESULT(no) 3010dc9477beSmrgfi 3011dc9477beSmrg_LT_DECL([], [MAGIC_CMD], [0], 3012dc9477beSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3013dc9477beSmrg])# _LT_PATH_TOOL_PREFIX 301421e67964Smrg 3015dc9477beSmrg# Old name: 3016dc9477beSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3017dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 3018dc9477beSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3019dc9477beSmrg 3020dc9477beSmrg 3021dc9477beSmrg# _LT_PATH_MAGIC 3022dc9477beSmrg# -------------- 3023dc9477beSmrg# find a file program which can recognize a shared library 3024dc9477beSmrgm4_defun([_LT_PATH_MAGIC], 3025dc9477beSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3026dc9477beSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3027dc9477beSmrg if test -n "$ac_tool_prefix"; then 3028dc9477beSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 302906c34b88Smrg else 3030dc9477beSmrg MAGIC_CMD=: 303106c34b88Smrg fi 3032dc9477beSmrgfi 3033dc9477beSmrg])# _LT_PATH_MAGIC 303421e67964Smrg 3035c43cc173Smrg 3036dc9477beSmrg# LT_PATH_LD 3037dc9477beSmrg# ---------- 3038dc9477beSmrg# find the pathname to the GNU or non-GNU linker 3039dc9477beSmrgAC_DEFUN([LT_PATH_LD], 3040dc9477beSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3041dc9477beSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3042dc9477beSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3043dc9477beSmrgm4_require([_LT_DECL_SED])dnl 3044dc9477beSmrgm4_require([_LT_DECL_EGREP])dnl 3045dc9477beSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3046c43cc173Smrg 3047dc9477beSmrgAC_ARG_WITH([gnu-ld], 3048dc9477beSmrg [AS_HELP_STRING([--with-gnu-ld], 3049dc9477beSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3050dc9477beSmrg [test "$withval" = no || with_gnu_ld=yes], 3051dc9477beSmrg [with_gnu_ld=no])dnl 3052dc9477beSmrg 3053dc9477beSmrgac_prog=ld 3054dc9477beSmrgif test "$GCC" = yes; then 3055dc9477beSmrg # Check if gcc -print-prog-name=ld gives a path. 3056dc9477beSmrg AC_MSG_CHECKING([for ld used by $CC]) 3057dc9477beSmrg case $host in 3058dc9477beSmrg *-*-mingw*) 3059dc9477beSmrg # gcc leaves a trailing carriage return which upsets mingw 3060dc9477beSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3061dc9477beSmrg *) 3062dc9477beSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 306306c34b88Smrg esac 3064dc9477beSmrg case $ac_prog in 3065dc9477beSmrg # Accept absolute paths. 3066dc9477beSmrg [[\\/]]* | ?:[[\\/]]*) 3067dc9477beSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3068dc9477beSmrg # Canonicalize the pathname of ld 3069dc9477beSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3070dc9477beSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3071dc9477beSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3072dc9477beSmrg done 3073dc9477beSmrg test -z "$LD" && LD="$ac_prog" 3074dc9477beSmrg ;; 3075dc9477beSmrg "") 3076dc9477beSmrg # If it fails, then pretend we aren't using GCC. 3077dc9477beSmrg ac_prog=ld 3078dc9477beSmrg ;; 3079dc9477beSmrg *) 3080dc9477beSmrg # If it is relative, then search for the first ld in PATH. 3081dc9477beSmrg with_gnu_ld=unknown 3082dc9477beSmrg ;; 3083dc9477beSmrg esac 3084dc9477beSmrgelif test "$with_gnu_ld" = yes; then 3085dc9477beSmrg AC_MSG_CHECKING([for GNU ld]) 3086dc9477beSmrgelse 3087dc9477beSmrg AC_MSG_CHECKING([for non-GNU ld]) 3088dc9477beSmrgfi 3089dc9477beSmrgAC_CACHE_VAL(lt_cv_path_LD, 3090dc9477beSmrg[if test -z "$LD"; then 3091dc9477beSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3092dc9477beSmrg for ac_dir in $PATH; do 3093dc9477beSmrg IFS="$lt_save_ifs" 3094dc9477beSmrg test -z "$ac_dir" && ac_dir=. 3095dc9477beSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3096dc9477beSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 3097dc9477beSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3098dc9477beSmrg # but apparently some variants of GNU ld only accept -v. 3099dc9477beSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3100dc9477beSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3101dc9477beSmrg *GNU* | *'with BFD'*) 3102dc9477beSmrg test "$with_gnu_ld" != no && break 310306c34b88Smrg ;; 310406c34b88Smrg *) 3105dc9477beSmrg test "$with_gnu_ld" != yes && break 310606c34b88Smrg ;; 310706c34b88Smrg esac 3108dc9477beSmrg fi 3109dc9477beSmrg done 3110dc9477beSmrg IFS="$lt_save_ifs" 3111dc9477beSmrgelse 3112dc9477beSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3113dc9477beSmrgfi]) 3114dc9477beSmrgLD="$lt_cv_path_LD" 3115dc9477beSmrgif test -n "$LD"; then 3116dc9477beSmrg AC_MSG_RESULT($LD) 3117dc9477beSmrgelse 3118dc9477beSmrg AC_MSG_RESULT(no) 3119dc9477beSmrgfi 3120dc9477beSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3121dc9477beSmrg_LT_PATH_LD_GNU 3122dc9477beSmrgAC_SUBST([LD]) 312321e67964Smrg 3124dc9477beSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3125dc9477beSmrg])# LT_PATH_LD 312621e67964Smrg 3127dc9477beSmrg# Old names: 3128dc9477beSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3129dc9477beSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3130dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 3131dc9477beSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3132dc9477beSmrgdnl AC_DEFUN([AC_PROG_LD], []) 313321e67964Smrg 3134c27c18e8Smrg 3135dc9477beSmrg# _LT_PATH_LD_GNU 3136dc9477beSmrg#- -------------- 3137dc9477beSmrgm4_defun([_LT_PATH_LD_GNU], 3138dc9477beSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3139dc9477beSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3140dc9477beSmrgcase `$LD -v 2>&1 </dev/null` in 3141dc9477beSmrg*GNU* | *'with BFD'*) 3142dc9477beSmrg lt_cv_prog_gnu_ld=yes 314306c34b88Smrg ;; 3144dc9477beSmrg*) 3145dc9477beSmrg lt_cv_prog_gnu_ld=no 314606c34b88Smrg ;; 3147dc9477beSmrgesac]) 3148dc9477beSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3149dc9477beSmrg])# _LT_PATH_LD_GNU 3150c43cc173Smrg 315106c34b88Smrg 3152dc9477beSmrg# _LT_CMD_RELOAD 3153dc9477beSmrg# -------------- 3154dc9477beSmrg# find reload flag for linker 3155dc9477beSmrg# -- PORTME Some linkers may need a different reload flag. 3156dc9477beSmrgm4_defun([_LT_CMD_RELOAD], 3157dc9477beSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3158dc9477beSmrg lt_cv_ld_reload_flag, 3159dc9477beSmrg [lt_cv_ld_reload_flag='-r']) 3160dc9477beSmrgreload_flag=$lt_cv_ld_reload_flag 3161dc9477beSmrgcase $reload_flag in 3162dc9477beSmrg"" | " "*) ;; 3163dc9477beSmrg*) reload_flag=" $reload_flag" ;; 316406c34b88Smrgesac 3165dc9477beSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3166dc9477beSmrgcase $host_os in 3167dc9477beSmrg cygwin* | mingw* | pw32* | cegcc*) 3168dc9477beSmrg if test "$GCC" != yes; then 3169dc9477beSmrg reload_cmds=false 3170dc9477beSmrg fi 3171dc9477beSmrg ;; 3172dc9477beSmrg darwin*) 3173dc9477beSmrg if test "$GCC" = yes; then 3174dc9477beSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3175dc9477beSmrg else 3176dc9477beSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3177dc9477beSmrg fi 3178dc9477beSmrg ;; 3179dc9477beSmrgesac 3180dc9477beSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3181dc9477beSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3182dc9477beSmrg])# _LT_CMD_RELOAD 318321e67964Smrg 318437eb1ca1Smrg 3185dc9477beSmrg# _LT_CHECK_MAGIC_METHOD 3186dc9477beSmrg# ---------------------- 3187dc9477beSmrg# how to check for library dependencies 3188dc9477beSmrg# -- PORTME fill in with the dynamic library characteristics 3189dc9477beSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3190dc9477beSmrg[m4_require([_LT_DECL_EGREP]) 3191dc9477beSmrgm4_require([_LT_DECL_OBJDUMP]) 3192dc9477beSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3193dc9477beSmrglt_cv_deplibs_check_method, 3194dc9477beSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3195dc9477beSmrglt_cv_file_magic_test_file= 3196dc9477beSmrglt_cv_deplibs_check_method='unknown' 3197dc9477beSmrg# Need to set the preceding variable on all platforms that support 3198dc9477beSmrg# interlibrary dependencies. 3199dc9477beSmrg# 'none' -- dependencies not supported. 3200dc9477beSmrg# `unknown' -- same as none, but documents that we really don't know. 3201dc9477beSmrg# 'pass_all' -- all dependencies passed with no checks. 3202dc9477beSmrg# 'test_compile' -- check by making test program. 3203dc9477beSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3204dc9477beSmrg# which responds to the $file_magic_cmd with a given extended regex. 3205dc9477beSmrg# If you have `file' or equivalent on your system and you're not sure 3206dc9477beSmrg# whether `pass_all' will *always* work, you probably want this one. 320721e67964Smrg 3208dc9477beSmrgcase $host_os in 3209dc9477beSmrgaix[[4-9]]*) 3210dc9477beSmrg lt_cv_deplibs_check_method=pass_all 3211dc9477beSmrg ;; 3212c43cc173Smrg 3213dc9477beSmrgbeos*) 3214dc9477beSmrg lt_cv_deplibs_check_method=pass_all 3215dc9477beSmrg ;; 3216c43cc173Smrg 3217dc9477beSmrgbsdi[[45]]*) 3218dc9477beSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3219dc9477beSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3220dc9477beSmrg lt_cv_file_magic_test_file=/shlib/libc.so 322106c34b88Smrg ;; 322206c34b88Smrg 3223dc9477beSmrgcygwin*) 3224dc9477beSmrg # func_win32_libid is a shell function defined in ltmain.sh 3225dc9477beSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3226dc9477beSmrg lt_cv_file_magic_cmd='func_win32_libid' 3227dc9477beSmrg ;; 322806c34b88Smrg 3229dc9477beSmrgmingw* | pw32*) 3230dc9477beSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3231dc9477beSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3232dc9477beSmrg # unless we find 'file', for example because we are cross-compiling. 3233dc9477beSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3234dc9477beSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3235dc9477beSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3236dc9477beSmrg lt_cv_file_magic_cmd='func_win32_libid' 3237dc9477beSmrg else 3238dc9477beSmrg # Keep this pattern in sync with the one in func_win32_libid. 3239dc9477beSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3240dc9477beSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3241dc9477beSmrg fi 324206c34b88Smrg ;; 3243c43cc173Smrg 3244dc9477beSmrgcegcc*) 3245dc9477beSmrg # use the weaker test based on 'objdump'. See mingw*. 3246dc9477beSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3247dc9477beSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3248dc9477beSmrg ;; 3249c43cc173Smrg 3250dc9477beSmrgdarwin* | rhapsody*) 3251dc9477beSmrg lt_cv_deplibs_check_method=pass_all 3252dc9477beSmrg ;; 3253c43cc173Smrg 3254dc9477beSmrgfreebsd* | dragonfly*) 3255dc9477beSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3256dc9477beSmrg case $host_cpu in 3257dc9477beSmrg i*86 ) 3258dc9477beSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3259dc9477beSmrg # Let's accept both of them until this is cleared up. 3260dc9477beSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3261dc9477beSmrg lt_cv_file_magic_cmd=/usr/bin/file 3262dc9477beSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3263dc9477beSmrg ;; 3264dc9477beSmrg esac 326506c34b88Smrg else 3266dc9477beSmrg lt_cv_deplibs_check_method=pass_all 326706c34b88Smrg fi 3268dc9477beSmrg ;; 3269c43cc173Smrg 3270dc9477beSmrggnu*) 3271dc9477beSmrg lt_cv_deplibs_check_method=pass_all 3272dc9477beSmrg ;; 3273c43cc173Smrg 327406c34b88Smrghaiku*) 327506c34b88Smrg lt_cv_deplibs_check_method=pass_all 327606c34b88Smrg ;; 3277c43cc173Smrg 327806c34b88Smrghpux10.20* | hpux11*) 327906c34b88Smrg lt_cv_file_magic_cmd=/usr/bin/file 328006c34b88Smrg case $host_cpu in 328106c34b88Smrg ia64*) 328206c34b88Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 328306c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 328406c34b88Smrg ;; 328506c34b88Smrg hppa*64*) 328606c34b88Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 328706c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 328806c34b88Smrg ;; 328906c34b88Smrg *) 329006c34b88Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 329106c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 329206c34b88Smrg ;; 329306c34b88Smrg esac 329406c34b88Smrg ;; 3295c43cc173Smrg 329606c34b88Smrginterix[[3-9]]*) 329706c34b88Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 329806c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 329906c34b88Smrg ;; 3300c43cc173Smrg 330106c34b88Smrgirix5* | irix6* | nonstopux*) 330206c34b88Smrg case $LD in 330306c34b88Smrg *-32|*"-32 ") libmagic=32-bit;; 330406c34b88Smrg *-n32|*"-n32 ") libmagic=N32;; 330506c34b88Smrg *-64|*"-64 ") libmagic=64-bit;; 330606c34b88Smrg *) libmagic=never-match;; 330706c34b88Smrg esac 330806c34b88Smrg lt_cv_deplibs_check_method=pass_all 330906c34b88Smrg ;; 3310c43cc173Smrg 331106c34b88Smrg# This must be glibc/ELF. 331206c34b88Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 331306c34b88Smrg lt_cv_deplibs_check_method=pass_all 331406c34b88Smrg ;; 3315c43cc173Smrg 331606c34b88Smrgnetbsd*) 331706c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 331806c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 331906c34b88Smrg else 332006c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 332106c34b88Smrg fi 332206c34b88Smrg ;; 3323c43cc173Smrg 332406c34b88Smrgnewos6*) 332506c34b88Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 332606c34b88Smrg lt_cv_file_magic_cmd=/usr/bin/file 332706c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 332806c34b88Smrg ;; 3329c27c18e8Smrg 333006c34b88Smrg*nto* | *qnx*) 333106c34b88Smrg lt_cv_deplibs_check_method=pass_all 333206c34b88Smrg ;; 3333c27c18e8Smrg 333406c34b88Smrgopenbsd*) 333506c34b88Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 333606c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 333706c34b88Smrg else 333806c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 333906c34b88Smrg fi 334006c34b88Smrg ;; 334121e67964Smrg 334206c34b88Smrgosf3* | osf4* | osf5*) 334306c34b88Smrg lt_cv_deplibs_check_method=pass_all 334406c34b88Smrg ;; 3345c43cc173Smrg 334606c34b88Smrgrdos*) 334706c34b88Smrg lt_cv_deplibs_check_method=pass_all 334806c34b88Smrg ;; 3349c43cc173Smrg 335006c34b88Smrgsolaris*) 335106c34b88Smrg lt_cv_deplibs_check_method=pass_all 335206c34b88Smrg ;; 3353c43cc173Smrg 335406c34b88Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 335506c34b88Smrg lt_cv_deplibs_check_method=pass_all 335606c34b88Smrg ;; 3357c43cc173Smrg 335806c34b88Smrgsysv4 | sysv4.3*) 335906c34b88Smrg case $host_vendor in 336006c34b88Smrg motorola) 336106c34b88Smrg 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]]' 336206c34b88Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 336306c34b88Smrg ;; 336406c34b88Smrg ncr) 336506c34b88Smrg lt_cv_deplibs_check_method=pass_all 336606c34b88Smrg ;; 336706c34b88Smrg sequent) 336806c34b88Smrg lt_cv_file_magic_cmd='/bin/file' 336906c34b88Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 337006c34b88Smrg ;; 337106c34b88Smrg sni) 337206c34b88Smrg lt_cv_file_magic_cmd='/bin/file' 337306c34b88Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 337406c34b88Smrg lt_cv_file_magic_test_file=/lib/libc.so 337506c34b88Smrg ;; 337606c34b88Smrg siemens) 337706c34b88Smrg lt_cv_deplibs_check_method=pass_all 337806c34b88Smrg ;; 337906c34b88Smrg pc) 338006c34b88Smrg lt_cv_deplibs_check_method=pass_all 338106c34b88Smrg ;; 338206c34b88Smrg esac 338306c34b88Smrg ;; 3384c43cc173Smrg 338506c34b88Smrgtpf*) 338606c34b88Smrg lt_cv_deplibs_check_method=pass_all 338706c34b88Smrg ;; 338806c34b88Smrgesac 338906c34b88Smrg]) 3390c43cc173Smrg 339106c34b88Smrgfile_magic_glob= 339206c34b88Smrgwant_nocaseglob=no 339306c34b88Smrgif test "$build" = "$host"; then 339406c34b88Smrg case $host_os in 339506c34b88Smrg mingw* | pw32*) 339606c34b88Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 339706c34b88Smrg want_nocaseglob=yes 339806c34b88Smrg else 339906c34b88Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 340006c34b88Smrg fi 340106c34b88Smrg ;; 340206c34b88Smrg esac 340306c34b88Smrgfi 3404c43cc173Smrg 340506c34b88Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 340606c34b88Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 340706c34b88Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3408c43cc173Smrg 340906c34b88Smrg_LT_DECL([], [deplibs_check_method], [1], 341006c34b88Smrg [Method to check whether dependent libraries are shared objects]) 341106c34b88Smrg_LT_DECL([], [file_magic_cmd], [1], 341206c34b88Smrg [Command to use when deplibs_check_method = "file_magic"]) 341306c34b88Smrg_LT_DECL([], [file_magic_glob], [1], 341406c34b88Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 341506c34b88Smrg_LT_DECL([], [want_nocaseglob], [1], 341606c34b88Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 341706c34b88Smrg])# _LT_CHECK_MAGIC_METHOD 341806c34b88Smrg 341906c34b88Smrg 342006c34b88Smrg# LT_PATH_NM 342106c34b88Smrg# ---------- 342206c34b88Smrg# find the pathname to a BSD- or MS-compatible name lister 342306c34b88SmrgAC_DEFUN([LT_PATH_NM], 342406c34b88Smrg[AC_REQUIRE([AC_PROG_CC])dnl 342506c34b88SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 342606c34b88Smrg[if test -n "$NM"; then 342706c34b88Smrg # Let the user override the test. 342806c34b88Smrg lt_cv_path_NM="$NM" 342906c34b88Smrgelse 343006c34b88Smrg lt_nm_to_check="${ac_tool_prefix}nm" 343106c34b88Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 343206c34b88Smrg lt_nm_to_check="$lt_nm_to_check nm" 343306c34b88Smrg fi 343406c34b88Smrg for lt_tmp_nm in $lt_nm_to_check; do 343506c34b88Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 343606c34b88Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 343706c34b88Smrg IFS="$lt_save_ifs" 343806c34b88Smrg test -z "$ac_dir" && ac_dir=. 343906c34b88Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 344006c34b88Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 344106c34b88Smrg # Check to see if the nm accepts a BSD-compat flag. 344206c34b88Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 344306c34b88Smrg # nm: unknown option "B" ignored 344406c34b88Smrg # Tru64's nm complains that /dev/null is an invalid object file 344506c34b88Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 344606c34b88Smrg */dev/null* | *'Invalid file or object type'*) 344706c34b88Smrg lt_cv_path_NM="$tmp_nm -B" 344806c34b88Smrg break 3449c27c18e8Smrg ;; 3450c27c18e8Smrg *) 345106c34b88Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 345206c34b88Smrg */dev/null*) 345306c34b88Smrg lt_cv_path_NM="$tmp_nm -p" 345406c34b88Smrg break 345506c34b88Smrg ;; 345606c34b88Smrg *) 345706c34b88Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 345806c34b88Smrg continue # so that we can try to find one that supports BSD flags 345906c34b88Smrg ;; 346006c34b88Smrg esac 3461c27c18e8Smrg ;; 3462c27c18e8Smrg esac 3463c27c18e8Smrg fi 346406c34b88Smrg done 346506c34b88Smrg IFS="$lt_save_ifs" 346606c34b88Smrg done 346706c34b88Smrg : ${lt_cv_path_NM=no} 346806c34b88Smrgfi]) 346906c34b88Smrgif test "$lt_cv_path_NM" != "no"; then 347006c34b88Smrg NM="$lt_cv_path_NM" 347106c34b88Smrgelse 347206c34b88Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 347306c34b88Smrg if test -n "$DUMPBIN"; then : 347406c34b88Smrg # Let the user override the test. 347506c34b88Smrg else 347606c34b88Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 347706c34b88Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 347806c34b88Smrg *COFF*) 347906c34b88Smrg DUMPBIN="$DUMPBIN -symbols" 3480c27c18e8Smrg ;; 348106c34b88Smrg *) 348206c34b88Smrg DUMPBIN=: 3483c27c18e8Smrg ;; 348406c34b88Smrg esac 348506c34b88Smrg fi 348606c34b88Smrg AC_SUBST([DUMPBIN]) 348706c34b88Smrg if test "$DUMPBIN" != ":"; then 348806c34b88Smrg NM="$DUMPBIN" 348906c34b88Smrg fi 349006c34b88Smrgfi 349106c34b88Smrgtest -z "$NM" && NM=nm 349206c34b88SmrgAC_SUBST([NM]) 349306c34b88Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3494c43cc173Smrg 349506c34b88SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 349606c34b88Smrg [lt_cv_nm_interface="BSD nm" 349706c34b88Smrg echo "int some_variable = 0;" > conftest.$ac_ext 349806c34b88Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 349906c34b88Smrg (eval "$ac_compile" 2>conftest.err) 350006c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 350106c34b88Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 350206c34b88Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 350306c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 350406c34b88Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 350506c34b88Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 350606c34b88Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 350706c34b88Smrg lt_cv_nm_interface="MS dumpbin" 350806c34b88Smrg fi 350906c34b88Smrg rm -f conftest*]) 351006c34b88Smrg])# LT_PATH_NM 3511c43cc173Smrg 351206c34b88Smrg# Old names: 351306c34b88SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 351406c34b88SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 351506c34b88Smrgdnl aclocal-1.4 backwards compatibility: 351606c34b88Smrgdnl AC_DEFUN([AM_PROG_NM], []) 351706c34b88Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3518c43cc173Smrg 351906c34b88Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 352006c34b88Smrg# -------------------------------- 352106c34b88Smrg# how to determine the name of the shared library 352206c34b88Smrg# associated with a specific link library. 352306c34b88Smrg# -- PORTME fill in with the dynamic library characteristics 352406c34b88Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 352506c34b88Smrg[m4_require([_LT_DECL_EGREP]) 352606c34b88Smrgm4_require([_LT_DECL_OBJDUMP]) 352706c34b88Smrgm4_require([_LT_DECL_DLLTOOL]) 352806c34b88SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 352906c34b88Smrglt_cv_sharedlib_from_linklib_cmd, 353006c34b88Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3531c43cc173Smrg 353206c34b88Smrgcase $host_os in 353306c34b88Smrgcygwin* | mingw* | pw32* | cegcc*) 353406c34b88Smrg # two different shell functions defined in ltmain.sh 353506c34b88Smrg # decide which to use based on capabilities of $DLLTOOL 353606c34b88Smrg case `$DLLTOOL --help 2>&1` in 353706c34b88Smrg *--identify-strict*) 353806c34b88Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 353906c34b88Smrg ;; 354006c34b88Smrg *) 354106c34b88Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 354206c34b88Smrg ;; 354306c34b88Smrg esac 354406c34b88Smrg ;; 354506c34b88Smrg*) 354606c34b88Smrg # fallback: assume linklib IS sharedlib 354706c34b88Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 354806c34b88Smrg ;; 354906c34b88Smrgesac 355006c34b88Smrg]) 355106c34b88Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 355206c34b88Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3553c43cc173Smrg 355406c34b88Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 355506c34b88Smrg [Command to associate shared and link libraries]) 355606c34b88Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3557c43cc173Smrg 3558c43cc173Smrg 355906c34b88Smrg# _LT_PATH_MANIFEST_TOOL 356006c34b88Smrg# ---------------------- 356106c34b88Smrg# locate the manifest tool 356206c34b88Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 356306c34b88Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 356406c34b88Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 356506c34b88SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 356606c34b88Smrg [lt_cv_path_mainfest_tool=no 356706c34b88Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 356806c34b88Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 356906c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 357006c34b88Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 357106c34b88Smrg lt_cv_path_mainfest_tool=yes 357206c34b88Smrg fi 357306c34b88Smrg rm -f conftest*]) 357406c34b88Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 357506c34b88Smrg MANIFEST_TOOL=: 357606c34b88Smrgfi 357706c34b88Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 357806c34b88Smrg])# _LT_PATH_MANIFEST_TOOL 3579c43cc173Smrg 3580c43cc173Smrg 358106c34b88Smrg# LT_LIB_M 358206c34b88Smrg# -------- 358306c34b88Smrg# check for math library 358406c34b88SmrgAC_DEFUN([LT_LIB_M], 358506c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 358606c34b88SmrgLIBM= 358706c34b88Smrgcase $host in 358806c34b88Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 358906c34b88Smrg # These system don't have libm, or don't need it 359006c34b88Smrg ;; 359106c34b88Smrg*-ncr-sysv4.3*) 359206c34b88Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 359306c34b88Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 359406c34b88Smrg ;; 359506c34b88Smrg*) 359606c34b88Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 359706c34b88Smrg ;; 359806c34b88Smrgesac 359906c34b88SmrgAC_SUBST([LIBM]) 360006c34b88Smrg])# LT_LIB_M 360106c34b88Smrg 360206c34b88Smrg# Old name: 360306c34b88SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 360406c34b88Smrgdnl aclocal-1.4 backwards compatibility: 360506c34b88Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 360606c34b88Smrg 360706c34b88Smrg 360806c34b88Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 360906c34b88Smrg# ------------------------------- 361006c34b88Smrgm4_defun([_LT_COMPILER_NO_RTTI], 361106c34b88Smrg[m4_require([_LT_TAG_COMPILER])dnl 361206c34b88Smrg 361306c34b88Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 361406c34b88Smrg 361506c34b88Smrgif test "$GCC" = yes; then 361606c34b88Smrg case $cc_basename in 361706c34b88Smrg nvcc*) 361806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 361906c34b88Smrg *) 362006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 362106c34b88Smrg esac 362206c34b88Smrg 362306c34b88Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 362406c34b88Smrg lt_cv_prog_compiler_rtti_exceptions, 362506c34b88Smrg [-fno-rtti -fno-exceptions], [], 362606c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 362706c34b88Smrgfi 362806c34b88Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 362906c34b88Smrg [Compiler flag to turn off builtin functions]) 363006c34b88Smrg])# _LT_COMPILER_NO_RTTI 3631c43cc173Smrg 3632c43cc173Smrg 363306c34b88Smrg# _LT_CMD_GLOBAL_SYMBOLS 363406c34b88Smrg# ---------------------- 363506c34b88Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 363606c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 363706c34b88SmrgAC_REQUIRE([AC_PROG_CC])dnl 363806c34b88SmrgAC_REQUIRE([AC_PROG_AWK])dnl 363906c34b88SmrgAC_REQUIRE([LT_PATH_NM])dnl 364006c34b88SmrgAC_REQUIRE([LT_PATH_LD])dnl 364106c34b88Smrgm4_require([_LT_DECL_SED])dnl 364206c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 364306c34b88Smrgm4_require([_LT_TAG_COMPILER])dnl 3644c43cc173Smrg 364506c34b88Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 364606c34b88SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 364706c34b88SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 364806c34b88Smrg[ 364906c34b88Smrg# These are sane defaults that work on at least a few old systems. 365006c34b88Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3651c43cc173Smrg 365206c34b88Smrg# Character class describing NM global symbol codes. 365306c34b88Smrgsymcode='[[BCDEGRST]]' 3654c43cc173Smrg 365506c34b88Smrg# Regexp to match symbols that can be accessed directly from C. 365606c34b88Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 365737eb1ca1Smrg 365806c34b88Smrg# Define system-specific variables. 365906c34b88Smrgcase $host_os in 366006c34b88Smrgaix*) 366106c34b88Smrg symcode='[[BCDT]]' 366206c34b88Smrg ;; 366306c34b88Smrgcygwin* | mingw* | pw32* | cegcc*) 366406c34b88Smrg symcode='[[ABCDGISTW]]' 366506c34b88Smrg ;; 366606c34b88Smrghpux*) 366706c34b88Smrg if test "$host_cpu" = ia64; then 366806c34b88Smrg symcode='[[ABCDEGRST]]' 3669c27c18e8Smrg fi 3670c27c18e8Smrg ;; 367106c34b88Smrgirix* | nonstopux*) 367206c34b88Smrg symcode='[[BCDEGRST]]' 367306c34b88Smrg ;; 367406c34b88Smrgosf*) 367506c34b88Smrg symcode='[[BCDEGQRST]]' 367606c34b88Smrg ;; 367706c34b88Smrgsolaris*) 367806c34b88Smrg symcode='[[BDRT]]' 367906c34b88Smrg ;; 368006c34b88Smrgsco3.2v5*) 368106c34b88Smrg symcode='[[DT]]' 368206c34b88Smrg ;; 368306c34b88Smrgsysv4.2uw2*) 368406c34b88Smrg symcode='[[DT]]' 368506c34b88Smrg ;; 368606c34b88Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 368706c34b88Smrg symcode='[[ABDT]]' 368806c34b88Smrg ;; 368906c34b88Smrgsysv4) 369006c34b88Smrg symcode='[[DFNSTU]]' 369106c34b88Smrg ;; 3692c27c18e8Smrgesac 3693c43cc173Smrg 369406c34b88Smrg# If we're using GNU nm, then use its standard symbol codes. 369506c34b88Smrgcase `$NM -V 2>&1` in 369606c34b88Smrg*GNU* | *'with BFD'*) 369706c34b88Smrg symcode='[[ABCDGIRSTW]]' ;; 369806c34b88Smrgesac 3699c27c18e8Smrg 370006c34b88Smrg# Transform an extracted symbol line into a proper C declaration. 370106c34b88Smrg# Some systems (esp. on ia64) link data and code symbols differently, 370206c34b88Smrg# so use this general approach. 370306c34b88Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3704c27c18e8Smrg 370506c34b88Smrg# Transform an extracted symbol line into symbol name and symbol address 370606c34b88Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 370706c34b88Smrglt_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'" 3708c43cc173Smrg 370906c34b88Smrg# Handle CRLF in mingw tool chain 371006c34b88Smrgopt_cr= 371106c34b88Smrgcase $build_os in 371206c34b88Smrgmingw*) 371306c34b88Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 371406c34b88Smrg ;; 371506c34b88Smrgesac 371606c34b88Smrg 371706c34b88Smrg# Try without a prefix underscore, then with it. 371806c34b88Smrgfor ac_symprfx in "" "_"; do 371906c34b88Smrg 372006c34b88Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 372106c34b88Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 372206c34b88Smrg 372306c34b88Smrg # Write the raw and C identifiers. 372406c34b88Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 372506c34b88Smrg # Fake it for dumpbin and say T for any non-static function 372606c34b88Smrg # and D for any global variable. 372706c34b88Smrg # Also find C++ and __fastcall symbols from MSVC++, 372806c34b88Smrg # which start with @ or ?. 372906c34b88Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 373006c34b88Smrg" {last_section=section; section=\$ 3};"\ 373106c34b88Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 373206c34b88Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 373306c34b88Smrg" \$ 0!~/External *\|/{next};"\ 373406c34b88Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 373506c34b88Smrg" {if(hide[section]) next};"\ 373606c34b88Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 373706c34b88Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 373806c34b88Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 373906c34b88Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 374006c34b88Smrg" ' prfx=^$ac_symprfx]" 374106c34b88Smrg else 374206c34b88Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 374306c34b88Smrg fi 374406c34b88Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3745c43cc173Smrg 374606c34b88Smrg # Check to see that the pipe works correctly. 374706c34b88Smrg pipe_works=no 3748c43cc173Smrg 374906c34b88Smrg rm -f conftest* 375006c34b88Smrg cat > conftest.$ac_ext <<_LT_EOF 375106c34b88Smrg#ifdef __cplusplus 375206c34b88Smrgextern "C" { 375306c34b88Smrg#endif 375406c34b88Smrgchar nm_test_var; 375506c34b88Smrgvoid nm_test_func(void); 375606c34b88Smrgvoid nm_test_func(void){} 375706c34b88Smrg#ifdef __cplusplus 375806c34b88Smrg} 375906c34b88Smrg#endif 376006c34b88Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 376106c34b88Smrg_LT_EOF 3762c43cc173Smrg 376306c34b88Smrg if AC_TRY_EVAL(ac_compile); then 376406c34b88Smrg # Now try to grab the symbols. 376506c34b88Smrg nlist=conftest.nm 376606c34b88Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 376706c34b88Smrg # Try sorting and uniquifying the output. 376806c34b88Smrg if sort "$nlist" | uniq > "$nlist"T; then 376906c34b88Smrg mv -f "$nlist"T "$nlist" 377006c34b88Smrg else 377106c34b88Smrg rm -f "$nlist"T 377206c34b88Smrg fi 3773c43cc173Smrg 377406c34b88Smrg # Make sure that we snagged all the symbols we need. 377506c34b88Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 377606c34b88Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 377706c34b88Smrg cat <<_LT_EOF > conftest.$ac_ext 377806c34b88Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 377906c34b88Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 378006c34b88Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 378106c34b88Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 378206c34b88Smrg# define LT@&t@_DLSYM_CONST 378306c34b88Smrg#elif defined(__osf__) 378406c34b88Smrg/* This system does not cope well with relocations in const data. */ 378506c34b88Smrg# define LT@&t@_DLSYM_CONST 378606c34b88Smrg#else 378706c34b88Smrg# define LT@&t@_DLSYM_CONST const 378806c34b88Smrg#endif 3789c43cc173Smrg 379006c34b88Smrg#ifdef __cplusplus 379106c34b88Smrgextern "C" { 379206c34b88Smrg#endif 3793c43cc173Smrg 379406c34b88Smrg_LT_EOF 379506c34b88Smrg # Now generate the symbol file. 379606c34b88Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3797c27c18e8Smrg 379806c34b88Smrg cat <<_LT_EOF >> conftest.$ac_ext 3799c27c18e8Smrg 380006c34b88Smrg/* The mapping between symbol names and symbols. */ 380106c34b88SmrgLT@&t@_DLSYM_CONST struct { 380206c34b88Smrg const char *name; 380306c34b88Smrg void *address; 380406c34b88Smrg} 380506c34b88Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 380606c34b88Smrg{ 380706c34b88Smrg { "@PROGRAM@", (void *) 0 }, 380806c34b88Smrg_LT_EOF 380906c34b88Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 381006c34b88Smrg cat <<\_LT_EOF >> conftest.$ac_ext 381106c34b88Smrg {0, (void *) 0} 381206c34b88Smrg}; 3813c27c18e8Smrg 381406c34b88Smrg/* This works around a problem in FreeBSD linker */ 381506c34b88Smrg#ifdef FREEBSD_WORKAROUND 381606c34b88Smrgstatic const void *lt_preloaded_setup() { 381706c34b88Smrg return lt__PROGRAM__LTX_preloaded_symbols; 381806c34b88Smrg} 381906c34b88Smrg#endif 3820c43cc173Smrg 382106c34b88Smrg#ifdef __cplusplus 382206c34b88Smrg} 382306c34b88Smrg#endif 382406c34b88Smrg_LT_EOF 382506c34b88Smrg # Now try linking the two files. 382606c34b88Smrg mv conftest.$ac_objext conftstm.$ac_objext 382706c34b88Smrg lt_globsym_save_LIBS=$LIBS 382806c34b88Smrg lt_globsym_save_CFLAGS=$CFLAGS 382906c34b88Smrg LIBS="conftstm.$ac_objext" 383006c34b88Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 383106c34b88Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 383206c34b88Smrg pipe_works=yes 383306c34b88Smrg fi 383406c34b88Smrg LIBS=$lt_globsym_save_LIBS 383506c34b88Smrg CFLAGS=$lt_globsym_save_CFLAGS 383606c34b88Smrg else 383706c34b88Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 383806c34b88Smrg fi 383906c34b88Smrg else 384006c34b88Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 384106c34b88Smrg fi 384206c34b88Smrg else 384306c34b88Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3844c27c18e8Smrg fi 384506c34b88Smrg else 384606c34b88Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 384706c34b88Smrg cat conftest.$ac_ext >&5 384806c34b88Smrg fi 384906c34b88Smrg rm -rf conftest* conftst* 3850c43cc173Smrg 385106c34b88Smrg # Do not use the global_symbol_pipe unless it works. 385206c34b88Smrg if test "$pipe_works" = yes; then 385306c34b88Smrg break 385406c34b88Smrg else 385506c34b88Smrg lt_cv_sys_global_symbol_pipe= 385606c34b88Smrg fi 385706c34b88Smrgdone 385806c34b88Smrg]) 385906c34b88Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 386006c34b88Smrg lt_cv_sys_global_symbol_to_cdecl= 3861c27c18e8Smrgfi 386206c34b88Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 386306c34b88Smrg AC_MSG_RESULT(failed) 386437eb1ca1Smrgelse 386506c34b88Smrg AC_MSG_RESULT(ok) 386637eb1ca1Smrgfi 3867c27c18e8Smrg 386806c34b88Smrg# Response file support. 386906c34b88Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 387006c34b88Smrg nm_file_list_spec='@' 387106c34b88Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 387206c34b88Smrg nm_file_list_spec='@' 387306c34b88Smrgfi 3874c43cc173Smrg 387506c34b88Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 387606c34b88Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 387706c34b88Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 387806c34b88Smrg [Transform the output of nm in a proper C declaration]) 387906c34b88Smrg_LT_DECL([global_symbol_to_c_name_address], 388006c34b88Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 388106c34b88Smrg [Transform the output of nm in a C name address pair]) 388206c34b88Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 388306c34b88Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 388406c34b88Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 388506c34b88Smrg_LT_DECL([], [nm_file_list_spec], [1], 388606c34b88Smrg [Specify filename containing input files for $NM]) 388706c34b88Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3888c43cc173Smrg 3889c27c18e8Smrg 389006c34b88Smrg# _LT_COMPILER_PIC([TAGNAME]) 389106c34b88Smrg# --------------------------- 389206c34b88Smrgm4_defun([_LT_COMPILER_PIC], 389306c34b88Smrg[m4_require([_LT_TAG_COMPILER])dnl 389406c34b88Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 389506c34b88Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 389606c34b88Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3897c27c18e8Smrg 389806c34b88Smrgm4_if([$1], [CXX], [ 389906c34b88Smrg # C++ specific cases for pic, static, wl, etc. 390006c34b88Smrg if test "$GXX" = yes; then 390106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 390206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3903c27c18e8Smrg 390406c34b88Smrg case $host_os in 390506c34b88Smrg aix*) 390606c34b88Smrg # All AIX code is PIC. 390706c34b88Smrg if test "$host_cpu" = ia64; then 390806c34b88Smrg # AIX 5 now supports IA64 processor 390906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 391006c34b88Smrg fi 391106c34b88Smrg ;; 3912c27c18e8Smrg 391306c34b88Smrg amigaos*) 391406c34b88Smrg case $host_cpu in 391506c34b88Smrg powerpc) 391606c34b88Smrg # see comment about AmigaOS4 .so support 391706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 391806c34b88Smrg ;; 391906c34b88Smrg m68k) 392006c34b88Smrg # FIXME: we need at least 68020 code to build shared libraries, but 392106c34b88Smrg # adding the `-m68020' flag to GCC prevents building anything better, 392206c34b88Smrg # like `-m68040'. 392306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 392406c34b88Smrg ;; 392506c34b88Smrg esac 392606c34b88Smrg ;; 3927c27c18e8Smrg 392806c34b88Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 392906c34b88Smrg # PIC is the default for these OSes. 393006c34b88Smrg ;; 393106c34b88Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 393206c34b88Smrg # This hack is so that the source file can tell whether it is being 393306c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 393406c34b88Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 393506c34b88Smrg # (--disable-auto-import) libraries 393606c34b88Smrg m4_if([$1], [GCJ], [], 393706c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 393806c34b88Smrg ;; 393906c34b88Smrg darwin* | rhapsody*) 394006c34b88Smrg # PIC is the default on this platform 394106c34b88Smrg # Common symbols not allowed in MH_DYLIB files 394206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 394306c34b88Smrg ;; 394406c34b88Smrg *djgpp*) 394506c34b88Smrg # DJGPP does not support shared libraries at all 394606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 394706c34b88Smrg ;; 394806c34b88Smrg haiku*) 394906c34b88Smrg # PIC is the default for Haiku. 395006c34b88Smrg # The "-static" flag exists, but is broken. 395106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 395206c34b88Smrg ;; 395306c34b88Smrg interix[[3-9]]*) 395406c34b88Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 395506c34b88Smrg # Instead, we relocate shared libraries at runtime. 395606c34b88Smrg ;; 395706c34b88Smrg sysv4*MP*) 395806c34b88Smrg if test -d /usr/nec; then 395906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 396006c34b88Smrg fi 396106c34b88Smrg ;; 396206c34b88Smrg hpux*) 396306c34b88Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 396406c34b88Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 396506c34b88Smrg # sets the default TLS model and affects inlining. 396606c34b88Smrg case $host_cpu in 396706c34b88Smrg hppa*64*) 396806c34b88Smrg ;; 396906c34b88Smrg *) 397006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 397106c34b88Smrg ;; 397206c34b88Smrg esac 397306c34b88Smrg ;; 397406c34b88Smrg *qnx* | *nto*) 397506c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 397606c34b88Smrg # it will coredump. 397706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 397806c34b88Smrg ;; 397906c34b88Smrg *) 398006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 398106c34b88Smrg ;; 398206c34b88Smrg esac 3983c27c18e8Smrg else 398406c34b88Smrg case $host_os in 398506c34b88Smrg aix[[4-9]]*) 398606c34b88Smrg # All AIX code is PIC. 398706c34b88Smrg if test "$host_cpu" = ia64; then 398806c34b88Smrg # AIX 5 now supports IA64 processor 398906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 399006c34b88Smrg else 399106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 399206c34b88Smrg fi 399306c34b88Smrg ;; 399406c34b88Smrg chorus*) 399506c34b88Smrg case $cc_basename in 399606c34b88Smrg cxch68*) 399706c34b88Smrg # Green Hills C++ Compiler 399806c34b88Smrg # _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" 399906c34b88Smrg ;; 400006c34b88Smrg esac 400106c34b88Smrg ;; 400206c34b88Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 400306c34b88Smrg # This hack is so that the source file can tell whether it is being 400406c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 400506c34b88Smrg m4_if([$1], [GCJ], [], 400606c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 400706c34b88Smrg ;; 400806c34b88Smrg dgux*) 400906c34b88Smrg case $cc_basename in 401006c34b88Smrg ec++*) 401106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 401206c34b88Smrg ;; 401306c34b88Smrg ghcx*) 401406c34b88Smrg # Green Hills C++ Compiler 401506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 401606c34b88Smrg ;; 401706c34b88Smrg *) 401806c34b88Smrg ;; 401906c34b88Smrg esac 402006c34b88Smrg ;; 402106c34b88Smrg freebsd* | dragonfly*) 402206c34b88Smrg # FreeBSD uses GNU C++ 402306c34b88Smrg ;; 402406c34b88Smrg hpux9* | hpux10* | hpux11*) 402506c34b88Smrg case $cc_basename in 402606c34b88Smrg CC*) 402706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 402806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 402906c34b88Smrg if test "$host_cpu" != ia64; then 403006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 403106c34b88Smrg fi 403206c34b88Smrg ;; 403306c34b88Smrg aCC*) 403406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 403506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 403606c34b88Smrg case $host_cpu in 403706c34b88Smrg hppa*64*|ia64*) 403806c34b88Smrg # +Z the default 403906c34b88Smrg ;; 404006c34b88Smrg *) 404106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 404206c34b88Smrg ;; 404306c34b88Smrg esac 404406c34b88Smrg ;; 404506c34b88Smrg *) 404606c34b88Smrg ;; 404706c34b88Smrg esac 404806c34b88Smrg ;; 404906c34b88Smrg interix*) 405006c34b88Smrg # This is c89, which is MS Visual C++ (no shared libs) 405106c34b88Smrg # Anyone wants to do a port? 405206c34b88Smrg ;; 405306c34b88Smrg irix5* | irix6* | nonstopux*) 405406c34b88Smrg case $cc_basename in 405506c34b88Smrg CC*) 405606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 405706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 405806c34b88Smrg # CC pic flag -KPIC is the default. 405906c34b88Smrg ;; 406006c34b88Smrg *) 406106c34b88Smrg ;; 406206c34b88Smrg esac 406306c34b88Smrg ;; 406406c34b88Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 406506c34b88Smrg case $cc_basename in 406606c34b88Smrg KCC*) 406706c34b88Smrg # KAI C++ Compiler 406806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 406906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 407006c34b88Smrg ;; 407106c34b88Smrg ecpc* ) 407206c34b88Smrg # old Intel C++ for x86_64 which still supported -KPIC. 407306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 407406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 407506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 407606c34b88Smrg ;; 407706c34b88Smrg icpc* ) 407806c34b88Smrg # Intel C++, used to be incompatible with GCC. 407906c34b88Smrg # ICC 10 doesn't accept -KPIC any more. 408006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 408106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 408206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 408306c34b88Smrg ;; 408406c34b88Smrg pgCC* | pgcpp*) 408506c34b88Smrg # Portland Group C++ compiler 408606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 408706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 408806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 408906c34b88Smrg ;; 409006c34b88Smrg cxx*) 409106c34b88Smrg # Compaq C++ 409206c34b88Smrg # Make sure the PIC flag is empty. It appears that all Alpha 409306c34b88Smrg # Linux and Compaq Tru64 Unix objects are PIC. 409406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 409506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 409606c34b88Smrg ;; 409706c34b88Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 409806c34b88Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 409906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 410006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 410106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 410206c34b88Smrg ;; 410306c34b88Smrg *) 410406c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 410506c34b88Smrg *Sun\ C*) 410606c34b88Smrg # Sun C++ 5.9 410706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 410806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 410906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 411006c34b88Smrg ;; 411106c34b88Smrg esac 411206c34b88Smrg ;; 411306c34b88Smrg esac 411406c34b88Smrg ;; 411506c34b88Smrg lynxos*) 411606c34b88Smrg ;; 411706c34b88Smrg m88k*) 411806c34b88Smrg ;; 411906c34b88Smrg mvs*) 412006c34b88Smrg case $cc_basename in 412106c34b88Smrg cxx*) 412206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 412306c34b88Smrg ;; 412406c34b88Smrg *) 412506c34b88Smrg ;; 412606c34b88Smrg esac 412706c34b88Smrg ;; 412806c34b88Smrg netbsd*) 412906c34b88Smrg ;; 413006c34b88Smrg *qnx* | *nto*) 413106c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 413206c34b88Smrg # it will coredump. 413306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 413406c34b88Smrg ;; 413506c34b88Smrg osf3* | osf4* | osf5*) 413606c34b88Smrg case $cc_basename in 413706c34b88Smrg KCC*) 413806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 413906c34b88Smrg ;; 414006c34b88Smrg RCC*) 414106c34b88Smrg # Rational C++ 2.4.1 414206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 414306c34b88Smrg ;; 414406c34b88Smrg cxx*) 414506c34b88Smrg # Digital/Compaq C++ 414606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 414706c34b88Smrg # Make sure the PIC flag is empty. It appears that all Alpha 414806c34b88Smrg # Linux and Compaq Tru64 Unix objects are PIC. 414906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 415006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 415106c34b88Smrg ;; 415206c34b88Smrg *) 415306c34b88Smrg ;; 415406c34b88Smrg esac 415506c34b88Smrg ;; 415606c34b88Smrg psos*) 415706c34b88Smrg ;; 415806c34b88Smrg solaris*) 415906c34b88Smrg case $cc_basename in 416006c34b88Smrg CC* | sunCC*) 416106c34b88Smrg # Sun C++ 4.2, 5.x and Centerline C++ 416206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 416306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 416406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 416506c34b88Smrg ;; 416606c34b88Smrg gcx*) 416706c34b88Smrg # Green Hills C++ Compiler 416806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 416906c34b88Smrg ;; 417006c34b88Smrg *) 417106c34b88Smrg ;; 417206c34b88Smrg esac 417306c34b88Smrg ;; 417406c34b88Smrg sunos4*) 417506c34b88Smrg case $cc_basename in 417606c34b88Smrg CC*) 417706c34b88Smrg # Sun C++ 4.x 417806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 417906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 418006c34b88Smrg ;; 418106c34b88Smrg lcc*) 418206c34b88Smrg # Lucid 418306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 418406c34b88Smrg ;; 418506c34b88Smrg *) 418606c34b88Smrg ;; 418706c34b88Smrg esac 418806c34b88Smrg ;; 418906c34b88Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 419006c34b88Smrg case $cc_basename in 419106c34b88Smrg CC*) 419206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 419306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 419406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 419506c34b88Smrg ;; 419606c34b88Smrg esac 419706c34b88Smrg ;; 419806c34b88Smrg tandem*) 419906c34b88Smrg case $cc_basename in 420006c34b88Smrg NCC*) 420106c34b88Smrg # NonStop-UX NCC 3.20 420206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 420306c34b88Smrg ;; 420406c34b88Smrg *) 420506c34b88Smrg ;; 420606c34b88Smrg esac 420706c34b88Smrg ;; 420806c34b88Smrg vxworks*) 420906c34b88Smrg ;; 421006c34b88Smrg *) 421106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 421206c34b88Smrg ;; 421306c34b88Smrg esac 4214c27c18e8Smrg fi 421506c34b88Smrg], 421606c34b88Smrg[ 421706c34b88Smrg if test "$GCC" = yes; then 421806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 421906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4220c43cc173Smrg 422106c34b88Smrg case $host_os in 422206c34b88Smrg aix*) 422306c34b88Smrg # All AIX code is PIC. 422406c34b88Smrg if test "$host_cpu" = ia64; then 422506c34b88Smrg # AIX 5 now supports IA64 processor 422606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 422706c34b88Smrg fi 422806c34b88Smrg ;; 4229c43cc173Smrg 423006c34b88Smrg amigaos*) 423106c34b88Smrg case $host_cpu in 423206c34b88Smrg powerpc) 423306c34b88Smrg # see comment about AmigaOS4 .so support 423406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 423506c34b88Smrg ;; 423606c34b88Smrg m68k) 423706c34b88Smrg # FIXME: we need at least 68020 code to build shared libraries, but 423806c34b88Smrg # adding the `-m68020' flag to GCC prevents building anything better, 423906c34b88Smrg # like `-m68040'. 424006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 424106c34b88Smrg ;; 424206c34b88Smrg esac 424306c34b88Smrg ;; 4244c43cc173Smrg 424506c34b88Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 424606c34b88Smrg # PIC is the default for these OSes. 424706c34b88Smrg ;; 4248c27c18e8Smrg 424906c34b88Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 425006c34b88Smrg # This hack is so that the source file can tell whether it is being 425106c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 425206c34b88Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 425306c34b88Smrg # (--disable-auto-import) libraries 425406c34b88Smrg m4_if([$1], [GCJ], [], 425506c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 425606c34b88Smrg ;; 4257c43cc173Smrg 425806c34b88Smrg darwin* | rhapsody*) 425906c34b88Smrg # PIC is the default on this platform 426006c34b88Smrg # Common symbols not allowed in MH_DYLIB files 426106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 426206c34b88Smrg ;; 4263c43cc173Smrg 426406c34b88Smrg haiku*) 426506c34b88Smrg # PIC is the default for Haiku. 426606c34b88Smrg # The "-static" flag exists, but is broken. 426706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 426806c34b88Smrg ;; 4269c43cc173Smrg 427006c34b88Smrg hpux*) 427106c34b88Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 427206c34b88Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 427306c34b88Smrg # sets the default TLS model and affects inlining. 427406c34b88Smrg case $host_cpu in 427506c34b88Smrg hppa*64*) 427606c34b88Smrg # +Z the default 427706c34b88Smrg ;; 427806c34b88Smrg *) 427906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 428006c34b88Smrg ;; 428106c34b88Smrg esac 428206c34b88Smrg ;; 4283c27c18e8Smrg 428406c34b88Smrg interix[[3-9]]*) 428506c34b88Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 428606c34b88Smrg # Instead, we relocate shared libraries at runtime. 428706c34b88Smrg ;; 4288c43cc173Smrg 428906c34b88Smrg msdosdjgpp*) 429006c34b88Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 429106c34b88Smrg # on systems that don't support them. 429206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 429306c34b88Smrg enable_shared=no 429406c34b88Smrg ;; 4295c43cc173Smrg 429606c34b88Smrg *nto* | *qnx*) 429706c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 429806c34b88Smrg # it will coredump. 429906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 430006c34b88Smrg ;; 4301c27c18e8Smrg 430206c34b88Smrg sysv4*MP*) 430306c34b88Smrg if test -d /usr/nec; then 430406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 430506c34b88Smrg fi 430606c34b88Smrg ;; 4307c27c18e8Smrg 430806c34b88Smrg *) 430906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 431006c34b88Smrg ;; 431106c34b88Smrg esac 4312c43cc173Smrg 431306c34b88Smrg case $cc_basename in 431406c34b88Smrg nvcc*) # Cuda Compiler Driver 2.2 431506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 431606c34b88Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 431706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 431806c34b88Smrg fi 431906c34b88Smrg ;; 432006c34b88Smrg esac 432106c34b88Smrg else 432206c34b88Smrg # PORTME Check for flag to pass linker flags through the system compiler. 432306c34b88Smrg case $host_os in 432406c34b88Smrg aix*) 432506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 432606c34b88Smrg if test "$host_cpu" = ia64; then 432706c34b88Smrg # AIX 5 now supports IA64 processor 432806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 432906c34b88Smrg else 433006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 433106c34b88Smrg fi 433206c34b88Smrg ;; 4333c27c18e8Smrg 433406c34b88Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 433506c34b88Smrg # This hack is so that the source file can tell whether it is being 433606c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 433706c34b88Smrg m4_if([$1], [GCJ], [], 433806c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 433906c34b88Smrg ;; 4340c43cc173Smrg 434106c34b88Smrg hpux9* | hpux10* | hpux11*) 434206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 434306c34b88Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 434406c34b88Smrg # not for PA HP-UX. 434506c34b88Smrg case $host_cpu in 434606c34b88Smrg hppa*64*|ia64*) 434706c34b88Smrg # +Z the default 434806c34b88Smrg ;; 434906c34b88Smrg *) 435006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4351c27c18e8Smrg ;; 435206c34b88Smrg esac 435306c34b88Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 435406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 435506c34b88Smrg ;; 4356c43cc173Smrg 435706c34b88Smrg irix5* | irix6* | nonstopux*) 435806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 435906c34b88Smrg # PIC (with -KPIC) is the default. 436006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 436106c34b88Smrg ;; 4362c43cc173Smrg 436306c34b88Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 436406c34b88Smrg case $cc_basename in 436506c34b88Smrg # old Intel for x86_64 which still supported -KPIC. 436606c34b88Smrg ecc*) 436706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 436806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 436906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 437006c34b88Smrg ;; 437106c34b88Smrg # icc used to be incompatible with GCC. 437206c34b88Smrg # ICC 10 doesn't accept -KPIC any more. 437306c34b88Smrg icc* | ifort*) 437406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 437506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 437606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 437706c34b88Smrg ;; 437806c34b88Smrg # Lahey Fortran 8.1. 437906c34b88Smrg lf95*) 438006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 438106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 438206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 438306c34b88Smrg ;; 438406c34b88Smrg nagfor*) 438506c34b88Smrg # NAG Fortran compiler 438606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 438706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 438806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 438906c34b88Smrg ;; 439006c34b88Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 439106c34b88Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 439206c34b88Smrg # which looks to be a dead project) 439306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 439406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 439506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 439606c34b88Smrg ;; 439706c34b88Smrg ccc*) 439806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 439906c34b88Smrg # All Alpha code is PIC. 440006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 440106c34b88Smrg ;; 440206c34b88Smrg xl* | bgxl* | bgf* | mpixl*) 440306c34b88Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 440406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 440506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 440606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 440706c34b88Smrg ;; 440806c34b88Smrg *) 440906c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 441006c34b88Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 441106c34b88Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 441206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 441306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 441406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 441506c34b88Smrg ;; 441606c34b88Smrg *Sun\ F* | *Sun*Fortran*) 441706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 441806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 441906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 442006c34b88Smrg ;; 442106c34b88Smrg *Sun\ C*) 442206c34b88Smrg # Sun C 5.9 442306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 442406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 442506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442606c34b88Smrg ;; 442706c34b88Smrg *Intel*\ [[CF]]*Compiler*) 442806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 443006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4431b789ec8aSmrg ;; 443206c34b88Smrg *Portland\ Group*) 443306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 443406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 443506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4436b789ec8aSmrg ;; 4437b789ec8aSmrg esac 4438b789ec8aSmrg ;; 443906c34b88Smrg esac 444006c34b88Smrg ;; 4441c43cc173Smrg 444206c34b88Smrg newsos6) 444306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 444406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 444506c34b88Smrg ;; 4446c27c18e8Smrg 444706c34b88Smrg *nto* | *qnx*) 444806c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 444906c34b88Smrg # it will coredump. 445006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 445106c34b88Smrg ;; 4452c43cc173Smrg 445306c34b88Smrg osf3* | osf4* | osf5*) 445406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 445506c34b88Smrg # All OSF/1 code is PIC. 445606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 445706c34b88Smrg ;; 4458c43cc173Smrg 445906c34b88Smrg rdos*) 446006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 446106c34b88Smrg ;; 4462c43cc173Smrg 446306c34b88Smrg solaris*) 446406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 446506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 446606c34b88Smrg case $cc_basename in 446706c34b88Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 446806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 446906c34b88Smrg *) 447006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 447106c34b88Smrg esac 447206c34b88Smrg ;; 4473c43cc173Smrg 447406c34b88Smrg sunos4*) 447506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 447606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 447706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 447806c34b88Smrg ;; 447937eb1ca1Smrg 448006c34b88Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 448106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 448206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 448306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 448406c34b88Smrg ;; 4485c27c18e8Smrg 448606c34b88Smrg sysv4*MP*) 448706c34b88Smrg if test -d /usr/nec ;then 448806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 448906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 449006c34b88Smrg fi 449106c34b88Smrg ;; 4492c43cc173Smrg 449306c34b88Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 449406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 449506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 449606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 449706c34b88Smrg ;; 4498c27c18e8Smrg 449906c34b88Smrg unicos*) 450006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 450106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 450206c34b88Smrg ;; 4503c27c18e8Smrg 450406c34b88Smrg uts4*) 450506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 450606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 450706c34b88Smrg ;; 4508c43cc173Smrg 450906c34b88Smrg *) 451006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 451106c34b88Smrg ;; 451206c34b88Smrg esac 451306c34b88Smrg fi 451406c34b88Smrg]) 451506c34b88Smrgcase $host_os in 451606c34b88Smrg # For platforms which do not support PIC, -DPIC is meaningless: 451706c34b88Smrg *djgpp*) 451806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 451906c34b88Smrg ;; 452006c34b88Smrg *) 452106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 452206c34b88Smrg ;; 452306c34b88Smrgesac 4524c27c18e8Smrg 452506c34b88SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 452606c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 452706c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 452806c34b88Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4529c43cc173Smrg 453006c34b88Smrg# 453106c34b88Smrg# Check to make sure the PIC flag actually works. 453206c34b88Smrg# 453306c34b88Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 453406c34b88Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 453506c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 453606c34b88Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 453706c34b88Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 453806c34b88Smrg "" | " "*) ;; 453906c34b88Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 454006c34b88Smrg esac], 454106c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 454206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 454306c34b88Smrgfi 454406c34b88Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 454506c34b88Smrg [Additional compiler flags for building library objects]) 4546c27c18e8Smrg 454706c34b88Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 454806c34b88Smrg [How to pass a linker flag through the compiler]) 454906c34b88Smrg# 455006c34b88Smrg# Check to make sure the static flag actually works. 455106c34b88Smrg# 455206c34b88Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 455306c34b88Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 455406c34b88Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 455506c34b88Smrg $lt_tmp_static_flag, 455606c34b88Smrg [], 455706c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 455806c34b88Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 455906c34b88Smrg [Compiler flag to prevent dynamic linking]) 456006c34b88Smrg])# _LT_COMPILER_PIC 4561c27c18e8Smrg 4562c27c18e8Smrg 456306c34b88Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 456406c34b88Smrg# ---------------------------- 456506c34b88Smrg# See if the linker supports building shared libraries. 456606c34b88Smrgm4_defun([_LT_LINKER_SHLIBS], 456706c34b88Smrg[AC_REQUIRE([LT_PATH_LD])dnl 456806c34b88SmrgAC_REQUIRE([LT_PATH_NM])dnl 456906c34b88Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 457006c34b88Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 457106c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 457206c34b88Smrgm4_require([_LT_DECL_SED])dnl 457306c34b88Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 457406c34b88Smrgm4_require([_LT_TAG_COMPILER])dnl 457506c34b88SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 457606c34b88Smrgm4_if([$1], [CXX], [ 457706c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 457806c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 457906c34b88Smrg case $host_os in 458006c34b88Smrg aix[[4-9]]*) 458106c34b88Smrg # If we're using GNU nm, then we don't want the "-C" option. 458206c34b88Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 458306c34b88Smrg # Also, AIX nm treats weak defined symbols like other global defined 458406c34b88Smrg # symbols, whereas GNU nm marks them as "W". 458506c34b88Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 458606c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 458706c34b88Smrg else 458806c34b88Smrg _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' 458906c34b88Smrg fi 459006c34b88Smrg ;; 459106c34b88Smrg pw32*) 459206c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 459306c34b88Smrg ;; 459406c34b88Smrg cygwin* | mingw* | cegcc*) 459506c34b88Smrg case $cc_basename in 459606c34b88Smrg cl*) 459706c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 459806c34b88Smrg ;; 459906c34b88Smrg *) 460006c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 460106c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 460206c34b88Smrg ;; 460306c34b88Smrg esac 460406c34b88Smrg ;; 460506c34b88Smrg *) 460606c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 460706c34b88Smrg ;; 460806c34b88Smrg esac 460906c34b88Smrg], [ 461006c34b88Smrg runpath_var= 461106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 461206c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 461306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)= 461406c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 461506c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 461606c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 461706c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 461806c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 461906c34b88Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 462006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 462106c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 462206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 462306c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 462406c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 462506c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 462606c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=no 462706c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 462806c34b88Smrg _LT_TAGVAR(module_cmds, $1)= 462906c34b88Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 463006c34b88Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 463106c34b88Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 463206c34b88Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 463306c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 463406c34b88Smrg # include_expsyms should be a list of space-separated symbols to be *always* 463506c34b88Smrg # included in the symbol list 463606c34b88Smrg _LT_TAGVAR(include_expsyms, $1)= 463706c34b88Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 463806c34b88Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 463906c34b88Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 464006c34b88Smrg # as well as any symbol that contains `d'. 464106c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 464206c34b88Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 464306c34b88Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 464406c34b88Smrg # the symbol is explicitly referenced. Since portable code cannot 464506c34b88Smrg # rely on this symbol name, it's probably fine to never include it in 464606c34b88Smrg # preloaded symbol tables. 464706c34b88Smrg # Exclude shared library initialization/finalization symbols. 464806c34b88Smrgdnl Note also adjust exclude_expsyms for C++ above. 464906c34b88Smrg extract_expsyms_cmds= 4650c43cc173Smrg 465106c34b88Smrg case $host_os in 465206c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 465306c34b88Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 465406c34b88Smrg # When not using gcc, we currently assume that we are using 465506c34b88Smrg # Microsoft Visual C++. 465606c34b88Smrg if test "$GCC" != yes; then 465706c34b88Smrg with_gnu_ld=no 465806c34b88Smrg fi 465906c34b88Smrg ;; 466006c34b88Smrg interix*) 466106c34b88Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 466206c34b88Smrg with_gnu_ld=yes 466306c34b88Smrg ;; 466406c34b88Smrg openbsd*) 466506c34b88Smrg with_gnu_ld=no 466606c34b88Smrg ;; 466706c34b88Smrg esac 4668c43cc173Smrg 466906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 467021e67964Smrg 467106c34b88Smrg # On some targets, GNU ld is compatible enough with the native linker 467206c34b88Smrg # that we're better off using the native interface for both. 467306c34b88Smrg lt_use_gnu_ld_interface=no 467406c34b88Smrg if test "$with_gnu_ld" = yes; then 467506c34b88Smrg case $host_os in 467606c34b88Smrg aix*) 467706c34b88Smrg # The AIX port of GNU ld has always aspired to compatibility 467806c34b88Smrg # with the native linker. However, as the warning in the GNU ld 467906c34b88Smrg # block says, versions before 2.19.5* couldn't really create working 468006c34b88Smrg # shared libraries, regardless of the interface used. 468106c34b88Smrg case `$LD -v 2>&1` in 468206c34b88Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 468306c34b88Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 468406c34b88Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4685c27c18e8Smrg *) 468606c34b88Smrg lt_use_gnu_ld_interface=yes 4687c27c18e8Smrg ;; 4688c27c18e8Smrg esac 4689c27c18e8Smrg ;; 469006c34b88Smrg *) 469106c34b88Smrg lt_use_gnu_ld_interface=yes 469206c34b88Smrg ;; 469306c34b88Smrg esac 469406c34b88Smrg fi 4695c43cc173Smrg 469606c34b88Smrg if test "$lt_use_gnu_ld_interface" = yes; then 469706c34b88Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 469806c34b88Smrg wlarc='${wl}' 469906c34b88Smrg 470006c34b88Smrg # Set some defaults for GNU ld with shared library support. These 470106c34b88Smrg # are reset later if shared libraries are not supported. Putting them 470206c34b88Smrg # here allows them to be overridden if necessary. 470306c34b88Smrg runpath_var=LD_RUN_PATH 470406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 470506c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 470606c34b88Smrg # ancient GNU ld didn't support --whole-archive et. al. 470706c34b88Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 470806c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 470906c34b88Smrg else 471006c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 471106c34b88Smrg fi 471206c34b88Smrg supports_anon_versioning=no 471306c34b88Smrg case `$LD -v 2>&1` in 471406c34b88Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 471506c34b88Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 471606c34b88Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 471706c34b88Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 471806c34b88Smrg *\ 2.11.*) ;; # other 2.11 versions 471906c34b88Smrg *) supports_anon_versioning=yes ;; 472006c34b88Smrg esac 472106c34b88Smrg 472206c34b88Smrg # See if GNU ld supports shared libraries. 472306c34b88Smrg case $host_os in 472406c34b88Smrg aix[[3-9]]*) 472506c34b88Smrg # On AIX/PPC, the GNU linker is very broken 472606c34b88Smrg if test "$host_cpu" != ia64; then 4727c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 472806c34b88Smrg cat <<_LT_EOF 1>&2 4729c43cc173Smrg 473006c34b88Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 473106c34b88Smrg*** to be unable to reliably create shared libraries on AIX. 473206c34b88Smrg*** Therefore, libtool is disabling shared libraries support. If you 473306c34b88Smrg*** really care for shared libraries, you may want to install binutils 473406c34b88Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 473506c34b88Smrg*** You will then need to restart the configuration process. 4736c43cc173Smrg 473706c34b88Smrg_LT_EOF 473806c34b88Smrg fi 473906c34b88Smrg ;; 4740c43cc173Smrg 474106c34b88Smrg amigaos*) 474206c34b88Smrg case $host_cpu in 474306c34b88Smrg powerpc) 474406c34b88Smrg # see comment about AmigaOS4 .so support 474506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 474606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 474706c34b88Smrg ;; 474806c34b88Smrg m68k) 474906c34b88Smrg _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)' 475006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 475106c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 475206c34b88Smrg ;; 475306c34b88Smrg esac 475406c34b88Smrg ;; 4755c43cc173Smrg 475606c34b88Smrg beos*) 475706c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 475806c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 475906c34b88Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 476006c34b88Smrg # support --undefined. This deserves some investigation. FIXME 476106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 476206c34b88Smrg else 476306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 476406c34b88Smrg fi 476506c34b88Smrg ;; 476606c34b88Smrg 476706c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 476806c34b88Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 476906c34b88Smrg # as there is no search path for DLLs. 477006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 477106c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 477206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 477306c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 477406c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 477506c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 477606c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 477706c34b88Smrg 477806c34b88Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 477906c34b88Smrg _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' 478006c34b88Smrg # If the export-symbols file already is a .def file (1st line 478106c34b88Smrg # is EXPORTS), use it as is; otherwise, prepend... 478206c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 478306c34b88Smrg cp $export_symbols $output_objdir/$soname.def; 478406c34b88Smrg else 478506c34b88Smrg echo EXPORTS > $output_objdir/$soname.def; 478606c34b88Smrg cat $export_symbols >> $output_objdir/$soname.def; 478706c34b88Smrg fi~ 478806c34b88Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 478906c34b88Smrg else 479006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 479106c34b88Smrg fi 479206c34b88Smrg ;; 479306c34b88Smrg 479406c34b88Smrg haiku*) 479506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 479606c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 479706c34b88Smrg ;; 479806c34b88Smrg 479906c34b88Smrg interix[[3-9]]*) 480006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 480106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 480206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 480306c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 480406c34b88Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 480506c34b88Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 480606c34b88Smrg # default) and relocated if they conflict, which is a slow very memory 480706c34b88Smrg # consuming and fragmenting process. To avoid this, we pick a random, 480806c34b88Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 480906c34b88Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 481006c34b88Smrg _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' 481106c34b88Smrg _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' 481206c34b88Smrg ;; 481306c34b88Smrg 481406c34b88Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 481506c34b88Smrg tmp_diet=no 481606c34b88Smrg if test "$host_os" = linux-dietlibc; then 481706c34b88Smrg case $cc_basename in 481806c34b88Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 481906c34b88Smrg esac 482006c34b88Smrg fi 482106c34b88Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 482206c34b88Smrg && test "$tmp_diet" = no 482306c34b88Smrg then 482406c34b88Smrg tmp_addflag=' $pic_flag' 482506c34b88Smrg tmp_sharedflag='-shared' 482606c34b88Smrg case $cc_basename,$host_cpu in 482706c34b88Smrg pgcc*) # Portland Group C compiler 482806c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 482906c34b88Smrg tmp_addflag=' $pic_flag' 483006c34b88Smrg ;; 483106c34b88Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 483206c34b88Smrg # Portland Group f77 and f90 compilers 483306c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 483406c34b88Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 483506c34b88Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 483606c34b88Smrg tmp_addflag=' -i_dynamic' ;; 483706c34b88Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 483806c34b88Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 483906c34b88Smrg ifc* | ifort*) # Intel Fortran compiler 484006c34b88Smrg tmp_addflag=' -nofor_main' ;; 484106c34b88Smrg lf95*) # Lahey Fortran 8.1 484206c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 484306c34b88Smrg tmp_sharedflag='--shared' ;; 484406c34b88Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 484506c34b88Smrg tmp_sharedflag='-qmkshrobj' 484606c34b88Smrg tmp_addflag= ;; 484706c34b88Smrg nvcc*) # Cuda Compiler Driver 2.2 484806c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 484906c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 485006c34b88Smrg ;; 485106c34b88Smrg esac 485206c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 485306c34b88Smrg *Sun\ C*) # Sun C 5.9 485406c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 485506c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 485606c34b88Smrg tmp_sharedflag='-G' ;; 485706c34b88Smrg *Sun\ F*) # Sun Fortran 8.3 485806c34b88Smrg tmp_sharedflag='-G' ;; 485906c34b88Smrg esac 486006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4861c43cc173Smrg 486206c34b88Smrg if test "x$supports_anon_versioning" = xyes; then 486306c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 486406c34b88Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 486506c34b88Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 486606c34b88Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 486706c34b88Smrg fi 4868c43cc173Smrg 486906c34b88Smrg case $cc_basename in 487006c34b88Smrg xlf* | bgf* | bgxlf* | mpixlf*) 487106c34b88Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 487206c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 487306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 487406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 487506c34b88Smrg if test "x$supports_anon_versioning" = xyes; then 487606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 487706c34b88Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 487806c34b88Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 487906c34b88Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4880c27c18e8Smrg fi 488106c34b88Smrg ;; 488206c34b88Smrg esac 488306c34b88Smrg else 488406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 488506c34b88Smrg fi 488606c34b88Smrg ;; 4887c27c18e8Smrg 488806c34b88Smrg netbsd*) 488906c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 489006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 489106c34b88Smrg wlarc= 489206c34b88Smrg else 489306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 489406c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 489506c34b88Smrg fi 489606c34b88Smrg ;; 4897c27c18e8Smrg 489806c34b88Smrg solaris*) 489906c34b88Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 490006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 490106c34b88Smrg cat <<_LT_EOF 1>&2 4902c27c18e8Smrg 490306c34b88Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 490406c34b88Smrg*** create shared libraries on Solaris systems. Therefore, libtool 490506c34b88Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 490606c34b88Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 490706c34b88Smrg*** your PATH or compiler configuration so that the native linker is 490806c34b88Smrg*** used, and then restart. 4909c43cc173Smrg 491006c34b88Smrg_LT_EOF 491106c34b88Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 491206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 491306c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 491406c34b88Smrg else 491506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 491606c34b88Smrg fi 491706c34b88Smrg ;; 4918c43cc173Smrg 491906c34b88Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 492006c34b88Smrg case `$LD -v 2>&1` in 492106c34b88Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 492206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 492306c34b88Smrg cat <<_LT_EOF 1>&2 4924c27c18e8Smrg 492506c34b88Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 492606c34b88Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 492706c34b88Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 492806c34b88Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 492906c34b88Smrg*** your PATH or compiler configuration so that the native linker is 493006c34b88Smrg*** used, and then restart. 4931c27c18e8Smrg 493206c34b88Smrg_LT_EOF 493306c34b88Smrg ;; 493406c34b88Smrg *) 493506c34b88Smrg # For security reasons, it is highly recommended that you always 493606c34b88Smrg # use absolute paths for naming shared libraries, and exclude the 493706c34b88Smrg # DT_RUNPATH tag from executables and libraries. But doing so 493806c34b88Smrg # requires that you compile everything twice, which is a pain. 493906c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 494006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 494106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 494206c34b88Smrg _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' 494306c34b88Smrg else 494406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 494506c34b88Smrg fi 494606c34b88Smrg ;; 494706c34b88Smrg esac 494806c34b88Smrg ;; 4949c27c18e8Smrg 495006c34b88Smrg sunos4*) 495106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 495206c34b88Smrg wlarc= 495306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 495406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 495506c34b88Smrg ;; 4956c43cc173Smrg 495706c34b88Smrg *) 495806c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 495906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 496006c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 496106c34b88Smrg else 496206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 496306c34b88Smrg fi 496406c34b88Smrg ;; 496506c34b88Smrg esac 4966c43cc173Smrg 496706c34b88Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 496806c34b88Smrg runpath_var= 496906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 497006c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 497106c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 497206c34b88Smrg fi 497306c34b88Smrg else 497406c34b88Smrg # PORTME fill in a description of your system's linker (not GNU ld) 497506c34b88Smrg case $host_os in 497606c34b88Smrg aix3*) 497706c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 497806c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 497906c34b88Smrg _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' 498006c34b88Smrg # Note: this linker hardcodes the directories in LIBPATH if there 498106c34b88Smrg # are no directories specified by -L. 498206c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 498306c34b88Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 498406c34b88Smrg # Neither direct hardcoding nor static linking is supported with a 498506c34b88Smrg # broken collect2. 498606c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 498706c34b88Smrg fi 498806c34b88Smrg ;; 4989c43cc173Smrg 499006c34b88Smrg aix[[4-9]]*) 499106c34b88Smrg if test "$host_cpu" = ia64; then 499206c34b88Smrg # On IA64, the linker does run time linking by default, so we don't 499306c34b88Smrg # have to do anything special. 499406c34b88Smrg aix_use_runtimelinking=no 499506c34b88Smrg exp_sym_flag='-Bexport' 499606c34b88Smrg no_entry_flag="" 499706c34b88Smrg else 499806c34b88Smrg # If we're using GNU nm, then we don't want the "-C" option. 499906c34b88Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 500006c34b88Smrg # Also, AIX nm treats weak defined symbols like other global 500106c34b88Smrg # defined symbols, whereas GNU nm marks them as "W". 500206c34b88Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 500306c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 500406c34b88Smrg else 500506c34b88Smrg _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' 500606c34b88Smrg fi 500706c34b88Smrg aix_use_runtimelinking=no 5008c27c18e8Smrg 500906c34b88Smrg # Test if we are trying to use run time linking or normal 501006c34b88Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 501106c34b88Smrg # need to do runtime linking. 501206c34b88Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 501306c34b88Smrg for ld_flag in $LDFLAGS; do 501406c34b88Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 501506c34b88Smrg aix_use_runtimelinking=yes 501606c34b88Smrg break 501706c34b88Smrg fi 501806c34b88Smrg done 501906c34b88Smrg ;; 502006c34b88Smrg esac 5021c43cc173Smrg 502206c34b88Smrg exp_sym_flag='-bexport' 502306c34b88Smrg no_entry_flag='-bnoentry' 502406c34b88Smrg fi 5025c43cc173Smrg 502606c34b88Smrg # When large executables or shared objects are built, AIX ld can 502706c34b88Smrg # have problems creating the table of contents. If linking a library 502806c34b88Smrg # or program results in "error TOC overflow" add -mminimal-toc to 502906c34b88Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 503006c34b88Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5031c43cc173Smrg 503206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='' 503306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 503406c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 503506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 503606c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 503706c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5038c27c18e8Smrg 503906c34b88Smrg if test "$GCC" = yes; then 504006c34b88Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 504106c34b88Smrg # We only want to do this on AIX 4.2 and lower, the check 504206c34b88Smrg # below for broken collect2 doesn't work under 4.3+ 504306c34b88Smrg collect2name=`${CC} -print-prog-name=collect2` 504406c34b88Smrg if test -f "$collect2name" && 504506c34b88Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 504606c34b88Smrg then 504706c34b88Smrg # We have reworked collect2 504806c34b88Smrg : 504906c34b88Smrg else 505006c34b88Smrg # We have old collect2 505106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 505206c34b88Smrg # It fails to find uninstalled libraries when the uninstalled 505306c34b88Smrg # path is not listed in the libpath. Setting hardcode_minus_L 505406c34b88Smrg # to unsupported forces relinking 505506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 505606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 505706c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 505806c34b88Smrg fi 505906c34b88Smrg ;; 506006c34b88Smrg esac 506106c34b88Smrg shared_flag='-shared' 506206c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 506306c34b88Smrg shared_flag="$shared_flag "'${wl}-G' 506406c34b88Smrg fi 506506c34b88Smrg else 506606c34b88Smrg # not using gcc 506706c34b88Smrg if test "$host_cpu" = ia64; then 506806c34b88Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 506906c34b88Smrg # chokes on -Wl,-G. The following line is correct: 507006c34b88Smrg shared_flag='-G' 507106c34b88Smrg else 507206c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 507306c34b88Smrg shared_flag='${wl}-G' 507406c34b88Smrg else 507506c34b88Smrg shared_flag='${wl}-bM:SRE' 507606c34b88Smrg fi 507706c34b88Smrg fi 507806c34b88Smrg fi 5079c27c18e8Smrg 508006c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 508106c34b88Smrg # It seems that -bexpall does not export symbols beginning with 508206c34b88Smrg # underscore (_), so it is better to generate a list of symbols to export. 508306c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 508406c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 508506c34b88Smrg # Warning - without using the other runtime loading flags (-brtl), 508606c34b88Smrg # -berok will link without error, but may produce a broken library. 508706c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 508806c34b88Smrg # Determine the default libpath from the value encoded in an 508906c34b88Smrg # empty executable. 509006c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 509106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 509206c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 509306c34b88Smrg else 509406c34b88Smrg if test "$host_cpu" = ia64; then 509506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 509606c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 509706c34b88Smrg _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" 509806c34b88Smrg else 509906c34b88Smrg # Determine the default libpath from the value encoded in an 510006c34b88Smrg # empty executable. 510106c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 510206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 510306c34b88Smrg # Warning - without using the other run time loading flags, 510406c34b88Smrg # -berok will link without error, but may produce a broken library. 510506c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 510606c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 510706c34b88Smrg if test "$with_gnu_ld" = yes; then 510806c34b88Smrg # We only use this code for GNU lds that support --whole-archive. 510906c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 511006c34b88Smrg else 511106c34b88Smrg # Exported symbols can be pulled into shared objects from archives 511206c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 511306c34b88Smrg fi 511406c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 511506c34b88Smrg # This is similar to how AIX traditionally builds its shared libraries. 511606c34b88Smrg _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' 511706c34b88Smrg fi 511806c34b88Smrg fi 511906c34b88Smrg ;; 5120c27c18e8Smrg 512106c34b88Smrg amigaos*) 512206c34b88Smrg case $host_cpu in 512306c34b88Smrg powerpc) 512406c34b88Smrg # see comment about AmigaOS4 .so support 512506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 512606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 512706c34b88Smrg ;; 512806c34b88Smrg m68k) 512906c34b88Smrg _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)' 513006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 513106c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5132c27c18e8Smrg ;; 513306c34b88Smrg esac 513406c34b88Smrg ;; 5135c43cc173Smrg 513606c34b88Smrg bsdi[[45]]*) 513706c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 513806c34b88Smrg ;; 5139c43cc173Smrg 514006c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 514106c34b88Smrg # When not using gcc, we currently assume that we are using 514206c34b88Smrg # Microsoft Visual C++. 514306c34b88Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 514406c34b88Smrg # no search path for DLLs. 5145c27c18e8Smrg case $cc_basename in 514606c34b88Smrg cl*) 514706c34b88Smrg # Native MSVC 514806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 514906c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 515006c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 515106c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='@' 515206c34b88Smrg # Tell ltmain to make .lib files, not .a files. 515306c34b88Smrg libext=lib 515406c34b88Smrg # Tell ltmain to make .dll files, not .so files. 515506c34b88Smrg shrext_cmds=".dll" 515606c34b88Smrg # FIXME: Setting linknames here is a bad hack. 515706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 515806c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 515906c34b88Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 516006c34b88Smrg else 516106c34b88Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 516206c34b88Smrg fi~ 516306c34b88Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 516406c34b88Smrg linknames=' 516506c34b88Smrg # The linker will not automatically build a static lib if we build a DLL. 516606c34b88Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 516706c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 516806c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 516906c34b88Smrg _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' 517006c34b88Smrg # Don't use ranlib 517106c34b88Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 517206c34b88Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 517306c34b88Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 517406c34b88Smrg case $lt_outputfile in 517506c34b88Smrg *.exe|*.EXE) ;; 517606c34b88Smrg *) 517706c34b88Smrg lt_outputfile="$lt_outputfile.exe" 517806c34b88Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 517906c34b88Smrg ;; 518006c34b88Smrg esac~ 518106c34b88Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 518206c34b88Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 518306c34b88Smrg $RM "$lt_outputfile.manifest"; 518406c34b88Smrg fi' 518506c34b88Smrg ;; 518606c34b88Smrg *) 518706c34b88Smrg # Assume MSVC wrapper 518806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 518906c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 519006c34b88Smrg # Tell ltmain to make .lib files, not .a files. 519106c34b88Smrg libext=lib 519206c34b88Smrg # Tell ltmain to make .dll files, not .so files. 519306c34b88Smrg shrext_cmds=".dll" 519406c34b88Smrg # FIXME: Setting linknames here is a bad hack. 519506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 519606c34b88Smrg # The linker will automatically build a .lib file if we build a DLL. 519706c34b88Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 519806c34b88Smrg # FIXME: Should let the user specify the lib program. 519906c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 520006c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 520106c34b88Smrg ;; 5202c27c18e8Smrg esac 5203c27c18e8Smrg ;; 5204c43cc173Smrg 520506c34b88Smrg darwin* | rhapsody*) 520606c34b88Smrg _LT_DARWIN_LINKER_FEATURES($1) 5207c27c18e8Smrg ;; 5208c43cc173Smrg 520906c34b88Smrg dgux*) 521006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 521106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 521206c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 521306c34b88Smrg ;; 5214c27c18e8Smrg 521506c34b88Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 521606c34b88Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 521706c34b88Smrg # does not break anything, and helps significantly (at the cost of a little 521806c34b88Smrg # extra space). 521906c34b88Smrg freebsd2.2*) 522006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 522106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 522206c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 522306c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 522406c34b88Smrg ;; 5225c27c18e8Smrg 522606c34b88Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 522706c34b88Smrg freebsd2.*) 522806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 522906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 523006c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 523106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 523206c34b88Smrg ;; 5233c27c18e8Smrg 523406c34b88Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 523506c34b88Smrg freebsd* | dragonfly*) 523606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 523706c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 523806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 523906c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 524006c34b88Smrg ;; 5241c43cc173Smrg 524206c34b88Smrg hpux9*) 524306c34b88Smrg if test "$GCC" = yes; then 524406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 524506c34b88Smrg else 524606c34b88Smrg _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' 524706c34b88Smrg fi 524806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 524906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 525006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5251c43cc173Smrg 525206c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 525306c34b88Smrg # but as the default location of the library. 525406c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 525506c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 525606c34b88Smrg ;; 5257c43cc173Smrg 525806c34b88Smrg hpux10*) 525906c34b88Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 526006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 526106c34b88Smrg else 526206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 526306c34b88Smrg fi 526406c34b88Smrg if test "$with_gnu_ld" = no; then 526506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 526606c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 526706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 526806c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 526906c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 527006c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 527106c34b88Smrg # but as the default location of the library. 527206c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 527306c34b88Smrg fi 527406c34b88Smrg ;; 5275b789ec8aSmrg 527606c34b88Smrg hpux11*) 527706c34b88Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 527806c34b88Smrg case $host_cpu in 527906c34b88Smrg hppa*64*) 528006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 528106c34b88Smrg ;; 528206c34b88Smrg ia64*) 528306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 528406c34b88Smrg ;; 528506c34b88Smrg *) 528606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 528706c34b88Smrg ;; 528806c34b88Smrg esac 528906c34b88Smrg else 529006c34b88Smrg case $host_cpu in 529106c34b88Smrg hppa*64*) 529206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 529306c34b88Smrg ;; 529406c34b88Smrg ia64*) 529506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 529606c34b88Smrg ;; 529706c34b88Smrg *) 529806c34b88Smrg m4_if($1, [], [ 529906c34b88Smrg # Older versions of the 11.00 compiler do not understand -b yet 530006c34b88Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 530106c34b88Smrg _LT_LINKER_OPTION([if $CC understands -b], 530206c34b88Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 530306c34b88Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 530406c34b88Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 530506c34b88Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 530606c34b88Smrg ;; 530706c34b88Smrg esac 530806c34b88Smrg fi 530906c34b88Smrg if test "$with_gnu_ld" = no; then 531006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 531106c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5312c43cc173Smrg 531306c34b88Smrg case $host_cpu in 531406c34b88Smrg hppa*64*|ia64*) 531506c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 531606c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 531706c34b88Smrg ;; 531806c34b88Smrg *) 531906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 532006c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 532106c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 532206c34b88Smrg 532306c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 532406c34b88Smrg # but as the default location of the library. 532506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 532606c34b88Smrg ;; 532706c34b88Smrg esac 532806c34b88Smrg fi 532906c34b88Smrg ;; 533006c34b88Smrg 533106c34b88Smrg irix5* | irix6* | nonstopux*) 533206c34b88Smrg if test "$GCC" = yes; then 533306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 533406c34b88Smrg # Try to use the -exported_symbol ld option, if it does not 533506c34b88Smrg # work, assume that -exports_file does not work either and 533606c34b88Smrg # implicitly export all symbols. 533706c34b88Smrg # This should be the same for all languages, so no per-tag cache variable. 533806c34b88Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 533906c34b88Smrg [lt_cv_irix_exported_symbol], 534006c34b88Smrg [save_LDFLAGS="$LDFLAGS" 534106c34b88Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 534206c34b88Smrg AC_LINK_IFELSE( 534306c34b88Smrg [AC_LANG_SOURCE( 534406c34b88Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 534506c34b88Smrg [C++], [[int foo (void) { return 0; }]], 534606c34b88Smrg [Fortran 77], [[ 5347c27c18e8Smrg subroutine foo 534806c34b88Smrg end]], 534906c34b88Smrg [Fortran], [[ 5350c27c18e8Smrg subroutine foo 535106c34b88Smrg end]])])], 535206c34b88Smrg [lt_cv_irix_exported_symbol=yes], 535306c34b88Smrg [lt_cv_irix_exported_symbol=no]) 535406c34b88Smrg LDFLAGS="$save_LDFLAGS"]) 535506c34b88Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 535606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 535706c34b88Smrg fi 535806c34b88Smrg else 535906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 536006c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 536106c34b88Smrg fi 536206c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 536306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 536406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 536506c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 536606c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 536706c34b88Smrg ;; 5368b789ec8aSmrg 536906c34b88Smrg netbsd*) 537006c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 537106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 537206c34b88Smrg else 537306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 537406c34b88Smrg fi 537506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 537606c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 537706c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 537806c34b88Smrg ;; 5379b789ec8aSmrg 538006c34b88Smrg newsos6) 538106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 538206c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 538306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 538406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 538506c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 538606c34b88Smrg ;; 5387c43cc173Smrg 538806c34b88Smrg *nto* | *qnx*) 538906c34b88Smrg ;; 5390c43cc173Smrg 539106c34b88Smrg openbsd*) 539206c34b88Smrg if test -f /usr/libexec/ld.so; then 539306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 539406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 539506c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 539606c34b88Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 539706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 539806c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 539906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 540006c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 540106c34b88Smrg else 540206c34b88Smrg case $host_os in 540306c34b88Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 540406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 540506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 540606c34b88Smrg ;; 540706c34b88Smrg *) 540806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 540906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 541006c34b88Smrg ;; 541106c34b88Smrg esac 541206c34b88Smrg fi 541306c34b88Smrg else 541406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 541506c34b88Smrg fi 541606c34b88Smrg ;; 5417c43cc173Smrg 541806c34b88Smrg os2*) 541906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 542006c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 542106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 542206c34b88Smrg _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' 542306c34b88Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 542406c34b88Smrg ;; 5425c43cc173Smrg 542606c34b88Smrg osf3*) 542706c34b88Smrg if test "$GCC" = yes; then 542806c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 542906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 543006c34b88Smrg else 543106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 543206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 543306c34b88Smrg fi 543406c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 543506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 543606c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 543706c34b88Smrg ;; 5438c43cc173Smrg 543906c34b88Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 544006c34b88Smrg if test "$GCC" = yes; then 544106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 544206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 544306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 544406c34b88Smrg else 544506c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 544606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 544706c34b88Smrg _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~ 544806c34b88Smrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 544906c34b88Smrg 545006c34b88Smrg # Both c and cxx compiler support -rpath directly 545106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 545206c34b88Smrg fi 545306c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 545406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 545506c34b88Smrg ;; 545606c34b88Smrg 545706c34b88Smrg solaris*) 545806c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 545906c34b88Smrg if test "$GCC" = yes; then 546006c34b88Smrg wlarc='${wl}' 546106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 546206c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 546306c34b88Smrg $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 546406c34b88Smrg else 546506c34b88Smrg case `$CC -V 2>&1` in 546606c34b88Smrg *"Compilers 5.0"*) 546706c34b88Smrg wlarc='' 546806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 546906c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 547006c34b88Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 547106c34b88Smrg ;; 547206c34b88Smrg *) 547306c34b88Smrg wlarc='${wl}' 547406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 547506c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 547606c34b88Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 547706c34b88Smrg ;; 547806c34b88Smrg esac 547906c34b88Smrg fi 548006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 548106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 548206c34b88Smrg case $host_os in 548306c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 548406c34b88Smrg *) 548506c34b88Smrg # The compiler driver will combine and reorder linker options, 548606c34b88Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 548706c34b88Smrg # but is careful enough not to reorder. 548806c34b88Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 548906c34b88Smrg if test "$GCC" = yes; then 549006c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 549106c34b88Smrg else 549206c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 549306c34b88Smrg fi 549406c34b88Smrg ;; 549506c34b88Smrg esac 549606c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 549706c34b88Smrg ;; 5498c43cc173Smrg 549906c34b88Smrg sunos4*) 550006c34b88Smrg if test "x$host_vendor" = xsequent; then 550106c34b88Smrg # Use $CC to link under sequent, because it throws in some extra .o 550206c34b88Smrg # files that make .init and .fini sections work. 550306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 550406c34b88Smrg else 550506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 550606c34b88Smrg fi 550706c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 550806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 550906c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 551006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 551106c34b88Smrg ;; 5512c43cc173Smrg 551306c34b88Smrg sysv4) 551406c34b88Smrg case $host_vendor in 551506c34b88Smrg sni) 551606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 551706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 551806c34b88Smrg ;; 551906c34b88Smrg siemens) 552006c34b88Smrg ## LD is ld it makes a PLAMLIB 552106c34b88Smrg ## CC just makes a GrossModule. 552206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 552306c34b88Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 552406c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 552506c34b88Smrg ;; 552606c34b88Smrg motorola) 552706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 552806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 552906c34b88Smrg ;; 553006c34b88Smrg esac 553106c34b88Smrg runpath_var='LD_RUN_PATH' 553206c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 553306c34b88Smrg ;; 5534c43cc173Smrg 553506c34b88Smrg sysv4.3*) 553606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 553706c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 553806c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 553906c34b88Smrg ;; 5540c43cc173Smrg 554106c34b88Smrg sysv4*MP*) 554206c34b88Smrg if test -d /usr/nec; then 554306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 554406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 554506c34b88Smrg runpath_var=LD_RUN_PATH 554606c34b88Smrg hardcode_runpath_var=yes 554706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 554806c34b88Smrg fi 554906c34b88Smrg ;; 5550c43cc173Smrg 555106c34b88Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 555206c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 555306c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 555406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 555506c34b88Smrg runpath_var='LD_RUN_PATH' 5556c43cc173Smrg 555706c34b88Smrg if test "$GCC" = yes; then 555806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 555906c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 556006c34b88Smrg else 556106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 556206c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 556306c34b88Smrg fi 556406c34b88Smrg ;; 5565c43cc173Smrg 556606c34b88Smrg sysv5* | sco3.2v5* | sco5v6*) 556706c34b88Smrg # Note: We can NOT use -z defs as we might desire, because we do not 556806c34b88Smrg # link with -lc, and that would cause any symbols used from libc to 556906c34b88Smrg # always be unresolved, which means just about no library would 557006c34b88Smrg # ever link correctly. If we're not using GNU ld we use -z text 557106c34b88Smrg # though, which does catch some bad symbols but isn't as heavy-handed 557206c34b88Smrg # as -z defs. 557306c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 557406c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 557506c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 557606c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 557706c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 557806c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 557906c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 558006c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 558106c34b88Smrg runpath_var='LD_RUN_PATH' 5582c43cc173Smrg 558306c34b88Smrg if test "$GCC" = yes; then 558406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 558506c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 558606c34b88Smrg else 558706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 558806c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 558906c34b88Smrg fi 5590c27c18e8Smrg ;; 5591c43cc173Smrg 559206c34b88Smrg uts4*) 559306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 559406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 559506c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 559606c34b88Smrg ;; 5597c27c18e8Smrg 559806c34b88Smrg *) 559906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5600c27c18e8Smrg ;; 5601c27c18e8Smrg esac 5602c43cc173Smrg 560306c34b88Smrg if test x$host_vendor = xsni; then 560406c34b88Smrg case $host in 560506c34b88Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 560606c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 560706c34b88Smrg ;; 560806c34b88Smrg esac 5609c27c18e8Smrg fi 561006c34b88Smrg fi 5611c27c18e8Smrg]) 561206c34b88SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 561306c34b88Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5614c43cc173Smrg 561506c34b88Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 561606c34b88Smrg 561706c34b88Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 561806c34b88Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 561906c34b88Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 562006c34b88Smrg [The commands to extract the exported symbol list from a shared archive]) 562106c34b88Smrg 562206c34b88Smrg# 562306c34b88Smrg# Do we need to explicitly link libc? 562406c34b88Smrg# 562506c34b88Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 562606c34b88Smrgx|xyes) 562706c34b88Smrg # Assume -lc should be added 562806c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 562906c34b88Smrg 563006c34b88Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 563106c34b88Smrg case $_LT_TAGVAR(archive_cmds, $1) in 563206c34b88Smrg *'~'*) 563306c34b88Smrg # FIXME: we may have to deal with multi-command sequences. 563406c34b88Smrg ;; 563506c34b88Smrg '$CC '*) 563606c34b88Smrg # Test whether the compiler implicitly links with -lc since on some 563706c34b88Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 563806c34b88Smrg # to ld, don't add -lc before -lgcc. 563906c34b88Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 564006c34b88Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 564106c34b88Smrg [$RM conftest* 564206c34b88Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 564306c34b88Smrg 564406c34b88Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 564506c34b88Smrg soname=conftest 564606c34b88Smrg lib=conftest 564706c34b88Smrg libobjs=conftest.$ac_objext 564806c34b88Smrg deplibs= 564906c34b88Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 565006c34b88Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 565106c34b88Smrg compiler_flags=-v 565206c34b88Smrg linker_flags=-v 565306c34b88Smrg verstring= 565406c34b88Smrg output_objdir=. 565506c34b88Smrg libname=conftest 565606c34b88Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 565706c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 565806c34b88Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 565906c34b88Smrg then 566006c34b88Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 566106c34b88Smrg else 566206c34b88Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 566306c34b88Smrg fi 566406c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 566506c34b88Smrg else 566606c34b88Smrg cat conftest.err 1>&5 566706c34b88Smrg fi 566806c34b88Smrg $RM conftest* 566906c34b88Smrg ]) 567006c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 567106c34b88Smrg ;; 567206c34b88Smrg esac 567306c34b88Smrg fi 567406c34b88Smrg ;; 567506c34b88Smrgesac 5676c27c18e8Smrg 567706c34b88Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 567806c34b88Smrg [Whether or not to add -lc for building shared libraries]) 567906c34b88Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 568006c34b88Smrg [enable_shared_with_static_runtimes], [0], 568106c34b88Smrg [Whether or not to disallow shared libs when runtime libs are static]) 568206c34b88Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 568306c34b88Smrg [Compiler flag to allow reflexive dlopens]) 568406c34b88Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 568506c34b88Smrg [Compiler flag to generate shared objects directly from archives]) 568606c34b88Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 568706c34b88Smrg [Whether the compiler copes with passing no objects directly]) 568806c34b88Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 568906c34b88Smrg [Create an old-style archive from a shared archive]) 569006c34b88Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 569106c34b88Smrg [Create a temporary old-style archive to link instead of a shared archive]) 569206c34b88Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 569306c34b88Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 569406c34b88Smrg_LT_TAGDECL([], [module_cmds], [2], 569506c34b88Smrg [Commands used to build a loadable module if different from building 569606c34b88Smrg a shared archive.]) 569706c34b88Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 569806c34b88Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 569906c34b88Smrg [Whether we are building with GNU ld or not]) 570006c34b88Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 570106c34b88Smrg [Flag that allows shared libraries with undefined symbols to be built]) 570206c34b88Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 570306c34b88Smrg [Flag that enforces no undefined symbols]) 570406c34b88Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 570506c34b88Smrg [Flag to hardcode $libdir into a binary during linking. 570606c34b88Smrg This must work even if $libdir does not exist]) 570706c34b88Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 570806c34b88Smrg [Whether we need a single "-rpath" flag with a separated argument]) 570906c34b88Smrg_LT_TAGDECL([], [hardcode_direct], [0], 571006c34b88Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 571106c34b88Smrg DIR into the resulting binary]) 571206c34b88Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 571306c34b88Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 571406c34b88Smrg DIR into the resulting binary and the resulting library dependency is 571506c34b88Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 571606c34b88Smrg library is relocated]) 571706c34b88Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 571806c34b88Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 571906c34b88Smrg into the resulting binary]) 572006c34b88Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 572106c34b88Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 572206c34b88Smrg into the resulting binary]) 572306c34b88Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 572406c34b88Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 572506c34b88Smrg into the library and all subsequent libraries and executables linked 572606c34b88Smrg against it]) 572706c34b88Smrg_LT_TAGDECL([], [inherit_rpath], [0], 572806c34b88Smrg [Set to yes if linker adds runtime paths of dependent libraries 572906c34b88Smrg to runtime path list]) 573006c34b88Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 573106c34b88Smrg [Whether libtool must link a program against all its dependency libraries]) 573206c34b88Smrg_LT_TAGDECL([], [always_export_symbols], [0], 573306c34b88Smrg [Set to "yes" if exported symbols are required]) 573406c34b88Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 573506c34b88Smrg [The commands to list exported symbols]) 573606c34b88Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 573706c34b88Smrg [Symbols that should not be listed in the preloaded symbols]) 573806c34b88Smrg_LT_TAGDECL([], [include_expsyms], [1], 573906c34b88Smrg [Symbols that must always be exported]) 574006c34b88Smrg_LT_TAGDECL([], [prelink_cmds], [2], 574106c34b88Smrg [Commands necessary for linking programs (against libraries) with templates]) 574206c34b88Smrg_LT_TAGDECL([], [postlink_cmds], [2], 574306c34b88Smrg [Commands necessary for finishing linking programs]) 574406c34b88Smrg_LT_TAGDECL([], [file_list_spec], [1], 574506c34b88Smrg [Specify filename containing input files]) 574606c34b88Smrgdnl FIXME: Not yet implemented 574706c34b88Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 574806c34b88Smrgdnl [Compiler flag to generate thread safe objects]) 574906c34b88Smrg])# _LT_LINKER_SHLIBS 5750c27c18e8Smrg 5751c43cc173Smrg 575206c34b88Smrg# _LT_LANG_C_CONFIG([TAG]) 575306c34b88Smrg# ------------------------ 575406c34b88Smrg# Ensure that the configuration variables for a C compiler are suitably 575506c34b88Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 575606c34b88Smrg# the compiler configuration to `libtool'. 575706c34b88Smrgm4_defun([_LT_LANG_C_CONFIG], 575806c34b88Smrg[m4_require([_LT_DECL_EGREP])dnl 575906c34b88Smrglt_save_CC="$CC" 576006c34b88SmrgAC_LANG_PUSH(C) 5761c43cc173Smrg 576206c34b88Smrg# Source file extension for C test sources. 576306c34b88Smrgac_ext=c 5764c43cc173Smrg 576506c34b88Smrg# Object file extension for compiled C test sources. 5766c27c18e8Smrgobjext=o 5767c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 5768c27c18e8Smrg 576906c34b88Smrg# Code to be used in simple compile tests 577006c34b88Smrglt_simple_compile_test_code="int some_variable = 0;" 5771c43cc173Smrg 577206c34b88Smrg# Code to be used in simple link tests 577306c34b88Smrglt_simple_link_test_code='int main(){return(0);}' 5774c43cc173Smrg 577506c34b88Smrg_LT_TAG_COMPILER 577606c34b88Smrg# Save the default compiler, since it gets overwritten when the other 577706c34b88Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 577806c34b88Smrgcompiler_DEFAULT=$CC 5779c27c18e8Smrg 578006c34b88Smrg# save warnings/boilerplate of simple test code 578106c34b88Smrg_LT_COMPILER_BOILERPLATE 578206c34b88Smrg_LT_LINKER_BOILERPLATE 5783c27c18e8Smrg 578406c34b88Smrgif test -n "$compiler"; then 578506c34b88Smrg _LT_COMPILER_NO_RTTI($1) 578606c34b88Smrg _LT_COMPILER_PIC($1) 578706c34b88Smrg _LT_COMPILER_C_O($1) 578806c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 578906c34b88Smrg _LT_LINKER_SHLIBS($1) 579006c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 579106c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 579206c34b88Smrg LT_SYS_DLOPEN_SELF 579306c34b88Smrg _LT_CMD_STRIPLIB 5794c27c18e8Smrg 579506c34b88Smrg # Report which library types will actually be built 579606c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 579706c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 5798c27c18e8Smrg 579906c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 580006c34b88Smrg test "$can_build_shared" = "no" && enable_shared=no 5801c27c18e8Smrg 580206c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 580306c34b88Smrg # are all built from PIC. 580406c34b88Smrg case $host_os in 580506c34b88Smrg aix3*) 580606c34b88Smrg test "$enable_shared" = yes && enable_static=no 580706c34b88Smrg if test -n "$RANLIB"; then 580806c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 580906c34b88Smrg postinstall_cmds='$RANLIB $lib' 581006c34b88Smrg fi 581106c34b88Smrg ;; 5812c43cc173Smrg 581306c34b88Smrg aix[[4-9]]*) 581406c34b88Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 581506c34b88Smrg test "$enable_shared" = yes && enable_static=no 581606c34b88Smrg fi 581706c34b88Smrg ;; 581806c34b88Smrg esac 581906c34b88Smrg AC_MSG_RESULT([$enable_shared]) 5820c43cc173Smrg 582106c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 582206c34b88Smrg # Make sure either enable_shared or enable_static is yes. 582306c34b88Smrg test "$enable_shared" = yes || enable_static=yes 582406c34b88Smrg AC_MSG_RESULT([$enable_static]) 5825c43cc173Smrg 582606c34b88Smrg _LT_CONFIG($1) 582706c34b88Smrgfi 582806c34b88SmrgAC_LANG_POP 582906c34b88SmrgCC="$lt_save_CC" 583006c34b88Smrg])# _LT_LANG_C_CONFIG 583137eb1ca1Smrg 583206c34b88Smrg 583306c34b88Smrg# _LT_LANG_CXX_CONFIG([TAG]) 583406c34b88Smrg# -------------------------- 583506c34b88Smrg# Ensure that the configuration variables for a C++ compiler are suitably 583606c34b88Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 583706c34b88Smrg# the compiler configuration to `libtool'. 583806c34b88Smrgm4_defun([_LT_LANG_CXX_CONFIG], 583906c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 584006c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 584106c34b88Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 584206c34b88Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 584306c34b88Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 584406c34b88Smrg (test "X$CXX" != "Xg++"))) ; then 584506c34b88Smrg AC_PROG_CXXCPP 584606c34b88Smrgelse 584706c34b88Smrg _lt_caught_CXX_error=yes 584837eb1ca1Smrgfi 5849c27c18e8Smrg 585006c34b88SmrgAC_LANG_PUSH(C++) 5851c27c18e8Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5852c27c18e8Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5853c27c18e8Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5854c27c18e8Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 585506c34b88Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5856c27c18e8Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5857c27c18e8Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5858c27c18e8Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5859c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5860c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5861c27c18e8Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 586206c34b88Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5863c27c18e8Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5864c27c18e8Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5865c27c18e8Smrg_LT_TAGVAR(module_cmds, $1)= 5866c27c18e8Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5867c27c18e8Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5868c27c18e8Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 586937eb1ca1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 587037eb1ca1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5871c27c18e8Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5872c27c18e8Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5873c27c18e8Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5874c27c18e8Smrg 587506c34b88Smrg# Source file extension for C++ test sources. 587606c34b88Smrgac_ext=cpp 5877c27c18e8Smrg 587806c34b88Smrg# Object file extension for compiled C++ test sources. 5879c27c18e8Smrgobjext=o 5880c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 5881c27c18e8Smrg 5882c27c18e8Smrg# No sense in running all these tests if we already determined that 588306c34b88Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5884c27c18e8Smrg# are currently assumed to apply to all compilers on this platform, 5885c27c18e8Smrg# and will be corrupted by setting them based on a non-working compiler. 588606c34b88Smrgif test "$_lt_caught_CXX_error" != yes; then 5887c27c18e8Smrg # Code to be used in simple compile tests 588806c34b88Smrg lt_simple_compile_test_code="int some_variable = 0;" 5889c43cc173Smrg 5890c27c18e8Smrg # Code to be used in simple link tests 589106c34b88Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5892c43cc173Smrg 5893c27c18e8Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5894c27c18e8Smrg _LT_TAG_COMPILER 5895c43cc173Smrg 5896c27c18e8Smrg # save warnings/boilerplate of simple test code 5897c27c18e8Smrg _LT_COMPILER_BOILERPLATE 5898c27c18e8Smrg _LT_LINKER_BOILERPLATE 5899c43cc173Smrg 5900c27c18e8Smrg # Allow CC to be a program name with arguments. 590106c34b88Smrg lt_save_CC=$CC 5902b789ec8aSmrg lt_save_CFLAGS=$CFLAGS 590306c34b88Smrg lt_save_LD=$LD 590406c34b88Smrg lt_save_GCC=$GCC 590506c34b88Smrg GCC=$GXX 590606c34b88Smrg lt_save_with_gnu_ld=$with_gnu_ld 590706c34b88Smrg lt_save_path_LD=$lt_cv_path_LD 590806c34b88Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 590906c34b88Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 591006c34b88Smrg else 591106c34b88Smrg $as_unset lt_cv_prog_gnu_ld 591206c34b88Smrg fi 591306c34b88Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 591406c34b88Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 591506c34b88Smrg else 591606c34b88Smrg $as_unset lt_cv_path_LD 591706c34b88Smrg fi 591806c34b88Smrg test -z "${LDCXX+set}" || LD=$LDCXX 591906c34b88Smrg CC=${CXX-"c++"} 592006c34b88Smrg CFLAGS=$CXXFLAGS 5921c27c18e8Smrg compiler=$CC 5922c27c18e8Smrg _LT_TAGVAR(compiler, $1)=$CC 5923c27c18e8Smrg _LT_CC_BASENAME([$compiler]) 5924c27c18e8Smrg 5925c27c18e8Smrg if test -n "$compiler"; then 592606c34b88Smrg # We don't want -fno-exception when compiling C++ code, so set the 592706c34b88Smrg # no_builtin_flag separately 592806c34b88Smrg if test "$GXX" = yes; then 592906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 593006c34b88Smrg else 593106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 593206c34b88Smrg fi 5933c27c18e8Smrg 593406c34b88Smrg if test "$GXX" = yes; then 593506c34b88Smrg # Set up default GNU C++ configuration 5936c27c18e8Smrg 593706c34b88Smrg LT_PATH_LD 593806c34b88Smrg 593906c34b88Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 594006c34b88Smrg # archiving commands below assume that GNU ld is being used. 594106c34b88Smrg if test "$with_gnu_ld" = yes; then 594206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 594306c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 594406c34b88Smrg 594506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 594606c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 594706c34b88Smrg 594806c34b88Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 594906c34b88Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 595006c34b88Smrg # investigate it a little bit more. (MM) 595106c34b88Smrg wlarc='${wl}' 595206c34b88Smrg 595306c34b88Smrg # ancient GNU ld didn't support --whole-archive et. al. 595406c34b88Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 595506c34b88Smrg $GREP 'no-whole-archive' > /dev/null; then 595606c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 595706c34b88Smrg else 595806c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 595906c34b88Smrg fi 596006c34b88Smrg else 596106c34b88Smrg with_gnu_ld=no 596206c34b88Smrg wlarc= 596306c34b88Smrg 596406c34b88Smrg # A generic and very simple default shared library creation 596506c34b88Smrg # command for GNU C++ for the case where it uses the native 596606c34b88Smrg # linker, instead of GNU ld. If possible, this setting should 596706c34b88Smrg # overridden to take advantage of the native linker features on 596806c34b88Smrg # the platform it is being used on. 596906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 597006c34b88Smrg fi 597106c34b88Smrg 597206c34b88Smrg # Commands to make compiler produce verbose output that lists 597306c34b88Smrg # what "hidden" libraries, object files and flags are used when 597406c34b88Smrg # linking a shared library. 597506c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 597606c34b88Smrg 597706c34b88Smrg else 597806c34b88Smrg GXX=no 597906c34b88Smrg with_gnu_ld=no 598006c34b88Smrg wlarc= 598106c34b88Smrg fi 598206c34b88Smrg 598306c34b88Smrg # PORTME: fill in a description of your system's C++ link characteristics 598406c34b88Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 598506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5986c43cc173Smrg case $host_os in 5987c27c18e8Smrg aix3*) 598806c34b88Smrg # FIXME: insert proper C++ library support 598906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5990c27c18e8Smrg ;; 599121e67964Smrg aix[[4-9]]*) 599206c34b88Smrg if test "$host_cpu" = ia64; then 599306c34b88Smrg # On IA64, the linker does run time linking by default, so we don't 599406c34b88Smrg # have to do anything special. 599506c34b88Smrg aix_use_runtimelinking=no 599606c34b88Smrg exp_sym_flag='-Bexport' 599706c34b88Smrg no_entry_flag="" 599806c34b88Smrg else 599906c34b88Smrg aix_use_runtimelinking=no 6000c27c18e8Smrg 600106c34b88Smrg # Test if we are trying to use run time linking or normal 600206c34b88Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 600306c34b88Smrg # need to do runtime linking. 600406c34b88Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 600506c34b88Smrg for ld_flag in $LDFLAGS; do 600606c34b88Smrg case $ld_flag in 600706c34b88Smrg *-brtl*) 600806c34b88Smrg aix_use_runtimelinking=yes 600906c34b88Smrg break 601006c34b88Smrg ;; 601106c34b88Smrg esac 601206c34b88Smrg done 601306c34b88Smrg ;; 601406c34b88Smrg esac 6015c27c18e8Smrg 601606c34b88Smrg exp_sym_flag='-bexport' 601706c34b88Smrg no_entry_flag='-bnoentry' 601806c34b88Smrg fi 6019c27c18e8Smrg 602006c34b88Smrg # When large executables or shared objects are built, AIX ld can 602106c34b88Smrg # have problems creating the table of contents. If linking a library 602206c34b88Smrg # or program results in "error TOC overflow" add -mminimal-toc to 602306c34b88Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 602406c34b88Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6025c27c18e8Smrg 602606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='' 602706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 602806c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 602906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 603006c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 603106c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6032c27c18e8Smrg 603306c34b88Smrg if test "$GXX" = yes; then 603406c34b88Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 603506c34b88Smrg # We only want to do this on AIX 4.2 and lower, the check 603606c34b88Smrg # below for broken collect2 doesn't work under 4.3+ 603706c34b88Smrg collect2name=`${CC} -print-prog-name=collect2` 603806c34b88Smrg if test -f "$collect2name" && 603906c34b88Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 604006c34b88Smrg then 604106c34b88Smrg # We have reworked collect2 604206c34b88Smrg : 604306c34b88Smrg else 604406c34b88Smrg # We have old collect2 604506c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 604606c34b88Smrg # It fails to find uninstalled libraries when the uninstalled 604706c34b88Smrg # path is not listed in the libpath. Setting hardcode_minus_L 604806c34b88Smrg # to unsupported forces relinking 604906c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 605006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 605106c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 605206c34b88Smrg fi 605306c34b88Smrg esac 605406c34b88Smrg shared_flag='-shared' 605506c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 605606c34b88Smrg shared_flag="$shared_flag "'${wl}-G' 605706c34b88Smrg fi 605806c34b88Smrg else 605906c34b88Smrg # not using gcc 606006c34b88Smrg if test "$host_cpu" = ia64; then 606106c34b88Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 606206c34b88Smrg # chokes on -Wl,-G. The following line is correct: 606306c34b88Smrg shared_flag='-G' 606406c34b88Smrg else 606506c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 606606c34b88Smrg shared_flag='${wl}-G' 606706c34b88Smrg else 606806c34b88Smrg shared_flag='${wl}-bM:SRE' 606906c34b88Smrg fi 607006c34b88Smrg fi 607106c34b88Smrg fi 607221e67964Smrg 607306c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 607406c34b88Smrg # It seems that -bexpall does not export symbols beginning with 607506c34b88Smrg # underscore (_), so it is better to generate a list of symbols to 607606c34b88Smrg # export. 607706c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 607806c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 607906c34b88Smrg # Warning - without using the other runtime loading flags (-brtl), 608006c34b88Smrg # -berok will link without error, but may produce a broken library. 608106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 608206c34b88Smrg # Determine the default libpath from the value encoded in an empty 608306c34b88Smrg # executable. 608406c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 608506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 608621e67964Smrg 608706c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 608806c34b88Smrg else 608906c34b88Smrg if test "$host_cpu" = ia64; then 609006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 609106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 609206c34b88Smrg _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" 609306c34b88Smrg else 609406c34b88Smrg # Determine the default libpath from the value encoded in an 609506c34b88Smrg # empty executable. 609606c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 609706c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 609806c34b88Smrg # Warning - without using the other run time loading flags, 609906c34b88Smrg # -berok will link without error, but may produce a broken library. 610006c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 610106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 610206c34b88Smrg if test "$with_gnu_ld" = yes; then 610306c34b88Smrg # We only use this code for GNU lds that support --whole-archive. 610406c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 610506c34b88Smrg else 610606c34b88Smrg # Exported symbols can be pulled into shared objects from archives 610706c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 610806c34b88Smrg fi 610906c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 611006c34b88Smrg # This is similar to how AIX traditionally builds its shared 611106c34b88Smrg # libraries. 611206c34b88Smrg _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' 611306c34b88Smrg fi 611406c34b88Smrg fi 611506c34b88Smrg ;; 611621e67964Smrg 611706c34b88Smrg beos*) 611806c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 611906c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 612006c34b88Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 612106c34b88Smrg # support --undefined. This deserves some investigation. FIXME 612206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 612306c34b88Smrg else 612406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 612506c34b88Smrg fi 612606c34b88Smrg ;; 612721e67964Smrg 612806c34b88Smrg chorus*) 612906c34b88Smrg case $cc_basename in 613006c34b88Smrg *) 613106c34b88Smrg # FIXME: insert proper C++ library support 613206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 613306c34b88Smrg ;; 613406c34b88Smrg esac 613506c34b88Smrg ;; 6136c27c18e8Smrg 613706c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 613806c34b88Smrg case $GXX,$cc_basename in 613906c34b88Smrg ,cl* | no,cl*) 614006c34b88Smrg # Native MSVC 614106c34b88Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 614206c34b88Smrg # no search path for DLLs. 614306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 614406c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 614506c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 614606c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='@' 614706c34b88Smrg # Tell ltmain to make .lib files, not .a files. 614806c34b88Smrg libext=lib 614906c34b88Smrg # Tell ltmain to make .dll files, not .so files. 615006c34b88Smrg shrext_cmds=".dll" 615106c34b88Smrg # FIXME: Setting linknames here is a bad hack. 615206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 615306c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 615406c34b88Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 615506c34b88Smrg else 615606c34b88Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 615706c34b88Smrg fi~ 615806c34b88Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 615906c34b88Smrg linknames=' 616006c34b88Smrg # The linker will not automatically build a static lib if we build a DLL. 616106c34b88Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 616206c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 616306c34b88Smrg # Don't use ranlib 616406c34b88Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 616506c34b88Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 616606c34b88Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 616706c34b88Smrg case $lt_outputfile in 616806c34b88Smrg *.exe|*.EXE) ;; 616906c34b88Smrg *) 617006c34b88Smrg lt_outputfile="$lt_outputfile.exe" 617106c34b88Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 617206c34b88Smrg ;; 617306c34b88Smrg esac~ 617406c34b88Smrg func_to_tool_file "$lt_outputfile"~ 617506c34b88Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 617606c34b88Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 617706c34b88Smrg $RM "$lt_outputfile.manifest"; 617806c34b88Smrg fi' 617906c34b88Smrg ;; 618006c34b88Smrg *) 618106c34b88Smrg # g++ 618206c34b88Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 618306c34b88Smrg # as there is no search path for DLLs. 618406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 618506c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 618606c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 618706c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 618806c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6189c27c18e8Smrg 619006c34b88Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 619106c34b88Smrg _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' 619206c34b88Smrg # If the export-symbols file already is a .def file (1st line 619306c34b88Smrg # is EXPORTS), use it as is; otherwise, prepend... 619406c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 619506c34b88Smrg cp $export_symbols $output_objdir/$soname.def; 619606c34b88Smrg else 619706c34b88Smrg echo EXPORTS > $output_objdir/$soname.def; 619806c34b88Smrg cat $export_symbols >> $output_objdir/$soname.def; 619906c34b88Smrg fi~ 620006c34b88Smrg $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' 620106c34b88Smrg else 620206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 620306c34b88Smrg fi 620406c34b88Smrg ;; 620506c34b88Smrg esac 620606c34b88Smrg ;; 620706c34b88Smrg darwin* | rhapsody*) 620806c34b88Smrg _LT_DARWIN_LINKER_FEATURES($1) 620906c34b88Smrg ;; 6210c27c18e8Smrg 621106c34b88Smrg dgux*) 621206c34b88Smrg case $cc_basename in 621306c34b88Smrg ec++*) 621406c34b88Smrg # FIXME: insert proper C++ library support 621506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 621606c34b88Smrg ;; 621706c34b88Smrg ghcx*) 621806c34b88Smrg # Green Hills C++ Compiler 621906c34b88Smrg # FIXME: insert proper C++ library support 622006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 622106c34b88Smrg ;; 622206c34b88Smrg *) 622306c34b88Smrg # FIXME: insert proper C++ library support 622406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 622506c34b88Smrg ;; 622606c34b88Smrg esac 622706c34b88Smrg ;; 6228c27c18e8Smrg 622906c34b88Smrg freebsd2.*) 623006c34b88Smrg # C++ shared libraries reported to be fairly broken before 623106c34b88Smrg # switch to ELF 623206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 623306c34b88Smrg ;; 6234c27c18e8Smrg 623506c34b88Smrg freebsd-elf*) 623606c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 623706c34b88Smrg ;; 6238c27c18e8Smrg 623906c34b88Smrg freebsd* | dragonfly*) 624006c34b88Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 624106c34b88Smrg # conventions 624206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 624306c34b88Smrg ;; 6244c27c18e8Smrg 624506c34b88Smrg gnu*) 624606c34b88Smrg ;; 6247c27c18e8Smrg 624806c34b88Smrg haiku*) 624906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 625006c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 625106c34b88Smrg ;; 6252c27c18e8Smrg 625306c34b88Smrg hpux9*) 625406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 625506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 625606c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 625706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 625806c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 625906c34b88Smrg # but as the default 626006c34b88Smrg # location of the library. 6261c27c18e8Smrg 626206c34b88Smrg case $cc_basename in 626306c34b88Smrg CC*) 626406c34b88Smrg # FIXME: insert proper C++ library support 626506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 626606c34b88Smrg ;; 626706c34b88Smrg aCC*) 626806c34b88Smrg _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' 626906c34b88Smrg # Commands to make compiler produce verbose output that lists 627006c34b88Smrg # what "hidden" libraries, object files and flags are used when 627106c34b88Smrg # linking a shared library. 627206c34b88Smrg # 627306c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 627406c34b88Smrg # explicitly linking system object files so we need to strip them 627506c34b88Smrg # from the output so that they don't get included in the library 627606c34b88Smrg # dependencies. 627706c34b88Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 627806c34b88Smrg ;; 627906c34b88Smrg *) 628006c34b88Smrg if test "$GXX" = yes; then 628106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 628206c34b88Smrg else 628306c34b88Smrg # FIXME: insert proper C++ library support 628406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 628506c34b88Smrg fi 628606c34b88Smrg ;; 628706c34b88Smrg esac 628806c34b88Smrg ;; 6289c27c18e8Smrg 629006c34b88Smrg hpux10*|hpux11*) 629106c34b88Smrg if test $with_gnu_ld = no; then 629206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 629306c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6294c27c18e8Smrg 629506c34b88Smrg case $host_cpu in 629606c34b88Smrg hppa*64*|ia64*) 629706c34b88Smrg ;; 629806c34b88Smrg *) 629906c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 630006c34b88Smrg ;; 630106c34b88Smrg esac 630206c34b88Smrg fi 630306c34b88Smrg case $host_cpu in 630406c34b88Smrg hppa*64*|ia64*) 630506c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 630606c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 630706c34b88Smrg ;; 630806c34b88Smrg *) 630906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 631006c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 631106c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 631206c34b88Smrg # but as the default 631306c34b88Smrg # location of the library. 631406c34b88Smrg ;; 631506c34b88Smrg esac 6316c27c18e8Smrg 631706c34b88Smrg case $cc_basename in 631806c34b88Smrg CC*) 631906c34b88Smrg # FIXME: insert proper C++ library support 632006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 632106c34b88Smrg ;; 632206c34b88Smrg aCC*) 632306c34b88Smrg case $host_cpu in 632406c34b88Smrg hppa*64*) 632506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 632606c34b88Smrg ;; 632706c34b88Smrg ia64*) 632806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 632906c34b88Smrg ;; 633006c34b88Smrg *) 633106c34b88Smrg _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' 633206c34b88Smrg ;; 633306c34b88Smrg esac 633406c34b88Smrg # Commands to make compiler produce verbose output that lists 633506c34b88Smrg # what "hidden" libraries, object files and flags are used when 633606c34b88Smrg # linking a shared library. 633706c34b88Smrg # 633806c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 633906c34b88Smrg # explicitly linking system object files so we need to strip them 634006c34b88Smrg # from the output so that they don't get included in the library 634106c34b88Smrg # dependencies. 634206c34b88Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 634306c34b88Smrg ;; 634406c34b88Smrg *) 634506c34b88Smrg if test "$GXX" = yes; then 634606c34b88Smrg if test $with_gnu_ld = no; then 634706c34b88Smrg case $host_cpu in 634806c34b88Smrg hppa*64*) 634906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 635006c34b88Smrg ;; 635106c34b88Smrg ia64*) 635206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 635306c34b88Smrg ;; 635406c34b88Smrg *) 635506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 635606c34b88Smrg ;; 635706c34b88Smrg esac 635806c34b88Smrg fi 635906c34b88Smrg else 636006c34b88Smrg # FIXME: insert proper C++ library support 636106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 636206c34b88Smrg fi 636306c34b88Smrg ;; 636406c34b88Smrg esac 636506c34b88Smrg ;; 6366c27c18e8Smrg 636706c34b88Smrg interix[[3-9]]*) 636806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 636906c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 637006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 637106c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 637206c34b88Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 637306c34b88Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 637406c34b88Smrg # default) and relocated if they conflict, which is a slow very memory 637506c34b88Smrg # consuming and fragmenting process. To avoid this, we pick a random, 637606c34b88Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 637706c34b88Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 637806c34b88Smrg _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' 637906c34b88Smrg _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' 638006c34b88Smrg ;; 638106c34b88Smrg irix5* | irix6*) 638206c34b88Smrg case $cc_basename in 638306c34b88Smrg CC*) 638406c34b88Smrg # SGI C++ 638506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 6386f1ee322dSmrg 638706c34b88Smrg # Archives containing C++ object files must be created using 638806c34b88Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 638906c34b88Smrg # necessary to make sure instantiated templates are included 639006c34b88Smrg # in the archive. 639106c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 639206c34b88Smrg ;; 639306c34b88Smrg *) 639406c34b88Smrg if test "$GXX" = yes; then 639506c34b88Smrg if test "$with_gnu_ld" = no; then 639606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 639706c34b88Smrg else 639806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 639906c34b88Smrg fi 640006c34b88Smrg fi 640106c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 640206c34b88Smrg ;; 640306c34b88Smrg esac 640406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 640506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 640606c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 640706c34b88Smrg ;; 6408f1ee322dSmrg 640906c34b88Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 641006c34b88Smrg case $cc_basename in 641106c34b88Smrg KCC*) 641206c34b88Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6413f1ee322dSmrg 641406c34b88Smrg # KCC will only create a shared library if the output file 641506c34b88Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 641606c34b88Smrg # to its proper name (with version) after linking. 641706c34b88Smrg _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' 641806c34b88Smrg _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' 641906c34b88Smrg # Commands to make compiler produce verbose output that lists 642006c34b88Smrg # what "hidden" libraries, object files and flags are used when 642106c34b88Smrg # linking a shared library. 642206c34b88Smrg # 642306c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 642406c34b88Smrg # explicitly linking system object files so we need to strip them 642506c34b88Smrg # from the output so that they don't get included in the library 642606c34b88Smrg # dependencies. 642706c34b88Smrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 6428f1ee322dSmrg 642906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 643006c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6431f1ee322dSmrg 643206c34b88Smrg # Archives containing C++ object files must be created using 643306c34b88Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 643406c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 643506c34b88Smrg ;; 643606c34b88Smrg icpc* | ecpc* ) 643706c34b88Smrg # Intel C++ 643806c34b88Smrg with_gnu_ld=yes 643906c34b88Smrg # version 8.0 and above of icpc choke on multiply defined symbols 644006c34b88Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 644106c34b88Smrg # earlier do not add the objects themselves. 644206c34b88Smrg case `$CC -V 2>&1` in 644306c34b88Smrg *"Version 7."*) 644406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 644506c34b88Smrg _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' 644606c34b88Smrg ;; 644706c34b88Smrg *) # Version 8.0 or newer 644806c34b88Smrg tmp_idyn= 644906c34b88Smrg case $host_cpu in 645006c34b88Smrg ia64*) tmp_idyn=' -i_dynamic';; 645106c34b88Smrg esac 645206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 645306c34b88Smrg _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' 645406c34b88Smrg ;; 645506c34b88Smrg esac 645606c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 645706c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 645806c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 645906c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 646006c34b88Smrg ;; 646106c34b88Smrg pgCC* | pgcpp*) 646206c34b88Smrg # Portland Group C++ compiler 646306c34b88Smrg case `$CC -V` in 646406c34b88Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 646506c34b88Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 646606c34b88Smrg rm -rf $tpldir~ 646706c34b88Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 646806c34b88Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 646906c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 647006c34b88Smrg rm -rf $tpldir~ 647106c34b88Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 647206c34b88Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 647306c34b88Smrg $RANLIB $oldlib' 647406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 647506c34b88Smrg rm -rf $tpldir~ 647606c34b88Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 647706c34b88Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 647806c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 647906c34b88Smrg rm -rf $tpldir~ 648006c34b88Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 648106c34b88Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 648206c34b88Smrg ;; 648306c34b88Smrg *) # Version 6 and above use weak symbols 648406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 648506c34b88Smrg _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' 648606c34b88Smrg ;; 648706c34b88Smrg esac 6488f1ee322dSmrg 648906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 649006c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 649106c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 649206c34b88Smrg ;; 649306c34b88Smrg cxx*) 649406c34b88Smrg # Compaq C++ 649506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 649606c34b88Smrg _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' 6497f1ee322dSmrg 649806c34b88Smrg runpath_var=LD_RUN_PATH 649906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 650006c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6501f1ee322dSmrg 650206c34b88Smrg # Commands to make compiler produce verbose output that lists 650306c34b88Smrg # what "hidden" libraries, object files and flags are used when 650406c34b88Smrg # linking a shared library. 650506c34b88Smrg # 650606c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 650706c34b88Smrg # explicitly linking system object files so we need to strip them 650806c34b88Smrg # from the output so that they don't get included in the library 650906c34b88Smrg # dependencies. 651006c34b88Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 651106c34b88Smrg ;; 651206c34b88Smrg xl* | mpixl* | bgxl*) 651306c34b88Smrg # IBM XL 8.0 on PPC, with GNU ld 651406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 651506c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 651606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 651706c34b88Smrg if test "x$supports_anon_versioning" = xyes; then 651806c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 651906c34b88Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 652006c34b88Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 652106c34b88Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 652206c34b88Smrg fi 652306c34b88Smrg ;; 652406c34b88Smrg *) 652506c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 652606c34b88Smrg *Sun\ C*) 652706c34b88Smrg # Sun C++ 5.9 652806c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 652906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 653006c34b88Smrg _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' 653106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 653206c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 653306c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6534f1ee322dSmrg 653506c34b88Smrg # Not sure whether something based on 653606c34b88Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 653706c34b88Smrg # would be better. 653806c34b88Smrg output_verbose_link_cmd='func_echo_all' 6539f1ee322dSmrg 654006c34b88Smrg # Archives containing C++ object files must be created using 654106c34b88Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 654206c34b88Smrg # necessary to make sure instantiated templates are included 654306c34b88Smrg # in the archive. 654406c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 654506c34b88Smrg ;; 654606c34b88Smrg esac 654706c34b88Smrg ;; 654806c34b88Smrg esac 654906c34b88Smrg ;; 6550f1ee322dSmrg 655106c34b88Smrg lynxos*) 655206c34b88Smrg # FIXME: insert proper C++ library support 655306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 655406c34b88Smrg ;; 6555f1ee322dSmrg 655606c34b88Smrg m88k*) 655706c34b88Smrg # FIXME: insert proper C++ library support 655806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 655906c34b88Smrg ;; 6560f1ee322dSmrg 656106c34b88Smrg mvs*) 656206c34b88Smrg case $cc_basename in 656306c34b88Smrg cxx*) 656406c34b88Smrg # FIXME: insert proper C++ library support 656506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 656606c34b88Smrg ;; 656706c34b88Smrg *) 656806c34b88Smrg # FIXME: insert proper C++ library support 656906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 657006c34b88Smrg ;; 657106c34b88Smrg esac 657206c34b88Smrg ;; 6573f1ee322dSmrg 657406c34b88Smrg netbsd*) 657506c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 657606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 657706c34b88Smrg wlarc= 657806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 657906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 658006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 658106c34b88Smrg fi 658206c34b88Smrg # Workaround some broken pre-1.5 toolchains 658306c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 658406c34b88Smrg ;; 6585f1ee322dSmrg 658606c34b88Smrg *nto* | *qnx*) 658706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 658806c34b88Smrg ;; 6589c27c18e8Smrg 659006c34b88Smrg openbsd2*) 659106c34b88Smrg # C++ shared libraries are fairly broken 659206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 659306c34b88Smrg ;; 659421e67964Smrg 659506c34b88Smrg openbsd*) 659606c34b88Smrg if test -f /usr/libexec/ld.so; then 659706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 659806c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 659906c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 660006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 660106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 660206c34b88Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 660306c34b88Smrg _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' 660406c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 660506c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 660606c34b88Smrg fi 660706c34b88Smrg output_verbose_link_cmd=func_echo_all 660806c34b88Smrg else 660906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 661006c34b88Smrg fi 661106c34b88Smrg ;; 661221e67964Smrg 661306c34b88Smrg osf3* | osf4* | osf5*) 661406c34b88Smrg case $cc_basename in 661506c34b88Smrg KCC*) 661606c34b88Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 661721e67964Smrg 661806c34b88Smrg # KCC will only create a shared library if the output file 661906c34b88Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 662006c34b88Smrg # to its proper name (with version) after linking. 662106c34b88Smrg _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' 662221e67964Smrg 662306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 662406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 662521e67964Smrg 662606c34b88Smrg # Archives containing C++ object files must be created using 662706c34b88Smrg # the KAI C++ compiler. 662806c34b88Smrg case $host in 662906c34b88Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 663006c34b88Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 663106c34b88Smrg esac 663206c34b88Smrg ;; 663306c34b88Smrg RCC*) 663406c34b88Smrg # Rational C++ 2.4.1 663506c34b88Smrg # FIXME: insert proper C++ library support 663606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 663706c34b88Smrg ;; 663806c34b88Smrg cxx*) 663906c34b88Smrg case $host in 664006c34b88Smrg osf3*) 664106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 664206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 664306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 664406c34b88Smrg ;; 664506c34b88Smrg *) 664606c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 664706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 664806c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 664906c34b88Smrg echo "-hidden">> $lib.exp~ 665006c34b88Smrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ 665106c34b88Smrg $RM $lib.exp' 665206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 665306c34b88Smrg ;; 665406c34b88Smrg esac 665521e67964Smrg 665606c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 665721e67964Smrg 665806c34b88Smrg # Commands to make compiler produce verbose output that lists 665906c34b88Smrg # what "hidden" libraries, object files and flags are used when 666006c34b88Smrg # linking a shared library. 666106c34b88Smrg # 666206c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 666306c34b88Smrg # explicitly linking system object files so we need to strip them 666406c34b88Smrg # from the output so that they don't get included in the library 666506c34b88Smrg # dependencies. 666606c34b88Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 666706c34b88Smrg ;; 666806c34b88Smrg *) 666906c34b88Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 667006c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 667106c34b88Smrg case $host in 667206c34b88Smrg osf3*) 667306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 667406c34b88Smrg ;; 667506c34b88Smrg *) 667606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 667706c34b88Smrg ;; 667806c34b88Smrg esac 667921e67964Smrg 668006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 668106c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 668221e67964Smrg 668306c34b88Smrg # Commands to make compiler produce verbose output that lists 668406c34b88Smrg # what "hidden" libraries, object files and flags are used when 668506c34b88Smrg # linking a shared library. 668606c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 668721e67964Smrg 668806c34b88Smrg else 668906c34b88Smrg # FIXME: insert proper C++ library support 669006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 669106c34b88Smrg fi 669206c34b88Smrg ;; 669306c34b88Smrg esac 669406c34b88Smrg ;; 669521e67964Smrg 669606c34b88Smrg psos*) 669706c34b88Smrg # FIXME: insert proper C++ library support 669806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 669906c34b88Smrg ;; 670021e67964Smrg 670106c34b88Smrg sunos4*) 670206c34b88Smrg case $cc_basename in 670306c34b88Smrg CC*) 670406c34b88Smrg # Sun C++ 4.x 670506c34b88Smrg # FIXME: insert proper C++ library support 670606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 670706c34b88Smrg ;; 670806c34b88Smrg lcc*) 670906c34b88Smrg # Lucid 671006c34b88Smrg # FIXME: insert proper C++ library support 671106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 671206c34b88Smrg ;; 671306c34b88Smrg *) 671406c34b88Smrg # FIXME: insert proper C++ library support 671506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 671606c34b88Smrg ;; 671706c34b88Smrg esac 671806c34b88Smrg ;; 671921e67964Smrg 672006c34b88Smrg solaris*) 672106c34b88Smrg case $cc_basename in 672206c34b88Smrg CC* | sunCC*) 672306c34b88Smrg # Sun C++ 4.2, 5.x and Centerline C++ 672406c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 672506c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 672606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 672706c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 672806c34b88Smrg $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' 6729f1ee322dSmrg 673006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 673106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 673206c34b88Smrg case $host_os in 673306c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 673406c34b88Smrg *) 673506c34b88Smrg # The compiler driver will combine and reorder linker options, 673606c34b88Smrg # but understands `-z linker_flag'. 673706c34b88Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 673806c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 673906c34b88Smrg ;; 674006c34b88Smrg esac 674106c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6742f1ee322dSmrg 674306c34b88Smrg output_verbose_link_cmd='func_echo_all' 674421e67964Smrg 674506c34b88Smrg # Archives containing C++ object files must be created using 674606c34b88Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 674706c34b88Smrg # necessary to make sure instantiated templates are included 674806c34b88Smrg # in the archive. 674906c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 675006c34b88Smrg ;; 675106c34b88Smrg gcx*) 675206c34b88Smrg # Green Hills C++ Compiler 675306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 675421e67964Smrg 675506c34b88Smrg # The C++ compiler must be used to create the archive. 675606c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 675706c34b88Smrg ;; 675806c34b88Smrg *) 675906c34b88Smrg # GNU C++ compiler with Solaris linker 676006c34b88Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 676106c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 676206c34b88Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 676306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 676406c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 676506c34b88Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 676621e67964Smrg 676706c34b88Smrg # Commands to make compiler produce verbose output that lists 676806c34b88Smrg # what "hidden" libraries, object files and flags are used when 676906c34b88Smrg # linking a shared library. 677006c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 677106c34b88Smrg else 677206c34b88Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 677306c34b88Smrg # platform. 677406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 677506c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 677606c34b88Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 677721e67964Smrg 677806c34b88Smrg # Commands to make compiler produce verbose output that lists 677906c34b88Smrg # what "hidden" libraries, object files and flags are used when 678006c34b88Smrg # linking a shared library. 678106c34b88Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 678206c34b88Smrg fi 678321e67964Smrg 678406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 678506c34b88Smrg case $host_os in 678606c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 678706c34b88Smrg *) 678806c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 678906c34b88Smrg ;; 679006c34b88Smrg esac 679106c34b88Smrg fi 679206c34b88Smrg ;; 679306c34b88Smrg esac 679406c34b88Smrg ;; 679521e67964Smrg 679606c34b88Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 679706c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 679806c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 679906c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 680006c34b88Smrg runpath_var='LD_RUN_PATH' 680121e67964Smrg 680206c34b88Smrg case $cc_basename in 680306c34b88Smrg CC*) 680406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 680506c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 680606c34b88Smrg ;; 680706c34b88Smrg *) 680806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 680906c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 681006c34b88Smrg ;; 681106c34b88Smrg esac 681206c34b88Smrg ;; 681321e67964Smrg 681406c34b88Smrg sysv5* | sco3.2v5* | sco5v6*) 681506c34b88Smrg # Note: We can NOT use -z defs as we might desire, because we do not 681606c34b88Smrg # link with -lc, and that would cause any symbols used from libc to 681706c34b88Smrg # always be unresolved, which means just about no library would 681806c34b88Smrg # ever link correctly. If we're not using GNU ld we use -z text 681906c34b88Smrg # though, which does catch some bad symbols but isn't as heavy-handed 682006c34b88Smrg # as -z defs. 682106c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 682206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 682306c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 682406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 682506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 682606c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 682706c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 682806c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 682906c34b88Smrg runpath_var='LD_RUN_PATH' 6830c27c18e8Smrg 683106c34b88Smrg case $cc_basename in 683206c34b88Smrg CC*) 683306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 683406c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 683506c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 683606c34b88Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 683706c34b88Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 683806c34b88Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 683906c34b88Smrg ;; 684006c34b88Smrg *) 684106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 684206c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 684306c34b88Smrg ;; 684406c34b88Smrg esac 684506c34b88Smrg ;; 684621e67964Smrg 684706c34b88Smrg tandem*) 684806c34b88Smrg case $cc_basename in 684906c34b88Smrg NCC*) 685006c34b88Smrg # NonStop-UX NCC 3.20 685106c34b88Smrg # FIXME: insert proper C++ library support 685206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 685306c34b88Smrg ;; 685406c34b88Smrg *) 685506c34b88Smrg # FIXME: insert proper C++ library support 685606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 685706c34b88Smrg ;; 685806c34b88Smrg esac 685906c34b88Smrg ;; 6860c27c18e8Smrg 686106c34b88Smrg vxworks*) 686206c34b88Smrg # FIXME: insert proper C++ library support 686306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 686406c34b88Smrg ;; 6865c27c18e8Smrg 686606c34b88Smrg *) 686706c34b88Smrg # FIXME: insert proper C++ library support 686806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 686906c34b88Smrg ;; 687006c34b88Smrg esac 6871c27c18e8Smrg 687206c34b88Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 687306c34b88Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6874c27c18e8Smrg 687506c34b88Smrg _LT_TAGVAR(GCC, $1)="$GXX" 687606c34b88Smrg _LT_TAGVAR(LD, $1)="$LD" 6877c27c18e8Smrg 687806c34b88Smrg ## CAVEAT EMPTOR: 687906c34b88Smrg ## There is no encapsulation within the following macros, do not change 688006c34b88Smrg ## the running order or otherwise move them around unless you know exactly 688106c34b88Smrg ## what you are doing... 688206c34b88Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 688306c34b88Smrg _LT_COMPILER_PIC($1) 688406c34b88Smrg _LT_COMPILER_C_O($1) 688506c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 688606c34b88Smrg _LT_LINKER_SHLIBS($1) 688706c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 688806c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 688921e67964Smrg 689006c34b88Smrg _LT_CONFIG($1) 689106c34b88Smrg fi # test -n "$compiler" 689221e67964Smrg 689306c34b88Smrg CC=$lt_save_CC 689406c34b88Smrg CFLAGS=$lt_save_CFLAGS 689506c34b88Smrg LDCXX=$LD 689606c34b88Smrg LD=$lt_save_LD 689706c34b88Smrg GCC=$lt_save_GCC 689806c34b88Smrg with_gnu_ld=$lt_save_with_gnu_ld 689906c34b88Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 690006c34b88Smrg lt_cv_path_LD=$lt_save_path_LD 690106c34b88Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 690206c34b88Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 690306c34b88Smrgfi # test "$_lt_caught_CXX_error" != yes 690421e67964Smrg 690506c34b88SmrgAC_LANG_POP 690606c34b88Smrg])# _LT_LANG_CXX_CONFIG 6907c27c18e8Smrg 6908b789ec8aSmrg 690906c34b88Smrg# _LT_FUNC_STRIPNAME_CNF 691006c34b88Smrg# ---------------------- 691106c34b88Smrg# func_stripname_cnf prefix suffix name 691206c34b88Smrg# strip PREFIX and SUFFIX off of NAME. 691306c34b88Smrg# PREFIX and SUFFIX must not contain globbing or regex special 691406c34b88Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 691506c34b88Smrg# dot (in which case that matches only a dot). 691606c34b88Smrg# 691706c34b88Smrg# This function is identical to the (non-XSI) version of func_stripname, 691806c34b88Smrg# except this one can be used by m4 code that may be executed by configure, 691906c34b88Smrg# rather than the libtool script. 692006c34b88Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 692106c34b88SmrgAC_REQUIRE([_LT_DECL_SED]) 692206c34b88SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 692306c34b88Smrgfunc_stripname_cnf () 692406c34b88Smrg{ 692506c34b88Smrg case ${2} in 692606c34b88Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 692706c34b88Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 692806c34b88Smrg esac 692906c34b88Smrg} # func_stripname_cnf 693006c34b88Smrg])# _LT_FUNC_STRIPNAME_CNF 6931b789ec8aSmrg 693206c34b88Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 693306c34b88Smrg# --------------------------------- 693406c34b88Smrg# Figure out "hidden" library dependencies from verbose 693506c34b88Smrg# compiler output when linking a shared library. 693606c34b88Smrg# Parse the compiler output and extract the necessary 693706c34b88Smrg# objects, libraries and library flags. 693806c34b88Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 693906c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 694006c34b88SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 694106c34b88Smrg# Dependencies to place before and after the object being linked: 694206c34b88Smrg_LT_TAGVAR(predep_objects, $1)= 694306c34b88Smrg_LT_TAGVAR(postdep_objects, $1)= 694406c34b88Smrg_LT_TAGVAR(predeps, $1)= 694506c34b88Smrg_LT_TAGVAR(postdeps, $1)= 694606c34b88Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6947c27c18e8Smrg 694806c34b88Smrgdnl we can't use the lt_simple_compile_test_code here, 694906c34b88Smrgdnl because it contains code intended for an executable, 695006c34b88Smrgdnl not a library. It's possible we should let each 695106c34b88Smrgdnl tag define a new lt_????_link_test_code variable, 695206c34b88Smrgdnl but it's only used here... 695306c34b88Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 695406c34b88Smrgint a; 695506c34b88Smrgvoid foo (void) { a = 0; } 695606c34b88Smrg_LT_EOF 695706c34b88Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 695806c34b88Smrgclass Foo 695906c34b88Smrg{ 696006c34b88Smrgpublic: 696106c34b88Smrg Foo (void) { a = 0; } 696206c34b88Smrgprivate: 696306c34b88Smrg int a; 696406c34b88Smrg}; 696506c34b88Smrg_LT_EOF 696606c34b88Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 696706c34b88Smrg subroutine foo 696806c34b88Smrg implicit none 696906c34b88Smrg integer*4 a 697006c34b88Smrg a=0 697106c34b88Smrg return 697206c34b88Smrg end 697306c34b88Smrg_LT_EOF 697406c34b88Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 697506c34b88Smrg subroutine foo 697606c34b88Smrg implicit none 697706c34b88Smrg integer a 697806c34b88Smrg a=0 697906c34b88Smrg return 698006c34b88Smrg end 698106c34b88Smrg_LT_EOF 698206c34b88Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 698306c34b88Smrgpublic class foo { 698406c34b88Smrg private int a; 698506c34b88Smrg public void bar (void) { 698606c34b88Smrg a = 0; 698706c34b88Smrg } 698806c34b88Smrg}; 698906c34b88Smrg_LT_EOF 699006c34b88Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 699106c34b88Smrgpackage foo 699206c34b88Smrgfunc foo() { 699306c34b88Smrg} 699406c34b88Smrg_LT_EOF 699506c34b88Smrg]) 6996c27c18e8Smrg 699706c34b88Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 699806c34b88Smrgcase "$CC $CFLAGS " in #( 699906c34b88Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 700006c34b88Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 700106c34b88Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 700206c34b88Smrgesac 7003c27c18e8Smrg 700406c34b88Smrgdnl Parse the compiler output and extract the necessary 700506c34b88Smrgdnl objects, libraries and library flags. 700606c34b88Smrgif AC_TRY_EVAL(ac_compile); then 700706c34b88Smrg # Parse the compiler output and extract the necessary 700806c34b88Smrg # objects, libraries and library flags. 7009c27c18e8Smrg 701006c34b88Smrg # Sentinel used to keep track of whether or not we are before 701106c34b88Smrg # the conftest object file. 701206c34b88Smrg pre_test_object_deps_done=no 7013c27c18e8Smrg 701406c34b88Smrg for p in `eval "$output_verbose_link_cmd"`; do 701506c34b88Smrg case ${prev}${p} in 701606c34b88Smrg 701706c34b88Smrg -L* | -R* | -l*) 701806c34b88Smrg # Some compilers place space between "-{L,R}" and the path. 701906c34b88Smrg # Remove the space. 702006c34b88Smrg if test $p = "-L" || 702106c34b88Smrg test $p = "-R"; then 702206c34b88Smrg prev=$p 702306c34b88Smrg continue 702406c34b88Smrg fi 702506c34b88Smrg 702606c34b88Smrg # Expand the sysroot to ease extracting the directories later. 702706c34b88Smrg if test -z "$prev"; then 702806c34b88Smrg case $p in 702906c34b88Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 703006c34b88Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 703106c34b88Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 703206c34b88Smrg esac 703306c34b88Smrg fi 703406c34b88Smrg case $p in 703506c34b88Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 703606c34b88Smrg esac 703706c34b88Smrg if test "$pre_test_object_deps_done" = no; then 703806c34b88Smrg case ${prev} in 703906c34b88Smrg -L | -R) 704006c34b88Smrg # Internal compiler library paths should come after those 704106c34b88Smrg # provided the user. The postdeps already come after the 704206c34b88Smrg # user supplied libs so there is no need to process them. 704306c34b88Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 704406c34b88Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 704506c34b88Smrg else 704606c34b88Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 704706c34b88Smrg fi 704806c34b88Smrg ;; 704906c34b88Smrg # The "-l" case would never come before the object being 705006c34b88Smrg # linked, so don't bother handling this case. 705106c34b88Smrg esac 705206c34b88Smrg else 705306c34b88Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 705406c34b88Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 705506c34b88Smrg else 705606c34b88Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 705706c34b88Smrg fi 705806c34b88Smrg fi 705906c34b88Smrg prev= 706006c34b88Smrg ;; 7061c27c18e8Smrg 706206c34b88Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 706306c34b88Smrg *.$objext) 706406c34b88Smrg # This assumes that the test object file only shows up 706506c34b88Smrg # once in the compiler output. 706606c34b88Smrg if test "$p" = "conftest.$objext"; then 706706c34b88Smrg pre_test_object_deps_done=yes 706806c34b88Smrg continue 706906c34b88Smrg fi 7070c27c18e8Smrg 707106c34b88Smrg if test "$pre_test_object_deps_done" = no; then 707206c34b88Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 707306c34b88Smrg _LT_TAGVAR(predep_objects, $1)="$p" 707406c34b88Smrg else 707506c34b88Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 707606c34b88Smrg fi 707706c34b88Smrg else 707806c34b88Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 707906c34b88Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 708006c34b88Smrg else 708106c34b88Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 708206c34b88Smrg fi 708306c34b88Smrg fi 708406c34b88Smrg ;; 7085c27c18e8Smrg 708606c34b88Smrg *) ;; # Ignore the rest. 7087c27c18e8Smrg 708806c34b88Smrg esac 708906c34b88Smrg done 7090c27c18e8Smrg 709106c34b88Smrg # Clean up. 709206c34b88Smrg rm -f a.out a.exe 7093b789ec8aSmrgelse 709406c34b88Smrg echo "libtool.m4: error: problem compiling $1 test program" 7095b789ec8aSmrgfi 7096c27c18e8Smrg 709706c34b88Smrg$RM -f confest.$objext 709806c34b88SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 709921e67964Smrg 710006c34b88Smrg# PORTME: override above test on systems where it is broken 710106c34b88Smrgm4_if([$1], [CXX], 710206c34b88Smrg[case $host_os in 710306c34b88Smrginterix[[3-9]]*) 710406c34b88Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 710506c34b88Smrg # hack all around it, let's just trust "g++" to DTRT. 710606c34b88Smrg _LT_TAGVAR(predep_objects,$1)= 710706c34b88Smrg _LT_TAGVAR(postdep_objects,$1)= 710806c34b88Smrg _LT_TAGVAR(postdeps,$1)= 710906c34b88Smrg ;; 711006c34b88Smrg 711106c34b88Smrglinux*) 711206c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 711306c34b88Smrg *Sun\ C*) 711406c34b88Smrg # Sun C++ 5.9 711506c34b88Smrg 711606c34b88Smrg # The more standards-conforming stlport4 library is 711706c34b88Smrg # incompatible with the Cstd library. Avoid specifying 711806c34b88Smrg # it if it's in CXXFLAGS. Ignore libCrun as 711906c34b88Smrg # -library=stlport4 depends on it. 712006c34b88Smrg case " $CXX $CXXFLAGS " in 712106c34b88Smrg *" -library=stlport4 "*) 712206c34b88Smrg solaris_use_stlport4=yes 712306c34b88Smrg ;; 7124b789ec8aSmrg esac 712506c34b88Smrg 712606c34b88Smrg if test "$solaris_use_stlport4" != yes; then 712706c34b88Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 712806c34b88Smrg fi 7129b789ec8aSmrg ;; 713006c34b88Smrg esac 713106c34b88Smrg ;; 7132b789ec8aSmrg 713306c34b88Smrgsolaris*) 713406c34b88Smrg case $cc_basename in 713506c34b88Smrg CC* | sunCC*) 713606c34b88Smrg # The more standards-conforming stlport4 library is 713706c34b88Smrg # incompatible with the Cstd library. Avoid specifying 713806c34b88Smrg # it if it's in CXXFLAGS. Ignore libCrun as 713906c34b88Smrg # -library=stlport4 depends on it. 714006c34b88Smrg case " $CXX $CXXFLAGS " in 714106c34b88Smrg *" -library=stlport4 "*) 714206c34b88Smrg solaris_use_stlport4=yes 714306c34b88Smrg ;; 7144b789ec8aSmrg esac 714506c34b88Smrg 714606c34b88Smrg # Adding this requires a known-good setup of shared libraries for 714706c34b88Smrg # Sun compiler versions before 5.6, else PIC objects from an old 714806c34b88Smrg # archive will be linked into the output, leading to subtle bugs. 714906c34b88Smrg if test "$solaris_use_stlport4" != yes; then 715006c34b88Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 715106c34b88Smrg fi 7152b789ec8aSmrg ;; 715306c34b88Smrg esac 715406c34b88Smrg ;; 7155b789ec8aSmrgesac 7156b789ec8aSmrg]) 715721e67964Smrg 715806c34b88Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 715906c34b88Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 716006c34b88Smrgesac 716106c34b88Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 716206c34b88Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 716306c34b88Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 716406c34b88Smrgfi 716506c34b88Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 716606c34b88Smrg [The directories searched by this compiler when creating a shared library]) 716706c34b88Smrg_LT_TAGDECL([], [predep_objects], [1], 716806c34b88Smrg [Dependencies to place before and after the objects being linked to 716906c34b88Smrg create a shared library]) 717006c34b88Smrg_LT_TAGDECL([], [postdep_objects], [1]) 717106c34b88Smrg_LT_TAGDECL([], [predeps], [1]) 717206c34b88Smrg_LT_TAGDECL([], [postdeps], [1]) 717306c34b88Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 717406c34b88Smrg [The library search path used internally by the compiler when linking 717506c34b88Smrg a shared library]) 717606c34b88Smrg])# _LT_SYS_HIDDEN_LIBDEPS 717721e67964Smrg 717821e67964Smrg 717906c34b88Smrg# _LT_LANG_F77_CONFIG([TAG]) 718006c34b88Smrg# -------------------------- 718106c34b88Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 718206c34b88Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 718306c34b88Smrg# to write the compiler configuration to `libtool'. 718406c34b88Smrgm4_defun([_LT_LANG_F77_CONFIG], 718506c34b88Smrg[AC_LANG_PUSH(Fortran 77) 718606c34b88Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 718706c34b88Smrg _lt_disable_F77=yes 718806c34b88Smrgfi 718921e67964Smrg 719006c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 719106c34b88Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 719206c34b88Smrg_LT_TAGVAR(always_export_symbols, $1)=no 719306c34b88Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 719406c34b88Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 719506c34b88Smrg_LT_TAGVAR(hardcode_direct, $1)=no 719606c34b88Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 719706c34b88Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 719806c34b88Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 719906c34b88Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 720006c34b88Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 720106c34b88Smrg_LT_TAGVAR(inherit_rpath, $1)=no 720206c34b88Smrg_LT_TAGVAR(module_cmds, $1)= 720306c34b88Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 720406c34b88Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 720506c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 720606c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 720706c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 720806c34b88Smrg_LT_TAGVAR(no_undefined_flag, $1)= 720906c34b88Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 721006c34b88Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 721121e67964Smrg 721206c34b88Smrg# Source file extension for f77 test sources. 721306c34b88Smrgac_ext=f 721421e67964Smrg 721506c34b88Smrg# Object file extension for compiled f77 test sources. 721606c34b88Smrgobjext=o 721706c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 721821e67964Smrg 721906c34b88Smrg# No sense in running all these tests if we already determined that 722006c34b88Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 722106c34b88Smrg# are currently assumed to apply to all compilers on this platform, 722206c34b88Smrg# and will be corrupted by setting them based on a non-working compiler. 722306c34b88Smrgif test "$_lt_disable_F77" != yes; then 722406c34b88Smrg # Code to be used in simple compile tests 722506c34b88Smrg lt_simple_compile_test_code="\ 722606c34b88Smrg subroutine t 722706c34b88Smrg return 722806c34b88Smrg end 722906c34b88Smrg" 723021e67964Smrg 723106c34b88Smrg # Code to be used in simple link tests 723206c34b88Smrg lt_simple_link_test_code="\ 723306c34b88Smrg program t 723406c34b88Smrg end 723506c34b88Smrg" 7236c27c18e8Smrg 723706c34b88Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 723806c34b88Smrg _LT_TAG_COMPILER 7239c27c18e8Smrg 724006c34b88Smrg # save warnings/boilerplate of simple test code 724106c34b88Smrg _LT_COMPILER_BOILERPLATE 724206c34b88Smrg _LT_LINKER_BOILERPLATE 724321e67964Smrg 724406c34b88Smrg # Allow CC to be a program name with arguments. 724506c34b88Smrg lt_save_CC="$CC" 724606c34b88Smrg lt_save_GCC=$GCC 724706c34b88Smrg lt_save_CFLAGS=$CFLAGS 724806c34b88Smrg CC=${F77-"f77"} 724906c34b88Smrg CFLAGS=$FFLAGS 725006c34b88Smrg compiler=$CC 725106c34b88Smrg _LT_TAGVAR(compiler, $1)=$CC 725206c34b88Smrg _LT_CC_BASENAME([$compiler]) 725306c34b88Smrg GCC=$G77 725406c34b88Smrg if test -n "$compiler"; then 725506c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 725606c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 725721e67964Smrg 725806c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 725906c34b88Smrg test "$can_build_shared" = "no" && enable_shared=no 7260c27c18e8Smrg 726106c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 726206c34b88Smrg # are all built from PIC. 726306c34b88Smrg case $host_os in 726406c34b88Smrg aix3*) 726506c34b88Smrg test "$enable_shared" = yes && enable_static=no 726606c34b88Smrg if test -n "$RANLIB"; then 726706c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 726806c34b88Smrg postinstall_cmds='$RANLIB $lib' 726906c34b88Smrg fi 727006c34b88Smrg ;; 727106c34b88Smrg aix[[4-9]]*) 727206c34b88Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 727306c34b88Smrg test "$enable_shared" = yes && enable_static=no 727406c34b88Smrg fi 727506c34b88Smrg ;; 727606c34b88Smrg esac 727706c34b88Smrg AC_MSG_RESULT([$enable_shared]) 727821e67964Smrg 727906c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 728006c34b88Smrg # Make sure either enable_shared or enable_static is yes. 728106c34b88Smrg test "$enable_shared" = yes || enable_static=yes 728206c34b88Smrg AC_MSG_RESULT([$enable_static]) 728321e67964Smrg 728406c34b88Smrg _LT_TAGVAR(GCC, $1)="$G77" 728506c34b88Smrg _LT_TAGVAR(LD, $1)="$LD" 728621e67964Smrg 728706c34b88Smrg ## CAVEAT EMPTOR: 728806c34b88Smrg ## There is no encapsulation within the following macros, do not change 728906c34b88Smrg ## the running order or otherwise move them around unless you know exactly 729006c34b88Smrg ## what you are doing... 729106c34b88Smrg _LT_COMPILER_PIC($1) 729206c34b88Smrg _LT_COMPILER_C_O($1) 729306c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 729406c34b88Smrg _LT_LINKER_SHLIBS($1) 729506c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 729606c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7297c27c18e8Smrg 729806c34b88Smrg _LT_CONFIG($1) 729906c34b88Smrg fi # test -n "$compiler" 7300c27c18e8Smrg 730106c34b88Smrg GCC=$lt_save_GCC 730206c34b88Smrg CC="$lt_save_CC" 730306c34b88Smrg CFLAGS="$lt_save_CFLAGS" 730406c34b88Smrgfi # test "$_lt_disable_F77" != yes 7305c27c18e8Smrg 730606c34b88SmrgAC_LANG_POP 730706c34b88Smrg])# _LT_LANG_F77_CONFIG 730821e67964Smrg 730921e67964Smrg 731006c34b88Smrg# _LT_LANG_FC_CONFIG([TAG]) 731106c34b88Smrg# ------------------------- 731206c34b88Smrg# Ensure that the configuration variables for a Fortran compiler are 731306c34b88Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 731406c34b88Smrg# to write the compiler configuration to `libtool'. 731506c34b88Smrgm4_defun([_LT_LANG_FC_CONFIG], 731606c34b88Smrg[AC_LANG_PUSH(Fortran) 731721e67964Smrg 731806c34b88Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 731906c34b88Smrg _lt_disable_FC=yes 732006c34b88Smrgfi 732121e67964Smrg 732206c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 732306c34b88Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 732406c34b88Smrg_LT_TAGVAR(always_export_symbols, $1)=no 732506c34b88Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 732606c34b88Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 732706c34b88Smrg_LT_TAGVAR(hardcode_direct, $1)=no 732806c34b88Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 732906c34b88Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 733006c34b88Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 733106c34b88Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 733206c34b88Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 733306c34b88Smrg_LT_TAGVAR(inherit_rpath, $1)=no 733406c34b88Smrg_LT_TAGVAR(module_cmds, $1)= 733506c34b88Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 733606c34b88Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 733706c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 733806c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 733906c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 734006c34b88Smrg_LT_TAGVAR(no_undefined_flag, $1)= 734106c34b88Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 734206c34b88Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 734321e67964Smrg 734406c34b88Smrg# Source file extension for fc test sources. 734506c34b88Smrgac_ext=${ac_fc_srcext-f} 734621e67964Smrg 734706c34b88Smrg# Object file extension for compiled fc test sources. 734806c34b88Smrgobjext=o 734906c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 735021e67964Smrg 735106c34b88Smrg# No sense in running all these tests if we already determined that 735206c34b88Smrg# the FC compiler isn't working. Some variables (like enable_shared) 735306c34b88Smrg# are currently assumed to apply to all compilers on this platform, 735406c34b88Smrg# and will be corrupted by setting them based on a non-working compiler. 735506c34b88Smrgif test "$_lt_disable_FC" != yes; then 735606c34b88Smrg # Code to be used in simple compile tests 735706c34b88Smrg lt_simple_compile_test_code="\ 735806c34b88Smrg subroutine t 735906c34b88Smrg return 736006c34b88Smrg end 736106c34b88Smrg" 736221e67964Smrg 736306c34b88Smrg # Code to be used in simple link tests 736406c34b88Smrg lt_simple_link_test_code="\ 736506c34b88Smrg program t 736606c34b88Smrg end 736706c34b88Smrg" 736821e67964Smrg 736906c34b88Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 737006c34b88Smrg _LT_TAG_COMPILER 737121e67964Smrg 737206c34b88Smrg # save warnings/boilerplate of simple test code 737306c34b88Smrg _LT_COMPILER_BOILERPLATE 737406c34b88Smrg _LT_LINKER_BOILERPLATE 737521e67964Smrg 737606c34b88Smrg # Allow CC to be a program name with arguments. 737706c34b88Smrg lt_save_CC="$CC" 737806c34b88Smrg lt_save_GCC=$GCC 737906c34b88Smrg lt_save_CFLAGS=$CFLAGS 738006c34b88Smrg CC=${FC-"f95"} 738106c34b88Smrg CFLAGS=$FCFLAGS 738206c34b88Smrg compiler=$CC 738306c34b88Smrg GCC=$ac_cv_fc_compiler_gnu 738421e67964Smrg 738506c34b88Smrg _LT_TAGVAR(compiler, $1)=$CC 738606c34b88Smrg _LT_CC_BASENAME([$compiler]) 7387c27c18e8Smrg 738806c34b88Smrg if test -n "$compiler"; then 738906c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 739006c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 739106c34b88Smrg 739206c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 739306c34b88Smrg test "$can_build_shared" = "no" && enable_shared=no 739406c34b88Smrg 739506c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 739606c34b88Smrg # are all built from PIC. 739706c34b88Smrg case $host_os in 739806c34b88Smrg aix3*) 739906c34b88Smrg test "$enable_shared" = yes && enable_static=no 740006c34b88Smrg if test -n "$RANLIB"; then 740106c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 740206c34b88Smrg postinstall_cmds='$RANLIB $lib' 740306c34b88Smrg fi 740406c34b88Smrg ;; 740506c34b88Smrg aix[[4-9]]*) 740606c34b88Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 740706c34b88Smrg test "$enable_shared" = yes && enable_static=no 7408c27c18e8Smrg fi 740906c34b88Smrg ;; 741006c34b88Smrg esac 741106c34b88Smrg AC_MSG_RESULT([$enable_shared]) 741221e67964Smrg 741306c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 741406c34b88Smrg # Make sure either enable_shared or enable_static is yes. 741506c34b88Smrg test "$enable_shared" = yes || enable_static=yes 741606c34b88Smrg AC_MSG_RESULT([$enable_static]) 741721e67964Smrg 741806c34b88Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 741906c34b88Smrg _LT_TAGVAR(LD, $1)="$LD" 742021e67964Smrg 742106c34b88Smrg ## CAVEAT EMPTOR: 742206c34b88Smrg ## There is no encapsulation within the following macros, do not change 742306c34b88Smrg ## the running order or otherwise move them around unless you know exactly 742406c34b88Smrg ## what you are doing... 742506c34b88Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 742606c34b88Smrg _LT_COMPILER_PIC($1) 742706c34b88Smrg _LT_COMPILER_C_O($1) 742806c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 742906c34b88Smrg _LT_LINKER_SHLIBS($1) 743006c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 743106c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7432c27c18e8Smrg 743306c34b88Smrg _LT_CONFIG($1) 743406c34b88Smrg fi # test -n "$compiler" 743521e67964Smrg 743606c34b88Smrg GCC=$lt_save_GCC 743706c34b88Smrg CC=$lt_save_CC 743806c34b88Smrg CFLAGS=$lt_save_CFLAGS 743906c34b88Smrgfi # test "$_lt_disable_FC" != yes 744021e67964Smrg 744106c34b88SmrgAC_LANG_POP 744206c34b88Smrg])# _LT_LANG_FC_CONFIG 744321e67964Smrg 744421e67964Smrg 744506c34b88Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 744606c34b88Smrg# -------------------------- 744706c34b88Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 744806c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 744906c34b88Smrg# to write the compiler configuration to `libtool'. 745006c34b88Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 745106c34b88Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 745206c34b88SmrgAC_LANG_SAVE 745321e67964Smrg 745406c34b88Smrg# Source file extension for Java test sources. 745506c34b88Smrgac_ext=java 745621e67964Smrg 745706c34b88Smrg# Object file extension for compiled Java test sources. 745806c34b88Smrgobjext=o 745906c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 746021e67964Smrg 746106c34b88Smrg# Code to be used in simple compile tests 746206c34b88Smrglt_simple_compile_test_code="class foo {}" 746321e67964Smrg 746406c34b88Smrg# Code to be used in simple link tests 746506c34b88Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 746621e67964Smrg 746706c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 746806c34b88Smrg_LT_TAG_COMPILER 746921e67964Smrg 747006c34b88Smrg# save warnings/boilerplate of simple test code 747106c34b88Smrg_LT_COMPILER_BOILERPLATE 747206c34b88Smrg_LT_LINKER_BOILERPLATE 747321e67964Smrg 747406c34b88Smrg# Allow CC to be a program name with arguments. 747506c34b88Smrglt_save_CC=$CC 747606c34b88Smrglt_save_CFLAGS=$CFLAGS 747706c34b88Smrglt_save_GCC=$GCC 747806c34b88SmrgGCC=yes 747906c34b88SmrgCC=${GCJ-"gcj"} 748006c34b88SmrgCFLAGS=$GCJFLAGS 748106c34b88Smrgcompiler=$CC 748206c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 748306c34b88Smrg_LT_TAGVAR(LD, $1)="$LD" 748406c34b88Smrg_LT_CC_BASENAME([$compiler]) 748521e67964Smrg 748606c34b88Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 748706c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 748821e67964Smrg 748906c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 749006c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 749106c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 749221e67964Smrg 749306c34b88Smrgif test -n "$compiler"; then 749406c34b88Smrg _LT_COMPILER_NO_RTTI($1) 749506c34b88Smrg _LT_COMPILER_PIC($1) 749606c34b88Smrg _LT_COMPILER_C_O($1) 749706c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 749806c34b88Smrg _LT_LINKER_SHLIBS($1) 749906c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 750021e67964Smrg 750106c34b88Smrg _LT_CONFIG($1) 750206c34b88Smrgfi 750321e67964Smrg 750406c34b88SmrgAC_LANG_RESTORE 750521e67964Smrg 750606c34b88SmrgGCC=$lt_save_GCC 750706c34b88SmrgCC=$lt_save_CC 750806c34b88SmrgCFLAGS=$lt_save_CFLAGS 750906c34b88Smrg])# _LT_LANG_GCJ_CONFIG 751021e67964Smrg 751121e67964Smrg 751206c34b88Smrg# _LT_LANG_GO_CONFIG([TAG]) 751306c34b88Smrg# -------------------------- 751406c34b88Smrg# Ensure that the configuration variables for the GNU Go compiler 751506c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 751606c34b88Smrg# to write the compiler configuration to `libtool'. 751706c34b88Smrgm4_defun([_LT_LANG_GO_CONFIG], 751806c34b88Smrg[AC_REQUIRE([LT_PROG_GO])dnl 751906c34b88SmrgAC_LANG_SAVE 752006c34b88Smrg 752106c34b88Smrg# Source file extension for Go test sources. 752206c34b88Smrgac_ext=go 752321e67964Smrg 752406c34b88Smrg# Object file extension for compiled Go test sources. 752506c34b88Smrgobjext=o 752606c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 752721e67964Smrg 752806c34b88Smrg# Code to be used in simple compile tests 752906c34b88Smrglt_simple_compile_test_code="package main; func main() { }" 753021e67964Smrg 753106c34b88Smrg# Code to be used in simple link tests 753206c34b88Smrglt_simple_link_test_code='package main; func main() { }' 753321e67964Smrg 753406c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 753506c34b88Smrg_LT_TAG_COMPILER 753621e67964Smrg 753706c34b88Smrg# save warnings/boilerplate of simple test code 753806c34b88Smrg_LT_COMPILER_BOILERPLATE 753906c34b88Smrg_LT_LINKER_BOILERPLATE 7540c27c18e8Smrg 754106c34b88Smrg# Allow CC to be a program name with arguments. 754206c34b88Smrglt_save_CC=$CC 754306c34b88Smrglt_save_CFLAGS=$CFLAGS 754406c34b88Smrglt_save_GCC=$GCC 754506c34b88SmrgGCC=yes 754606c34b88SmrgCC=${GOC-"gccgo"} 754706c34b88SmrgCFLAGS=$GOFLAGS 754806c34b88Smrgcompiler=$CC 754906c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 755006c34b88Smrg_LT_TAGVAR(LD, $1)="$LD" 755106c34b88Smrg_LT_CC_BASENAME([$compiler]) 755221e67964Smrg 755306c34b88Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 755406c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 755521e67964Smrg 755606c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 755706c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 755806c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 755921e67964Smrg 756006c34b88Smrgif test -n "$compiler"; then 756106c34b88Smrg _LT_COMPILER_NO_RTTI($1) 756206c34b88Smrg _LT_COMPILER_PIC($1) 756306c34b88Smrg _LT_COMPILER_C_O($1) 756406c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 756506c34b88Smrg _LT_LINKER_SHLIBS($1) 756606c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 756721e67964Smrg 756806c34b88Smrg _LT_CONFIG($1) 756906c34b88Smrgfi 757021e67964Smrg 757106c34b88SmrgAC_LANG_RESTORE 7572c27c18e8Smrg 757306c34b88SmrgGCC=$lt_save_GCC 757406c34b88SmrgCC=$lt_save_CC 757506c34b88SmrgCFLAGS=$lt_save_CFLAGS 757606c34b88Smrg])# _LT_LANG_GO_CONFIG 7577c27c18e8Smrg 7578c27c18e8Smrg 757906c34b88Smrg# _LT_LANG_RC_CONFIG([TAG]) 758006c34b88Smrg# ------------------------- 758106c34b88Smrg# Ensure that the configuration variables for the Windows resource compiler 758206c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 758306c34b88Smrg# to write the compiler configuration to `libtool'. 758406c34b88Smrgm4_defun([_LT_LANG_RC_CONFIG], 758506c34b88Smrg[AC_REQUIRE([LT_PROG_RC])dnl 758606c34b88SmrgAC_LANG_SAVE 7587c27c18e8Smrg 758806c34b88Smrg# Source file extension for RC test sources. 758906c34b88Smrgac_ext=rc 7590c27c18e8Smrg 759106c34b88Smrg# Object file extension for compiled RC test sources. 759206c34b88Smrgobjext=o 759306c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 7594c27c18e8Smrg 759506c34b88Smrg# Code to be used in simple compile tests 759606c34b88Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7597c27c18e8Smrg 759806c34b88Smrg# Code to be used in simple link tests 759906c34b88Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 7600c27c18e8Smrg 760106c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 760206c34b88Smrg_LT_TAG_COMPILER 7603c27c18e8Smrg 760406c34b88Smrg# save warnings/boilerplate of simple test code 760506c34b88Smrg_LT_COMPILER_BOILERPLATE 760606c34b88Smrg_LT_LINKER_BOILERPLATE 7607c27c18e8Smrg 760806c34b88Smrg# Allow CC to be a program name with arguments. 760906c34b88Smrglt_save_CC="$CC" 761006c34b88Smrglt_save_CFLAGS=$CFLAGS 761106c34b88Smrglt_save_GCC=$GCC 761206c34b88SmrgGCC= 761306c34b88SmrgCC=${RC-"windres"} 761406c34b88SmrgCFLAGS= 761506c34b88Smrgcompiler=$CC 761606c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 761706c34b88Smrg_LT_CC_BASENAME([$compiler]) 761806c34b88Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7619c27c18e8Smrg 762006c34b88Smrgif test -n "$compiler"; then 762106c34b88Smrg : 762206c34b88Smrg _LT_CONFIG($1) 762306c34b88Smrgfi 7624c27c18e8Smrg 762506c34b88SmrgGCC=$lt_save_GCC 762606c34b88SmrgAC_LANG_RESTORE 762706c34b88SmrgCC=$lt_save_CC 762806c34b88SmrgCFLAGS=$lt_save_CFLAGS 762906c34b88Smrg])# _LT_LANG_RC_CONFIG 7630c27c18e8Smrg 7631c27c18e8Smrg 763206c34b88Smrg# LT_PROG_GCJ 763306c34b88Smrg# ----------- 763406c34b88SmrgAC_DEFUN([LT_PROG_GCJ], 763506c34b88Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 763606c34b88Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 763706c34b88Smrg [AC_CHECK_TOOL(GCJ, gcj,) 763806c34b88Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 763906c34b88Smrg AC_SUBST(GCJFLAGS)])])[]dnl 764006c34b88Smrg]) 7641c27c18e8Smrg 764206c34b88Smrg# Old name: 764306c34b88SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 764406c34b88Smrgdnl aclocal-1.4 backwards compatibility: 764506c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 764621e67964Smrg 764721e67964Smrg 764806c34b88Smrg# LT_PROG_GO 764906c34b88Smrg# ---------- 765006c34b88SmrgAC_DEFUN([LT_PROG_GO], 765106c34b88Smrg[AC_CHECK_TOOL(GOC, gccgo,) 765206c34b88Smrg]) 7653c27c18e8Smrg 765421e67964Smrg 765506c34b88Smrg# LT_PROG_RC 765606c34b88Smrg# ---------- 765706c34b88SmrgAC_DEFUN([LT_PROG_RC], 765806c34b88Smrg[AC_CHECK_TOOL(RC, windres,) 765906c34b88Smrg]) 766021e67964Smrg 766106c34b88Smrg# Old name: 766206c34b88SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 766306c34b88Smrgdnl aclocal-1.4 backwards compatibility: 766406c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 766521e67964Smrg 766621e67964Smrg 766706c34b88Smrg# _LT_DECL_EGREP 766806c34b88Smrg# -------------- 766906c34b88Smrg# If we don't have a new enough Autoconf to choose the best grep 767006c34b88Smrg# available, choose the one first in the user's PATH. 767106c34b88Smrgm4_defun([_LT_DECL_EGREP], 767206c34b88Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 767306c34b88SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 767406c34b88Smrgtest -z "$GREP" && GREP=grep 767506c34b88Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 767606c34b88Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 767706c34b88Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 767806c34b88Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 767906c34b88SmrgAC_SUBST([GREP]) 768006c34b88Smrg]) 768121e67964Smrg 768206c34b88Smrg 768306c34b88Smrg# _LT_DECL_OBJDUMP 768406c34b88Smrg# -------------- 768506c34b88Smrg# If we don't have a new enough Autoconf to choose the best objdump 768606c34b88Smrg# available, choose the one first in the user's PATH. 768706c34b88Smrgm4_defun([_LT_DECL_OBJDUMP], 768806c34b88Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 768906c34b88Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 769006c34b88Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 769106c34b88SmrgAC_SUBST([OBJDUMP]) 769221e67964Smrg]) 769321e67964Smrg 769406c34b88Smrg# _LT_DECL_DLLTOOL 769506c34b88Smrg# ---------------- 769606c34b88Smrg# Ensure DLLTOOL variable is set. 769706c34b88Smrgm4_defun([_LT_DECL_DLLTOOL], 769806c34b88Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 769906c34b88Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 770006c34b88Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 770106c34b88SmrgAC_SUBST([DLLTOOL]) 770206c34b88Smrg]) 770321e67964Smrg 770406c34b88Smrg# _LT_DECL_SED 770506c34b88Smrg# ------------ 770606c34b88Smrg# Check for a fully-functional sed program, that truncates 770706c34b88Smrg# as few characters as possible. Prefer GNU sed if found. 770806c34b88Smrgm4_defun([_LT_DECL_SED], 770906c34b88Smrg[AC_PROG_SED 771006c34b88Smrgtest -z "$SED" && SED=sed 771106c34b88SmrgXsed="$SED -e 1s/^X//" 771206c34b88Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 771306c34b88Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 771406c34b88Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 771506c34b88Smrg])# _LT_DECL_SED 771621e67964Smrg 771706c34b88Smrgm4_ifndef([AC_PROG_SED], [ 771806c34b88Smrg# NOTE: This macro has been submitted for inclusion into # 771906c34b88Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 772006c34b88Smrg# a released version of Autoconf we should remove this # 772106c34b88Smrg# macro and use it instead. # 772221e67964Smrg 772306c34b88Smrgm4_defun([AC_PROG_SED], 772406c34b88Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 772506c34b88SmrgAC_CACHE_VAL(lt_cv_path_SED, 772606c34b88Smrg[# Loop through the user's path and test for sed and gsed. 772706c34b88Smrg# Then use that list of sed's as ones to test for truncation. 772806c34b88Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 772906c34b88Smrgfor as_dir in $PATH 773006c34b88Smrgdo 773106c34b88Smrg IFS=$as_save_IFS 773206c34b88Smrg test -z "$as_dir" && as_dir=. 773306c34b88Smrg for lt_ac_prog in sed gsed; do 773406c34b88Smrg for ac_exec_ext in '' $ac_executable_extensions; do 773506c34b88Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 773606c34b88Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 773706c34b88Smrg fi 773806c34b88Smrg done 773906c34b88Smrg done 774006c34b88Smrgdone 774106c34b88SmrgIFS=$as_save_IFS 774206c34b88Smrglt_ac_max=0 774306c34b88Smrglt_ac_count=0 774406c34b88Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 774506c34b88Smrg# along with /bin/sed that truncates output. 774606c34b88Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 774706c34b88Smrg test ! -f $lt_ac_sed && continue 774806c34b88Smrg cat /dev/null > conftest.in 774906c34b88Smrg lt_ac_count=0 775006c34b88Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 775106c34b88Smrg # Check for GNU sed and select it if it is found. 775206c34b88Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 775306c34b88Smrg lt_cv_path_SED=$lt_ac_sed 775406c34b88Smrg break 775506c34b88Smrg fi 775606c34b88Smrg while true; do 775706c34b88Smrg cat conftest.in conftest.in >conftest.tmp 775806c34b88Smrg mv conftest.tmp conftest.in 775906c34b88Smrg cp conftest.in conftest.nl 776006c34b88Smrg echo >>conftest.nl 776106c34b88Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 776206c34b88Smrg cmp -s conftest.out conftest.nl || break 776306c34b88Smrg # 10000 chars as input seems more than enough 776406c34b88Smrg test $lt_ac_count -gt 10 && break 776506c34b88Smrg lt_ac_count=`expr $lt_ac_count + 1` 776606c34b88Smrg if test $lt_ac_count -gt $lt_ac_max; then 776706c34b88Smrg lt_ac_max=$lt_ac_count 776806c34b88Smrg lt_cv_path_SED=$lt_ac_sed 776906c34b88Smrg fi 777006c34b88Smrg done 777106c34b88Smrgdone 777221e67964Smrg]) 777306c34b88SmrgSED=$lt_cv_path_SED 777406c34b88SmrgAC_SUBST([SED]) 777506c34b88SmrgAC_MSG_RESULT([$SED]) 777606c34b88Smrg])#AC_PROG_SED 777706c34b88Smrg])#m4_ifndef 7778c43cc173Smrg 777906c34b88Smrg# Old name: 778006c34b88SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 778106c34b88Smrgdnl aclocal-1.4 backwards compatibility: 778206c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7783c27c18e8Smrg 7784c27c18e8Smrg 778506c34b88Smrg# _LT_CHECK_SHELL_FEATURES 778606c34b88Smrg# ------------------------ 778706c34b88Smrg# Find out whether the shell is Bourne or XSI compatible, 778806c34b88Smrg# or has some other useful features. 778906c34b88Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 779006c34b88Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 779106c34b88Smrg# Try some XSI features 779206c34b88Smrgxsi_shell=no 779306c34b88Smrg( _lt_dummy="a/b/c" 779406c34b88Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 779506c34b88Smrg = c,a/b,b/c, \ 779606c34b88Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 779706c34b88Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 779806c34b88Smrg && xsi_shell=yes 779906c34b88SmrgAC_MSG_RESULT([$xsi_shell]) 780006c34b88Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7801c27c18e8Smrg 780206c34b88SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 780306c34b88Smrglt_shell_append=no 780406c34b88Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 780506c34b88Smrg >/dev/null 2>&1 \ 780606c34b88Smrg && lt_shell_append=yes 780706c34b88SmrgAC_MSG_RESULT([$lt_shell_append]) 780806c34b88Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7809c27c18e8Smrg 781006c34b88Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 781106c34b88Smrg lt_unset=unset 781206c34b88Smrgelse 781306c34b88Smrg lt_unset=false 781406c34b88Smrgfi 781506c34b88Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 781606c34b88Smrg 781706c34b88Smrg# test EBCDIC or ASCII 781806c34b88Smrgcase `echo X|tr X '\101'` in 781906c34b88Smrg A) # ASCII based system 782006c34b88Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 782106c34b88Smrg lt_SP2NL='tr \040 \012' 782206c34b88Smrg lt_NL2SP='tr \015\012 \040\040' 782306c34b88Smrg ;; 782406c34b88Smrg *) # EBCDIC based system 782506c34b88Smrg lt_SP2NL='tr \100 \n' 782606c34b88Smrg lt_NL2SP='tr \r\n \100\100' 782706c34b88Smrg ;; 782806c34b88Smrgesac 782906c34b88Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 783006c34b88Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 783106c34b88Smrg])# _LT_CHECK_SHELL_FEATURES 783206c34b88Smrg 783306c34b88Smrg 783406c34b88Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 783506c34b88Smrg# ------------------------------------------------------ 783606c34b88Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 783706c34b88Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 783806c34b88Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 783906c34b88Smrg[dnl { 784006c34b88Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 784106c34b88Smrg$1 ()\ 784206c34b88Smrg{\ 784306c34b88Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 784406c34b88Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 784506c34b88Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 784606c34b88Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 784706c34b88Smrgtest 0 -eq $? || _lt_function_replace_fail=: 784806c34b88Smrg]) 7849c27c18e8Smrg 7850c43cc173Smrg 785106c34b88Smrg# _LT_PROG_REPLACE_SHELLFNS 785206c34b88Smrg# ------------------------- 785306c34b88Smrg# Replace existing portable implementations of several shell functions with 785406c34b88Smrg# equivalent extended shell implementations where those features are available.. 785506c34b88Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 785606c34b88Smrg[if test x"$xsi_shell" = xyes; then 785706c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 785806c34b88Smrg case ${1} in 785906c34b88Smrg */*) func_dirname_result="${1%/*}${2}" ;; 786006c34b88Smrg * ) func_dirname_result="${3}" ;; 786106c34b88Smrg esac]) 786237eb1ca1Smrg 786306c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 786406c34b88Smrg func_basename_result="${1##*/}"]) 7865c43cc173Smrg 786606c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 786706c34b88Smrg case ${1} in 786806c34b88Smrg */*) func_dirname_result="${1%/*}${2}" ;; 786906c34b88Smrg * ) func_dirname_result="${3}" ;; 787006c34b88Smrg esac 787106c34b88Smrg func_basename_result="${1##*/}"]) 7872c43cc173Smrg 787306c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 787406c34b88Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 787506c34b88Smrg # positional parameters, so assign one to ordinary parameter first. 787606c34b88Smrg func_stripname_result=${3} 787706c34b88Smrg func_stripname_result=${func_stripname_result#"${1}"} 787806c34b88Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 7879c43cc173Smrg 788006c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 788106c34b88Smrg func_split_long_opt_name=${1%%=*} 788206c34b88Smrg func_split_long_opt_arg=${1#*=}]) 7883c43cc173Smrg 788406c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 788506c34b88Smrg func_split_short_opt_arg=${1#??} 788606c34b88Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7887c43cc173Smrg 788806c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 788906c34b88Smrg case ${1} in 789006c34b88Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 789106c34b88Smrg *) func_lo2o_result=${1} ;; 789206c34b88Smrg esac]) 7893c43cc173Smrg 789406c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7895c43cc173Smrg 789606c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7897c43cc173Smrg 789806c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 789906c34b88Smrgfi 7900c43cc173Smrg 790106c34b88Smrgif test x"$lt_shell_append" = xyes; then 790206c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7903c43cc173Smrg 790406c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 790506c34b88Smrg func_quote_for_eval "${2}" 790606c34b88Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 790706c34b88Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7908c43cc173Smrg 790906c34b88Smrg # Save a `func_append' function call where possible by direct use of '+=' 791006c34b88Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 791106c34b88Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 791206c34b88Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 791306c34b88Smrg test 0 -eq $? || _lt_function_replace_fail=: 791406c34b88Smrgelse 791506c34b88Smrg # Save a `func_append' function call even when '+=' is not available 791606c34b88Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 791706c34b88Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 791806c34b88Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 791906c34b88Smrg test 0 -eq $? || _lt_function_replace_fail=: 792006c34b88Smrgfi 7921c43cc173Smrg 792206c34b88Smrgif test x"$_lt_function_replace_fail" = x":"; then 792306c34b88Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 792406c34b88Smrgfi 792506c34b88Smrg]) 7926c43cc173Smrg 792706c34b88Smrg# _LT_PATH_CONVERSION_FUNCTIONS 792806c34b88Smrg# ----------------------------- 792906c34b88Smrg# Determine which file name conversion functions should be used by 793006c34b88Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 793106c34b88Smrg# for certain cross-compile configurations and native mingw. 793206c34b88Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 793306c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 793406c34b88SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 793506c34b88SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 793606c34b88SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 793706c34b88Smrg[case $host in 793806c34b88Smrg *-*-mingw* ) 793906c34b88Smrg case $build in 794006c34b88Smrg *-*-mingw* ) # actually msys 794106c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 794206c34b88Smrg ;; 794306c34b88Smrg *-*-cygwin* ) 794406c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 794506c34b88Smrg ;; 794606c34b88Smrg * ) # otherwise, assume *nix 794706c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 794806c34b88Smrg ;; 794906c34b88Smrg esac 795006c34b88Smrg ;; 795106c34b88Smrg *-*-cygwin* ) 795206c34b88Smrg case $build in 795306c34b88Smrg *-*-mingw* ) # actually msys 795406c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 795506c34b88Smrg ;; 795606c34b88Smrg *-*-cygwin* ) 795706c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 795806c34b88Smrg ;; 795906c34b88Smrg * ) # otherwise, assume *nix 796006c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 796106c34b88Smrg ;; 796206c34b88Smrg esac 796306c34b88Smrg ;; 796406c34b88Smrg * ) # unhandled hosts (and "normal" native builds) 796506c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 796606c34b88Smrg ;; 796706c34b88Smrgesac 796806c34b88Smrg]) 796906c34b88Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 797006c34b88SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 797106c34b88Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 797206c34b88Smrg [0], [convert $build file names to $host format])dnl 797306c34b88Smrg 797406c34b88SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 797506c34b88SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 797606c34b88Smrg[#assume ordinary cross tools, or native build. 797706c34b88Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 797806c34b88Smrgcase $host in 797906c34b88Smrg *-*-mingw* ) 798006c34b88Smrg case $build in 798106c34b88Smrg *-*-mingw* ) # actually msys 798206c34b88Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 798306c34b88Smrg ;; 798406c34b88Smrg esac 798506c34b88Smrg ;; 798606c34b88Smrgesac 798706c34b88Smrg]) 798806c34b88Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 798906c34b88SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 799006c34b88Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 799106c34b88Smrg [0], [convert $build files to toolchain format])dnl 799206c34b88Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 7993c43cc173Smrg 799406c34b88Smrg# Helper functions for option handling. -*- Autoconf -*- 799506c34b88Smrg# 799606c34b88Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 799706c34b88Smrg# Inc. 799806c34b88Smrg# Written by Gary V. Vaughan, 2004 799906c34b88Smrg# 800006c34b88Smrg# This file is free software; the Free Software Foundation gives 800106c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 800206c34b88Smrg# modifications, as long as this notice is preserved. 8003c43cc173Smrg 800406c34b88Smrg# serial 7 ltoptions.m4 8005c43cc173Smrg 800606c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 800706c34b88SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8008f1ee322dSmrg 8009f1ee322dSmrg 801006c34b88Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 801106c34b88Smrg# ------------------------------------------ 801206c34b88Smrgm4_define([_LT_MANGLE_OPTION], 801306c34b88Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 801489069ce9Smrg 8015c43cc173Smrg 801606c34b88Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 801706c34b88Smrg# --------------------------------------- 801806c34b88Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 801906c34b88Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 802006c34b88Smrg# saved as a flag. 802106c34b88Smrgm4_define([_LT_SET_OPTION], 802206c34b88Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 802306c34b88Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 802406c34b88Smrg _LT_MANGLE_DEFUN([$1], [$2]), 802506c34b88Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 802606c34b88Smrg]) 8027c43cc173Smrg 8028c43cc173Smrg 802906c34b88Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 803006c34b88Smrg# ------------------------------------------------------------ 803106c34b88Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 803206c34b88Smrgm4_define([_LT_IF_OPTION], 803306c34b88Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8034c43cc173Smrg 8035c27c18e8Smrg 803606c34b88Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 803706c34b88Smrg# ------------------------------------------------------- 803806c34b88Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 803906c34b88Smrg# are set. 804006c34b88Smrgm4_define([_LT_UNLESS_OPTIONS], 804106c34b88Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 804206c34b88Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 804306c34b88Smrg [m4_define([$0_found])])])[]dnl 804406c34b88Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 804506c34b88Smrg])[]dnl 804606c34b88Smrg]) 804721e67964Smrg 804821e67964Smrg 804906c34b88Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 805006c34b88Smrg# ---------------------------------------- 805106c34b88Smrg# OPTION-LIST is a space-separated list of Libtool options associated 805206c34b88Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 805306c34b88Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 805406c34b88Smrg# the unknown option and exit. 805506c34b88Smrgm4_defun([_LT_SET_OPTIONS], 805606c34b88Smrg[# Set options 805706c34b88Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 805806c34b88Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 805921e67964Smrg 806006c34b88Smrgm4_if([$1],[LT_INIT],[ 806106c34b88Smrg dnl 806206c34b88Smrg dnl Simply set some default values (i.e off) if boolean options were not 806306c34b88Smrg dnl specified: 806406c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 806506c34b88Smrg ]) 806606c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 806706c34b88Smrg ]) 806806c34b88Smrg dnl 806906c34b88Smrg dnl If no reference was made to various pairs of opposing options, then 807006c34b88Smrg dnl we run the default mode handler for the pair. For example, if neither 807106c34b88Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 807206c34b88Smrg dnl archives by default: 807306c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 807406c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 807506c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 807606c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 807706c34b88Smrg [_LT_ENABLE_FAST_INSTALL]) 807806c34b88Smrg ]) 807906c34b88Smrg])# _LT_SET_OPTIONS 8080c43cc173Smrg 8081c43cc173Smrg 8082c43cc173Smrg 808306c34b88Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 808406c34b88Smrg# ----------------------------------------- 808506c34b88Smrgm4_define([_LT_MANGLE_DEFUN], 808606c34b88Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8087c43cc173Smrg 8088c43cc173Smrg 808906c34b88Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 809006c34b88Smrg# ----------------------------------------------- 809106c34b88Smrgm4_define([LT_OPTION_DEFINE], 809206c34b88Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 809306c34b88Smrg])# LT_OPTION_DEFINE 8094c43cc173Smrg 8095c43cc173Smrg 809606c34b88Smrg# dlopen 809706c34b88Smrg# ------ 809806c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 809906c34b88Smrg]) 8100c43cc173Smrg 810106c34b88SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 810206c34b88Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 810306c34b88SmrgAC_DIAGNOSE([obsolete], 810406c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 810506c34b88Smrgput the `dlopen' option into LT_INIT's first parameter.]) 810606c34b88Smrg]) 8107c43cc173Smrg 810806c34b88Smrgdnl aclocal-1.4 backwards compatibility: 810906c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8110c43cc173Smrg 8111c43cc173Smrg 811206c34b88Smrg# win32-dll 811306c34b88Smrg# --------- 811406c34b88Smrg# Declare package support for building win32 dll's. 811506c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 811606c34b88Smrg[enable_win32_dll=yes 8117c43cc173Smrg 811806c34b88Smrgcase $host in 811906c34b88Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 812006c34b88Smrg AC_CHECK_TOOL(AS, as, false) 812106c34b88Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 812206c34b88Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 812306c34b88Smrg ;; 812406c34b88Smrgesac 8125c27c18e8Smrg 812606c34b88Smrgtest -z "$AS" && AS=as 812706c34b88Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 812889069ce9Smrg 812906c34b88Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 813006c34b88Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 813189069ce9Smrg 813206c34b88Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 813306c34b88Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 813406c34b88Smrg])# win32-dll 8135c43cc173Smrg 813606c34b88SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 813706c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 813806c34b88Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 813906c34b88SmrgAC_DIAGNOSE([obsolete], 814006c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 814106c34b88Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 814206c34b88Smrg]) 8143c43cc173Smrg 814406c34b88Smrgdnl aclocal-1.4 backwards compatibility: 814506c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8146c43cc173Smrg 8147c43cc173Smrg 814806c34b88Smrg# _LT_ENABLE_SHARED([DEFAULT]) 814906c34b88Smrg# ---------------------------- 815006c34b88Smrg# implement the --enable-shared flag, and supports the `shared' and 815106c34b88Smrg# `disable-shared' LT_INIT options. 815206c34b88Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 815306c34b88Smrgm4_define([_LT_ENABLE_SHARED], 815406c34b88Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 815506c34b88SmrgAC_ARG_ENABLE([shared], 815606c34b88Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 815706c34b88Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 815806c34b88Smrg [p=${PACKAGE-default} 815906c34b88Smrg case $enableval in 816006c34b88Smrg yes) enable_shared=yes ;; 816106c34b88Smrg no) enable_shared=no ;; 816206c34b88Smrg *) 816306c34b88Smrg enable_shared=no 816406c34b88Smrg # Look at the argument we got. We use all the common list separators. 816506c34b88Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 816606c34b88Smrg for pkg in $enableval; do 816706c34b88Smrg IFS="$lt_save_ifs" 816806c34b88Smrg if test "X$pkg" = "X$p"; then 816906c34b88Smrg enable_shared=yes 817006c34b88Smrg fi 817106c34b88Smrg done 817206c34b88Smrg IFS="$lt_save_ifs" 817306c34b88Smrg ;; 817406c34b88Smrg esac], 817506c34b88Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8176c43cc173Smrg 817706c34b88Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 817806c34b88Smrg [Whether or not to build shared libraries]) 817906c34b88Smrg])# _LT_ENABLE_SHARED 8180c43cc173Smrg 818106c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 818206c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8183c43cc173Smrg 818406c34b88Smrg# Old names: 818506c34b88SmrgAC_DEFUN([AC_ENABLE_SHARED], 818606c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 818706c34b88Smrg]) 8188c43cc173Smrg 818906c34b88SmrgAC_DEFUN([AC_DISABLE_SHARED], 819006c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 819106c34b88Smrg]) 8192c43cc173Smrg 819306c34b88SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 819406c34b88SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8195c43cc173Smrg 819606c34b88Smrgdnl aclocal-1.4 backwards compatibility: 819706c34b88Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 819806c34b88Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8199c43cc173Smrg 8200c43cc173Smrg 8201c27c18e8Smrg 820206c34b88Smrg# _LT_ENABLE_STATIC([DEFAULT]) 820306c34b88Smrg# ---------------------------- 820406c34b88Smrg# implement the --enable-static flag, and support the `static' and 820506c34b88Smrg# `disable-static' LT_INIT options. 820606c34b88Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 820706c34b88Smrgm4_define([_LT_ENABLE_STATIC], 820806c34b88Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 820906c34b88SmrgAC_ARG_ENABLE([static], 821006c34b88Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 821106c34b88Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 821206c34b88Smrg [p=${PACKAGE-default} 821306c34b88Smrg case $enableval in 821406c34b88Smrg yes) enable_static=yes ;; 821506c34b88Smrg no) enable_static=no ;; 821606c34b88Smrg *) 821706c34b88Smrg enable_static=no 821806c34b88Smrg # Look at the argument we got. We use all the common list separators. 821906c34b88Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 822006c34b88Smrg for pkg in $enableval; do 822106c34b88Smrg IFS="$lt_save_ifs" 822206c34b88Smrg if test "X$pkg" = "X$p"; then 822306c34b88Smrg enable_static=yes 822406c34b88Smrg fi 822506c34b88Smrg done 822606c34b88Smrg IFS="$lt_save_ifs" 822706c34b88Smrg ;; 822806c34b88Smrg esac], 822906c34b88Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 823089069ce9Smrg 823106c34b88Smrg _LT_DECL([build_old_libs], [enable_static], [0], 823206c34b88Smrg [Whether or not to build static libraries]) 823306c34b88Smrg])# _LT_ENABLE_STATIC 8234c43cc173Smrg 823506c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 823606c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 823789069ce9Smrg 823806c34b88Smrg# Old names: 823906c34b88SmrgAC_DEFUN([AC_ENABLE_STATIC], 824006c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 824106c34b88Smrg]) 8242c43cc173Smrg 824306c34b88SmrgAC_DEFUN([AC_DISABLE_STATIC], 824406c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 824506c34b88Smrg]) 8246c27c18e8Smrg 824706c34b88SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 824806c34b88SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8249c43cc173Smrg 825006c34b88Smrgdnl aclocal-1.4 backwards compatibility: 825106c34b88Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 825206c34b88Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8253c27c18e8Smrg 8254c43cc173Smrg 8255b789ec8aSmrg 825606c34b88Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 825706c34b88Smrg# ---------------------------------- 825806c34b88Smrg# implement the --enable-fast-install flag, and support the `fast-install' 825906c34b88Smrg# and `disable-fast-install' LT_INIT options. 826006c34b88Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 826106c34b88Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 826206c34b88Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 826306c34b88SmrgAC_ARG_ENABLE([fast-install], 826406c34b88Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 826506c34b88Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 826606c34b88Smrg [p=${PACKAGE-default} 826706c34b88Smrg case $enableval in 826806c34b88Smrg yes) enable_fast_install=yes ;; 826906c34b88Smrg no) enable_fast_install=no ;; 827006c34b88Smrg *) 827106c34b88Smrg enable_fast_install=no 827206c34b88Smrg # Look at the argument we got. We use all the common list separators. 827306c34b88Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 827406c34b88Smrg for pkg in $enableval; do 827506c34b88Smrg IFS="$lt_save_ifs" 827606c34b88Smrg if test "X$pkg" = "X$p"; then 827706c34b88Smrg enable_fast_install=yes 827806c34b88Smrg fi 827906c34b88Smrg done 828006c34b88Smrg IFS="$lt_save_ifs" 828106c34b88Smrg ;; 828206c34b88Smrg esac], 828306c34b88Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 828489069ce9Smrg 828506c34b88Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 828606c34b88Smrg [Whether or not to optimize for fast installation])dnl 828706c34b88Smrg])# _LT_ENABLE_FAST_INSTALL 828889069ce9Smrg 828906c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 829006c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8291f1ee322dSmrg 829206c34b88Smrg# Old names: 829306c34b88SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 829406c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 829506c34b88SmrgAC_DIAGNOSE([obsolete], 829606c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 829706c34b88Smrgthe `fast-install' option into LT_INIT's first parameter.]) 829806c34b88Smrg]) 8299f1ee322dSmrg 830006c34b88SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 830106c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 830206c34b88SmrgAC_DIAGNOSE([obsolete], 830306c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 830406c34b88Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 830506c34b88Smrg]) 830689069ce9Smrg 830706c34b88Smrgdnl aclocal-1.4 backwards compatibility: 830806c34b88Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 830906c34b88Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 831089069ce9Smrg 8311c43cc173Smrg 831206c34b88Smrg# _LT_WITH_PIC([MODE]) 831306c34b88Smrg# -------------------- 831406c34b88Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 831506c34b88Smrg# LT_INIT options. 831606c34b88Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 831706c34b88Smrgm4_define([_LT_WITH_PIC], 831806c34b88Smrg[AC_ARG_WITH([pic], 831906c34b88Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 832006c34b88Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 832106c34b88Smrg [lt_p=${PACKAGE-default} 832206c34b88Smrg case $withval in 832306c34b88Smrg yes|no) pic_mode=$withval ;; 832406c34b88Smrg *) 832506c34b88Smrg pic_mode=default 832606c34b88Smrg # Look at the argument we got. We use all the common list separators. 832706c34b88Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 832806c34b88Smrg for lt_pkg in $withval; do 832906c34b88Smrg IFS="$lt_save_ifs" 833006c34b88Smrg if test "X$lt_pkg" = "X$lt_p"; then 833106c34b88Smrg pic_mode=yes 833206c34b88Smrg fi 833306c34b88Smrg done 833406c34b88Smrg IFS="$lt_save_ifs" 833506c34b88Smrg ;; 833606c34b88Smrg esac], 833706c34b88Smrg [pic_mode=default]) 833889069ce9Smrg 833906c34b88Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8340c43cc173Smrg 834106c34b88Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 834206c34b88Smrg])# _LT_WITH_PIC 834337eb1ca1Smrg 834406c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 834506c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 834689069ce9Smrg 834706c34b88Smrg# Old name: 834806c34b88SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 834906c34b88Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 835006c34b88SmrgAC_DIAGNOSE([obsolete], 835106c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 835206c34b88Smrgput the `pic-only' option into LT_INIT's first parameter.]) 835306c34b88Smrg]) 835489069ce9Smrg 835506c34b88Smrgdnl aclocal-1.4 backwards compatibility: 835606c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 835789069ce9Smrg 835889069ce9Smrg 835906c34b88Smrgm4_define([_LTDL_MODE], []) 836006c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 836106c34b88Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 836206c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 836306c34b88Smrg [m4_define([_LTDL_MODE], [recursive])]) 836406c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 836506c34b88Smrg [m4_define([_LTDL_MODE], [subproject])]) 836606c34b88Smrg 836706c34b88Smrgm4_define([_LTDL_TYPE], []) 836806c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 836906c34b88Smrg [m4_define([_LTDL_TYPE], [installable])]) 837006c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 837106c34b88Smrg [m4_define([_LTDL_TYPE], [convenience])]) 837206c34b88Smrg 837306c34b88Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8374b789ec8aSmrg# 837506c34b88Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 837606c34b88Smrg# Written by Gary V. Vaughan, 2004 8377b789ec8aSmrg# 837806c34b88Smrg# This file is free software; the Free Software Foundation gives 837906c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 838006c34b88Smrg# modifications, as long as this notice is preserved. 838189069ce9Smrg 838206c34b88Smrg# serial 6 ltsugar.m4 8383f1ee322dSmrg 838406c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 838506c34b88SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 838689069ce9Smrg 838706c34b88Smrg 838806c34b88Smrg# lt_join(SEP, ARG1, [ARG2...]) 838906c34b88Smrg# ----------------------------- 839006c34b88Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 839106c34b88Smrg# associated separator. 839206c34b88Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 839306c34b88Smrg# versions in m4sugar had bugs. 839406c34b88Smrgm4_define([lt_join], 839506c34b88Smrg[m4_if([$#], [1], [], 839606c34b88Smrg [$#], [2], [[$2]], 839706c34b88Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 839806c34b88Smrgm4_define([_lt_join], 839906c34b88Smrg[m4_if([$#$2], [2], [], 840006c34b88Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 840106c34b88Smrg 840206c34b88Smrg 840306c34b88Smrg# lt_car(LIST) 840406c34b88Smrg# lt_cdr(LIST) 840506c34b88Smrg# ------------ 840606c34b88Smrg# Manipulate m4 lists. 840706c34b88Smrg# These macros are necessary as long as will still need to support 840806c34b88Smrg# Autoconf-2.59 which quotes differently. 840906c34b88Smrgm4_define([lt_car], [[$1]]) 841006c34b88Smrgm4_define([lt_cdr], 841106c34b88Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 841206c34b88Smrg [$#], 1, [], 841306c34b88Smrg [m4_dquote(m4_shift($@))])]) 841406c34b88Smrgm4_define([lt_unquote], $1) 841506c34b88Smrg 841606c34b88Smrg 841706c34b88Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 841806c34b88Smrg# ------------------------------------------ 841906c34b88Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 842006c34b88Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 842106c34b88Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 842206c34b88Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 842306c34b88Smrg# than defined and empty). 8424b789ec8aSmrg# 842506c34b88Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 842606c34b88Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 842706c34b88Smrgm4_define([lt_append], 842806c34b88Smrg[m4_define([$1], 842906c34b88Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 843006c34b88Smrg 843106c34b88Smrg 843206c34b88Smrg 843306c34b88Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 843406c34b88Smrg# ---------------------------------------------------------- 843506c34b88Smrg# Produce a SEP delimited list of all paired combinations of elements of 843606c34b88Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 843706c34b88Smrg# has the form PREFIXmINFIXSUFFIXn. 843806c34b88Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 843906c34b88Smrgm4_define([lt_combine], 844006c34b88Smrg[m4_if(m4_eval([$# > 3]), [1], 844106c34b88Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 844206c34b88Smrg[[m4_foreach([_Lt_prefix], [$2], 844306c34b88Smrg [m4_foreach([_Lt_suffix], 844406c34b88Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 844506c34b88Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 844606c34b88Smrg 844706c34b88Smrg 844806c34b88Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 844906c34b88Smrg# ----------------------------------------------------------------------- 845006c34b88Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 845106c34b88Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 845206c34b88Smrgm4_define([lt_if_append_uniq], 845306c34b88Smrg[m4_ifdef([$1], 845406c34b88Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 845506c34b88Smrg [lt_append([$1], [$2], [$3])$4], 845606c34b88Smrg [$5])], 845706c34b88Smrg [lt_append([$1], [$2], [$3])$4])]) 845806c34b88Smrg 845906c34b88Smrg 846006c34b88Smrg# lt_dict_add(DICT, KEY, VALUE) 846106c34b88Smrg# ----------------------------- 846206c34b88Smrgm4_define([lt_dict_add], 846306c34b88Smrg[m4_define([$1($2)], [$3])]) 846406c34b88Smrg 846506c34b88Smrg 846606c34b88Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 846706c34b88Smrg# -------------------------------------------- 846806c34b88Smrgm4_define([lt_dict_add_subkey], 846906c34b88Smrg[m4_define([$1($2:$3)], [$4])]) 847006c34b88Smrg 847106c34b88Smrg 847206c34b88Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 847306c34b88Smrg# ---------------------------------- 847406c34b88Smrgm4_define([lt_dict_fetch], 847506c34b88Smrg[m4_ifval([$3], 847606c34b88Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 847706c34b88Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8478c43cc173Smrg 8479c43cc173Smrg 848006c34b88Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 848106c34b88Smrg# ----------------------------------------------------------------- 848206c34b88Smrgm4_define([lt_if_dict_fetch], 848306c34b88Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 848406c34b88Smrg [$5], 848506c34b88Smrg [$6])]) 848606c34b88Smrg 848706c34b88Smrg 848806c34b88Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 848906c34b88Smrg# -------------------------------------------------------------- 849006c34b88Smrgm4_define([lt_dict_filter], 849106c34b88Smrg[m4_if([$5], [], [], 849206c34b88Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 849306c34b88Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 849406c34b88Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 849506c34b88Smrg]) 849606c34b88Smrg 849706c34b88Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8498b789ec8aSmrg# 849906c34b88Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 850006c34b88Smrg# Written by Scott James Remnant, 2004 8501b789ec8aSmrg# 850206c34b88Smrg# This file is free software; the Free Software Foundation gives 850306c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 850406c34b88Smrg# modifications, as long as this notice is preserved. 850506c34b88Smrg 850606c34b88Smrg# @configure_input@ 850706c34b88Smrg 850806c34b88Smrg# serial 3337 ltversion.m4 850906c34b88Smrg# This file is part of GNU Libtool 851006c34b88Smrg 851106c34b88Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 851206c34b88Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 851306c34b88Smrg 851406c34b88SmrgAC_DEFUN([LTVERSION_VERSION], 851506c34b88Smrg[macro_version='2.4.2' 851606c34b88Smrgmacro_revision='1.3337' 851706c34b88Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 851806c34b88Smrg_LT_DECL(, macro_revision, 0) 851906c34b88Smrg]) 852006c34b88Smrg 852106c34b88Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8522b789ec8aSmrg# 852306c34b88Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 852406c34b88Smrg# Written by Scott James Remnant, 2004. 852506c34b88Smrg# 852606c34b88Smrg# This file is free software; the Free Software Foundation gives 852706c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 852806c34b88Smrg# modifications, as long as this notice is preserved. 8529b789ec8aSmrg 853006c34b88Smrg# serial 5 lt~obsolete.m4 853106c34b88Smrg 853206c34b88Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8533b789ec8aSmrg# 853406c34b88Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 853506c34b88Smrg# which have later been changed to m4_define as they aren't part of the 853606c34b88Smrg# exported API, or moved to Autoconf or Automake where they belong. 8537b789ec8aSmrg# 853806c34b88Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 853906c34b88Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 854006c34b88Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 854106c34b88Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 854206c34b88Smrg# and doesn't know about Autoconf macros at all.) 8543b789ec8aSmrg# 854406c34b88Smrg# So we provide this file, which has a silly filename so it's always 854506c34b88Smrg# included after everything else. This provides aclocal with the 854606c34b88Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 854706c34b88Smrg# because those macros already exist, or will be overwritten later. 854806c34b88Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 854906c34b88Smrg# 855006c34b88Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 855106c34b88Smrg# Yes, that means every name once taken will need to remain here until 855206c34b88Smrg# we give up compatibility with versions before 1.7, at which point 855306c34b88Smrg# we need to keep only those names which we still refer to. 8554b789ec8aSmrg 855506c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 855606c34b88SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 855706c34b88Smrg 855806c34b88Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 855906c34b88Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 856006c34b88Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 856106c34b88Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 856206c34b88Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 856306c34b88Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 856406c34b88Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 856506c34b88Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 856606c34b88Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 856706c34b88Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 856806c34b88Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 856906c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 857006c34b88Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 857106c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 857206c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 857306c34b88Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 857406c34b88Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 857506c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 857606c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 857706c34b88Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 857806c34b88Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 857906c34b88Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 858006c34b88Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 858106c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 858206c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 858306c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 858406c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 858506c34b88Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 858606c34b88Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 858706c34b88Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 858806c34b88Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 858906c34b88Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 859006c34b88Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 859106c34b88Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 859206c34b88Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 859306c34b88Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 859406c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 859506c34b88Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 859606c34b88Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 859706c34b88Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 859806c34b88Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 859906c34b88Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 860006c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 860106c34b88Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 860206c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 860306c34b88Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 860406c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 860506c34b88Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 860606c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 860706c34b88Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 860806c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 860906c34b88Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 861006c34b88Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 861106c34b88Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 861206c34b88Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 861306c34b88Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 861406c34b88Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 861506c34b88Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 861606c34b88Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 861706c34b88Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 861806c34b88Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 861906c34b88Smrg 862006c34b88Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 862106c34b88Smrg# serial 1 (pkg-config-0.24) 862206c34b88Smrg# 862306c34b88Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8624b789ec8aSmrg# 862506c34b88Smrg# This program is free software; you can redistribute it and/or modify 862606c34b88Smrg# it under the terms of the GNU General Public License as published by 862706c34b88Smrg# the Free Software Foundation; either version 2 of the License, or 862806c34b88Smrg# (at your option) any later version. 8629b789ec8aSmrg# 863006c34b88Smrg# This program is distributed in the hope that it will be useful, but 863106c34b88Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 863206c34b88Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 863306c34b88Smrg# General Public License for more details. 8634b789ec8aSmrg# 863506c34b88Smrg# You should have received a copy of the GNU General Public License 863606c34b88Smrg# along with this program; if not, write to the Free Software 863706c34b88Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 863806c34b88Smrg# 863906c34b88Smrg# As a special exception to the GNU General Public License, if you 864006c34b88Smrg# distribute this file as part of a program that contains a 864106c34b88Smrg# configuration script generated by Autoconf, you may include it under 864206c34b88Smrg# the same distribution terms that you use for the rest of that program. 864306c34b88Smrg 864406c34b88Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 864506c34b88Smrg# ---------------------------------- 864606c34b88SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 864706c34b88Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8648dc9477beSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 8649dc9477beSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 865006c34b88SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 865106c34b88SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 865206c34b88SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 865306c34b88Smrg 865406c34b88Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 865506c34b88Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 865606c34b88Smrgfi 865706c34b88Smrgif test -n "$PKG_CONFIG"; then 865806c34b88Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 865906c34b88Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 866006c34b88Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 866106c34b88Smrg AC_MSG_RESULT([yes]) 866206c34b88Smrg else 866306c34b88Smrg AC_MSG_RESULT([no]) 866406c34b88Smrg PKG_CONFIG="" 866506c34b88Smrg fi 866606c34b88Smrgfi[]dnl 866706c34b88Smrg])# PKG_PROG_PKG_CONFIG 8668b789ec8aSmrg 866906c34b88Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8670b789ec8aSmrg# 867106c34b88Smrg# Check to see whether a particular set of modules exists. Similar 867206c34b88Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8673b789ec8aSmrg# 867406c34b88Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 867506c34b88Smrg# only at the first occurence in configure.ac, so if the first place 867606c34b88Smrg# it's called might be skipped (such as if it is within an "if", you 867706c34b88Smrg# have to call PKG_CHECK_EXISTS manually 867806c34b88Smrg# -------------------------------------------------------------- 867906c34b88SmrgAC_DEFUN([PKG_CHECK_EXISTS], 868006c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 868106c34b88Smrgif test -n "$PKG_CONFIG" && \ 868206c34b88Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 868306c34b88Smrg m4_default([$2], [:]) 868406c34b88Smrgm4_ifvaln([$3], [else 868506c34b88Smrg $3])dnl 868606c34b88Smrgfi]) 8687b789ec8aSmrg 868806c34b88Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 868906c34b88Smrg# --------------------------------------------- 869006c34b88Smrgm4_define([_PKG_CONFIG], 869106c34b88Smrg[if test -n "$$1"; then 869206c34b88Smrg pkg_cv_[]$1="$$1" 869306c34b88Smrg elif test -n "$PKG_CONFIG"; then 869406c34b88Smrg PKG_CHECK_EXISTS([$3], 8695dc9477beSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 8696dc9477beSmrg test "x$?" != "x0" && pkg_failed=yes ], 869706c34b88Smrg [pkg_failed=yes]) 869806c34b88Smrg else 869906c34b88Smrg pkg_failed=untried 870006c34b88Smrgfi[]dnl 870106c34b88Smrg])# _PKG_CONFIG 870206c34b88Smrg 870306c34b88Smrg# _PKG_SHORT_ERRORS_SUPPORTED 870406c34b88Smrg# ----------------------------- 870506c34b88SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 870606c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 870706c34b88Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 870806c34b88Smrg _pkg_short_errors_supported=yes 870906c34b88Smrgelse 871006c34b88Smrg _pkg_short_errors_supported=no 871106c34b88Smrgfi[]dnl 871206c34b88Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 871306c34b88Smrg 871406c34b88Smrg 871506c34b88Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 871606c34b88Smrg# [ACTION-IF-NOT-FOUND]) 8717f1ee322dSmrg# 8718f1ee322dSmrg# 871906c34b88Smrg# Note that if there is a possibility the first call to 872006c34b88Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 872106c34b88Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8722f1ee322dSmrg# 8723f1ee322dSmrg# 872406c34b88Smrg# -------------------------------------------------------------- 872506c34b88SmrgAC_DEFUN([PKG_CHECK_MODULES], 872606c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 872706c34b88SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 872806c34b88SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8729f1ee322dSmrg 873006c34b88Smrgpkg_failed=no 873106c34b88SmrgAC_MSG_CHECKING([for $1]) 873206c34b88Smrg 873306c34b88Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 873406c34b88Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 873506c34b88Smrg 873606c34b88Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 873706c34b88Smrgand $1[]_LIBS to avoid the need to call pkg-config. 873806c34b88SmrgSee the pkg-config man page for more details.]) 873906c34b88Smrg 874006c34b88Smrgif test $pkg_failed = yes; then 874106c34b88Smrg AC_MSG_RESULT([no]) 874206c34b88Smrg _PKG_SHORT_ERRORS_SUPPORTED 874306c34b88Smrg if test $_pkg_short_errors_supported = yes; then 8744dc9477beSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 874506c34b88Smrg else 8746dc9477beSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 874706c34b88Smrg fi 874806c34b88Smrg # Put the nasty error message in config.log where it belongs 874906c34b88Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 875006c34b88Smrg 875106c34b88Smrg m4_default([$4], [AC_MSG_ERROR( 875206c34b88Smrg[Package requirements ($2) were not met: 875306c34b88Smrg 875406c34b88Smrg$$1_PKG_ERRORS 875506c34b88Smrg 875606c34b88SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 875706c34b88Smrginstalled software in a non-standard prefix. 875806c34b88Smrg 8759dc9477beSmrg_PKG_TEXT])[]dnl 876006c34b88Smrg ]) 876106c34b88Smrgelif test $pkg_failed = untried; then 876206c34b88Smrg AC_MSG_RESULT([no]) 876306c34b88Smrg m4_default([$4], [AC_MSG_FAILURE( 876406c34b88Smrg[The pkg-config script could not be found or is too old. Make sure it 876506c34b88Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 876606c34b88Smrgpath to pkg-config. 876706c34b88Smrg 876806c34b88Smrg_PKG_TEXT 876906c34b88Smrg 8770dc9477beSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 877106c34b88Smrg ]) 877206c34b88Smrgelse 877306c34b88Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 877406c34b88Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 877506c34b88Smrg AC_MSG_RESULT([yes]) 877606c34b88Smrg $3 877706c34b88Smrgfi[]dnl 877806c34b88Smrg])# PKG_CHECK_MODULES 877906c34b88Smrg 8780dc9477beSmrg 8781dc9477beSmrg# PKG_INSTALLDIR(DIRECTORY) 8782dc9477beSmrg# ------------------------- 8783dc9477beSmrg# Substitutes the variable pkgconfigdir as the location where a module 8784dc9477beSmrg# should install pkg-config .pc files. By default the directory is 8785dc9477beSmrg# $libdir/pkgconfig, but the default can be changed by passing 8786dc9477beSmrg# DIRECTORY. The user can override through the --with-pkgconfigdir 8787dc9477beSmrg# parameter. 8788dc9477beSmrgAC_DEFUN([PKG_INSTALLDIR], 8789dc9477beSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 8790dc9477beSmrgm4_pushdef([pkg_description], 8791dc9477beSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 8792dc9477beSmrgAC_ARG_WITH([pkgconfigdir], 8793dc9477beSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 8794dc9477beSmrg [with_pkgconfigdir=]pkg_default) 8795dc9477beSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 8796dc9477beSmrgm4_popdef([pkg_default]) 8797dc9477beSmrgm4_popdef([pkg_description]) 8798dc9477beSmrg]) dnl PKG_INSTALLDIR 8799dc9477beSmrg 8800dc9477beSmrg 8801dc9477beSmrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 8802dc9477beSmrg# ------------------------- 8803dc9477beSmrg# Substitutes the variable noarch_pkgconfigdir as the location where a 8804dc9477beSmrg# module should install arch-independent pkg-config .pc files. By 8805dc9477beSmrg# default the directory is $datadir/pkgconfig, but the default can be 8806dc9477beSmrg# changed by passing DIRECTORY. The user can override through the 8807dc9477beSmrg# --with-noarch-pkgconfigdir parameter. 8808dc9477beSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 8809dc9477beSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 8810dc9477beSmrgm4_pushdef([pkg_description], 8811dc9477beSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 8812dc9477beSmrgAC_ARG_WITH([noarch-pkgconfigdir], 8813dc9477beSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 8814dc9477beSmrg [with_noarch_pkgconfigdir=]pkg_default) 8815dc9477beSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 8816dc9477beSmrgm4_popdef([pkg_default]) 8817dc9477beSmrgm4_popdef([pkg_description]) 8818dc9477beSmrg]) dnl PKG_NOARCH_INSTALLDIR 8819dc9477beSmrg 8820dc9477beSmrg 8821dc9477beSmrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 8822dc9477beSmrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8823dc9477beSmrg# ------------------------------------------- 8824dc9477beSmrg# Retrieves the value of the pkg-config variable for the given module. 8825dc9477beSmrgAC_DEFUN([PKG_CHECK_VAR], 8826dc9477beSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8827dc9477beSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 8828dc9477beSmrg 8829dc9477beSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 8830dc9477beSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 8831dc9477beSmrg 8832dc9477beSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 8833dc9477beSmrg])# PKG_CHECK_VAR 8834dc9477beSmrg 883506c34b88Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 883606c34b88Smrgdnl 883706c34b88Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 883806c34b88Smrgdnl 883906c34b88Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 884006c34b88Smrgdnl copy of this software and associated documentation files (the "Software"), 884106c34b88Smrgdnl to deal in the Software without restriction, including without limitation 884206c34b88Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 884306c34b88Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 884406c34b88Smrgdnl Software is furnished to do so, subject to the following conditions: 884506c34b88Smrgdnl 884606c34b88Smrgdnl The above copyright notice and this permission notice (including the next 884706c34b88Smrgdnl paragraph) shall be included in all copies or substantial portions of the 884806c34b88Smrgdnl Software. 884906c34b88Smrgdnl 885006c34b88Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 885106c34b88Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 885206c34b88Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 885306c34b88Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 885406c34b88Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 885506c34b88Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 885606c34b88Smrgdnl DEALINGS IN THE SOFTWARE. 885706c34b88Smrg 885806c34b88Smrg# XORG_MACROS_VERSION(required-version) 885906c34b88Smrg# ------------------------------------- 886006c34b88Smrg# Minimum version: 1.1.0 8861b789ec8aSmrg# 886206c34b88Smrg# If you're using a macro added in Version 1.1 or newer, include this in 886306c34b88Smrg# your configure.ac with the minimum required version, such as: 886406c34b88Smrg# XORG_MACROS_VERSION(1.1) 8865b789ec8aSmrg# 886606c34b88Smrg# To ensure that this macro is defined, also add: 886706c34b88Smrg# m4_ifndef([XORG_MACROS_VERSION], 886806c34b88Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8869b789ec8aSmrg# 8870f1ee322dSmrg# 887106c34b88Smrg# See the "minimum version" comment for each macro you use to see what 887206c34b88Smrg# version you require. 887306c34b88Smrgm4_defun([XORG_MACROS_VERSION],[ 887406c34b88Smrgm4_define([vers_have], [1.17]) 887506c34b88Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 887606c34b88Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 887706c34b88Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 887806c34b88Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 887906c34b88Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 888006c34b88Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 888106c34b88Smrgm4_undefine([vers_have]) 888206c34b88Smrgm4_undefine([maj_have]) 888306c34b88Smrgm4_undefine([maj_needed]) 888406c34b88Smrg]) # XORG_MACROS_VERSION 888506c34b88Smrg 888606c34b88Smrg# XORG_PROG_RAWCPP() 888706c34b88Smrg# ------------------ 888806c34b88Smrg# Minimum version: 1.0.0 888906c34b88Smrg# 889006c34b88Smrg# Find cpp program and necessary flags for use in pre-processing text files 889106c34b88Smrg# such as man pages and config files 889206c34b88SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 889306c34b88SmrgAC_REQUIRE([AC_PROG_CPP]) 889406c34b88SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 889506c34b88Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 889606c34b88Smrg 889706c34b88Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 889806c34b88Smrg# which is not the best choice for supporting other OS'es, but covers most 889906c34b88Smrg# of the ones we need for now. 890006c34b88SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 890106c34b88SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 890206c34b88Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 890306c34b88Smrg AC_MSG_RESULT([no]) 890406c34b88Smrgelse 890506c34b88Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 890606c34b88Smrg RAWCPPFLAGS=-undef 890706c34b88Smrg AC_MSG_RESULT([yes]) 890806c34b88Smrg # under Cygwin unix is still defined even with -undef 890906c34b88Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 891006c34b88Smrg RAWCPPFLAGS="-undef -ansi" 891106c34b88Smrg AC_MSG_RESULT([yes, with -ansi]) 891206c34b88Smrg else 891306c34b88Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 891406c34b88Smrg fi 891506c34b88Smrgfi 891606c34b88Smrgrm -f conftest.$ac_ext 891706c34b88Smrg 891806c34b88SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 891906c34b88SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 892006c34b88Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 892106c34b88Smrg AC_MSG_RESULT([no]) 892206c34b88Smrgelse 892306c34b88Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 892406c34b88Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 892506c34b88Smrg AC_MSG_RESULT([yes]) 892606c34b88Smrg else 892706c34b88Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 892806c34b88Smrg fi 892906c34b88Smrgfi 893006c34b88Smrgrm -f conftest.$ac_ext 893106c34b88SmrgAC_SUBST(RAWCPPFLAGS) 893206c34b88Smrg]) # XORG_PROG_RAWCPP 893306c34b88Smrg 893406c34b88Smrg# XORG_MANPAGE_SECTIONS() 893506c34b88Smrg# ----------------------- 893606c34b88Smrg# Minimum version: 1.0.0 8937b789ec8aSmrg# 893806c34b88Smrg# Determine which sections man pages go in for the different man page types 893906c34b88Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 894006c34b88Smrg# Not sure if there's any better way than just hardcoding by OS name. 894106c34b88Smrg# Override default settings by setting environment variables 894206c34b88Smrg# Added MAN_SUBSTS in version 1.8 894306c34b88Smrg# Added AC_PROG_SED in version 1.8 8944b789ec8aSmrg 894506c34b88SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 894606c34b88SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 894706c34b88SmrgAC_REQUIRE([AC_PROG_SED]) 894806c34b88Smrg 894906c34b88Smrgif test x$APP_MAN_SUFFIX = x ; then 895006c34b88Smrg APP_MAN_SUFFIX=1 895106c34b88Smrgfi 895206c34b88Smrgif test x$APP_MAN_DIR = x ; then 895306c34b88Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8954b789ec8aSmrgfi 8955c43cc173Smrg 895606c34b88Smrgif test x$LIB_MAN_SUFFIX = x ; then 895706c34b88Smrg LIB_MAN_SUFFIX=3 895806c34b88Smrgfi 895906c34b88Smrgif test x$LIB_MAN_DIR = x ; then 896006c34b88Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8961b789ec8aSmrgfi 8962c43cc173Smrg 896306c34b88Smrgif test x$FILE_MAN_SUFFIX = x ; then 896406c34b88Smrg case $host_os in 896506c34b88Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 896606c34b88Smrg *) FILE_MAN_SUFFIX=5 ;; 896706c34b88Smrg esac 896806c34b88Smrgfi 896906c34b88Smrgif test x$FILE_MAN_DIR = x ; then 897006c34b88Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8971b789ec8aSmrgfi 897237eb1ca1Smrg 897306c34b88Smrgif test x$MISC_MAN_SUFFIX = x ; then 897406c34b88Smrg case $host_os in 897506c34b88Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 897606c34b88Smrg *) MISC_MAN_SUFFIX=7 ;; 897706c34b88Smrg esac 897806c34b88Smrgfi 897906c34b88Smrgif test x$MISC_MAN_DIR = x ; then 898006c34b88Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8981b789ec8aSmrgfi 8982b789ec8aSmrg 898306c34b88Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 898406c34b88Smrg case $host_os in 898506c34b88Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 898606c34b88Smrg *) DRIVER_MAN_SUFFIX=4 ;; 898706c34b88Smrg esac 898806c34b88Smrgfi 898906c34b88Smrgif test x$DRIVER_MAN_DIR = x ; then 899006c34b88Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 899106c34b88Smrgfi 8992b789ec8aSmrg 899306c34b88Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 899406c34b88Smrg case $host_os in 899506c34b88Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 899606c34b88Smrg *) ADMIN_MAN_SUFFIX=8 ;; 899706c34b88Smrg esac 899806c34b88Smrgfi 899906c34b88Smrgif test x$ADMIN_MAN_DIR = x ; then 900006c34b88Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9001b789ec8aSmrgfi 9002c43cc173Smrg 900306c34b88Smrg 900406c34b88SmrgAC_SUBST([APP_MAN_SUFFIX]) 900506c34b88SmrgAC_SUBST([LIB_MAN_SUFFIX]) 900606c34b88SmrgAC_SUBST([FILE_MAN_SUFFIX]) 900706c34b88SmrgAC_SUBST([MISC_MAN_SUFFIX]) 900806c34b88SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 900906c34b88SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 901006c34b88SmrgAC_SUBST([APP_MAN_DIR]) 901106c34b88SmrgAC_SUBST([LIB_MAN_DIR]) 901206c34b88SmrgAC_SUBST([FILE_MAN_DIR]) 901306c34b88SmrgAC_SUBST([MISC_MAN_DIR]) 901406c34b88SmrgAC_SUBST([DRIVER_MAN_DIR]) 901506c34b88SmrgAC_SUBST([ADMIN_MAN_DIR]) 901606c34b88Smrg 901706c34b88SmrgXORG_MAN_PAGE="X Version 11" 901806c34b88SmrgAC_SUBST([XORG_MAN_PAGE]) 901906c34b88SmrgMAN_SUBSTS="\ 902006c34b88Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 902106c34b88Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 902206c34b88Smrg -e 's|__xservername__|Xorg|g' \ 902306c34b88Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 902406c34b88Smrg -e 's|__projectroot__|\$(prefix)|g' \ 902506c34b88Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 902606c34b88Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 902706c34b88Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 902806c34b88Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 902906c34b88Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 903006c34b88Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 903106c34b88Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 903206c34b88SmrgAC_SUBST([MAN_SUBSTS]) 903306c34b88Smrg 903406c34b88Smrg]) # XORG_MANPAGE_SECTIONS 903506c34b88Smrg 903606c34b88Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 903706c34b88Smrg# ------------------------ 903806c34b88Smrg# Minimum version: 1.7.0 9039b789ec8aSmrg# 904006c34b88Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 904106c34b88Smrg# provided by xorg-sgml-doctools, if installed. 904206c34b88SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 904306c34b88SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 904406c34b88SmrgXORG_SGML_PATH= 904506c34b88SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 904606c34b88Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 904706c34b88Smrg [m4_ifval([$1],[:], 904806c34b88Smrg [if test x"$cross_compiling" != x"yes" ; then 904906c34b88Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 905006c34b88Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 905106c34b88Smrg fi]) 905206c34b88Smrg ]) 905306c34b88Smrg 905406c34b88Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 905506c34b88Smrg# the path and the name of the doc stylesheet 905606c34b88Smrgif test "x$XORG_SGML_PATH" != "x" ; then 905706c34b88Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 905806c34b88Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 905906c34b88Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9060b789ec8aSmrgelse 906106c34b88Smrg AC_MSG_RESULT([no]) 9062b789ec8aSmrgfi 9063b789ec8aSmrg 906406c34b88SmrgAC_SUBST(XORG_SGML_PATH) 906506c34b88SmrgAC_SUBST(STYLESHEET_SRCDIR) 906606c34b88SmrgAC_SUBST(XSL_STYLESHEET) 906706c34b88SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 906806c34b88Smrg]) # XORG_CHECK_SGML_DOCTOOLS 906906c34b88Smrg 907006c34b88Smrg# XORG_CHECK_LINUXDOC 907106c34b88Smrg# ------------------- 907206c34b88Smrg# Minimum version: 1.0.0 9073f1ee322dSmrg# 907406c34b88Smrg# Defines the variable MAKE_TEXT if the necessary tools and 907506c34b88Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 907606c34b88Smrg# Whether or not the necessary tools and files are found can be checked 907706c34b88Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 907806c34b88SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 907906c34b88SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 908006c34b88SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9081f1ee322dSmrg 908206c34b88SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9083f1ee322dSmrg 908406c34b88SmrgAC_MSG_CHECKING([whether to build documentation]) 9085f1ee322dSmrg 908606c34b88Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 908706c34b88Smrg BUILDDOC=yes 908806c34b88Smrgelse 908906c34b88Smrg BUILDDOC=no 9090f1ee322dSmrgfi 9091f1ee322dSmrg 909206c34b88SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9093f1ee322dSmrg 909406c34b88SmrgAC_MSG_RESULT([$BUILDDOC]) 9095c43cc173Smrg 909606c34b88SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9097c43cc173Smrg 909806c34b88Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 909906c34b88Smrg BUILDPDFDOC=yes 910089069ce9Smrgelse 910106c34b88Smrg BUILDPDFDOC=no 910221e67964Smrgfi 9103c43cc173Smrg 910406c34b88SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9105b789ec8aSmrg 910606c34b88SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9107c43cc173Smrg 910806c34b88SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 910906c34b88SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 911006c34b88SmrgMAKE_PDF="$PS2PDF" 911106c34b88SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9112c43cc173Smrg 911306c34b88SmrgAC_SUBST(MAKE_TEXT) 911406c34b88SmrgAC_SUBST(MAKE_PS) 911506c34b88SmrgAC_SUBST(MAKE_PDF) 911606c34b88SmrgAC_SUBST(MAKE_HTML) 911706c34b88Smrg]) # XORG_CHECK_LINUXDOC 91183e256790Smrg 911906c34b88Smrg# XORG_CHECK_DOCBOOK 912006c34b88Smrg# ------------------- 912106c34b88Smrg# Minimum version: 1.0.0 912206c34b88Smrg# 912306c34b88Smrg# Checks for the ability to build output formats from SGML DocBook source. 912406c34b88Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 912506c34b88Smrg# indicates whether the necessary tools and files are found and, if set, 912606c34b88Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 912706c34b88SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 912806c34b88SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 91293e256790Smrg 913006c34b88SmrgBUILDTXTDOC=no 913106c34b88SmrgBUILDPDFDOC=no 913206c34b88SmrgBUILDPSDOC=no 913306c34b88SmrgBUILDHTMLDOC=no 9134c43cc173Smrg 913506c34b88SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 913606c34b88SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 913706c34b88SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 913806c34b88SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9139c43cc173Smrg 914006c34b88SmrgAC_MSG_CHECKING([whether to build text documentation]) 914106c34b88Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 914206c34b88Smrg test x$BUILD_TXTDOC != xno; then 914306c34b88Smrg BUILDTXTDOC=yes 914406c34b88Smrgfi 914506c34b88SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 914606c34b88SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 914721e67964Smrg 914806c34b88SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 914906c34b88Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 915006c34b88Smrg test x$BUILD_PDFDOC != xno; then 915106c34b88Smrg BUILDPDFDOC=yes 915206c34b88Smrgfi 915306c34b88SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 915406c34b88SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9155c43cc173Smrg 915606c34b88SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 915706c34b88Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 915806c34b88Smrg test x$BUILD_PSDOC != xno; then 915906c34b88Smrg BUILDPSDOC=yes 916006c34b88Smrgfi 916106c34b88SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 916206c34b88SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9163c43cc173Smrg 916406c34b88SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 916506c34b88Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 916606c34b88Smrg test x$BUILD_HTMLDOC != xno; then 916706c34b88Smrg BUILDHTMLDOC=yes 9168b789ec8aSmrgfi 916906c34b88SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 917006c34b88SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9171c43cc173Smrg 917206c34b88SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 917306c34b88SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 917406c34b88SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 917506c34b88SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9176c43cc173Smrg 917706c34b88SmrgAC_SUBST(MAKE_TEXT) 917806c34b88SmrgAC_SUBST(MAKE_PS) 917906c34b88SmrgAC_SUBST(MAKE_PDF) 918006c34b88SmrgAC_SUBST(MAKE_HTML) 918106c34b88Smrg]) # XORG_CHECK_DOCBOOK 918221e67964Smrg 918306c34b88Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 918406c34b88Smrg# ---------------- 918506c34b88Smrg# Minimum version: 1.5.0 918606c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9187f1ee322dSmrg# 918806c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 918906c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 919006c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 919106c34b88Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 919206c34b88Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 919306c34b88Smrg# --with-xmlto assumes 'auto'. 9194f1ee322dSmrg# 919506c34b88Smrg# Interface to module: 919606c34b88Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 919706c34b88Smrg# XMLTO: returns the path of the xmlto program found 919806c34b88Smrg# returns the path set by the user in the environment 919906c34b88Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 920006c34b88Smrg# 'no' user instructs the module not to use xmlto 9201f1ee322dSmrg# 920206c34b88Smrg# Added in version 1.10.0 920306c34b88Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 920406c34b88Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9205f1ee322dSmrg# 920606c34b88Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9207f1ee322dSmrg# 920806c34b88SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 920906c34b88SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 921006c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 921106c34b88SmrgAC_ARG_WITH(xmlto, 921206c34b88Smrg AS_HELP_STRING([--with-xmlto], 921306c34b88Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 921406c34b88Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 921506c34b88Smrgm4_undefine([_defopt]) 9216f1ee322dSmrg 921706c34b88Smrgif test "x$use_xmlto" = x"auto"; then 921806c34b88Smrg AC_PATH_PROG([XMLTO], [xmlto]) 921906c34b88Smrg if test "x$XMLTO" = "x"; then 922006c34b88Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 922106c34b88Smrg have_xmlto=no 922206c34b88Smrg else 922306c34b88Smrg have_xmlto=yes 922406c34b88Smrg fi 922506c34b88Smrgelif test "x$use_xmlto" = x"yes" ; then 922606c34b88Smrg AC_PATH_PROG([XMLTO], [xmlto]) 922706c34b88Smrg if test "x$XMLTO" = "x"; then 922806c34b88Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 922906c34b88Smrg fi 923006c34b88Smrg have_xmlto=yes 923106c34b88Smrgelif test "x$use_xmlto" = x"no" ; then 923206c34b88Smrg if test "x$XMLTO" != "x"; then 923306c34b88Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 923406c34b88Smrg fi 923506c34b88Smrg have_xmlto=no 923606c34b88Smrgelse 923706c34b88Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9238f1ee322dSmrgfi 9239f1ee322dSmrg 924006c34b88Smrg# Test for a minimum version of xmlto, if provided. 924106c34b88Smrgm4_ifval([$1], 924206c34b88Smrg[if test "$have_xmlto" = yes; then 924306c34b88Smrg # scrape the xmlto version 924406c34b88Smrg AC_MSG_CHECKING([the xmlto version]) 924506c34b88Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 924606c34b88Smrg AC_MSG_RESULT([$xmlto_version]) 924706c34b88Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 924806c34b88Smrg [if test "x$use_xmlto" = xauto; then 924906c34b88Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 925006c34b88Smrg have_xmlto=no 925106c34b88Smrg else 925206c34b88Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 925306c34b88Smrg fi]) 925406c34b88Smrgfi]) 9255f1ee322dSmrg 925606c34b88Smrg# Test for the ability of xmlto to generate a text target 925706c34b88Smrghave_xmlto_text=no 925806c34b88Smrgcat > conftest.xml << "EOF" 925906c34b88SmrgEOF 926006c34b88SmrgAS_IF([test "$have_xmlto" = yes], 926106c34b88Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 926206c34b88Smrg [have_xmlto_text=yes], 926306c34b88Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 926406c34b88Smrgrm -f conftest.xml 926506c34b88SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 926606c34b88SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 926706c34b88Smrg]) # XORG_WITH_XMLTO 9268f1ee322dSmrg 926906c34b88Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 927006c34b88Smrg# -------------------------------------------- 927106c34b88Smrg# Minimum version: 1.12.0 927206c34b88Smrg# Minimum version for optional DEFAULT argument: 1.12.0 927306c34b88Smrg# 927406c34b88Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 927506c34b88Smrg# XML-based language used for the transformation of XML documents. 927606c34b88Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 927706c34b88Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 927806c34b88Smrg# The XSLT processor is often used as a standalone tool for transformations. 927906c34b88Smrg# It should not be assumed that this tool is used only to work with documnetation. 928006c34b88Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 928106c34b88Smrg# 928206c34b88Smrg# Interface to module: 928306c34b88Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 928406c34b88Smrg# XSLTPROC: returns the path of the xsltproc program found 928506c34b88Smrg# returns the path set by the user in the environment 928606c34b88Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 928706c34b88Smrg# 'no' user instructs the module not to use xsltproc 928806c34b88Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 928906c34b88Smrg# 929006c34b88Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 929106c34b88Smrg# 929206c34b88SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 929306c34b88SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 929406c34b88Smrg# Preserves the interface, should it be implemented later 929506c34b88Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 929606c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 929706c34b88SmrgAC_ARG_WITH(xsltproc, 929806c34b88Smrg AS_HELP_STRING([--with-xsltproc], 929906c34b88Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 930006c34b88Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 930106c34b88Smrgm4_undefine([_defopt]) 9302f1ee322dSmrg 930306c34b88Smrgif test "x$use_xsltproc" = x"auto"; then 930406c34b88Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 930506c34b88Smrg if test "x$XSLTPROC" = "x"; then 930606c34b88Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 930706c34b88Smrg have_xsltproc=no 930806c34b88Smrg else 930906c34b88Smrg have_xsltproc=yes 931006c34b88Smrg fi 931106c34b88Smrgelif test "x$use_xsltproc" = x"yes" ; then 931206c34b88Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 931306c34b88Smrg if test "x$XSLTPROC" = "x"; then 931406c34b88Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 931506c34b88Smrg fi 931606c34b88Smrg have_xsltproc=yes 931706c34b88Smrgelif test "x$use_xsltproc" = x"no" ; then 931806c34b88Smrg if test "x$XSLTPROC" != "x"; then 931906c34b88Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 932006c34b88Smrg fi 932106c34b88Smrg have_xsltproc=no 932206c34b88Smrgelse 932306c34b88Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 932406c34b88Smrgfi 9325f1ee322dSmrg 932606c34b88SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 932706c34b88Smrg]) # XORG_WITH_XSLTPROC 932806c34b88Smrg 932906c34b88Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 933006c34b88Smrg# ---------------------------------------- 933106c34b88Smrg# Minimum version: 1.15.0 9332f1ee322dSmrg# 933306c34b88Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 933406c34b88Smrg# scanning arbitrary text files, extracting information from those text files, 933506c34b88Smrg# and printing reports based on that information. 9336f1ee322dSmrg# 933706c34b88Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9338f1ee322dSmrg# 933906c34b88Smrg# Interface to module: 934006c34b88Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 934106c34b88Smrg# PERL: returns the path of the perl program found 934206c34b88Smrg# returns the path set by the user in the environment 934306c34b88Smrg# --with-perl: 'yes' user instructs the module to use perl 934406c34b88Smrg# 'no' user instructs the module not to use perl 934506c34b88Smrg# have_perl: returns yes if perl found in PATH or no 934606c34b88Smrg# 934706c34b88Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 934806c34b88Smrg# 934906c34b88SmrgAC_DEFUN([XORG_WITH_PERL],[ 935006c34b88SmrgAC_ARG_VAR([PERL], [Path to perl command]) 935106c34b88Smrg# Preserves the interface, should it be implemented later 935206c34b88Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 935306c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 935406c34b88SmrgAC_ARG_WITH(perl, 935506c34b88Smrg AS_HELP_STRING([--with-perl], 935606c34b88Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 935706c34b88Smrg [use_perl=$withval], [use_perl=]_defopt) 935806c34b88Smrgm4_undefine([_defopt]) 9359f1ee322dSmrg 936006c34b88Smrgif test "x$use_perl" = x"auto"; then 936106c34b88Smrg AC_PATH_PROG([PERL], [perl]) 936206c34b88Smrg if test "x$PERL" = "x"; then 936306c34b88Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 936406c34b88Smrg have_perl=no 936506c34b88Smrg else 936606c34b88Smrg have_perl=yes 936706c34b88Smrg fi 936806c34b88Smrgelif test "x$use_perl" = x"yes" ; then 936906c34b88Smrg AC_PATH_PROG([PERL], [perl]) 937006c34b88Smrg if test "x$PERL" = "x"; then 937106c34b88Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 937206c34b88Smrg fi 937306c34b88Smrg have_perl=yes 937406c34b88Smrgelif test "x$use_perl" = x"no" ; then 937506c34b88Smrg if test "x$PERL" != "x"; then 937606c34b88Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 937706c34b88Smrg fi 937806c34b88Smrg have_perl=no 9379f1ee322dSmrgelse 938006c34b88Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9381f1ee322dSmrgfi 9382f1ee322dSmrg 938306c34b88SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 938406c34b88Smrg]) # XORG_WITH_PERL 9385f1ee322dSmrg 938606c34b88Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 938706c34b88Smrg# ---------------- 938806c34b88Smrg# Minimum version: 1.5.0 938906c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 939006c34b88Smrg# 939106c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 939206c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 939306c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 939406c34b88Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 939506c34b88Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 939606c34b88Smrg# --with-asciidoc assumes 'auto'. 939706c34b88Smrg# 939806c34b88Smrg# Interface to module: 939906c34b88Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 940006c34b88Smrg# ASCIIDOC: returns the path of the asciidoc program found 940106c34b88Smrg# returns the path set by the user in the environment 940206c34b88Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 940306c34b88Smrg# 'no' user instructs the module not to use asciidoc 940406c34b88Smrg# 940506c34b88Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 940606c34b88Smrg# 940706c34b88SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 940806c34b88SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 940906c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 941006c34b88SmrgAC_ARG_WITH(asciidoc, 941106c34b88Smrg AS_HELP_STRING([--with-asciidoc], 941206c34b88Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 941306c34b88Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 941406c34b88Smrgm4_undefine([_defopt]) 9415f1ee322dSmrg 941606c34b88Smrgif test "x$use_asciidoc" = x"auto"; then 941706c34b88Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 941806c34b88Smrg if test "x$ASCIIDOC" = "x"; then 941906c34b88Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 942006c34b88Smrg have_asciidoc=no 942106c34b88Smrg else 942206c34b88Smrg have_asciidoc=yes 942306c34b88Smrg fi 942406c34b88Smrgelif test "x$use_asciidoc" = x"yes" ; then 942506c34b88Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 942606c34b88Smrg if test "x$ASCIIDOC" = "x"; then 942706c34b88Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 942806c34b88Smrg fi 942906c34b88Smrg have_asciidoc=yes 943006c34b88Smrgelif test "x$use_asciidoc" = x"no" ; then 943106c34b88Smrg if test "x$ASCIIDOC" != "x"; then 943206c34b88Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 943306c34b88Smrg fi 943406c34b88Smrg have_asciidoc=no 9435f1ee322dSmrgelse 943606c34b88Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9437f1ee322dSmrgfi 943806c34b88Smrgm4_ifval([$1], 943906c34b88Smrg[if test "$have_asciidoc" = yes; then 944006c34b88Smrg # scrape the asciidoc version 944106c34b88Smrg AC_MSG_CHECKING([the asciidoc version]) 944206c34b88Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 944306c34b88Smrg AC_MSG_RESULT([$asciidoc_version]) 944406c34b88Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 944506c34b88Smrg [if test "x$use_asciidoc" = xauto; then 944606c34b88Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 944706c34b88Smrg have_asciidoc=no 944806c34b88Smrg else 944906c34b88Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 945006c34b88Smrg fi]) 945106c34b88Smrgfi]) 945206c34b88SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 945306c34b88Smrg]) # XORG_WITH_ASCIIDOC 9454f1ee322dSmrg 945506c34b88Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 945606c34b88Smrg# -------------------------------- 945706c34b88Smrg# Minimum version: 1.5.0 945806c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 945906c34b88Smrg# 946006c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 946106c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 946206c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 946306c34b88Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 946406c34b88Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 946506c34b88Smrg# --with-doxygen assumes 'auto'. 946606c34b88Smrg# 946706c34b88Smrg# Interface to module: 946806c34b88Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 946906c34b88Smrg# DOXYGEN: returns the path of the doxygen program found 947006c34b88Smrg# returns the path set by the user in the environment 947106c34b88Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 947206c34b88Smrg# 'no' user instructs the module not to use doxygen 947306c34b88Smrg# 947406c34b88Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 947506c34b88Smrg# 947606c34b88SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 947706c34b88SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 947806c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 947906c34b88SmrgAC_ARG_WITH(doxygen, 948006c34b88Smrg AS_HELP_STRING([--with-doxygen], 948106c34b88Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 948206c34b88Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 948306c34b88Smrgm4_undefine([_defopt]) 948406c34b88Smrg 948506c34b88Smrgif test "x$use_doxygen" = x"auto"; then 948606c34b88Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 948706c34b88Smrg if test "x$DOXYGEN" = "x"; then 948806c34b88Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 948906c34b88Smrg have_doxygen=no 949006c34b88Smrg else 949106c34b88Smrg have_doxygen=yes 949206c34b88Smrg fi 949306c34b88Smrgelif test "x$use_doxygen" = x"yes" ; then 949406c34b88Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 949506c34b88Smrg if test "x$DOXYGEN" = "x"; then 949606c34b88Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 949706c34b88Smrg fi 949806c34b88Smrg have_doxygen=yes 949906c34b88Smrgelif test "x$use_doxygen" = x"no" ; then 950006c34b88Smrg if test "x$DOXYGEN" != "x"; then 950106c34b88Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 950206c34b88Smrg fi 950306c34b88Smrg have_doxygen=no 950406c34b88Smrgelse 950506c34b88Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 950606c34b88Smrgfi 950706c34b88Smrgm4_ifval([$1], 950806c34b88Smrg[if test "$have_doxygen" = yes; then 950906c34b88Smrg # scrape the doxygen version 951006c34b88Smrg AC_MSG_CHECKING([the doxygen version]) 951106c34b88Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 951206c34b88Smrg AC_MSG_RESULT([$doxygen_version]) 951306c34b88Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 951406c34b88Smrg [if test "x$use_doxygen" = xauto; then 951506c34b88Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 951606c34b88Smrg have_doxygen=no 951706c34b88Smrg else 951806c34b88Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 951906c34b88Smrg fi]) 952006c34b88Smrgfi]) 952106c34b88SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 952206c34b88Smrg]) # XORG_WITH_DOXYGEN 9523f1ee322dSmrg 952406c34b88Smrg# XORG_WITH_GROFF([DEFAULT]) 952506c34b88Smrg# ---------------- 952606c34b88Smrg# Minimum version: 1.6.0 952706c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9528c43cc173Smrg# 952906c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 953006c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 953106c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 953206c34b88Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 953306c34b88Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 953406c34b88Smrg# --with-groff assumes 'auto'. 953537eb1ca1Smrg# 953606c34b88Smrg# Interface to module: 953706c34b88Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 953806c34b88Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 953906c34b88Smrg# HAVE_GROFF_MS: the -ms macros package 954006c34b88Smrg# GROFF: returns the path of the groff program found 954106c34b88Smrg# returns the path set by the user in the environment 954206c34b88Smrg# --with-groff: 'yes' user instructs the module to use groff 954306c34b88Smrg# 'no' user instructs the module not to use groff 9544f1ee322dSmrg# 954506c34b88Smrg# Added in version 1.9.0: 954606c34b88Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 954706c34b88Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 954806c34b88Smrg# psselect from the psutils package. 954906c34b88Smrg# the ghostcript package. Refer to the grohtml man pages 9550b789ec8aSmrg# 955106c34b88Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9552f1ee322dSmrg# 955306c34b88Smrg# OS and distros often splits groff in a basic and full package, the former 955406c34b88Smrg# having the groff program and the later having devices, fonts and macros 955506c34b88Smrg# Checking for the groff executable is not enough. 955606c34b88Smrg# 955706c34b88Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 955806c34b88Smrg# unset HAVE_GROFF or GROFF env variables. 955906c34b88Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 956006c34b88Smrg# 956106c34b88SmrgAC_DEFUN([XORG_WITH_GROFF],[ 956206c34b88SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 956306c34b88Smrgm4_define([_defopt], m4_default([$1], [auto])) 956406c34b88SmrgAC_ARG_WITH(groff, 956506c34b88Smrg AS_HELP_STRING([--with-groff], 956606c34b88Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 956706c34b88Smrg [use_groff=$withval], [use_groff=]_defopt) 956806c34b88Smrgm4_undefine([_defopt]) 9569f1ee322dSmrg 957006c34b88Smrgif test "x$use_groff" = x"auto"; then 957106c34b88Smrg AC_PATH_PROG([GROFF], [groff]) 957206c34b88Smrg if test "x$GROFF" = "x"; then 957306c34b88Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 957406c34b88Smrg have_groff=no 957506c34b88Smrg else 957606c34b88Smrg have_groff=yes 957706c34b88Smrg fi 957806c34b88Smrgelif test "x$use_groff" = x"yes" ; then 957906c34b88Smrg AC_PATH_PROG([GROFF], [groff]) 958006c34b88Smrg if test "x$GROFF" = "x"; then 958106c34b88Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 958206c34b88Smrg fi 958306c34b88Smrg have_groff=yes 958406c34b88Smrgelif test "x$use_groff" = x"no" ; then 958506c34b88Smrg if test "x$GROFF" != "x"; then 958606c34b88Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 958706c34b88Smrg fi 958806c34b88Smrg have_groff=no 958906c34b88Smrgelse 959006c34b88Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 95913e256790Smrgfi 95923e256790Smrg 959306c34b88Smrg# We have groff, test for the presence of the macro packages 959406c34b88Smrgif test "x$have_groff" = x"yes"; then 959506c34b88Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 959606c34b88Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 959706c34b88Smrg groff_ms_works=yes 959806c34b88Smrg else 959906c34b88Smrg groff_ms_works=no 960006c34b88Smrg fi 960106c34b88Smrg AC_MSG_RESULT([$groff_ms_works]) 960206c34b88Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 960306c34b88Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 960406c34b88Smrg groff_mm_works=yes 960506c34b88Smrg else 960606c34b88Smrg groff_mm_works=no 960706c34b88Smrg fi 960806c34b88Smrg AC_MSG_RESULT([$groff_mm_works]) 960906c34b88Smrgfi 96103e256790Smrg 961106c34b88Smrg# We have groff, test for HTML dependencies, one command per package 961206c34b88Smrgif test "x$have_groff" = x"yes"; then 961306c34b88Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 961406c34b88Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 961506c34b88Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 961606c34b88Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 961706c34b88Smrg have_groff_html=yes 961806c34b88Smrg else 961906c34b88Smrg have_groff_html=no 962006c34b88Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 962106c34b88Smrg fi 962206c34b88Smrgfi 962337eb1ca1Smrg 962406c34b88Smrg# Set Automake conditionals for Makefiles 962506c34b88SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 962606c34b88SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 962706c34b88SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 962806c34b88SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 962906c34b88Smrg]) # XORG_WITH_GROFF 963037eb1ca1Smrg 963106c34b88Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 963206c34b88Smrg# --------------------------------------- 963306c34b88Smrg# Minimum version: 1.6.0 963406c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 963506c34b88Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 9636b789ec8aSmrg# 963706c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 963806c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 963906c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 964006c34b88Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 964106c34b88Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 964206c34b88Smrg# --with-fop assumes 'auto'. 9643b789ec8aSmrg# 964406c34b88Smrg# Interface to module: 964506c34b88Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 964606c34b88Smrg# FOP: returns the path of the fop program found 964706c34b88Smrg# returns the path set by the user in the environment 964806c34b88Smrg# --with-fop: 'yes' user instructs the module to use fop 964906c34b88Smrg# 'no' user instructs the module not to use fop 9650b789ec8aSmrg# 965106c34b88Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 965237eb1ca1Smrg# 965306c34b88SmrgAC_DEFUN([XORG_WITH_FOP],[ 965406c34b88SmrgAC_ARG_VAR([FOP], [Path to fop command]) 965506c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 965606c34b88SmrgAC_ARG_WITH(fop, 965706c34b88Smrg AS_HELP_STRING([--with-fop], 965806c34b88Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 965906c34b88Smrg [use_fop=$withval], [use_fop=]_defopt) 966006c34b88Smrgm4_undefine([_defopt]) 9661f1ee322dSmrg 966206c34b88Smrgif test "x$use_fop" = x"auto"; then 966306c34b88Smrg AC_PATH_PROG([FOP], [fop]) 966406c34b88Smrg if test "x$FOP" = "x"; then 966506c34b88Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 966606c34b88Smrg have_fop=no 966706c34b88Smrg else 966806c34b88Smrg have_fop=yes 966906c34b88Smrg fi 967006c34b88Smrgelif test "x$use_fop" = x"yes" ; then 967106c34b88Smrg AC_PATH_PROG([FOP], [fop]) 967206c34b88Smrg if test "x$FOP" = "x"; then 967306c34b88Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 967406c34b88Smrg fi 967506c34b88Smrg have_fop=yes 967606c34b88Smrgelif test "x$use_fop" = x"no" ; then 967706c34b88Smrg if test "x$FOP" != "x"; then 967806c34b88Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 967906c34b88Smrg fi 968006c34b88Smrg have_fop=no 968106c34b88Smrgelse 968206c34b88Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 968306c34b88Smrgfi 968437eb1ca1Smrg 968506c34b88Smrg# Test for a minimum version of fop, if provided. 968606c34b88Smrgm4_ifval([$1], 968706c34b88Smrg[if test "$have_fop" = yes; then 968806c34b88Smrg # scrape the fop version 968906c34b88Smrg AC_MSG_CHECKING([for fop minimum version]) 969006c34b88Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 969106c34b88Smrg AC_MSG_RESULT([$fop_version]) 969206c34b88Smrg AS_VERSION_COMPARE([$fop_version], [$1], 969306c34b88Smrg [if test "x$use_fop" = xauto; then 969406c34b88Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 969506c34b88Smrg have_fop=no 969606c34b88Smrg else 969706c34b88Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 969806c34b88Smrg fi]) 969906c34b88Smrgfi]) 970006c34b88SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 970106c34b88Smrg]) # XORG_WITH_FOP 970237eb1ca1Smrg 970306c34b88Smrg# XORG_WITH_PS2PDF([DEFAULT]) 970406c34b88Smrg# ---------------- 970506c34b88Smrg# Minimum version: 1.6.0 970606c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 970706c34b88Smrg# 970806c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 970906c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 971006c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 971106c34b88Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 971206c34b88Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 971306c34b88Smrg# --with-ps2pdf assumes 'auto'. 971406c34b88Smrg# 971506c34b88Smrg# Interface to module: 971606c34b88Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 971706c34b88Smrg# PS2PDF: returns the path of the ps2pdf program found 971806c34b88Smrg# returns the path set by the user in the environment 971906c34b88Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 972006c34b88Smrg# 'no' user instructs the module not to use ps2pdf 972106c34b88Smrg# 972206c34b88Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 972306c34b88Smrg# 972406c34b88SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 972506c34b88SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 972606c34b88Smrgm4_define([_defopt], m4_default([$1], [auto])) 972706c34b88SmrgAC_ARG_WITH(ps2pdf, 972806c34b88Smrg AS_HELP_STRING([--with-ps2pdf], 972906c34b88Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 973006c34b88Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 973106c34b88Smrgm4_undefine([_defopt]) 973237eb1ca1Smrg 973306c34b88Smrgif test "x$use_ps2pdf" = x"auto"; then 973406c34b88Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 973506c34b88Smrg if test "x$PS2PDF" = "x"; then 973606c34b88Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 973706c34b88Smrg have_ps2pdf=no 973806c34b88Smrg else 973906c34b88Smrg have_ps2pdf=yes 974006c34b88Smrg fi 974106c34b88Smrgelif test "x$use_ps2pdf" = x"yes" ; then 974206c34b88Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 974306c34b88Smrg if test "x$PS2PDF" = "x"; then 974406c34b88Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 974506c34b88Smrg fi 974606c34b88Smrg have_ps2pdf=yes 974706c34b88Smrgelif test "x$use_ps2pdf" = x"no" ; then 974806c34b88Smrg if test "x$PS2PDF" != "x"; then 974906c34b88Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 975006c34b88Smrg fi 975106c34b88Smrg have_ps2pdf=no 975206c34b88Smrgelse 975306c34b88Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 975406c34b88Smrgfi 975506c34b88SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 975606c34b88Smrg]) # XORG_WITH_PS2PDF 975737eb1ca1Smrg 975806c34b88Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 975906c34b88Smrg# ---------------- 976006c34b88Smrg# Minimum version: 1.6.0 9761b789ec8aSmrg# 976206c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 976306c34b88Smrg# not at the appropriate level. This macro enables a builder to skip all 976406c34b88Smrg# documentation targets except traditional man pages. 976506c34b88Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 976606c34b88Smrg# maximum flexibilty in controlling documentation building. 976706c34b88Smrg# Refer to: 976806c34b88Smrg# XORG_WITH_XMLTO --with-xmlto 976906c34b88Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 977006c34b88Smrg# XORG_WITH_DOXYGEN --with-doxygen 977106c34b88Smrg# XORG_WITH_FOP --with-fop 977206c34b88Smrg# XORG_WITH_GROFF --with-groff 977306c34b88Smrg# XORG_WITH_PS2PDF --with-ps2pdf 977406c34b88Smrg# 977506c34b88Smrg# Interface to module: 977606c34b88Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 977706c34b88Smrg# --enable-docs: 'yes' user instructs the module to generate docs 977806c34b88Smrg# 'no' user instructs the module not to generate docs 977906c34b88Smrg# parm1: specify the default value, yes or no. 978006c34b88Smrg# 978106c34b88SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 978206c34b88Smrgm4_define([docs_default], m4_default([$1], [yes])) 978306c34b88SmrgAC_ARG_ENABLE(docs, 978406c34b88Smrg AS_HELP_STRING([--enable-docs], 978506c34b88Smrg [Enable building the documentation (default: ]docs_default[)]), 978606c34b88Smrg [build_docs=$enableval], [build_docs=]docs_default) 978706c34b88Smrgm4_undefine([docs_default]) 978806c34b88SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 978906c34b88SmrgAC_MSG_CHECKING([whether to build documentation]) 979006c34b88SmrgAC_MSG_RESULT([$build_docs]) 979106c34b88Smrg]) # XORG_ENABLE_DOCS 9792f1ee322dSmrg 979306c34b88Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 979406c34b88Smrg# ---------------- 979506c34b88Smrg# Minimum version: 1.6.0 979689069ce9Smrg# 979706c34b88Smrg# This macro enables a builder to skip all developer documentation. 979806c34b88Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 979906c34b88Smrg# maximum flexibilty in controlling documentation building. 980006c34b88Smrg# Refer to: 980106c34b88Smrg# XORG_WITH_XMLTO --with-xmlto 980206c34b88Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 980306c34b88Smrg# XORG_WITH_DOXYGEN --with-doxygen 980406c34b88Smrg# XORG_WITH_FOP --with-fop 980506c34b88Smrg# XORG_WITH_GROFF --with-groff 980606c34b88Smrg# XORG_WITH_PS2PDF --with-ps2pdf 980789069ce9Smrg# 980806c34b88Smrg# Interface to module: 980906c34b88Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 981006c34b88Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 981106c34b88Smrg# 'no' user instructs the module not to generate developer docs 981206c34b88Smrg# parm1: specify the default value, yes or no. 981389069ce9Smrg# 981406c34b88SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 981506c34b88Smrgm4_define([devel_default], m4_default([$1], [yes])) 981606c34b88SmrgAC_ARG_ENABLE(devel-docs, 981706c34b88Smrg AS_HELP_STRING([--enable-devel-docs], 981806c34b88Smrg [Enable building the developer documentation (default: ]devel_default[)]), 981906c34b88Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 982006c34b88Smrgm4_undefine([devel_default]) 982106c34b88SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 982206c34b88SmrgAC_MSG_CHECKING([whether to build developer documentation]) 982306c34b88SmrgAC_MSG_RESULT([$build_devel_docs]) 982406c34b88Smrg]) # XORG_ENABLE_DEVEL_DOCS 982506c34b88Smrg 982606c34b88Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 982706c34b88Smrg# ---------------- 982806c34b88Smrg# Minimum version: 1.6.0 982906c34b88Smrg# 983006c34b88Smrg# This macro enables a builder to skip all functional specification targets. 983106c34b88Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 983206c34b88Smrg# maximum flexibilty in controlling documentation building. 983306c34b88Smrg# Refer to: 983406c34b88Smrg# XORG_WITH_XMLTO --with-xmlto 983506c34b88Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 983606c34b88Smrg# XORG_WITH_DOXYGEN --with-doxygen 983706c34b88Smrg# XORG_WITH_FOP --with-fop 983806c34b88Smrg# XORG_WITH_GROFF --with-groff 983906c34b88Smrg# XORG_WITH_PS2PDF --with-ps2pdf 984089069ce9Smrg# 984106c34b88Smrg# Interface to module: 984206c34b88Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 984306c34b88Smrg# --enable-specs: 'yes' user instructs the module to generate specs 984406c34b88Smrg# 'no' user instructs the module not to generate specs 984506c34b88Smrg# parm1: specify the default value, yes or no. 984689069ce9Smrg# 984706c34b88SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 984806c34b88Smrgm4_define([spec_default], m4_default([$1], [yes])) 984906c34b88SmrgAC_ARG_ENABLE(specs, 985006c34b88Smrg AS_HELP_STRING([--enable-specs], 985106c34b88Smrg [Enable building the specs (default: ]spec_default[)]), 985206c34b88Smrg [build_specs=$enableval], [build_specs=]spec_default) 985306c34b88Smrgm4_undefine([spec_default]) 985406c34b88SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 985506c34b88SmrgAC_MSG_CHECKING([whether to build functional specifications]) 985606c34b88SmrgAC_MSG_RESULT([$build_specs]) 985706c34b88Smrg]) # XORG_ENABLE_SPECS 985837eb1ca1Smrg 985906c34b88Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 986006c34b88Smrg# ---------------------------------------------- 986106c34b88Smrg# Minimum version: 1.13.0 986289069ce9Smrg# 986306c34b88Smrg# This macro enables a builder to enable/disable unit testing 986406c34b88Smrg# It makes no assumption about the test cases implementation 986506c34b88Smrg# Test cases may or may not use Automake "Support for test suites" 986606c34b88Smrg# They may or may not use the software utility library GLib 986789069ce9Smrg# 986806c34b88Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 986906c34b88Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 987006c34b88Smrg# The variable enable_unit_tests is used by other macros in this file. 987189069ce9Smrg# 987206c34b88Smrg# Interface to module: 987306c34b88Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 987406c34b88Smrg# enable_unit_tests: used in configure.ac for additional configuration 987506c34b88Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 987606c34b88Smrg# 'no' user instructs the module not to build tests 987706c34b88Smrg# parm1: specify the default value, yes or no. 987806c34b88Smrg# 987906c34b88SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 988006c34b88SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 988106c34b88SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 988206c34b88SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 988306c34b88Smrgm4_define([_defopt], m4_default([$1], [auto])) 988406c34b88SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 988506c34b88Smrg [Enable building unit test cases (default: ]_defopt[)]), 988606c34b88Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 988706c34b88Smrgm4_undefine([_defopt]) 988806c34b88SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 988906c34b88SmrgAC_MSG_CHECKING([whether to build unit test cases]) 989006c34b88SmrgAC_MSG_RESULT([$enable_unit_tests]) 989106c34b88Smrg]) # XORG_ENABLE_UNIT_TESTS 9892b789ec8aSmrg 989306c34b88Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 989406c34b88Smrg# ------------------------------------------------------ 989506c34b88Smrg# Minimum version: 1.17.0 989606c34b88Smrg# 989706c34b88Smrg# This macro enables a builder to enable/disable integration testing 989806c34b88Smrg# It makes no assumption about the test cases' implementation 989906c34b88Smrg# Test cases may or may not use Automake "Support for test suites" 990006c34b88Smrg# 990106c34b88Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 990206c34b88Smrg# usually requires less dependencies and may be built and run under less 990306c34b88Smrg# stringent environments than integration tests. 990406c34b88Smrg# 990506c34b88Smrg# Interface to module: 990606c34b88Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 990706c34b88Smrg# enable_integration_tests: used in configure.ac for additional configuration 990806c34b88Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 990906c34b88Smrg# 'no' user instructs the module not to build tests 991006c34b88Smrg# parm1: specify the default value, yes or no. 991106c34b88Smrg# 991206c34b88SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 991306c34b88SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 991406c34b88Smrgm4_define([_defopt], m4_default([$1], [auto])) 991506c34b88SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 991606c34b88Smrg [Enable building integration test cases (default: ]_defopt[)]), 991706c34b88Smrg [enable_integration_tests=$enableval], 991806c34b88Smrg [enable_integration_tests=]_defopt) 991906c34b88Smrgm4_undefine([_defopt]) 992006c34b88SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 992106c34b88Smrg [test "x$enable_integration_tests" != xno]) 992206c34b88SmrgAC_MSG_CHECKING([whether to build unit test cases]) 992306c34b88SmrgAC_MSG_RESULT([$enable_integration_tests]) 992406c34b88Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 9925b789ec8aSmrg 9926dc9477beSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9927dc9477beSmrg# ---------------------------------------- 9928dc9477beSmrg# Minimum version: 1.13.0 9929dc9477beSmrg# 9930dc9477beSmrg# GLib is a library which provides advanced data structures and functions. 9931dc9477beSmrg# This macro enables a module to test for the presence of Glib. 9932dc9477beSmrg# 9933dc9477beSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9934dc9477beSmrg# Otherwise the value of $enable_unit_tests is blank. 9935dc9477beSmrg# 9936dc9477beSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9937dc9477beSmrg# test support usually requires less dependencies and may be built and run under 9938dc9477beSmrg# less stringent environments than integration tests. 9939dc9477beSmrg# 9940dc9477beSmrg# Interface to module: 9941dc9477beSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 9942dc9477beSmrg# with_glib: used in configure.ac to know if GLib has been found 9943dc9477beSmrg# --with-glib: 'yes' user instructs the module to use glib 9944dc9477beSmrg# 'no' user instructs the module not to use glib 9945dc9477beSmrg# 9946dc9477beSmrgAC_DEFUN([XORG_WITH_GLIB],[ 9947dc9477beSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9948dc9477beSmrgm4_define([_defopt], m4_default([$2], [auto])) 9949dc9477beSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9950dc9477beSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 9951dc9477beSmrg [with_glib=$withval], [with_glib=]_defopt) 9952dc9477beSmrgm4_undefine([_defopt]) 9953dc9477beSmrg 9954dc9477beSmrghave_glib=no 9955dc9477beSmrg# Do not probe GLib if user explicitly disabled unit testing 9956dc9477beSmrgif test "x$enable_unit_tests" != x"no"; then 9957dc9477beSmrg # Do not probe GLib if user explicitly disabled it 9958dc9477beSmrg if test "x$with_glib" != x"no"; then 9959dc9477beSmrg m4_ifval( 9960dc9477beSmrg [$1], 9961dc9477beSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 9962dc9477beSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 9963dc9477beSmrg ) 9964dc9477beSmrg fi 9965dc9477beSmrgfi 9966dc9477beSmrg 9967dc9477beSmrg# Not having GLib when unit testing has been explicitly requested is an error 9968dc9477beSmrgif test "x$enable_unit_tests" = x"yes"; then 9969dc9477beSmrg if test "x$have_glib" = x"no"; then 9970dc9477beSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9971dc9477beSmrg fi 9972dc9477beSmrgfi 9973dc9477beSmrg 9974dc9477beSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 9975dc9477beSmrgif test "x$enable_unit_tests" = x"no"; then 9976dc9477beSmrg if test "x$with_glib" = x"yes"; then 9977dc9477beSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9978dc9477beSmrg fi 9979dc9477beSmrgfi 9980dc9477beSmrg 9981dc9477beSmrg# Not having GLib when it has been explicitly requested is an error 9982dc9477beSmrgif test "x$with_glib" = x"yes"; then 9983dc9477beSmrg if test "x$have_glib" = x"no"; then 9984dc9477beSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 9985dc9477beSmrg fi 9986dc9477beSmrgfi 9987dc9477beSmrg 9988dc9477beSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 9989dc9477beSmrg]) # XORG_WITH_GLIB 9990dc9477beSmrg 9991dc9477beSmrg# XORG_LD_WRAP([required|optional]) 9992dc9477beSmrg# --------------------------------- 9993dc9477beSmrg# Minimum version: 1.13.0 9994dc9477beSmrg# 9995dc9477beSmrg# Check if linker supports -wrap, passed via compiler flags 9996dc9477beSmrg# 9997dc9477beSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 9998dc9477beSmrg# Otherwise the value of $enable_unit_tests is blank. 9999dc9477beSmrg# 10000dc9477beSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10001dc9477beSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10002dc9477beSmrg# available, an argument of "optional" allows use when some unit tests require 10003dc9477beSmrg# ld -wrap and others do not. 10004dc9477beSmrg# 10005dc9477beSmrgAC_DEFUN([XORG_LD_WRAP],[ 10006dc9477beSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10007dc9477beSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 10008dc9477beSmrg void __wrap_exit(int status) { return; }], 10009dc9477beSmrg [exit(0);])]) 10010dc9477beSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 10011dc9477beSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10012dc9477beSmrg if test "x$have_ld_wrap" = x"no"; then 10013dc9477beSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10014dc9477beSmrg fi 10015dc9477beSmrgfi 10016dc9477beSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10017dc9477beSmrg# 10018dc9477beSmrg]) # XORG_LD_WRAP 10019dc9477beSmrg 10020dc9477beSmrg# XORG_CHECK_LINKER_FLAGS 10021dc9477beSmrg# ----------------------- 10022dc9477beSmrg# SYNOPSIS 10023dc9477beSmrg# 10024dc9477beSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10025dc9477beSmrg# 10026dc9477beSmrg# DESCRIPTION 10027dc9477beSmrg# 10028dc9477beSmrg# Check whether the given linker FLAGS work with the current language's 10029dc9477beSmrg# linker, or whether they give an error. 10030dc9477beSmrg# 10031dc9477beSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10032dc9477beSmrg# success/failure. 10033dc9477beSmrg# 10034dc9477beSmrg# PROGRAM-SOURCE is the program source to link with, if needed 10035dc9477beSmrg# 10036dc9477beSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10037dc9477beSmrg# 10038dc9477beSmrg# LICENSE 10039dc9477beSmrg# 10040dc9477beSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10041dc9477beSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10042dc9477beSmrg# Copyright (c) 2009 Matteo Frigo 10043dc9477beSmrg# 10044dc9477beSmrg# This program is free software: you can redistribute it and/or modify it 10045dc9477beSmrg# under the terms of the GNU General Public License as published by the 10046dc9477beSmrg# Free Software Foundation, either version 3 of the License, or (at your 10047dc9477beSmrg# option) any later version. 10048dc9477beSmrg# 10049dc9477beSmrg# This program is distributed in the hope that it will be useful, but 10050dc9477beSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10051dc9477beSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10052dc9477beSmrg# Public License for more details. 10053dc9477beSmrg# 10054dc9477beSmrg# You should have received a copy of the GNU General Public License along 10055dc9477beSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10056dc9477beSmrg# 10057dc9477beSmrg# As a special exception, the respective Autoconf Macro's copyright owner 10058dc9477beSmrg# gives unlimited permission to copy, distribute and modify the configure 10059dc9477beSmrg# scripts that are the output of Autoconf when processing the Macro. You 10060dc9477beSmrg# need not follow the terms of the GNU General Public License when using 10061dc9477beSmrg# or distributing such scripts, even though portions of the text of the 10062dc9477beSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 10063dc9477beSmrg# all other use of the material that constitutes the Autoconf Macro. 10064dc9477beSmrg# 10065dc9477beSmrg# This special exception to the GPL applies to versions of the Autoconf 10066dc9477beSmrg# Macro released by the Autoconf Archive. When you make and distribute a 10067dc9477beSmrg# modified version of the Autoconf Macro, you may extend this special 10068dc9477beSmrg# exception to the GPL to apply to your modified version as well.# 10069dc9477beSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10070dc9477beSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10071dc9477beSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10072dc9477beSmrgAS_LITERAL_IF([$1], 10073dc9477beSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10074dc9477beSmrg ax_save_FLAGS=$LDFLAGS 10075dc9477beSmrg LDFLAGS="$1" 10076dc9477beSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10077dc9477beSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10078dc9477beSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10079dc9477beSmrg LDFLAGS=$ax_save_FLAGS])], 10080dc9477beSmrg [ax_save_FLAGS=$LDFLAGS 10081dc9477beSmrg LDFLAGS="$1" 10082dc9477beSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10083dc9477beSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10084dc9477beSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10085dc9477beSmrg LDFLAGS=$ax_save_FLAGS]) 10086dc9477beSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10087dc9477beSmrgAC_MSG_RESULT($xorg_check_linker_flags) 10088dc9477beSmrgif test "x$xorg_check_linker_flags" = xyes; then 10089dc9477beSmrg m4_default([$2], :) 10090dc9477beSmrgelse 10091dc9477beSmrg m4_default([$3], :) 10092dc9477beSmrgfi 10093dc9477beSmrg]) # XORG_CHECK_LINKER_FLAGS 10094dc9477beSmrg 10095dc9477beSmrg# XORG_MEMORY_CHECK_FLAGS 10096dc9477beSmrg# ----------------------- 10097dc9477beSmrg# Minimum version: 1.16.0 10098dc9477beSmrg# 10099dc9477beSmrg# This macro attempts to find appropriate memory checking functionality 10100dc9477beSmrg# for various platforms which unit testing code may use to catch various 10101dc9477beSmrg# forms of memory allocation and access errors in testing. 10102dc9477beSmrg# 10103dc9477beSmrg# Interface to module: 10104dc9477beSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10105dc9477beSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10106dc9477beSmrg# 10107dc9477beSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10108dc9477beSmrg# 10109dc9477beSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10110dc9477beSmrg 10111dc9477beSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10112dc9477beSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10113dc9477beSmrg [Environment variables to enable memory checking in tests]) 10114dc9477beSmrg 10115dc9477beSmrg# Check for different types of support on different platforms 10116dc9477beSmrgcase $host_os in 10117dc9477beSmrg solaris*) 10118dc9477beSmrg AC_CHECK_LIB([umem], [umem_alloc], 10119dc9477beSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10120dc9477beSmrg ;; 10121dc9477beSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10122dc9477beSmrg # both directly and inverted, so should not be 0 or 255. 10123dc9477beSmrg malloc_debug_env='MALLOC_PERTURB_=15' 10124dc9477beSmrg ;; 10125dc9477beSmrg darwin*) 10126dc9477beSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10127dc9477beSmrg ;; 10128dc9477beSmrg *bsd*) 10129dc9477beSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10130dc9477beSmrg ;; 10131dc9477beSmrgesac 10132dc9477beSmrg 10133dc9477beSmrg# User supplied flags override default flags 10134dc9477beSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10135dc9477beSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10136dc9477beSmrgfi 10137dc9477beSmrg 10138dc9477beSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10139dc9477beSmrg]) # XORG_WITH_LINT 10140dc9477beSmrg 10141dc9477beSmrg# XORG_CHECK_MALLOC_ZERO 10142dc9477beSmrg# ---------------------- 10143dc9477beSmrg# Minimum version: 1.0.0 10144dc9477beSmrg# 10145dc9477beSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10146dc9477beSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 10147dc9477beSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10148dc9477beSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10149dc9477beSmrgAC_ARG_ENABLE(malloc0returnsnull, 10150dc9477beSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 10151dc9477beSmrg [malloc(0) returns NULL (default: auto)]), 10152dc9477beSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10153dc9477beSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10154dc9477beSmrg 10155dc9477beSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10156dc9477beSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10157dc9477beSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10158dc9477beSmrg#include <stdlib.h> 10159dc9477beSmrg],[ 10160dc9477beSmrg char *m0, *r0, *c0, *p; 10161dc9477beSmrg m0 = malloc(0); 10162dc9477beSmrg p = malloc(10); 10163dc9477beSmrg r0 = realloc(p,0); 10164dc9477beSmrg c0 = calloc(0,10); 10165dc9477beSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10166dc9477beSmrg])], 10167dc9477beSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 10168dc9477beSmrg [MALLOC_ZERO_RETURNS_NULL=no], 10169dc9477beSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 10170dc9477beSmrgfi 10171dc9477beSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10172dc9477beSmrg 10173dc9477beSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10174dc9477beSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10175dc9477beSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10176dc9477beSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10177dc9477beSmrgelse 10178dc9477beSmrg MALLOC_ZERO_CFLAGS="" 10179dc9477beSmrg XMALLOC_ZERO_CFLAGS="" 10180dc9477beSmrg XTMALLOC_ZERO_CFLAGS="" 10181dc9477beSmrgfi 10182dc9477beSmrg 10183dc9477beSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10184dc9477beSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10185dc9477beSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10186dc9477beSmrg]) # XORG_CHECK_MALLOC_ZERO 10187dc9477beSmrg 10188dc9477beSmrg# XORG_WITH_LINT() 10189dc9477beSmrg# ---------------- 10190dc9477beSmrg# Minimum version: 1.1.0 10191dc9477beSmrg# 10192dc9477beSmrg# This macro enables the use of a tool that flags some suspicious and 10193dc9477beSmrg# non-portable constructs (likely to be bugs) in C language source code. 10194dc9477beSmrg# It will attempt to locate the tool and use appropriate options. 10195dc9477beSmrg# There are various lint type tools on different platforms. 10196dc9477beSmrg# 10197dc9477beSmrg# Interface to module: 10198dc9477beSmrg# LINT: returns the path to the tool found on the platform 10199dc9477beSmrg# or the value set to LINT on the configure cmd line 10200dc9477beSmrg# also an Automake conditional 10201dc9477beSmrg# LINT_FLAGS: an Automake variable with appropriate flags 10202dc9477beSmrg# 10203dc9477beSmrg# --with-lint: 'yes' user instructs the module to use lint 10204dc9477beSmrg# 'no' user instructs the module not to use lint (default) 10205dc9477beSmrg# 10206dc9477beSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10207dc9477beSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10208dc9477beSmrg# 10209dc9477beSmrgAC_DEFUN([XORG_WITH_LINT],[ 10210dc9477beSmrg 10211dc9477beSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10212dc9477beSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10213dc9477beSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10214dc9477beSmrg [Use a lint-style source code checker (default: disabled)])], 10215dc9477beSmrg [use_lint=$withval], [use_lint=no]) 10216dc9477beSmrg 10217dc9477beSmrg# Obtain platform specific info like program name and options 10218dc9477beSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10219dc9477beSmrgcase $host_os in 10220dc9477beSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10221dc9477beSmrg lint_name=splint 10222dc9477beSmrg lint_options="-badflag" 10223dc9477beSmrg ;; 10224dc9477beSmrg *freebsd* | *netbsd*) 10225dc9477beSmrg lint_name=lint 10226dc9477beSmrg lint_options="-u -b" 10227dc9477beSmrg ;; 10228dc9477beSmrg *solaris*) 10229dc9477beSmrg lint_name=lint 10230dc9477beSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10231dc9477beSmrg ;; 10232dc9477beSmrgesac 10233dc9477beSmrg 10234dc9477beSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10235dc9477beSmrgif test "x$use_lint" = x"yes" ; then 10236dc9477beSmrg AC_PATH_PROG([LINT], [$lint_name]) 10237dc9477beSmrg if test "x$LINT" = "x"; then 10238dc9477beSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10239dc9477beSmrg fi 10240dc9477beSmrgelif test "x$use_lint" = x"no" ; then 10241dc9477beSmrg if test "x$LINT" != "x"; then 10242dc9477beSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10243dc9477beSmrg fi 10244dc9477beSmrgelse 10245dc9477beSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10246dc9477beSmrgfi 10247dc9477beSmrg 10248dc9477beSmrg# User supplied flags override default flags 10249dc9477beSmrgif test "x$LINT_FLAGS" != "x"; then 10250dc9477beSmrg lint_options=$LINT_FLAGS 10251dc9477beSmrgfi 10252dc9477beSmrg 10253dc9477beSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10254dc9477beSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10255dc9477beSmrg 10256dc9477beSmrg]) # XORG_WITH_LINT 10257dc9477beSmrg 10258dc9477beSmrg# XORG_LINT_LIBRARY(LIBNAME) 10259dc9477beSmrg# -------------------------- 10260dc9477beSmrg# Minimum version: 1.1.0 10261dc9477beSmrg# 10262dc9477beSmrg# Sets up flags for building lint libraries for checking programs that call 10263dc9477beSmrg# functions in the library. 10264dc9477beSmrg# 10265dc9477beSmrg# Interface to module: 10266dc9477beSmrg# LINTLIB - Automake variable with the name of lint library file to make 10267dc9477beSmrg# MAKE_LINT_LIB - Automake conditional 10268dc9477beSmrg# 10269dc9477beSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10270dc9477beSmrg# - 'no' user instructs the module not to create a lint library (default) 10271dc9477beSmrg 10272dc9477beSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10273dc9477beSmrgAC_REQUIRE([XORG_WITH_LINT]) 10274dc9477beSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10275dc9477beSmrg [Create lint library (default: disabled)])], 10276dc9477beSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10277dc9477beSmrg 10278dc9477beSmrgif test "x$make_lint_lib" = x"yes" ; then 10279dc9477beSmrg LINTLIB=llib-l$1.ln 10280dc9477beSmrg if test "x$LINT" = "x"; then 10281dc9477beSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10282dc9477beSmrg fi 10283dc9477beSmrgelif test "x$make_lint_lib" != x"no" ; then 10284dc9477beSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10285dc9477beSmrgfi 10286dc9477beSmrg 10287dc9477beSmrgAC_SUBST(LINTLIB) 10288dc9477beSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10289dc9477beSmrg 10290dc9477beSmrg]) # XORG_LINT_LIBRARY 10291dc9477beSmrg 10292dc9477beSmrg# XORG_COMPILER_BRAND 10293dc9477beSmrg# ------------------- 10294dc9477beSmrg# Minimum version: 1.14.0 10295dc9477beSmrg# 10296dc9477beSmrg# Checks for various brands of compilers and sets flags as appropriate: 10297dc9477beSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10298dc9477beSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10299dc9477beSmrg# clang compiler - sets CLANGCC to "yes" 10300dc9477beSmrg# Intel compiler - sets INTELCC to "yes" 10301dc9477beSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10302dc9477beSmrg# 10303dc9477beSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10304dc9477beSmrgAC_LANG_CASE( 10305dc9477beSmrg [C], [ 10306dc9477beSmrg AC_REQUIRE([AC_PROG_CC_C99]) 10307dc9477beSmrg ], 10308dc9477beSmrg [C++], [ 10309dc9477beSmrg AC_REQUIRE([AC_PROG_CXX]) 10310dc9477beSmrg ] 10311dc9477beSmrg) 10312dc9477beSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10313dc9477beSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10314dc9477beSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10315dc9477beSmrg]) # XORG_COMPILER_BRAND 10316dc9477beSmrg 10317dc9477beSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10318dc9477beSmrg# --------------- 10319dc9477beSmrg# Minimum version: 1.16.0 10320dc9477beSmrg# 10321dc9477beSmrg# Test if the compiler works when passed the given flag as a command line argument. 10322dc9477beSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10323dc9477beSmrg# next flag in the list until there are no more options. 10324dc9477beSmrg# 10325dc9477beSmrg# Note that this does not guarantee that the compiler supports the flag as some 10326dc9477beSmrg# compilers will simply ignore arguments that they do not understand, but we do 10327dc9477beSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10328dc9477beSmrg# -Werror=unused-command-line-argument 10329dc9477beSmrg# 10330dc9477beSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10331dc9477beSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10332dc9477beSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10333dc9477beSmrg 10334dc9477beSmrgAC_LANG_COMPILER_REQUIRE 10335dc9477beSmrg 10336dc9477beSmrgAC_LANG_CASE( 10337dc9477beSmrg [C], [ 10338dc9477beSmrg AC_REQUIRE([AC_PROG_CC_C99]) 10339dc9477beSmrg define([PREFIX], [C]) 10340dc9477beSmrg define([CACHE_PREFIX], [cc]) 10341dc9477beSmrg define([COMPILER], [$CC]) 10342dc9477beSmrg ], 10343dc9477beSmrg [C++], [ 10344dc9477beSmrg define([PREFIX], [CXX]) 10345dc9477beSmrg define([CACHE_PREFIX], [cxx]) 10346dc9477beSmrg define([COMPILER], [$CXX]) 10347dc9477beSmrg ] 10348dc9477beSmrg) 10349dc9477beSmrg 10350dc9477beSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10351dc9477beSmrg 10352dc9477beSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10353dc9477beSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10354dc9477beSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10355dc9477beSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10356dc9477beSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10357dc9477beSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10358dc9477beSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10359dc9477beSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10360dc9477beSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10361dc9477beSmrgfi 10362dc9477beSmrg 10363dc9477beSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10364dc9477beSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10365dc9477beSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10366dc9477beSmrg fi 10367dc9477beSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10368dc9477beSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10369dc9477beSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10370dc9477beSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10371dc9477beSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10372dc9477beSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10373dc9477beSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10374dc9477beSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10375dc9477beSmrgfi 10376dc9477beSmrg 10377dc9477beSmrgfound="no" 10378dc9477beSmrgm4_foreach([flag], m4_cdr($@), [ 10379dc9477beSmrg if test $found = "no" ; then 10380dc9477beSmrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 10381dc9477beSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10382dc9477beSmrg fi 10383dc9477beSmrg 10384dc9477beSmrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 10385dc9477beSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10386dc9477beSmrg fi 10387dc9477beSmrg 10388dc9477beSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10389dc9477beSmrg 10390dc9477beSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10391dc9477beSmrg AC_MSG_CHECKING([if ]COMPILER[ supports]flag[]) 10392dc9477beSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10393dc9477beSmrg AC_CACHE_VAL($cacheid, 10394dc9477beSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10395dc9477beSmrg [eval $cacheid=yes], 10396dc9477beSmrg [eval $cacheid=no])]) 10397dc9477beSmrg 10398dc9477beSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10399dc9477beSmrg 10400dc9477beSmrg eval supported=\$$cacheid 10401dc9477beSmrg AC_MSG_RESULT([$supported]) 10402dc9477beSmrg if test "$supported" = "yes" ; then 10403dc9477beSmrg $1="$$1 ]flag[" 10404dc9477beSmrg found="yes" 10405dc9477beSmrg fi 10406dc9477beSmrg fi 10407dc9477beSmrg]) 10408dc9477beSmrg]) # XORG_TESTSET_CFLAG 10409dc9477beSmrg 10410dc9477beSmrg# XORG_COMPILER_FLAGS 10411dc9477beSmrg# --------------- 10412dc9477beSmrg# Minimum version: 1.16.0 10413dc9477beSmrg# 10414dc9477beSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10415dc9477beSmrg# arguments supported by the selected compiler which do NOT alter the generated 10416dc9477beSmrg# code. These arguments will cause the compiler to print various warnings 10417dc9477beSmrg# during compilation AND turn a conservative set of warnings into errors. 10418dc9477beSmrg# 10419dc9477beSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10420dc9477beSmrg# future versions of util-macros as options are added to new compilers. 10421dc9477beSmrg# 10422dc9477beSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10423dc9477beSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10424dc9477beSmrg 10425dc9477beSmrgAC_ARG_ENABLE(selective-werror, 10426dc9477beSmrg AS_HELP_STRING([--disable-selective-werror], 10427dc9477beSmrg [Turn off selective compiler errors. (default: enabled)]), 10428dc9477beSmrg [SELECTIVE_WERROR=$enableval], 10429dc9477beSmrg [SELECTIVE_WERROR=yes]) 10430dc9477beSmrg 10431dc9477beSmrgAC_LANG_CASE( 10432dc9477beSmrg [C], [ 10433dc9477beSmrg define([PREFIX], [C]) 10434dc9477beSmrg ], 10435dc9477beSmrg [C++], [ 10436dc9477beSmrg define([PREFIX], [CXX]) 10437dc9477beSmrg ] 10438dc9477beSmrg) 10439dc9477beSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10440dc9477beSmrgif test "x$SUNCC" = "xyes"; then 10441dc9477beSmrg [BASE_]PREFIX[FLAGS]="-v" 10442dc9477beSmrgelse 10443dc9477beSmrg [BASE_]PREFIX[FLAGS]="" 10444dc9477beSmrgfi 10445dc9477beSmrg 10446dc9477beSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10447dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10448dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10449dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10450dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10451dc9477beSmrg 10452dc9477beSmrgAC_LANG_CASE( 10453dc9477beSmrg [C], [ 10454dc9477beSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10455dc9477beSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10456dc9477beSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10457dc9477beSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10458dc9477beSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 10459dc9477beSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10460dc9477beSmrg ] 10461dc9477beSmrg) 10462dc9477beSmrg 10463dc9477beSmrg# This chunk adds additional warnings that could catch undesired effects. 10464dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10465dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10466dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10467dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10468dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10469dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10470dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10471dc9477beSmrg 10472dc9477beSmrg# These are currently disabled because they are noisy. They will be enabled 10473dc9477beSmrg# in the future once the codebase is sufficiently modernized to silence 10474dc9477beSmrg# them. For now, I don't want them to drown out the other warnings. 10475dc9477beSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10476dc9477beSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10477dc9477beSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10478dc9477beSmrg 10479dc9477beSmrg# Turn some warnings into errors, so we don't accidently get successful builds 10480dc9477beSmrg# when there are problems that should be fixed. 10481dc9477beSmrg 10482dc9477beSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10483dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10484dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10485dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10486dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10487dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10488dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10489dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10490dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10491dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10492dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10493dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10494dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10495dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10496dc9477beSmrgelse 10497dc9477beSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 10498dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10499dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10500dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10501dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10502dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10503dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10504dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10505dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10506dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10507dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10508dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10509dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10510dc9477beSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10511dc9477beSmrgfi 10512dc9477beSmrg 10513dc9477beSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10514dc9477beSmrg]) # XORG_COMPILER_FLAGS 10515dc9477beSmrg 10516dc9477beSmrg# XORG_CWARNFLAGS 10517dc9477beSmrg# --------------- 10518dc9477beSmrg# Minimum version: 1.2.0 10519dc9477beSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 10520dc9477beSmrg# 10521dc9477beSmrg# Defines CWARNFLAGS to enable C compiler warnings. 10522dc9477beSmrg# 10523dc9477beSmrg# This function is deprecated because it defines -fno-strict-aliasing 10524dc9477beSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10525dc9477beSmrg# is needed, then it should be added explicitly in the module when 10526dc9477beSmrg# it is updated to use BASE_CFLAGS. 10527dc9477beSmrg# 10528dc9477beSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10529dc9477beSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10530dc9477beSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10531dc9477beSmrgAC_LANG_CASE( 10532dc9477beSmrg [C], [ 10533dc9477beSmrg CWARNFLAGS="$BASE_CFLAGS" 10534dc9477beSmrg if test "x$GCC" = xyes ; then 10535dc9477beSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10536dc9477beSmrg fi 10537dc9477beSmrg AC_SUBST(CWARNFLAGS) 10538dc9477beSmrg ] 10539dc9477beSmrg) 10540dc9477beSmrg]) # XORG_CWARNFLAGS 10541dc9477beSmrg 10542dc9477beSmrg# XORG_STRICT_OPTION 10543dc9477beSmrg# ----------------------- 10544dc9477beSmrg# Minimum version: 1.3.0 10545dc9477beSmrg# 10546dc9477beSmrg# Add configure option to enable strict compilation flags, such as treating 10547dc9477beSmrg# warnings as fatal errors. 10548dc9477beSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10549dc9477beSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10550dc9477beSmrg# 10551dc9477beSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10552dc9477beSmrg# when strict compilation is unconditionally desired. 10553dc9477beSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 10554dc9477beSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10555dc9477beSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10556dc9477beSmrg 10557dc9477beSmrgAC_ARG_ENABLE(strict-compilation, 10558dc9477beSmrg AS_HELP_STRING([--enable-strict-compilation], 10559dc9477beSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 10560dc9477beSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10561dc9477beSmrg 10562dc9477beSmrgAC_LANG_CASE( 10563dc9477beSmrg [C], [ 10564dc9477beSmrg define([PREFIX], [C]) 10565dc9477beSmrg ], 10566dc9477beSmrg [C++], [ 10567dc9477beSmrg define([PREFIX], [CXX]) 10568dc9477beSmrg ] 10569dc9477beSmrg) 10570dc9477beSmrg 10571dc9477beSmrg[STRICT_]PREFIX[FLAGS]="" 10572dc9477beSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10573dc9477beSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10574dc9477beSmrg 10575dc9477beSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10576dc9477beSmrg# activate it with -Werror, so we add it here explicitly. 10577dc9477beSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10578dc9477beSmrg 10579dc9477beSmrgif test "x$STRICT_COMPILE" = "xyes"; then 10580dc9477beSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10581dc9477beSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 10582dc9477beSmrgfi 10583dc9477beSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10584dc9477beSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10585dc9477beSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 10586dc9477beSmrg]) # XORG_STRICT_OPTION 10587dc9477beSmrg 10588dc9477beSmrg# XORG_DEFAULT_OPTIONS 10589dc9477beSmrg# -------------------- 10590dc9477beSmrg# Minimum version: 1.3.0 10591dc9477beSmrg# 10592dc9477beSmrg# Defines default options for X.Org modules. 10593dc9477beSmrg# 10594dc9477beSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10595dc9477beSmrgAC_REQUIRE([AC_PROG_INSTALL]) 10596dc9477beSmrgXORG_COMPILER_FLAGS 10597dc9477beSmrgXORG_CWARNFLAGS 10598dc9477beSmrgXORG_STRICT_OPTION 10599dc9477beSmrgXORG_RELEASE_VERSION 10600dc9477beSmrgXORG_CHANGELOG 10601dc9477beSmrgXORG_INSTALL 10602dc9477beSmrgXORG_MANPAGE_SECTIONS 10603dc9477beSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 10604dc9477beSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 10605dc9477beSmrg]) # XORG_DEFAULT_OPTIONS 10606dc9477beSmrg 10607dc9477beSmrg# XORG_INSTALL() 10608dc9477beSmrg# ---------------- 10609dc9477beSmrg# Minimum version: 1.4.0 10610dc9477beSmrg# 10611dc9477beSmrg# Defines the variable INSTALL_CMD as the command to copy 10612dc9477beSmrg# INSTALL from $prefix/share/util-macros. 10613dc9477beSmrg# 10614dc9477beSmrgAC_DEFUN([XORG_INSTALL], [ 10615dc9477beSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10616dc9477beSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 10617dc9477beSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 10618dc9477beSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 10619dc9477beSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 10620dc9477beSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 10621dc9477beSmrgAC_SUBST([INSTALL_CMD]) 10622dc9477beSmrg]) # XORG_INSTALL 10623dc9477beSmrgdnl Copyright 2005 Red Hat, Inc 10624dc9477beSmrgdnl 10625dc9477beSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10626dc9477beSmrgdnl documentation for any purpose is hereby granted without fee, provided that 10627dc9477beSmrgdnl the above copyright notice appear in all copies and that both that 10628dc9477beSmrgdnl copyright notice and this permission notice appear in supporting 10629dc9477beSmrgdnl documentation. 10630dc9477beSmrgdnl 10631dc9477beSmrgdnl The above copyright notice and this permission notice shall be included 10632dc9477beSmrgdnl in all copies or substantial portions of the Software. 10633dc9477beSmrgdnl 10634dc9477beSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10635dc9477beSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10636dc9477beSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10637dc9477beSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10638dc9477beSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10639dc9477beSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10640dc9477beSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 10641dc9477beSmrgdnl 10642dc9477beSmrgdnl Except as contained in this notice, the name of the copyright holders shall 10643dc9477beSmrgdnl not be used in advertising or otherwise to promote the sale, use or 10644dc9477beSmrgdnl other dealings in this Software without prior written authorization 10645dc9477beSmrgdnl from the copyright holders. 10646dc9477beSmrgdnl 10647dc9477beSmrg 10648dc9477beSmrg# XORG_RELEASE_VERSION 10649dc9477beSmrg# -------------------- 10650dc9477beSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 10651dc9477beSmrg 10652dc9477beSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 10653dc9477beSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 10654dc9477beSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 10655dc9477beSmrg [Major version of this package]) 10656dc9477beSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 10657dc9477beSmrg if test "x$PVM" = "x"; then 10658dc9477beSmrg PVM="0" 10659dc9477beSmrg fi 10660dc9477beSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 10661dc9477beSmrg [$PVM], 10662dc9477beSmrg [Minor version of this package]) 10663dc9477beSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 10664dc9477beSmrg if test "x$PVP" = "x"; then 10665dc9477beSmrg PVP="0" 10666dc9477beSmrg fi 10667dc9477beSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 10668dc9477beSmrg [$PVP], 10669dc9477beSmrg [Patch version of this package]) 10670dc9477beSmrg]) 10671dc9477beSmrg 10672dc9477beSmrg# XORG_CHANGELOG() 10673dc9477beSmrg# ---------------- 10674dc9477beSmrg# Minimum version: 1.2.0 10675dc9477beSmrg# 10676dc9477beSmrg# Defines the variable CHANGELOG_CMD as the command to generate 10677dc9477beSmrg# ChangeLog from git. 10678dc9477beSmrg# 10679dc9477beSmrg# 10680dc9477beSmrgAC_DEFUN([XORG_CHANGELOG], [ 10681dc9477beSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 10682dc9477beSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 10683dc9477beSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 10684dc9477beSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 10685dc9477beSmrgAC_SUBST([CHANGELOG_CMD]) 10686dc9477beSmrg]) # XORG_CHANGELOG 10687dc9477beSmrg 10688dc9477beSmrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 10689dc9477beSmrg# 10690dc9477beSmrg# This file is free software; the Free Software Foundation 10691dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 10692dc9477beSmrg# with or without modifications, as long as this notice is preserved. 10693dc9477beSmrg 10694dc9477beSmrg# AM_AUTOMAKE_VERSION(VERSION) 10695dc9477beSmrg# ---------------------------- 10696dc9477beSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 10697dc9477beSmrg# generated from the m4 files accompanying Automake X.Y. 10698dc9477beSmrg# (This private macro should not be called outside this file.) 10699dc9477beSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 10700dc9477beSmrg[am__api_version='1.13' 10701dc9477beSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 10702dc9477beSmrgdnl require some minimum version. Point them to the right macro. 10703dc9477beSmrgm4_if([$1], [1.13.4], [], 10704dc9477beSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 10705dc9477beSmrg]) 10706dc9477beSmrg 10707dc9477beSmrg# _AM_AUTOCONF_VERSION(VERSION) 10708dc9477beSmrg# ----------------------------- 10709dc9477beSmrg# aclocal traces this macro to find the Autoconf version. 10710dc9477beSmrg# This is a private macro too. Using m4_define simplifies 10711dc9477beSmrg# the logic in aclocal, which can simply ignore this definition. 10712dc9477beSmrgm4_define([_AM_AUTOCONF_VERSION], []) 10713dc9477beSmrg 10714dc9477beSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 10715dc9477beSmrg# ------------------------------- 10716dc9477beSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 10717dc9477beSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 10718dc9477beSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 10719dc9477beSmrg[AM_AUTOMAKE_VERSION([1.13.4])dnl 10720dc9477beSmrgm4_ifndef([AC_AUTOCONF_VERSION], 10721dc9477beSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 10722dc9477beSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 10723dc9477beSmrg 10724dc9477beSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 10725dc9477beSmrg 10726dc9477beSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 10727dc9477beSmrg# 10728dc9477beSmrg# This file is free software; the Free Software Foundation 10729dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 10730dc9477beSmrg# with or without modifications, as long as this notice is preserved. 10731dc9477beSmrg 10732dc9477beSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 10733dc9477beSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 10734dc9477beSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 10735dc9477beSmrg# 10736dc9477beSmrg# Of course, Automake must honor this variable whenever it calls a 10737dc9477beSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 10738dc9477beSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 10739dc9477beSmrg# depending on how configure is run. This is pretty annoying, since 10740dc9477beSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 10741dc9477beSmrg# source directory, any form will work fine, but in subdirectories a 10742dc9477beSmrg# relative path needs to be adjusted first. 10743dc9477beSmrg# 10744dc9477beSmrg# $ac_aux_dir/missing 10745dc9477beSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 10746dc9477beSmrg# $top_srcdir/$ac_aux_dir/missing 10747dc9477beSmrg# fails if $ac_aux_dir is absolute, 10748dc9477beSmrg# fails when called from a subdirectory in a VPATH build with 10749dc9477beSmrg# a relative $ac_aux_dir 10750dc9477beSmrg# 10751dc9477beSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 10752dc9477beSmrg# are both prefixed by $srcdir. In an in-source build this is usually 10753dc9477beSmrg# harmless because $srcdir is '.', but things will broke when you 10754dc9477beSmrg# start a VPATH build or use an absolute $srcdir. 10755dc9477beSmrg# 10756dc9477beSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 10757dc9477beSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 10758dc9477beSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 10759dc9477beSmrg# and then we would define $MISSING as 10760dc9477beSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 10761dc9477beSmrg# This will work as long as MISSING is not called from configure, because 10762dc9477beSmrg# unfortunately $(top_srcdir) has no meaning in configure. 10763dc9477beSmrg# However there are other variables, like CC, which are often used in 10764dc9477beSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 10765dc9477beSmrg# 10766dc9477beSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 10767dc9477beSmrg# absolute PATH. The drawback is that using absolute paths prevent a 10768dc9477beSmrg# configured tree to be moved without reconfiguration. 10769dc9477beSmrg 10770dc9477beSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10771dc9477beSmrg[dnl Rely on autoconf to set up CDPATH properly. 10772dc9477beSmrgAC_PREREQ([2.50])dnl 10773dc9477beSmrg# expand $ac_aux_dir to an absolute path 10774dc9477beSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 10775dc9477beSmrg]) 10776dc9477beSmrg 10777dc9477beSmrg# AM_CONDITIONAL -*- Autoconf -*- 10778dc9477beSmrg 10779dc9477beSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 10780dc9477beSmrg# 10781dc9477beSmrg# This file is free software; the Free Software Foundation 10782dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 10783dc9477beSmrg# with or without modifications, as long as this notice is preserved. 10784dc9477beSmrg 10785dc9477beSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 10786dc9477beSmrg# ------------------------------------- 10787dc9477beSmrg# Define a conditional. 10788dc9477beSmrgAC_DEFUN([AM_CONDITIONAL], 10789dc9477beSmrg[AC_PREREQ([2.52])dnl 10790dc9477beSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 10791dc9477beSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 10792dc9477beSmrgAC_SUBST([$1_TRUE])dnl 10793dc9477beSmrgAC_SUBST([$1_FALSE])dnl 10794dc9477beSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 10795dc9477beSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 10796dc9477beSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 10797dc9477beSmrgif $2; then 10798dc9477beSmrg $1_TRUE= 10799dc9477beSmrg $1_FALSE='#' 10800dc9477beSmrgelse 10801dc9477beSmrg $1_TRUE='#' 10802dc9477beSmrg $1_FALSE= 10803dc9477beSmrgfi 10804dc9477beSmrgAC_CONFIG_COMMANDS_PRE( 10805dc9477beSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 10806dc9477beSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 10807dc9477beSmrgUsually this means the macro was only invoked conditionally.]]) 10808dc9477beSmrgfi])]) 10809dc9477beSmrg 10810dc9477beSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 10811dc9477beSmrg# 10812dc9477beSmrg# This file is free software; the Free Software Foundation 10813dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 10814dc9477beSmrg# with or without modifications, as long as this notice is preserved. 10815dc9477beSmrg 10816dc9477beSmrg 10817dc9477beSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 10818dc9477beSmrg# written in clear, in which case automake, when reading aclocal.m4, 10819dc9477beSmrg# will think it sees a *use*, and therefore will trigger all it's 10820dc9477beSmrg# C support machinery. Also note that it means that autoscan, seeing 10821dc9477beSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 10822dc9477beSmrg 10823dc9477beSmrg 10824dc9477beSmrg# _AM_DEPENDENCIES(NAME) 10825dc9477beSmrg# ---------------------- 10826dc9477beSmrg# See how the compiler implements dependency checking. 10827dc9477beSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 10828dc9477beSmrg# We try a few techniques and use that to set a single cache variable. 10829dc9477beSmrg# 10830dc9477beSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 10831dc9477beSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 10832dc9477beSmrg# dependency, and given that the user is not expected to run this macro, 10833dc9477beSmrg# just rely on AC_PROG_CC. 10834dc9477beSmrgAC_DEFUN([_AM_DEPENDENCIES], 10835dc9477beSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 10836dc9477beSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 10837dc9477beSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 10838dc9477beSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 10839dc9477beSmrg 10840dc9477beSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 10841dc9477beSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 10842dc9477beSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 10843dc9477beSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 10844dc9477beSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 10845dc9477beSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 10846dc9477beSmrg [depcc="$$1" am_compiler_list=]) 10847dc9477beSmrg 10848dc9477beSmrgAC_CACHE_CHECK([dependency style of $depcc], 10849dc9477beSmrg [am_cv_$1_dependencies_compiler_type], 10850dc9477beSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 10851dc9477beSmrg # We make a subdir and do the tests there. Otherwise we can end up 10852dc9477beSmrg # making bogus files that we don't know about and never remove. For 10853dc9477beSmrg # instance it was reported that on HP-UX the gcc test will end up 10854dc9477beSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 10855dc9477beSmrg # in D". 10856dc9477beSmrg rm -rf conftest.dir 10857dc9477beSmrg mkdir conftest.dir 10858dc9477beSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 10859dc9477beSmrg # using a relative directory. 10860dc9477beSmrg cp "$am_depcomp" conftest.dir 10861dc9477beSmrg cd conftest.dir 10862dc9477beSmrg # We will build objects and dependencies in a subdirectory because 10863dc9477beSmrg # it helps to detect inapplicable dependency modes. For instance 10864dc9477beSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 10865dc9477beSmrg # side effect of compilation, but ICC will put the dependencies in 10866dc9477beSmrg # the current directory while Tru64 will put them in the object 10867dc9477beSmrg # directory. 10868dc9477beSmrg mkdir sub 10869dc9477beSmrg 10870dc9477beSmrg am_cv_$1_dependencies_compiler_type=none 10871dc9477beSmrg if test "$am_compiler_list" = ""; then 10872dc9477beSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 10873dc9477beSmrg fi 10874dc9477beSmrg am__universal=false 10875dc9477beSmrg m4_case([$1], [CC], 10876dc9477beSmrg [case " $depcc " in #( 10877dc9477beSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10878dc9477beSmrg esac], 10879dc9477beSmrg [CXX], 10880dc9477beSmrg [case " $depcc " in #( 10881dc9477beSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10882dc9477beSmrg esac]) 10883dc9477beSmrg 10884dc9477beSmrg for depmode in $am_compiler_list; do 10885dc9477beSmrg # Setup a source with many dependencies, because some compilers 10886dc9477beSmrg # like to wrap large dependency lists on column 80 (with \), and 10887dc9477beSmrg # we should not choose a depcomp mode which is confused by this. 10888dc9477beSmrg # 10889dc9477beSmrg # We need to recreate these files for each test, as the compiler may 10890dc9477beSmrg # overwrite some of them when testing with obscure command lines. 10891dc9477beSmrg # This happens at least with the AIX C compiler. 10892dc9477beSmrg : > sub/conftest.c 10893dc9477beSmrg for i in 1 2 3 4 5 6; do 10894dc9477beSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 10895dc9477beSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 10896dc9477beSmrg # Solaris 10 /bin/sh. 10897dc9477beSmrg echo '/* dummy */' > sub/conftst$i.h 10898dc9477beSmrg done 10899dc9477beSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 10900dc9477beSmrg 10901dc9477beSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 10902dc9477beSmrg # mode. It turns out that the SunPro C++ compiler does not properly 10903dc9477beSmrg # handle '-M -o', and we need to detect this. Also, some Intel 10904dc9477beSmrg # versions had trouble with output in subdirs. 10905dc9477beSmrg am__obj=sub/conftest.${OBJEXT-o} 10906dc9477beSmrg am__minus_obj="-o $am__obj" 10907dc9477beSmrg case $depmode in 10908dc9477beSmrg gcc) 10909dc9477beSmrg # This depmode causes a compiler race in universal mode. 10910dc9477beSmrg test "$am__universal" = false || continue 10911dc9477beSmrg ;; 10912dc9477beSmrg nosideeffect) 10913dc9477beSmrg # After this tag, mechanisms are not by side-effect, so they'll 10914dc9477beSmrg # only be used when explicitly requested. 10915dc9477beSmrg if test "x$enable_dependency_tracking" = xyes; then 10916dc9477beSmrg continue 10917dc9477beSmrg else 10918dc9477beSmrg break 10919dc9477beSmrg fi 10920dc9477beSmrg ;; 10921dc9477beSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 10922dc9477beSmrg # This compiler won't grok '-c -o', but also, the minuso test has 10923dc9477beSmrg # not run yet. These depmodes are late enough in the game, and 10924dc9477beSmrg # so weak that their functioning should not be impacted. 10925dc9477beSmrg am__obj=conftest.${OBJEXT-o} 10926dc9477beSmrg am__minus_obj= 10927dc9477beSmrg ;; 10928dc9477beSmrg none) break ;; 10929dc9477beSmrg esac 10930dc9477beSmrg if depmode=$depmode \ 10931dc9477beSmrg source=sub/conftest.c object=$am__obj \ 10932dc9477beSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 10933dc9477beSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 10934dc9477beSmrg >/dev/null 2>conftest.err && 10935dc9477beSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 10936dc9477beSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 10937dc9477beSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 10938dc9477beSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 10939dc9477beSmrg # icc doesn't choke on unknown options, it will just issue warnings 10940dc9477beSmrg # or remarks (even with -Werror). So we grep stderr for any message 10941dc9477beSmrg # that says an option was ignored or not supported. 10942dc9477beSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 10943dc9477beSmrg # icc: Command line warning: ignoring option '-M'; no argument required 10944dc9477beSmrg # The diagnosis changed in icc 8.0: 10945dc9477beSmrg # icc: Command line remark: option '-MP' not supported 10946dc9477beSmrg if (grep 'ignoring option' conftest.err || 10947dc9477beSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 10948dc9477beSmrg am_cv_$1_dependencies_compiler_type=$depmode 10949dc9477beSmrg break 10950dc9477beSmrg fi 10951dc9477beSmrg fi 10952dc9477beSmrg done 10953dc9477beSmrg 10954dc9477beSmrg cd .. 10955dc9477beSmrg rm -rf conftest.dir 10956dc9477beSmrgelse 10957dc9477beSmrg am_cv_$1_dependencies_compiler_type=none 10958dc9477beSmrgfi 10959dc9477beSmrg]) 10960dc9477beSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 10961dc9477beSmrgAM_CONDITIONAL([am__fastdep$1], [ 10962dc9477beSmrg test "x$enable_dependency_tracking" != xno \ 10963dc9477beSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 10964dc9477beSmrg]) 10965dc9477beSmrg 10966dc9477beSmrg 10967dc9477beSmrg# AM_SET_DEPDIR 10968dc9477beSmrg# ------------- 10969dc9477beSmrg# Choose a directory name for dependency files. 10970dc9477beSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 10971dc9477beSmrgAC_DEFUN([AM_SET_DEPDIR], 10972dc9477beSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 10973dc9477beSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 10974dc9477beSmrg]) 10975dc9477beSmrg 10976dc9477beSmrg 10977dc9477beSmrg# AM_DEP_TRACK 10978dc9477beSmrg# ------------ 10979dc9477beSmrgAC_DEFUN([AM_DEP_TRACK], 10980dc9477beSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 10981dc9477beSmrgAS_HELP_STRING( 10982dc9477beSmrg [--enable-dependency-tracking], 10983dc9477beSmrg [do not reject slow dependency extractors]) 10984dc9477beSmrgAS_HELP_STRING( 10985dc9477beSmrg [--disable-dependency-tracking], 10986dc9477beSmrg [speeds up one-time build])]) 10987dc9477beSmrgif test "x$enable_dependency_tracking" != xno; then 10988dc9477beSmrg am_depcomp="$ac_aux_dir/depcomp" 10989dc9477beSmrg AMDEPBACKSLASH='\' 10990dc9477beSmrg am__nodep='_no' 10991dc9477beSmrgfi 10992dc9477beSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 10993dc9477beSmrgAC_SUBST([AMDEPBACKSLASH])dnl 10994dc9477beSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 10995dc9477beSmrgAC_SUBST([am__nodep])dnl 10996dc9477beSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 10997dc9477beSmrg]) 10998dc9477beSmrg 10999dc9477beSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 11000dc9477beSmrg 11001dc9477beSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 11002dc9477beSmrg# 11003dc9477beSmrg# This file is free software; the Free Software Foundation 11004dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11005dc9477beSmrg# with or without modifications, as long as this notice is preserved. 11006dc9477beSmrg 11007dc9477beSmrg 11008dc9477beSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11009dc9477beSmrg# ------------------------------ 11010dc9477beSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11011dc9477beSmrg[{ 11012dc9477beSmrg # Older Autoconf quotes --file arguments for eval, but not when files 11013dc9477beSmrg # are listed without --file. Let's play safe and only enable the eval 11014dc9477beSmrg # if we detect the quoting. 11015dc9477beSmrg case $CONFIG_FILES in 11016dc9477beSmrg *\'*) eval set x "$CONFIG_FILES" ;; 11017dc9477beSmrg *) set x $CONFIG_FILES ;; 11018dc9477beSmrg esac 11019dc9477beSmrg shift 11020dc9477beSmrg for mf 11021dc9477beSmrg do 11022dc9477beSmrg # Strip MF so we end up with the name of the file. 11023dc9477beSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11024dc9477beSmrg # Check whether this is an Automake generated Makefile or not. 11025dc9477beSmrg # We used to match only the files named 'Makefile.in', but 11026dc9477beSmrg # some people rename them; so instead we look at the file content. 11027dc9477beSmrg # Grep'ing the first line is not enough: some people post-process 11028dc9477beSmrg # each Makefile.in and add a new line on top of each file to say so. 11029dc9477beSmrg # Grep'ing the whole file is not good either: AIX grep has a line 11030dc9477beSmrg # limit of 2048, but all sed's we know have understand at least 4000. 11031dc9477beSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11032dc9477beSmrg dirpart=`AS_DIRNAME("$mf")` 11033dc9477beSmrg else 11034dc9477beSmrg continue 11035dc9477beSmrg fi 11036dc9477beSmrg # Extract the definition of DEPDIR, am__include, and am__quote 11037dc9477beSmrg # from the Makefile without running 'make'. 11038dc9477beSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11039dc9477beSmrg test -z "$DEPDIR" && continue 11040dc9477beSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11041dc9477beSmrg test -z "$am__include" && continue 11042dc9477beSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11043dc9477beSmrg # Find all dependency output files, they are included files with 11044dc9477beSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11045dc9477beSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 11046dc9477beSmrg # expansion. 11047dc9477beSmrg for file in `sed -n " 11048dc9477beSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11049dc9477beSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11050dc9477beSmrg # Make sure the directory exists. 11051dc9477beSmrg test -f "$dirpart/$file" && continue 11052dc9477beSmrg fdir=`AS_DIRNAME(["$file"])` 11053dc9477beSmrg AS_MKDIR_P([$dirpart/$fdir]) 11054dc9477beSmrg # echo "creating $dirpart/$file" 11055dc9477beSmrg echo '# dummy' > "$dirpart/$file" 11056dc9477beSmrg done 11057dc9477beSmrg done 11058dc9477beSmrg} 11059dc9477beSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11060dc9477beSmrg 11061dc9477beSmrg 11062dc9477beSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11063dc9477beSmrg# ----------------------------- 11064dc9477beSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 1106506c34b88Smrg# 11066dc9477beSmrg# This code is only required when automatic dependency tracking 11067dc9477beSmrg# is enabled. FIXME. This creates each '.P' file that we will 11068dc9477beSmrg# need in order to bootstrap the dependency handling code. 11069dc9477beSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11070dc9477beSmrg[AC_CONFIG_COMMANDS([depfiles], 11071dc9477beSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11072dc9477beSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11073dc9477beSmrg]) 11074b789ec8aSmrg 11075dc9477beSmrg# Do all the work for Automake. -*- Autoconf -*- 11076b789ec8aSmrg 11077dc9477beSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 11078dc9477beSmrg# 11079dc9477beSmrg# This file is free software; the Free Software Foundation 11080dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11081dc9477beSmrg# with or without modifications, as long as this notice is preserved. 11082b789ec8aSmrg 11083dc9477beSmrg# This macro actually does too much. Some checks are only needed if 11084dc9477beSmrg# your package does certain things. But this isn't really a big deal. 11085b789ec8aSmrg 11086dc9477beSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11087dc9477beSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 11088dc9477beSmrg# ----------------------------------------------- 11089dc9477beSmrg# The call with PACKAGE and VERSION arguments is the old style 11090dc9477beSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11091dc9477beSmrg# and VERSION should now be passed to AC_INIT and removed from 11092dc9477beSmrg# the call to AM_INIT_AUTOMAKE. 11093dc9477beSmrg# We support both call styles for the transition. After 11094dc9477beSmrg# the next Automake release, Autoconf can make the AC_INIT 11095dc9477beSmrg# arguments mandatory, and then we can depend on a new Autoconf 11096dc9477beSmrg# release and drop the old call support. 11097dc9477beSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11098dc9477beSmrg[AC_PREREQ([2.65])dnl 11099dc9477beSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11100dc9477beSmrgdnl the ones we care about. 11101dc9477beSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11102dc9477beSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11103dc9477beSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11104dc9477beSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11105dc9477beSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11106dc9477beSmrg # is not polluted with repeated "-I." 11107dc9477beSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11108dc9477beSmrg # test to see if srcdir already configured 11109dc9477beSmrg if test -f $srcdir/config.status; then 11110dc9477beSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1111106c34b88Smrg fi 1111206c34b88Smrgfi 11113b789ec8aSmrg 11114dc9477beSmrg# test whether we have cygpath 11115dc9477beSmrgif test -z "$CYGPATH_W"; then 11116dc9477beSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 11117dc9477beSmrg CYGPATH_W='cygpath -w' 11118dc9477beSmrg else 11119dc9477beSmrg CYGPATH_W=echo 1112006c34b88Smrg fi 1112106c34b88Smrgfi 11122dc9477beSmrgAC_SUBST([CYGPATH_W]) 11123b789ec8aSmrg 11124dc9477beSmrg# Define the identity of the package. 11125dc9477beSmrgdnl Distinguish between old-style and new-style calls. 11126dc9477beSmrgm4_ifval([$2], 11127dc9477beSmrg[AC_DIAGNOSE([obsolete], 11128dc9477beSmrg [$0: two- and three-arguments forms are deprecated.]) 11129dc9477beSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11130dc9477beSmrg AC_SUBST([PACKAGE], [$1])dnl 11131dc9477beSmrg AC_SUBST([VERSION], [$2])], 11132dc9477beSmrg[_AM_SET_OPTIONS([$1])dnl 11133dc9477beSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11134dc9477beSmrgm4_if( 11135dc9477beSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11136dc9477beSmrg [ok:ok],, 11137dc9477beSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11138dc9477beSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11139dc9477beSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11140b789ec8aSmrg 11141dc9477beSmrg_AM_IF_OPTION([no-define],, 11142dc9477beSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11143dc9477beSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11144b789ec8aSmrg 11145dc9477beSmrg# Some tools Automake needs. 11146dc9477beSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11147dc9477beSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11148dc9477beSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11149dc9477beSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11150dc9477beSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11151dc9477beSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11152dc9477beSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11153dc9477beSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11154dc9477beSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11155dc9477beSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11156dc9477beSmrg# For better backward compatibility. To be removed once Automake 1.9.x 11157dc9477beSmrg# dies out for good. For more background, see: 11158dc9477beSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11159dc9477beSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11160dc9477beSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11161dc9477beSmrg# We need awk for the "check" target. The system "awk" is bad on 11162dc9477beSmrg# some platforms. 11163dc9477beSmrgAC_REQUIRE([AC_PROG_AWK])dnl 11164dc9477beSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11165dc9477beSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11166dc9477beSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11167dc9477beSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11168dc9477beSmrg [_AM_PROG_TAR([v7])])]) 11169dc9477beSmrg_AM_IF_OPTION([no-dependencies],, 11170dc9477beSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11171dc9477beSmrg [_AM_DEPENDENCIES([CC])], 11172dc9477beSmrg [m4_define([AC_PROG_CC], 11173dc9477beSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11174dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11175dc9477beSmrg [_AM_DEPENDENCIES([CXX])], 11176dc9477beSmrg [m4_define([AC_PROG_CXX], 11177dc9477beSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11178dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11179dc9477beSmrg [_AM_DEPENDENCIES([OBJC])], 11180dc9477beSmrg [m4_define([AC_PROG_OBJC], 11181dc9477beSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11182dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11183dc9477beSmrg [_AM_DEPENDENCIES([OBJCXX])], 11184dc9477beSmrg [m4_define([AC_PROG_OBJCXX], 11185dc9477beSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11186dc9477beSmrg]) 11187dc9477beSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 11188dc9477beSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 11189dc9477beSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11190dc9477beSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11191dc9477beSmrgAC_CONFIG_COMMANDS_PRE(dnl 11192dc9477beSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11193dc9477beSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11194dc9477beSmrg]) 11195b789ec8aSmrg 11196dc9477beSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11197dc9477beSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11198dc9477beSmrgdnl mangled by Autoconf and run in a shell conditional statement. 11199dc9477beSmrgm4_define([_AC_COMPILER_EXEEXT], 11200dc9477beSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1120189069ce9Smrg 11202b789ec8aSmrg 11203dc9477beSmrg# When config.status generates a header, we must update the stamp-h file. 11204dc9477beSmrg# This file resides in the same directory as the config header 11205dc9477beSmrg# that is generated. The stamp files are numbered to have different names. 11206b789ec8aSmrg 11207dc9477beSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11208dc9477beSmrg# loop where config.status creates the headers, so we can generate 11209dc9477beSmrg# our stamp files there. 11210dc9477beSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11211dc9477beSmrg[# Compute $1's index in $config_headers. 11212dc9477beSmrg_am_arg=$1 11213dc9477beSmrg_am_stamp_count=1 11214dc9477beSmrgfor _am_header in $config_headers :; do 11215dc9477beSmrg case $_am_header in 11216dc9477beSmrg $_am_arg | $_am_arg:* ) 11217dc9477beSmrg break ;; 11218dc9477beSmrg * ) 11219dc9477beSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11220dc9477beSmrg esac 11221dc9477beSmrgdone 11222dc9477beSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11223dc9477beSmrg 11224dc9477beSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1122589069ce9Smrg# 11226dc9477beSmrg# This file is free software; the Free Software Foundation 11227dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11228dc9477beSmrg# with or without modifications, as long as this notice is preserved. 11229b789ec8aSmrg 11230dc9477beSmrg# AM_PROG_INSTALL_SH 11231dc9477beSmrg# ------------------ 11232dc9477beSmrg# Define $install_sh. 11233dc9477beSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 11234dc9477beSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11235dc9477beSmrgif test x"${install_sh}" != xset; then 11236dc9477beSmrg case $am_aux_dir in 11237dc9477beSmrg *\ * | *\ *) 11238dc9477beSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11239dc9477beSmrg *) 11240dc9477beSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11241dc9477beSmrg esac 1124206c34b88Smrgfi 11243dc9477beSmrgAC_SUBST([install_sh])]) 11244f1ee322dSmrg 11245dc9477beSmrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 11246dc9477beSmrg# 11247dc9477beSmrg# This file is free software; the Free Software Foundation 11248dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11249dc9477beSmrg# with or without modifications, as long as this notice is preserved. 11250dc9477beSmrg 11251dc9477beSmrg# Check whether the underlying file-system supports filenames 11252dc9477beSmrg# with a leading dot. For instance MS-DOS doesn't. 11253dc9477beSmrgAC_DEFUN([AM_SET_LEADING_DOT], 11254dc9477beSmrg[rm -rf .tst 2>/dev/null 11255dc9477beSmrgmkdir .tst 2>/dev/null 11256dc9477beSmrgif test -d .tst; then 11257dc9477beSmrg am__leading_dot=. 1125806c34b88Smrgelse 11259dc9477beSmrg am__leading_dot=_ 1126089069ce9Smrgfi 11261dc9477beSmrgrmdir .tst 2>/dev/null 11262dc9477beSmrgAC_SUBST([am__leading_dot])]) 1126337eb1ca1Smrg 11264dc9477beSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1126506c34b88Smrg 11266dc9477beSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1126706c34b88Smrg# 11268dc9477beSmrg# This file is free software; the Free Software Foundation 11269dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11270dc9477beSmrg# with or without modifications, as long as this notice is preserved. 11271b789ec8aSmrg 11272dc9477beSmrg# AM_MAKE_INCLUDE() 11273dc9477beSmrg# ----------------- 11274dc9477beSmrg# Check to see how make treats includes. 11275dc9477beSmrgAC_DEFUN([AM_MAKE_INCLUDE], 11276dc9477beSmrg[am_make=${MAKE-make} 11277dc9477beSmrgcat > confinc << 'END' 11278dc9477beSmrgam__doit: 11279dc9477beSmrg @echo this is the am__doit target 11280dc9477beSmrg.PHONY: am__doit 11281dc9477beSmrgEND 11282dc9477beSmrg# If we don't find an include directive, just comment out the code. 11283dc9477beSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11284dc9477beSmrgam__include="#" 11285dc9477beSmrgam__quote= 11286dc9477beSmrg_am_result=none 11287dc9477beSmrg# First try GNU make style include. 11288dc9477beSmrgecho "include confinc" > confmf 11289dc9477beSmrg# Ignore all kinds of additional output from 'make'. 11290dc9477beSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11291dc9477beSmrg*the\ am__doit\ target*) 11292dc9477beSmrg am__include=include 11293dc9477beSmrg am__quote= 11294dc9477beSmrg _am_result=GNU 11295dc9477beSmrg ;; 11296dc9477beSmrgesac 11297dc9477beSmrg# Now try BSD make style include. 11298dc9477beSmrgif test "$am__include" = "#"; then 11299dc9477beSmrg echo '.include "confinc"' > confmf 11300dc9477beSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 11301dc9477beSmrg *the\ am__doit\ target*) 11302dc9477beSmrg am__include=.include 11303dc9477beSmrg am__quote="\"" 11304dc9477beSmrg _am_result=BSD 11305dc9477beSmrg ;; 11306dc9477beSmrg esac 1130789069ce9Smrgfi 11308dc9477beSmrgAC_SUBST([am__include]) 11309dc9477beSmrgAC_SUBST([am__quote]) 11310dc9477beSmrgAC_MSG_RESULT([$_am_result]) 11311dc9477beSmrgrm -f confinc confmf 11312dc9477beSmrg]) 1131337eb1ca1Smrg 11314dc9477beSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1131506c34b88Smrg 11316dc9477beSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 11317dc9477beSmrg# 11318dc9477beSmrg# This file is free software; the Free Software Foundation 11319dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11320dc9477beSmrg# with or without modifications, as long as this notice is preserved. 1132106c34b88Smrg 11322dc9477beSmrg# AM_MISSING_PROG(NAME, PROGRAM) 11323dc9477beSmrg# ------------------------------ 11324dc9477beSmrgAC_DEFUN([AM_MISSING_PROG], 11325dc9477beSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11326dc9477beSmrg$1=${$1-"${am_missing_run}$2"} 11327dc9477beSmrgAC_SUBST($1)]) 11328b789ec8aSmrg 11329dc9477beSmrg# AM_MISSING_HAS_RUN 11330dc9477beSmrg# ------------------ 11331dc9477beSmrg# Define MISSING if not defined so far and test if it is modern enough. 11332dc9477beSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 11333dc9477beSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 11334dc9477beSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11335dc9477beSmrgAC_REQUIRE_AUX_FILE([missing])dnl 11336dc9477beSmrgif test x"${MISSING+set}" != xset; then 11337dc9477beSmrg case $am_aux_dir in 11338dc9477beSmrg *\ * | *\ *) 11339dc9477beSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11340dc9477beSmrg *) 11341dc9477beSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11342dc9477beSmrg esac 11343dc9477beSmrgfi 11344dc9477beSmrg# Use eval to expand $SHELL 11345dc9477beSmrgif eval "$MISSING --is-lightweight"; then 11346dc9477beSmrg am_missing_run="$MISSING " 11347dc9477beSmrgelse 11348dc9477beSmrg am_missing_run= 11349dc9477beSmrg AC_MSG_WARN(['missing' script is too old or missing]) 11350dc9477beSmrgfi 11351dc9477beSmrg]) 11352dc9477beSmrg 11353dc9477beSmrg# Helper functions for option handling. -*- Autoconf -*- 11354dc9477beSmrg 11355dc9477beSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1135606c34b88Smrg# 11357dc9477beSmrg# This file is free software; the Free Software Foundation 11358dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11359dc9477beSmrg# with or without modifications, as long as this notice is preserved. 11360b789ec8aSmrg 11361dc9477beSmrg# _AM_MANGLE_OPTION(NAME) 11362dc9477beSmrg# ----------------------- 11363dc9477beSmrgAC_DEFUN([_AM_MANGLE_OPTION], 11364dc9477beSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11365b789ec8aSmrg 11366dc9477beSmrg# _AM_SET_OPTION(NAME) 11367dc9477beSmrg# -------------------- 11368dc9477beSmrg# Set option NAME. Presently that only means defining a flag for this option. 11369dc9477beSmrgAC_DEFUN([_AM_SET_OPTION], 11370dc9477beSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 1137137eb1ca1Smrg 11372dc9477beSmrg# _AM_SET_OPTIONS(OPTIONS) 11373dc9477beSmrg# ------------------------ 11374dc9477beSmrg# OPTIONS is a space-separated list of Automake options. 11375dc9477beSmrgAC_DEFUN([_AM_SET_OPTIONS], 11376dc9477beSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1137706c34b88Smrg 11378dc9477beSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11379dc9477beSmrg# ------------------------------------------- 11380dc9477beSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11381dc9477beSmrgAC_DEFUN([_AM_IF_OPTION], 11382dc9477beSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11383b789ec8aSmrg 11384dc9477beSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1138506c34b88Smrg 11386dc9477beSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 1138706c34b88Smrg# 11388dc9477beSmrg# This file is free software; the Free Software Foundation 11389dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11390dc9477beSmrg# with or without modifications, as long as this notice is preserved. 11391b789ec8aSmrg 11392dc9477beSmrg# AM_SANITY_CHECK 11393dc9477beSmrg# --------------- 11394dc9477beSmrgAC_DEFUN([AM_SANITY_CHECK], 11395dc9477beSmrg[AC_MSG_CHECKING([whether build environment is sane]) 11396dc9477beSmrg# Reject unsafe characters in $srcdir or the absolute working directory 11397dc9477beSmrg# name. Accept space and tab only in the latter. 11398dc9477beSmrgam_lf=' 11399dc9477beSmrg' 11400dc9477beSmrgcase `pwd` in 11401dc9477beSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 11402dc9477beSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 11403dc9477beSmrgesac 11404dc9477beSmrgcase $srcdir in 11405dc9477beSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 11406dc9477beSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 11407dc9477beSmrgesac 11408b789ec8aSmrg 11409dc9477beSmrg# Do 'set' in a subshell so we don't clobber the current shell's 11410dc9477beSmrg# arguments. Must try -L first in case configure is actually a 11411dc9477beSmrg# symlink; some systems play weird games with the mod time of symlinks 11412dc9477beSmrg# (eg FreeBSD returns the mod time of the symlink's containing 11413dc9477beSmrg# directory). 11414dc9477beSmrgif ( 11415dc9477beSmrg am_has_slept=no 11416dc9477beSmrg for am_try in 1 2; do 11417dc9477beSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 11418dc9477beSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 11419dc9477beSmrg if test "$[*]" = "X"; then 11420dc9477beSmrg # -L didn't work. 11421dc9477beSmrg set X `ls -t "$srcdir/configure" conftest.file` 11422dc9477beSmrg fi 11423dc9477beSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 11424dc9477beSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 11425b789ec8aSmrg 11426dc9477beSmrg # If neither matched, then we have a broken ls. This can happen 11427dc9477beSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 11428dc9477beSmrg # broken ls alias from the environment. This has actually 11429dc9477beSmrg # happened. Such a system could not be considered "sane". 11430dc9477beSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 11431dc9477beSmrg alias in your environment]) 11432dc9477beSmrg fi 11433dc9477beSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 11434dc9477beSmrg break 11435dc9477beSmrg fi 11436dc9477beSmrg # Just in case. 11437dc9477beSmrg sleep 1 11438dc9477beSmrg am_has_slept=yes 11439dc9477beSmrg done 11440dc9477beSmrg test "$[2]" = conftest.file 11441dc9477beSmrg ) 11442dc9477beSmrgthen 11443dc9477beSmrg # Ok. 11444dc9477beSmrg : 11445dc9477beSmrgelse 11446dc9477beSmrg AC_MSG_ERROR([newly created file is older than distributed files! 11447dc9477beSmrgCheck your system clock]) 1144889069ce9Smrgfi 11449dc9477beSmrgAC_MSG_RESULT([yes]) 11450dc9477beSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 11451dc9477beSmrg# generated files are strictly newer. 11452dc9477beSmrgam_sleep_pid= 11453dc9477beSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 11454dc9477beSmrg ( sleep 1 ) & 11455dc9477beSmrg am_sleep_pid=$! 1145689069ce9Smrgfi 11457dc9477beSmrgAC_CONFIG_COMMANDS_PRE( 11458dc9477beSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 11459dc9477beSmrg if test -n "$am_sleep_pid"; then 11460dc9477beSmrg # Hide warnings about reused PIDs. 11461dc9477beSmrg wait $am_sleep_pid 2>/dev/null 11462dc9477beSmrg fi 11463dc9477beSmrg AC_MSG_RESULT([done])]) 11464dc9477beSmrgrm -f conftest.file 1146506c34b88Smrg]) 114663e256790Smrg 11467dc9477beSmrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 1146806c34b88Smrg# 11469dc9477beSmrg# This file is free software; the Free Software Foundation 11470dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11471dc9477beSmrg# with or without modifications, as long as this notice is preserved. 11472f1ee322dSmrg 11473dc9477beSmrg# AM_SILENT_RULES([DEFAULT]) 11474dc9477beSmrg# -------------------------- 11475dc9477beSmrg# Enable less verbose build rules; with the default set to DEFAULT 11476dc9477beSmrg# ("yes" being less verbose, "no" or empty being verbose). 11477dc9477beSmrgAC_DEFUN([AM_SILENT_RULES], 11478dc9477beSmrg[AC_ARG_ENABLE([silent-rules], [dnl 11479dc9477beSmrgAS_HELP_STRING( 11480dc9477beSmrg [--enable-silent-rules], 11481dc9477beSmrg [less verbose build output (undo: "make V=1")]) 11482dc9477beSmrgAS_HELP_STRING( 11483dc9477beSmrg [--disable-silent-rules], 11484dc9477beSmrg [verbose build output (undo: "make V=0")])dnl 11485dc9477beSmrg]) 11486dc9477beSmrgcase $enable_silent_rules in @%:@ ((( 11487dc9477beSmrg yes) AM_DEFAULT_VERBOSITY=0;; 11488dc9477beSmrg no) AM_DEFAULT_VERBOSITY=1;; 11489dc9477beSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 11490dc9477beSmrgesac 11491dc9477beSmrgdnl 11492dc9477beSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 11493dc9477beSmrgdnl do not support nested variable expansions. 11494dc9477beSmrgdnl See automake bug#9928 and bug#10237. 11495dc9477beSmrgam_make=${MAKE-make} 11496dc9477beSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 11497dc9477beSmrg [am_cv_make_support_nested_variables], 11498dc9477beSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 11499dc9477beSmrgBAR0=false 11500dc9477beSmrgBAR1=true 11501dc9477beSmrgV=1 11502dc9477beSmrgam__doit: 11503dc9477beSmrg @$(TRUE) 11504dc9477beSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11505dc9477beSmrg am_cv_make_support_nested_variables=yes 11506b789ec8aSmrgelse 11507dc9477beSmrg am_cv_make_support_nested_variables=no 11508dc9477beSmrgfi]) 11509dc9477beSmrgif test $am_cv_make_support_nested_variables = yes; then 11510dc9477beSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 11511dc9477beSmrg AM_V='$(V)' 11512dc9477beSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11513dc9477beSmrgelse 11514dc9477beSmrg AM_V=$AM_DEFAULT_VERBOSITY 11515dc9477beSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11516f1ee322dSmrgfi 11517dc9477beSmrgAC_SUBST([AM_V])dnl 11518dc9477beSmrgAM_SUBST_NOTMAKE([AM_V])dnl 11519dc9477beSmrgAC_SUBST([AM_DEFAULT_V])dnl 11520dc9477beSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 11521dc9477beSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 11522dc9477beSmrgAM_BACKSLASH='\' 11523dc9477beSmrgAC_SUBST([AM_BACKSLASH])dnl 11524dc9477beSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 11525dc9477beSmrg]) 11526c43cc173Smrg 11527dc9477beSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11528dc9477beSmrg# 11529dc9477beSmrg# This file is free software; the Free Software Foundation 11530dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11531dc9477beSmrg# with or without modifications, as long as this notice is preserved. 1153206c34b88Smrg 11533dc9477beSmrg# AM_PROG_INSTALL_STRIP 11534dc9477beSmrg# --------------------- 11535dc9477beSmrg# One issue with vendor 'install' (even GNU) is that you can't 11536dc9477beSmrg# specify the program used to strip binaries. This is especially 11537dc9477beSmrg# annoying in cross-compiling environments, where the build's strip 11538dc9477beSmrg# is unlikely to handle the host's binaries. 11539dc9477beSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 11540dc9477beSmrg# always use install-sh in "make install-strip", and initialize 11541dc9477beSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 11542dc9477beSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 11543dc9477beSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11544dc9477beSmrg# Installed binaries are usually stripped using 'strip' when the user 11545dc9477beSmrg# run "make install-strip". However 'strip' might not be the right 11546dc9477beSmrg# tool to use in cross-compilation environments, therefore Automake 11547dc9477beSmrg# will honor the 'STRIP' environment variable to overrule this program. 11548dc9477beSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 11549dc9477beSmrgif test "$cross_compiling" != no; then 11550dc9477beSmrg AC_CHECK_TOOL([STRIP], [strip], :) 11551f1ee322dSmrgfi 11552dc9477beSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 11553dc9477beSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 11554c43cc173Smrg 11555dc9477beSmrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 1155606c34b88Smrg# 11557dc9477beSmrg# This file is free software; the Free Software Foundation 11558dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11559dc9477beSmrg# with or without modifications, as long as this notice is preserved. 11560dc9477beSmrg 11561dc9477beSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 11562dc9477beSmrg# --------------------------- 11563dc9477beSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 11564dc9477beSmrg# This macro is traced by Automake. 11565dc9477beSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 11566dc9477beSmrg 11567dc9477beSmrg# AM_SUBST_NOTMAKE(VARIABLE) 11568dc9477beSmrg# -------------------------- 11569dc9477beSmrg# Public sister of _AM_SUBST_NOTMAKE. 11570dc9477beSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1157137eb1ca1Smrg 11572dc9477beSmrg# Check how to create a tarball. -*- Autoconf -*- 11573dc9477beSmrg 11574dc9477beSmrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 1157506c34b88Smrg# 11576dc9477beSmrg# This file is free software; the Free Software Foundation 11577dc9477beSmrg# gives unlimited permission to copy and/or distribute it, 11578dc9477beSmrg# with or without modifications, as long as this notice is preserved. 11579dc9477beSmrg 11580dc9477beSmrg# _AM_PROG_TAR(FORMAT) 11581dc9477beSmrg# -------------------- 11582dc9477beSmrg# Check how to create a tarball in format FORMAT. 11583dc9477beSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1158406c34b88Smrg# 11585dc9477beSmrg# Substitute a variable $(am__tar) that is a command 11586dc9477beSmrg# writing to stdout a FORMAT-tarball containing the directory 11587dc9477beSmrg# $tardir. 11588dc9477beSmrg# tardir=directory && $(am__tar) > result.tar 11589dc9477beSmrg# 11590dc9477beSmrg# Substitute a variable $(am__untar) that extract such 11591dc9477beSmrg# a tarball read from stdin. 11592dc9477beSmrg# $(am__untar) < result.tar 11593dc9477beSmrg# 11594dc9477beSmrgAC_DEFUN([_AM_PROG_TAR], 11595dc9477beSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 11596dc9477beSmrg# in the wild :-( We should find a proper way to deprecate it ... 11597dc9477beSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1159837eb1ca1Smrg 11599dc9477beSmrg# We'll loop over all known methods to create a tar archive until one works. 11600dc9477beSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 11601c27c18e8Smrg 11602dc9477beSmrgm4_if([$1], [v7], 11603dc9477beSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 11604b789ec8aSmrg 11605dc9477beSmrg [m4_case([$1], 11606dc9477beSmrg [ustar], 11607dc9477beSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 11608dc9477beSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 11609dc9477beSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 11610dc9477beSmrg # and bug#13588). 11611dc9477beSmrg am_max_uid=2097151 # 2^21 - 1 11612dc9477beSmrg am_max_gid=$am_max_uid 11613dc9477beSmrg # The $UID and $GID variables are not portable, so we need to resort 11614dc9477beSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 11615dc9477beSmrg # below are definitely unexpected, so allow the users to see them 11616dc9477beSmrg # (that is, avoid stderr redirection). 11617dc9477beSmrg am_uid=`id -u || echo unknown` 11618dc9477beSmrg am_gid=`id -g || echo unknown` 11619dc9477beSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 11620dc9477beSmrg if test $am_uid -le $am_max_uid; then 11621dc9477beSmrg AC_MSG_RESULT([yes]) 11622dc9477beSmrg else 11623dc9477beSmrg AC_MSG_RESULT([no]) 11624dc9477beSmrg _am_tools=none 11625dc9477beSmrg fi 11626dc9477beSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 11627dc9477beSmrg if test $am_gid -le $am_max_gid; then 11628dc9477beSmrg AC_MSG_RESULT([yes]) 11629dc9477beSmrg else 11630dc9477beSmrg AC_MSG_RESULT([no]) 11631dc9477beSmrg _am_tools=none 11632dc9477beSmrg fi], 11633b789ec8aSmrg 11634dc9477beSmrg [pax], 11635dc9477beSmrg [], 11636c27c18e8Smrg 11637dc9477beSmrg [m4_fatal([Unknown tar format])]) 1163889069ce9Smrg 11639dc9477beSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 116403e256790Smrg 11641dc9477beSmrg # Go ahead even if we have the value already cached. We do so because we 11642dc9477beSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 11643dc9477beSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 11644c43cc173Smrg 11645dc9477beSmrg for _am_tool in $_am_tools; do 11646dc9477beSmrg case $_am_tool in 11647dc9477beSmrg gnutar) 11648dc9477beSmrg for _am_tar in tar gnutar gtar; do 11649dc9477beSmrg AM_RUN_LOG([$_am_tar --version]) && break 11650dc9477beSmrg done 11651dc9477beSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11652dc9477beSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11653dc9477beSmrg am__untar="$_am_tar -xf -" 11654dc9477beSmrg ;; 11655dc9477beSmrg plaintar) 11656dc9477beSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 11657dc9477beSmrg # ustar tarball either. 11658dc9477beSmrg (tar --version) >/dev/null 2>&1 && continue 11659dc9477beSmrg am__tar='tar chf - "$$tardir"' 11660dc9477beSmrg am__tar_='tar chf - "$tardir"' 11661dc9477beSmrg am__untar='tar xf -' 11662dc9477beSmrg ;; 11663dc9477beSmrg pax) 11664dc9477beSmrg am__tar='pax -L -x $1 -w "$$tardir"' 11665dc9477beSmrg am__tar_='pax -L -x $1 -w "$tardir"' 11666dc9477beSmrg am__untar='pax -r' 11667dc9477beSmrg ;; 11668dc9477beSmrg cpio) 11669dc9477beSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11670dc9477beSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11671dc9477beSmrg am__untar='cpio -i -H $1 -d' 11672dc9477beSmrg ;; 11673dc9477beSmrg none) 11674dc9477beSmrg am__tar=false 11675dc9477beSmrg am__tar_=false 11676dc9477beSmrg am__untar=false 11677dc9477beSmrg ;; 11678dc9477beSmrg esac 1167921e67964Smrg 11680dc9477beSmrg # If the value was cached, stop now. We just wanted to have am__tar 11681dc9477beSmrg # and am__untar set. 11682dc9477beSmrg test -n "${am_cv_prog_tar_$1}" && break 11683dc9477beSmrg 11684dc9477beSmrg # tar/untar a dummy directory, and stop if the command works. 11685dc9477beSmrg rm -rf conftest.dir 11686dc9477beSmrg mkdir conftest.dir 11687dc9477beSmrg echo GrepMe > conftest.dir/file 11688dc9477beSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11689dc9477beSmrg rm -rf conftest.dir 11690dc9477beSmrg if test -s conftest.tar; then 11691dc9477beSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 11692dc9477beSmrg AM_RUN_LOG([cat conftest.dir/file]) 11693dc9477beSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11694dc9477beSmrg fi 11695dc9477beSmrg done 11696dc9477beSmrg rm -rf conftest.dir 11697dc9477beSmrg 11698dc9477beSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11699dc9477beSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11700dc9477beSmrg 11701dc9477beSmrgAC_SUBST([am__tar]) 11702dc9477beSmrgAC_SUBST([am__untar]) 11703dc9477beSmrg]) # _AM_PROG_TAR 11704c43cc173Smrg 11705