aclocal.m4 revision 4940c694
14940c694Smrg# generated automatically by aclocal 1.16.1 -*- Autoconf -*- 2f1ee322dSmrg 34940c694Smrg# Copyright (C) 1996-2018 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# 2548e5ce07Smrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 26dc9477beSmrg# Written by Gordon Matzigkeit, 1996 27c27c18e8Smrg# 28dc9477beSmrg# This file is free software; the Free Software Foundation gives 29dc9477beSmrg# unlimited permission to copy and/or distribute it, with or without 30dc9477beSmrg# modifications, as long as this notice is preserved. 31c27c18e8Smrg 32dc9477beSmrgm4_define([_LT_COPYING], [dnl 3348e5ce07Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 3448e5ce07Smrg# This is free software; see the source for copying conditions. There is NO 3548e5ce07Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3648e5ce07Smrg 3748e5ce07Smrg# GNU Libtool is free software; you can redistribute it and/or modify 3848e5ce07Smrg# it under the terms of the GNU General Public License as published by 3948e5ce07Smrg# the Free Software Foundation; either version 2 of of the License, or 4048e5ce07Smrg# (at your option) any later version. 410eb1301bSmrg# 4248e5ce07Smrg# As a special exception to the GNU General Public License, if you 4348e5ce07Smrg# distribute this file as part of a program or library that is built 4448e5ce07Smrg# using GNU Libtool, you may include this file under the same 4548e5ce07Smrg# distribution terms that you use for the rest of that program. 460eb1301bSmrg# 4748e5ce07Smrg# GNU Libtool is distributed in the hope that it will be useful, but 4848e5ce07Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 49dc9477beSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50dc9477beSmrg# GNU General Public License for more details. 51c27c18e8Smrg# 52dc9477beSmrg# You should have received a copy of the GNU General Public License 5348e5ce07Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 54c27c18e8Smrg]) 55c27c18e8Smrg 5648e5ce07Smrg# serial 58 LT_INIT 57c27c18e8Smrg 58c43cc173Smrg 59dc9477beSmrg# LT_PREREQ(VERSION) 60dc9477beSmrg# ------------------ 61dc9477beSmrg# Complain and exit if this libtool version is less that VERSION. 62dc9477beSmrgm4_defun([LT_PREREQ], 63dc9477beSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64dc9477beSmrg [m4_default([$3], 65dc9477beSmrg [m4_fatal([Libtool version $1 or higher is required], 66dc9477beSmrg 63)])], 67dc9477beSmrg [$2])]) 68c43cc173Smrg 69c27c18e8Smrg 70dc9477beSmrg# _LT_CHECK_BUILDDIR 71dc9477beSmrg# ------------------ 72dc9477beSmrg# Complain if the absolute build directory name contains unusual characters 73dc9477beSmrgm4_defun([_LT_CHECK_BUILDDIR], 74dc9477beSmrg[case `pwd` in 75dc9477beSmrg *\ * | *\ *) 76dc9477beSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77dc9477beSmrgesac 78dc9477beSmrg]) 79c27c18e8Smrg 80c27c18e8Smrg 81dc9477beSmrg# LT_INIT([OPTIONS]) 82dc9477beSmrg# ------------------ 83dc9477beSmrgAC_DEFUN([LT_INIT], 8448e5ce07Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85dc9477beSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86dc9477beSmrgAC_BEFORE([$0], [LT_LANG])dnl 87dc9477beSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 88dc9477beSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 89dc9477beSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 90c27c18e8Smrg 91dc9477beSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 92dc9477beSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93dc9477beSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94dc9477beSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95dc9477beSmrgdnl unless we require an AC_DEFUNed macro: 96dc9477beSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 97dc9477beSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 98dc9477beSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 99dc9477beSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 100dc9477beSmrgm4_require([_LT_PROG_LTMAIN])dnl 101c27c18e8Smrg 102dc9477beSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 103c27c18e8Smrg 104dc9477beSmrgdnl Parse OPTIONS 105dc9477beSmrg_LT_SET_OPTIONS([$0], [$1]) 106c43cc173Smrg 107dc9477beSmrg# This can be used to rebuild libtool when needed 10848e5ce07SmrgLIBTOOL_DEPS=$ltmain 109c43cc173Smrg 110dc9477beSmrg# Always use our own libtool. 111dc9477beSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 112dc9477beSmrgAC_SUBST(LIBTOOL)dnl 113c43cc173Smrg 114dc9477beSmrg_LT_SETUP 115c43cc173Smrg 116dc9477beSmrg# Only expand once: 117dc9477beSmrgm4_define([LT_INIT]) 118dc9477beSmrg])# LT_INIT 119c43cc173Smrg 120dc9477beSmrg# Old names: 121dc9477beSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122dc9477beSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 124dc9477beSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125dc9477beSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 126c43cc173Smrg 127c43cc173Smrg 12848e5ce07Smrg# _LT_PREPARE_CC_BASENAME 12948e5ce07Smrg# ----------------------- 13048e5ce07Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 13148e5ce07Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 13248e5ce07Smrgfunc_cc_basename () 13348e5ce07Smrg{ 13448e5ce07Smrg for cc_temp in @S|@*""; do 13548e5ce07Smrg case $cc_temp in 13648e5ce07Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 13748e5ce07Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 13848e5ce07Smrg \-*) ;; 13948e5ce07Smrg *) break;; 14048e5ce07Smrg esac 14148e5ce07Smrg done 14248e5ce07Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 14348e5ce07Smrg} 14448e5ce07Smrg])# _LT_PREPARE_CC_BASENAME 14548e5ce07Smrg 14648e5ce07Smrg 147dc9477beSmrg# _LT_CC_BASENAME(CC) 148dc9477beSmrg# ------------------- 14948e5ce07Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 15048e5ce07Smrg# but that macro is also expanded into generated libtool script, which 15148e5ce07Smrg# arranges for $SED and $ECHO to be set by different means. 152dc9477beSmrgm4_defun([_LT_CC_BASENAME], 15348e5ce07Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 15448e5ce07SmrgAC_REQUIRE([_LT_DECL_SED])dnl 15548e5ce07SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 15648e5ce07Smrgfunc_cc_basename $1 15748e5ce07Smrgcc_basename=$func_cc_basename_result 15806c34b88Smrg]) 15937eb1ca1Smrg 16037eb1ca1Smrg 161dc9477beSmrg# _LT_FILEUTILS_DEFAULTS 162dc9477beSmrg# ---------------------- 163dc9477beSmrg# It is okay to use these file commands and assume they have been set 16448e5ce07Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 165dc9477beSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 166dc9477beSmrg[: ${CP="cp -f"} 167dc9477beSmrg: ${MV="mv -f"} 168dc9477beSmrg: ${RM="rm -f"} 169dc9477beSmrg])# _LT_FILEUTILS_DEFAULTS 17037eb1ca1Smrg 171c43cc173Smrg 172dc9477beSmrg# _LT_SETUP 173dc9477beSmrg# --------- 174dc9477beSmrgm4_defun([_LT_SETUP], 175dc9477beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176dc9477beSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 177dc9477beSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 178dc9477beSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 179c43cc173Smrg 180dc9477beSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181dc9477beSmrgdnl 182dc9477beSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 183dc9477beSmrg_LT_DECL([], [host], [0])dnl 184dc9477beSmrg_LT_DECL([], [host_os], [0])dnl 185dc9477beSmrgdnl 186dc9477beSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 187dc9477beSmrg_LT_DECL([], [build], [0])dnl 188dc9477beSmrg_LT_DECL([], [build_os], [0])dnl 189dc9477beSmrgdnl 190dc9477beSmrgAC_REQUIRE([AC_PROG_CC])dnl 191dc9477beSmrgAC_REQUIRE([LT_PATH_LD])dnl 192dc9477beSmrgAC_REQUIRE([LT_PATH_NM])dnl 193dc9477beSmrgdnl 194dc9477beSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 195dc9477beSmrgtest -z "$LN_S" && LN_S="ln -s" 196dc9477beSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197dc9477beSmrgdnl 198dc9477beSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 199dc9477beSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 200dc9477beSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 201dc9477beSmrgdnl 202dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 203dc9477beSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 204dc9477beSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 205dc9477beSmrgm4_require([_LT_CMD_RELOAD])dnl 206dc9477beSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 207dc9477beSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 208dc9477beSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 209dc9477beSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210dc9477beSmrgm4_require([_LT_WITH_SYSROOT])dnl 21148e5ce07Smrgm4_require([_LT_CMD_TRUNCATE])dnl 212c27c18e8Smrg 213dc9477beSmrg_LT_CONFIG_LIBTOOL_INIT([ 21448e5ce07Smrg# See if we are running on zsh, and set the options that allow our 215dc9477beSmrg# commands through without removal of \ escapes INIT. 21648e5ce07Smrgif test -n "\${ZSH_VERSION+set}"; then 217dc9477beSmrg setopt NO_GLOB_SUBST 218dc9477beSmrgfi 21906c34b88Smrg]) 22048e5ce07Smrgif test -n "${ZSH_VERSION+set}"; then 221dc9477beSmrg setopt NO_GLOB_SUBST 222dc9477beSmrgfi 223c27c18e8Smrg 224dc9477beSmrg_LT_CHECK_OBJDIR 225c27c18e8Smrg 226dc9477beSmrgm4_require([_LT_TAG_COMPILER])dnl 227c27c18e8Smrg 228dc9477beSmrgcase $host_os in 229dc9477beSmrgaix3*) 230dc9477beSmrg # AIX sometimes has problems with the GCC collect2 program. For some 231dc9477beSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 232dc9477beSmrg # vanish in a puff of smoke. 23348e5ce07Smrg if test set != "${COLLECT_NAMES+set}"; then 234dc9477beSmrg COLLECT_NAMES= 235dc9477beSmrg export COLLECT_NAMES 23606c34b88Smrg fi 237dc9477beSmrg ;; 238dc9477beSmrgesac 239c27c18e8Smrg 240dc9477beSmrg# Global variables: 241dc9477beSmrgofile=libtool 242dc9477beSmrgcan_build_shared=yes 243c27c18e8Smrg 24448e5ce07Smrg# All known linkers require a '.a' archive for static linking (except MSVC, 245dc9477beSmrg# which needs '.lib'). 246dc9477beSmrglibext=a 247c27c18e8Smrg 24848e5ce07Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 249c27c18e8Smrg 25048e5ce07Smrgold_CC=$CC 25148e5ce07Smrgold_CFLAGS=$CFLAGS 252c27c18e8Smrg 253dc9477beSmrg# Set sane defaults for various variables 254dc9477beSmrgtest -z "$CC" && CC=cc 255dc9477beSmrgtest -z "$LTCC" && LTCC=$CC 256dc9477beSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257dc9477beSmrgtest -z "$LD" && LD=ld 258dc9477beSmrgtest -z "$ac_objext" && ac_objext=o 259c27c18e8Smrg 260dc9477beSmrg_LT_CC_BASENAME([$compiler]) 261c27c18e8Smrg 262dc9477beSmrg# Only perform the check for file, if the check method requires it 263dc9477beSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 264dc9477beSmrgcase $deplibs_check_method in 265dc9477beSmrgfile_magic*) 266dc9477beSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 267dc9477beSmrg _LT_PATH_MAGIC 268dc9477beSmrg fi 269dc9477beSmrg ;; 270dc9477beSmrgesac 271c27c18e8Smrg 272dc9477beSmrg# Use C for the default configuration in the libtool script 273dc9477beSmrgLT_SUPPORTED_TAG([CC]) 274dc9477beSmrg_LT_LANG_C_CONFIG 275dc9477beSmrg_LT_LANG_DEFAULT_CONFIG 276dc9477beSmrg_LT_CONFIG_COMMANDS 277dc9477beSmrg])# _LT_SETUP 278c27c18e8Smrg 279c27c18e8Smrg 280dc9477beSmrg# _LT_PREPARE_SED_QUOTE_VARS 281dc9477beSmrg# -------------------------- 282dc9477beSmrg# Define a few sed substitution that help us do robust quoting. 283dc9477beSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 284dc9477beSmrg[# Backslashify metacharacters that are still active within 285dc9477beSmrg# double-quoted strings. 286dc9477beSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 287c27c18e8Smrg 288dc9477beSmrg# Same as above, but do not quote variable references. 289dc9477beSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 290c27c18e8Smrg 291dc9477beSmrg# Sed substitution to delay expansion of an escaped shell variable in a 292dc9477beSmrg# double_quote_subst'ed string. 293dc9477beSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294c27c18e8Smrg 295dc9477beSmrg# Sed substitution to delay expansion of an escaped single quote. 296dc9477beSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297c27c18e8Smrg 298dc9477beSmrg# Sed substitution to avoid accidental globbing in evaled expressions 299dc9477beSmrgno_glob_subst='s/\*/\\\*/g' 300dc9477beSmrg]) 301c27c18e8Smrg 302dc9477beSmrg# _LT_PROG_LTMAIN 303dc9477beSmrg# --------------- 30448e5ce07Smrg# Note that this code is called both from 'configure', and 'config.status' 305dc9477beSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 30648e5ce07Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 307dc9477beSmrg# so we pass a copy along to make sure it has a sensible value anyway. 308dc9477beSmrgm4_defun([_LT_PROG_LTMAIN], 309dc9477beSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 310dc9477beSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 31148e5ce07Smrgltmain=$ac_aux_dir/ltmain.sh 312dc9477beSmrg])# _LT_PROG_LTMAIN 313c27c18e8Smrg 314c27c18e8Smrg 315c43cc173Smrg 316dc9477beSmrg# So that we can recreate a full libtool script including additional 317dc9477beSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 31848e5ce07Smrg# in macros and then make a single call at the end using the 'libtool' 319dc9477beSmrg# label. 320dc9477beSmrg 321dc9477beSmrg 322dc9477beSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 323dc9477beSmrg# ---------------------------------------- 324dc9477beSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325dc9477beSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 326dc9477beSmrg[m4_ifval([$1], 327dc9477beSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 328dc9477beSmrg [$1 329dc9477beSmrg])])]) 330dc9477beSmrg 331dc9477beSmrg# Initialize. 332dc9477beSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 333dc9477beSmrg 334dc9477beSmrg 335dc9477beSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 33606c34b88Smrg# ------------------------------ 337dc9477beSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 338dc9477beSmrgm4_define([_LT_CONFIG_LIBTOOL], 339dc9477beSmrg[m4_ifval([$1], 340dc9477beSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 341dc9477beSmrg [$1 342dc9477beSmrg])])]) 343c43cc173Smrg 344dc9477beSmrg# Initialize. 345dc9477beSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 346dc9477beSmrg 347dc9477beSmrg 348dc9477beSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 349dc9477beSmrg# ----------------------------------------------------- 350dc9477beSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 351dc9477beSmrg[_LT_CONFIG_LIBTOOL([$1]) 352dc9477beSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 353c27c18e8Smrg]) 354c27c18e8Smrg 355c27c18e8Smrg 356dc9477beSmrg# _LT_FORMAT_COMMENT([COMMENT]) 357dc9477beSmrg# ----------------------------- 358dc9477beSmrg# Add leading comment marks to the start of each line, and a trailing 359dc9477beSmrg# full-stop to the whole comment if one is not present already. 360dc9477beSmrgm4_define([_LT_FORMAT_COMMENT], 361dc9477beSmrg[m4_ifval([$1], [ 362dc9477beSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 363dc9477beSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 364dc9477beSmrg)]) 365c27c18e8Smrg 366c27c18e8Smrg 367c27c18e8Smrg 368c27c18e8Smrg 369c27c18e8Smrg 370dc9477beSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 371dc9477beSmrg# ------------------------------------------------------------------- 372dc9477beSmrg# CONFIGNAME is the name given to the value in the libtool script. 373dc9477beSmrg# VARNAME is the (base) name used in the configure script. 374dc9477beSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 375dc9477beSmrg# VARNAME. Any other value will be used directly. 376dc9477beSmrgm4_define([_LT_DECL], 377dc9477beSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 378dc9477beSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 379dc9477beSmrg [m4_ifval([$1], [$1], [$2])]) 380dc9477beSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 381dc9477beSmrg m4_ifval([$4], 382dc9477beSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 383dc9477beSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 384dc9477beSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 385dc9477beSmrg]) 386c27c18e8Smrg 387c27c18e8Smrg 388dc9477beSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 389dc9477beSmrg# -------------------------------------------------------- 390dc9477beSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 391c27c18e8Smrg 392c27c18e8Smrg 393dc9477beSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 394dc9477beSmrg# ------------------------------------------------ 395dc9477beSmrgm4_define([lt_decl_tag_varnames], 396dc9477beSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 397dc9477beSmrg 398dc9477beSmrg 399dc9477beSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 400dc9477beSmrg# --------------------------------------------------------- 401dc9477beSmrgm4_define([_lt_decl_filter], 402dc9477beSmrg[m4_case([$#], 403dc9477beSmrg [0], [m4_fatal([$0: too few arguments: $#])], 404dc9477beSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 405dc9477beSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 406dc9477beSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 407dc9477beSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 40806c34b88Smrg]) 409c27c18e8Smrg 410c27c18e8Smrg 411dc9477beSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 412dc9477beSmrg# -------------------------------------------------- 413dc9477beSmrgm4_define([lt_decl_quote_varnames], 414dc9477beSmrg[_lt_decl_filter([value], [1], $@)]) 415dc9477beSmrg 416dc9477beSmrg 417dc9477beSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 418dc9477beSmrg# --------------------------------------------------- 419dc9477beSmrgm4_define([lt_decl_dquote_varnames], 420dc9477beSmrg[_lt_decl_filter([value], [2], $@)]) 421dc9477beSmrg 422dc9477beSmrg 423dc9477beSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 424dc9477beSmrg# --------------------------------------------------- 425dc9477beSmrgm4_define([lt_decl_varnames_tagged], 426dc9477beSmrg[m4_assert([$# <= 2])dnl 427dc9477beSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 428dc9477beSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 429dc9477beSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 430dc9477beSmrgm4_define([_lt_decl_varnames_tagged], 431dc9477beSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432dc9477beSmrg 433dc9477beSmrg 434dc9477beSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 435dc9477beSmrg# ------------------------------------------------ 436dc9477beSmrgm4_define([lt_decl_all_varnames], 437dc9477beSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 438dc9477beSmrg m4_if([$2], [], 439dc9477beSmrg m4_quote(lt_decl_varnames), 440dc9477beSmrg m4_quote(m4_shift($@))))[]dnl 44106c34b88Smrg]) 442dc9477beSmrgm4_define([_lt_decl_all_varnames], 443dc9477beSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 444dc9477beSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 44506c34b88Smrg]) 446c27c18e8Smrg 44737eb1ca1Smrg 448dc9477beSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 449dc9477beSmrg# ------------------------------------ 45048e5ce07Smrg# Quote a variable value, and forward it to 'config.status' so that its 45148e5ce07Smrg# declaration there will have the same value as in 'configure'. VARNAME 452dc9477beSmrg# must have a single quote delimited value for this to work. 453dc9477beSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 454dc9477beSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 45506c34b88Smrg 45606c34b88Smrg 457dc9477beSmrg# _LT_CONFIG_STATUS_DECLARATIONS 458dc9477beSmrg# ------------------------------ 459dc9477beSmrg# We delimit libtool config variables with single quotes, so when 460dc9477beSmrg# we write them to config.status, we have to be sure to quote all 461dc9477beSmrg# embedded single quotes properly. In configure, this macro expands 462dc9477beSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 463dc9477beSmrg# 464dc9477beSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 465dc9477beSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 466dc9477beSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 467dc9477beSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 46806c34b88Smrg 46906c34b88Smrg 470dc9477beSmrg# _LT_LIBTOOL_TAGS 471dc9477beSmrg# ---------------- 472dc9477beSmrg# Output comment and list of tags supported by the script 473dc9477beSmrgm4_defun([_LT_LIBTOOL_TAGS], 474dc9477beSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 47548e5ce07Smrgavailable_tags='_LT_TAGS'dnl 476dc9477beSmrg]) 47706c34b88Smrg 47806c34b88Smrg 479dc9477beSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 480dc9477beSmrg# ----------------------------------- 481dc9477beSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 482dc9477beSmrg# expand to a commented shell variable setting: 48306c34b88Smrg# 484dc9477beSmrg# # Some comment about what VAR is for. 485dc9477beSmrg# visible_name=$lt_internal_name 486dc9477beSmrgm4_define([_LT_LIBTOOL_DECLARE], 487dc9477beSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 488dc9477beSmrg [description])))[]dnl 489dc9477beSmrgm4_pushdef([_libtool_name], 490dc9477beSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 491dc9477beSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 492dc9477beSmrg [0], [_libtool_name=[$]$1], 493dc9477beSmrg [1], [_libtool_name=$lt_[]$1], 494dc9477beSmrg [2], [_libtool_name=$lt_[]$1], 495dc9477beSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 496dc9477beSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 497dc9477beSmrg]) 49806c34b88Smrg 49906c34b88Smrg 500dc9477beSmrg# _LT_LIBTOOL_CONFIG_VARS 501dc9477beSmrg# ----------------------- 502dc9477beSmrg# Produce commented declarations of non-tagged libtool config variables 50348e5ce07Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 504dc9477beSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 505dc9477beSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 506dc9477beSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 507dc9477beSmrg[m4_foreach([_lt_var], 508dc9477beSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 509dc9477beSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 51006c34b88Smrg 51106c34b88Smrg 512dc9477beSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 513dc9477beSmrg# ------------------------- 514dc9477beSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 515dc9477beSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 516dc9477beSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 51706c34b88Smrg 51806c34b88Smrg 519dc9477beSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 520dc9477beSmrg# ------------------------------ 521dc9477beSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 52206c34b88Smrg 52306c34b88Smrg 524dc9477beSmrg# _LT_CONFIG_COMMANDS 525dc9477beSmrg# ------------------- 526dc9477beSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 527dc9477beSmrg# variables for single and double quote escaping we saved from calls 528dc9477beSmrg# to _LT_DECL, we can put quote escaped variables declarations 52948e5ce07Smrg# into 'config.status', and then the shell code to quote escape them in 53048e5ce07Smrg# for loops in 'config.status'. Finally, any additional code accumulated 531dc9477beSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 532dc9477beSmrgm4_defun([_LT_CONFIG_COMMANDS], 533dc9477beSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 534dc9477beSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 535dc9477beSmrg dnl instead of duplicating it all over again into config.status, 536dc9477beSmrg dnl then we will have config.status run $CONFIG_LT later, so it 537dc9477beSmrg dnl needs to know what name is stored there: 538dc9477beSmrg [AC_CONFIG_COMMANDS([libtool], 539dc9477beSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 540dc9477beSmrg dnl If the libtool generation code is destined for config.status, 541dc9477beSmrg dnl expand the accumulated commands and init code now: 542dc9477beSmrg [AC_CONFIG_COMMANDS([libtool], 543dc9477beSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 544dc9477beSmrg])#_LT_CONFIG_COMMANDS 545c27c18e8Smrg 546c27c18e8Smrg 547dc9477beSmrg# Initialize. 548dc9477beSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 549dc9477beSmrg[ 550c27c18e8Smrg 551dc9477beSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 552dc9477beSmrg# if CDPATH is set. 553dc9477beSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 554c27c18e8Smrg 555dc9477beSmrgsed_quote_subst='$sed_quote_subst' 556dc9477beSmrgdouble_quote_subst='$double_quote_subst' 557dc9477beSmrgdelay_variable_subst='$delay_variable_subst' 558dc9477beSmrg_LT_CONFIG_STATUS_DECLARATIONS 559dc9477beSmrgLTCC='$LTCC' 560dc9477beSmrgLTCFLAGS='$LTCFLAGS' 561dc9477beSmrgcompiler='$compiler_DEFAULT' 562c27c18e8Smrg 563dc9477beSmrg# A function that is used when there is no print builtin or printf. 564dc9477beSmrgfunc_fallback_echo () 565dc9477beSmrg{ 566dc9477beSmrg eval 'cat <<_LTECHO_EOF 567dc9477beSmrg\$[]1 568dc9477beSmrg_LTECHO_EOF' 569dc9477beSmrg} 570c27c18e8Smrg 571dc9477beSmrg# Quote evaled strings. 572dc9477beSmrgfor var in lt_decl_all_varnames([[ \ 573dc9477beSmrg]], lt_decl_quote_varnames); do 574dc9477beSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575dc9477beSmrg *[[\\\\\\\`\\"\\\$]]*) 57648e5ce07Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 577dc9477beSmrg ;; 578dc9477beSmrg *) 579dc9477beSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580dc9477beSmrg ;; 581dc9477beSmrg esac 582dc9477beSmrgdone 583c27c18e8Smrg 584dc9477beSmrg# Double-quote double-evaled strings. 585dc9477beSmrgfor var in lt_decl_all_varnames([[ \ 586dc9477beSmrg]], lt_decl_dquote_varnames); do 587dc9477beSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 588dc9477beSmrg *[[\\\\\\\`\\"\\\$]]*) 58948e5ce07Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 590dc9477beSmrg ;; 591dc9477beSmrg *) 592dc9477beSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 593dc9477beSmrg ;; 594dc9477beSmrg esac 595dc9477beSmrgdone 596c27c18e8Smrg 597dc9477beSmrg_LT_OUTPUT_LIBTOOL_INIT 59806c34b88Smrg]) 599c27c18e8Smrg 600dc9477beSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 601dc9477beSmrg# ------------------------------------ 602dc9477beSmrg# Generate a child script FILE with all initialization necessary to 603dc9477beSmrg# reuse the environment learned by the parent script, and make the 604dc9477beSmrg# file executable. If COMMENT is supplied, it is inserted after the 60548e5ce07Smrg# '#!' sequence but before initialization text begins. After this 606dc9477beSmrg# macro, additional text can be appended to FILE to form the body of 607dc9477beSmrg# the child script. The macro ends with non-zero status if the 608dc9477beSmrg# file could not be fully written (such as if the disk is full). 609dc9477beSmrgm4_ifdef([AS_INIT_GENERATED], 610dc9477beSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 611dc9477beSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 612dc9477beSmrg[m4_require([AS_PREPARE])]dnl 613dc9477beSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 614dc9477beSmrg[lt_write_fail=0 615dc9477beSmrgcat >$1 <<_ASEOF || lt_write_fail=1 616dc9477beSmrg#! $SHELL 617dc9477beSmrg# Generated by $as_me. 618dc9477beSmrg$2 619dc9477beSmrgSHELL=\${CONFIG_SHELL-$SHELL} 620dc9477beSmrgexport SHELL 621dc9477beSmrg_ASEOF 622dc9477beSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 623dc9477beSmrgAS_SHELL_SANITIZE 624dc9477beSmrg_AS_PREPARE 625dc9477beSmrgexec AS_MESSAGE_FD>&1 626dc9477beSmrg_ASEOF 62748e5ce07Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 628dc9477beSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 629c27c18e8Smrg 630dc9477beSmrg# LT_OUTPUT 631dc9477beSmrg# --------- 632dc9477beSmrg# This macro allows early generation of the libtool script (before 633dc9477beSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 634dc9477beSmrg# tests. 635dc9477beSmrgAC_DEFUN([LT_OUTPUT], 636dc9477beSmrg[: ${CONFIG_LT=./config.lt} 637dc9477beSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 638dc9477beSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 639dc9477beSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 640c27c18e8Smrg 641dc9477beSmrgcat >>"$CONFIG_LT" <<\_LTEOF 642dc9477beSmrglt_cl_silent=false 643dc9477beSmrgexec AS_MESSAGE_LOG_FD>>config.log 644dc9477beSmrg{ 645dc9477beSmrg echo 646dc9477beSmrg AS_BOX([Running $as_me.]) 647dc9477beSmrg} >&AS_MESSAGE_LOG_FD 648c27c18e8Smrg 649dc9477beSmrglt_cl_help="\ 65048e5ce07Smrg'$as_me' creates a local libtool stub from the current configuration, 651dc9477beSmrgfor use in further configure time tests before the real libtool is 652dc9477beSmrggenerated. 653c27c18e8Smrg 654dc9477beSmrgUsage: $[0] [[OPTIONS]] 655c27c18e8Smrg 656dc9477beSmrg -h, --help print this help, then exit 657dc9477beSmrg -V, --version print version number, then exit 658dc9477beSmrg -q, --quiet do not print progress messages 659dc9477beSmrg -d, --debug don't remove temporary files 660c27c18e8Smrg 661dc9477beSmrgReport bugs to <bug-libtool@gnu.org>." 662c27c18e8Smrg 663dc9477beSmrglt_cl_version="\ 664dc9477beSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 665dc9477beSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 666dc9477beSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 667c27c18e8Smrg 668dc9477beSmrgCopyright (C) 2011 Free Software Foundation, Inc. 669dc9477beSmrgThis config.lt script is free software; the Free Software Foundation 670dc9477beSmrggives unlimited permision to copy, distribute and modify it." 671dc9477beSmrg 67248e5ce07Smrgwhile test 0 != $[#] 673dc9477beSmrgdo 674dc9477beSmrg case $[1] in 675dc9477beSmrg --version | --v* | -V ) 676dc9477beSmrg echo "$lt_cl_version"; exit 0 ;; 677dc9477beSmrg --help | --h* | -h ) 678dc9477beSmrg echo "$lt_cl_help"; exit 0 ;; 679dc9477beSmrg --debug | --d* | -d ) 680dc9477beSmrg debug=: ;; 681dc9477beSmrg --quiet | --q* | --silent | --s* | -q ) 682dc9477beSmrg lt_cl_silent=: ;; 683c27c18e8Smrg 684dc9477beSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 68548e5ce07SmrgTry '$[0] --help' for more information.]) ;; 686c27c18e8Smrg 687dc9477beSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 68848e5ce07SmrgTry '$[0] --help' for more information.]) ;; 68906c34b88Smrg esac 690dc9477beSmrg shift 69106c34b88Smrgdone 692c27c18e8Smrg 693dc9477beSmrgif $lt_cl_silent; then 694dc9477beSmrg exec AS_MESSAGE_FD>/dev/null 695dc9477beSmrgfi 696dc9477beSmrg_LTEOF 697c27c18e8Smrg 698dc9477beSmrgcat >>"$CONFIG_LT" <<_LTEOF 699dc9477beSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 700dc9477beSmrg_LTEOF 701c27c18e8Smrg 702dc9477beSmrgcat >>"$CONFIG_LT" <<\_LTEOF 703dc9477beSmrgAC_MSG_NOTICE([creating $ofile]) 704dc9477beSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 705dc9477beSmrgAS_EXIT(0) 706dc9477beSmrg_LTEOF 707dc9477beSmrgchmod +x "$CONFIG_LT" 708c27c18e8Smrg 709dc9477beSmrg# configure is writing to config.log, but config.lt does its own redirection, 710dc9477beSmrg# appending to config.log, which fails on DOS, as config.log is still kept 711dc9477beSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 712dc9477beSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 713dc9477beSmrglt_cl_success=: 71448e5ce07Smrgtest yes = "$silent" && 715dc9477beSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 716dc9477beSmrgexec AS_MESSAGE_LOG_FD>/dev/null 717dc9477beSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 718dc9477beSmrgexec AS_MESSAGE_LOG_FD>>config.log 719dc9477beSmrg$lt_cl_success || AS_EXIT(1) 720dc9477beSmrg])# LT_OUTPUT 72106c34b88Smrg 72206c34b88Smrg 723dc9477beSmrg# _LT_CONFIG(TAG) 724dc9477beSmrg# --------------- 725dc9477beSmrg# If TAG is the built-in tag, create an initial libtool script with a 726dc9477beSmrg# default configuration from the untagged config vars. Otherwise add code 727dc9477beSmrg# to config.status for appending the configuration named by TAG from the 728dc9477beSmrg# matching tagged config vars. 729dc9477beSmrgm4_defun([_LT_CONFIG], 730dc9477beSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 731dc9477beSmrg_LT_CONFIG_SAVE_COMMANDS([ 732dc9477beSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 733dc9477beSmrg m4_if(_LT_TAG, [C], [ 73448e5ce07Smrg # See if we are running on zsh, and set the options that allow our 735dc9477beSmrg # commands through without removal of \ escapes. 73648e5ce07Smrg if test -n "${ZSH_VERSION+set}"; then 737dc9477beSmrg setopt NO_GLOB_SUBST 738dc9477beSmrg fi 739c27c18e8Smrg 74048e5ce07Smrg cfgfile=${ofile}T 741dc9477beSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 742dc9477beSmrg $RM "$cfgfile" 743c27c18e8Smrg 744dc9477beSmrg cat <<_LT_EOF >> "$cfgfile" 745dc9477beSmrg#! $SHELL 74648e5ce07Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 747dc9477beSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 748dc9477beSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 74948e5ce07Smrg 75048e5ce07Smrg# Provide generalized library-building support services. 75148e5ce07Smrg# Written by Gordon Matzigkeit, 1996 75248e5ce07Smrg 753dc9477beSmrg_LT_COPYING 754dc9477beSmrg_LT_LIBTOOL_TAGS 755c27c18e8Smrg 75648e5ce07Smrg# Configured defaults for sys_lib_dlsearch_path munging. 75748e5ce07Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 75848e5ce07Smrg 759dc9477beSmrg# ### BEGIN LIBTOOL CONFIG 760dc9477beSmrg_LT_LIBTOOL_CONFIG_VARS 761dc9477beSmrg_LT_LIBTOOL_TAG_VARS 762dc9477beSmrg# ### END LIBTOOL CONFIG 763c27c18e8Smrg 76448e5ce07Smrg_LT_EOF 76548e5ce07Smrg 76648e5ce07Smrg cat <<'_LT_EOF' >> "$cfgfile" 76748e5ce07Smrg 76848e5ce07Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 76948e5ce07Smrg 77048e5ce07Smrg_LT_PREPARE_MUNGE_PATH_LIST 77148e5ce07Smrg_LT_PREPARE_CC_BASENAME 77248e5ce07Smrg 77348e5ce07Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 77448e5ce07Smrg 775dc9477beSmrg_LT_EOF 776c27c18e8Smrg 777dc9477beSmrg case $host_os in 778dc9477beSmrg aix3*) 779dc9477beSmrg cat <<\_LT_EOF >> "$cfgfile" 780dc9477beSmrg# AIX sometimes has problems with the GCC collect2 program. For some 781dc9477beSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 782dc9477beSmrg# vanish in a puff of smoke. 78348e5ce07Smrgif test set != "${COLLECT_NAMES+set}"; then 784dc9477beSmrg COLLECT_NAMES= 785dc9477beSmrg export COLLECT_NAMES 786dc9477beSmrgfi 787dc9477beSmrg_LT_EOF 788dc9477beSmrg ;; 789dc9477beSmrg esac 790c27c18e8Smrg 791dc9477beSmrg _LT_PROG_LTMAIN 792c27c18e8Smrg 793dc9477beSmrg # We use sed instead of cat because bash on DJGPP gets confused if 794dc9477beSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 795dc9477beSmrg # text mode, it properly converts lines to CR/LF. This bash problem 796dc9477beSmrg # is reportedly fixed, but why not run on old versions too? 797dc9477beSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 798dc9477beSmrg || (rm -f "$cfgfile"; exit 1) 799c27c18e8Smrg 800dc9477beSmrg mv -f "$cfgfile" "$ofile" || 801dc9477beSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 802dc9477beSmrg chmod +x "$ofile" 803dc9477beSmrg], 804dc9477beSmrg[cat <<_LT_EOF >> "$ofile" 805c27c18e8Smrg 806dc9477beSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 807dc9477beSmrgdnl in a comment (ie after a #). 808dc9477beSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 809dc9477beSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 810dc9477beSmrg# ### END LIBTOOL TAG CONFIG: $1 811dc9477beSmrg_LT_EOF 812dc9477beSmrg])dnl /m4_if 813dc9477beSmrg], 814dc9477beSmrg[m4_if([$1], [], [ 815dc9477beSmrg PACKAGE='$PACKAGE' 816dc9477beSmrg VERSION='$VERSION' 817dc9477beSmrg RM='$RM' 818dc9477beSmrg ofile='$ofile'], []) 819dc9477beSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 820dc9477beSmrg])# _LT_CONFIG 821c27c18e8Smrg 822c27c18e8Smrg 823dc9477beSmrg# LT_SUPPORTED_TAG(TAG) 824dc9477beSmrg# --------------------- 825dc9477beSmrg# Trace this macro to discover what tags are supported by the libtool 826dc9477beSmrg# --tag option, using: 827dc9477beSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 828dc9477beSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 829c27c18e8Smrg 830c27c18e8Smrg 831dc9477beSmrg# C support is built-in for now 832dc9477beSmrgm4_define([_LT_LANG_C_enabled], []) 833dc9477beSmrgm4_define([_LT_TAGS], []) 834c27c18e8Smrg 835c27c18e8Smrg 836dc9477beSmrg# LT_LANG(LANG) 837dc9477beSmrg# ------------- 838dc9477beSmrg# Enable libtool support for the given language if not already enabled. 839dc9477beSmrgAC_DEFUN([LT_LANG], 840dc9477beSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 841dc9477beSmrgm4_case([$1], 842dc9477beSmrg [C], [_LT_LANG(C)], 843dc9477beSmrg [C++], [_LT_LANG(CXX)], 844dc9477beSmrg [Go], [_LT_LANG(GO)], 845dc9477beSmrg [Java], [_LT_LANG(GCJ)], 846dc9477beSmrg [Fortran 77], [_LT_LANG(F77)], 847dc9477beSmrg [Fortran], [_LT_LANG(FC)], 848dc9477beSmrg [Windows Resource], [_LT_LANG(RC)], 849dc9477beSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 850dc9477beSmrg [_LT_LANG($1)], 851dc9477beSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 852dc9477beSmrg])# LT_LANG 853c27c18e8Smrg 854c43cc173Smrg 855dc9477beSmrg# _LT_LANG(LANGNAME) 856dc9477beSmrg# ------------------ 857dc9477beSmrgm4_defun([_LT_LANG], 858dc9477beSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 859dc9477beSmrg [LT_SUPPORTED_TAG([$1])dnl 860dc9477beSmrg m4_append([_LT_TAGS], [$1 ])dnl 861dc9477beSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 862dc9477beSmrg _LT_LANG_$1_CONFIG($1)])dnl 863dc9477beSmrg])# _LT_LANG 864c27c18e8Smrg 865c43cc173Smrg 866dc9477beSmrgm4_ifndef([AC_PROG_GO], [ 867dc9477beSmrg# NOTE: This macro has been submitted for inclusion into # 868dc9477beSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 869dc9477beSmrg# a released version of Autoconf we should remove this # 870dc9477beSmrg# macro and use it instead. # 871dc9477beSmrgm4_defun([AC_PROG_GO], 872dc9477beSmrg[AC_LANG_PUSH(Go)dnl 873dc9477beSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 874dc9477beSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875dc9477beSmrg_AC_ARG_VAR_LDFLAGS()dnl 876dc9477beSmrgAC_CHECK_TOOL(GOC, gccgo) 877dc9477beSmrgif test -z "$GOC"; then 878dc9477beSmrg if test -n "$ac_tool_prefix"; then 879dc9477beSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880dc9477beSmrg fi 881dc9477beSmrgfi 882dc9477beSmrgif test -z "$GOC"; then 883dc9477beSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884dc9477beSmrgfi 885dc9477beSmrg])#m4_defun 886dc9477beSmrg])#m4_ifndef 887c43cc173Smrg 888c43cc173Smrg 889dc9477beSmrg# _LT_LANG_DEFAULT_CONFIG 890dc9477beSmrg# ----------------------- 891dc9477beSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 892dc9477beSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 893dc9477beSmrg [LT_LANG(CXX)], 894dc9477beSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 895c43cc173Smrg 896dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 897dc9477beSmrg [LT_LANG(F77)], 898dc9477beSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 899c43cc173Smrg 900dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 901dc9477beSmrg [LT_LANG(FC)], 902dc9477beSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903c43cc173Smrg 904dc9477beSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 905dc9477beSmrgdnl pulling things in needlessly. 906dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 907dc9477beSmrg [LT_LANG(GCJ)], 908dc9477beSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 909dc9477beSmrg [LT_LANG(GCJ)], 910dc9477beSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 911dc9477beSmrg [LT_LANG(GCJ)], 912dc9477beSmrg [m4_ifdef([AC_PROG_GCJ], 913dc9477beSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 914dc9477beSmrg m4_ifdef([A][M_PROG_GCJ], 915dc9477beSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 916dc9477beSmrg m4_ifdef([LT_PROG_GCJ], 917dc9477beSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918c43cc173Smrg 919dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 920dc9477beSmrg [LT_LANG(GO)], 921dc9477beSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 92221e67964Smrg 923dc9477beSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 924dc9477beSmrg [LT_LANG(RC)], 925dc9477beSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 926dc9477beSmrg])# _LT_LANG_DEFAULT_CONFIG 927f1ee322dSmrg 928dc9477beSmrg# Obsolete macros: 929dc9477beSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 930dc9477beSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 931dc9477beSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 932dc9477beSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 933dc9477beSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 934dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 935dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 936dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 937dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 938dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 939dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 940f1ee322dSmrg 941c43cc173Smrg 942dc9477beSmrg# _LT_TAG_COMPILER 943dc9477beSmrg# ---------------- 944dc9477beSmrgm4_defun([_LT_TAG_COMPILER], 945dc9477beSmrg[AC_REQUIRE([AC_PROG_CC])dnl 946c27c18e8Smrg 947dc9477beSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 948dc9477beSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 949dc9477beSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 950dc9477beSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 95106c34b88Smrg 952dc9477beSmrg# If no C compiler was specified, use CC. 953dc9477beSmrgLTCC=${LTCC-"$CC"} 95406c34b88Smrg 955dc9477beSmrg# If no C compiler flags were specified, use CFLAGS. 956dc9477beSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 95706c34b88Smrg 958dc9477beSmrg# Allow CC to be a program name with arguments. 959dc9477beSmrgcompiler=$CC 960dc9477beSmrg])# _LT_TAG_COMPILER 96106c34b88Smrg 962c27c18e8Smrg 963dc9477beSmrg# _LT_COMPILER_BOILERPLATE 964dc9477beSmrg# ------------------------ 965dc9477beSmrg# Check for compiler boilerplate output or warnings with 966dc9477beSmrg# the simple compiler test code. 967dc9477beSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 968dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 969dc9477beSmrgac_outfile=conftest.$ac_objext 970dc9477beSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 971dc9477beSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972dc9477beSmrg_lt_compiler_boilerplate=`cat conftest.err` 973dc9477beSmrg$RM conftest* 974dc9477beSmrg])# _LT_COMPILER_BOILERPLATE 975c43cc173Smrg 976c43cc173Smrg 977dc9477beSmrg# _LT_LINKER_BOILERPLATE 978dc9477beSmrg# ---------------------- 979dc9477beSmrg# Check for linker boilerplate output or warnings with 980dc9477beSmrg# the simple link test code. 981dc9477beSmrgm4_defun([_LT_LINKER_BOILERPLATE], 982dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 983dc9477beSmrgac_outfile=conftest.$ac_objext 984dc9477beSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 985dc9477beSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 986dc9477beSmrg_lt_linker_boilerplate=`cat conftest.err` 987dc9477beSmrg$RM -r conftest* 988dc9477beSmrg])# _LT_LINKER_BOILERPLATE 98937eb1ca1Smrg 990dc9477beSmrg# _LT_REQUIRED_DARWIN_CHECKS 991dc9477beSmrg# ------------------------- 992dc9477beSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 993dc9477beSmrg case $host_os in 994dc9477beSmrg rhapsody* | darwin*) 995dc9477beSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 996dc9477beSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 997dc9477beSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 998dc9477beSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 999dc9477beSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1000dc9477beSmrg _LT_DECL([], [DSYMUTIL], [1], 1001dc9477beSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1002dc9477beSmrg _LT_DECL([], [NMEDIT], [1], 1003dc9477beSmrg [Tool to change global to local symbols on Mac OS X]) 1004dc9477beSmrg _LT_DECL([], [LIPO], [1], 1005dc9477beSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 1006dc9477beSmrg _LT_DECL([], [OTOOL], [1], 1007dc9477beSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1008dc9477beSmrg _LT_DECL([], [OTOOL64], [1], 1009dc9477beSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1010c43cc173Smrg 1011dc9477beSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1012dc9477beSmrg [lt_cv_apple_cc_single_mod=no 101348e5ce07Smrg if test -z "$LT_MULTI_MODULE"; then 1014dc9477beSmrg # By default we will add the -single_module flag. You can override 1015dc9477beSmrg # by either setting the environment variable LT_MULTI_MODULE 1016dc9477beSmrg # non-empty at configure time, or by adding -multi_module to the 1017dc9477beSmrg # link flags. 1018dc9477beSmrg rm -rf libconftest.dylib* 1019dc9477beSmrg echo "int foo(void){return 1;}" > conftest.c 1020dc9477beSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1021dc9477beSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1022dc9477beSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023dc9477beSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1024dc9477beSmrg _lt_result=$? 1025dc9477beSmrg # If there is a non-empty error log, and "single_module" 1026dc9477beSmrg # appears in it, assume the flag caused a linker warning 1027dc9477beSmrg if test -s conftest.err && $GREP single_module conftest.err; then 1028dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1029dc9477beSmrg # Otherwise, if the output was created with a 0 exit code from 1030dc9477beSmrg # the compiler, it worked. 103148e5ce07Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1032dc9477beSmrg lt_cv_apple_cc_single_mod=yes 1033dc9477beSmrg else 1034dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1035dc9477beSmrg fi 1036dc9477beSmrg rm -rf libconftest.dylib* 1037dc9477beSmrg rm -f conftest.* 1038dc9477beSmrg fi]) 1039c43cc173Smrg 1040dc9477beSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1041dc9477beSmrg [lt_cv_ld_exported_symbols_list], 1042dc9477beSmrg [lt_cv_ld_exported_symbols_list=no 1043dc9477beSmrg save_LDFLAGS=$LDFLAGS 1044dc9477beSmrg echo "_main" > conftest.sym 1045dc9477beSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1046dc9477beSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1047dc9477beSmrg [lt_cv_ld_exported_symbols_list=yes], 1048dc9477beSmrg [lt_cv_ld_exported_symbols_list=no]) 104948e5ce07Smrg LDFLAGS=$save_LDFLAGS 1050dc9477beSmrg ]) 1051c43cc173Smrg 1052dc9477beSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1053dc9477beSmrg [lt_cv_ld_force_load=no 1054dc9477beSmrg cat > conftest.c << _LT_EOF 1055dc9477beSmrgint forced_loaded() { return 2;} 1056dc9477beSmrg_LT_EOF 1057dc9477beSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1058dc9477beSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1059dc9477beSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1060dc9477beSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1061dc9477beSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1062dc9477beSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1063dc9477beSmrg cat > conftest.c << _LT_EOF 1064dc9477beSmrgint main() { return 0;} 1065dc9477beSmrg_LT_EOF 1066dc9477beSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1067dc9477beSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1068dc9477beSmrg _lt_result=$? 1069dc9477beSmrg if test -s conftest.err && $GREP force_load conftest.err; then 1070dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 107148e5ce07Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1072dc9477beSmrg lt_cv_ld_force_load=yes 1073dc9477beSmrg else 1074dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1075dc9477beSmrg fi 1076dc9477beSmrg rm -f conftest.err libconftest.a conftest conftest.c 1077dc9477beSmrg rm -rf conftest.dSYM 1078dc9477beSmrg ]) 1079dc9477beSmrg case $host_os in 1080dc9477beSmrg rhapsody* | darwin1.[[012]]) 108148e5ce07Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1082dc9477beSmrg darwin1.*) 108348e5ce07Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1084dc9477beSmrg darwin*) # darwin 5.x on 1085dc9477beSmrg # if running on 10.5 or later, the deployment target defaults 1086dc9477beSmrg # to the OS version, if on x86, and 10.4, the deployment 1087dc9477beSmrg # target defaults to 10.4. Don't you love it? 1088dc9477beSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1089dc9477beSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 109048e5ce07Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 109148e5ce07Smrg 10.[[012]][[,.]]*) 109248e5ce07Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1093dc9477beSmrg 10.*) 109448e5ce07Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1095dc9477beSmrg esac 1096dc9477beSmrg ;; 1097dc9477beSmrg esac 109848e5ce07Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1099dc9477beSmrg _lt_dar_single_mod='$single_module' 1100dc9477beSmrg fi 110148e5ce07Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 110248e5ce07Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1103dc9477beSmrg else 110448e5ce07Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1105dc9477beSmrg fi 110648e5ce07Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1107dc9477beSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1108dc9477beSmrg else 1109dc9477beSmrg _lt_dsymutil= 1110dc9477beSmrg fi 1111dc9477beSmrg ;; 1112dc9477beSmrg esac 111306c34b88Smrg]) 1114c43cc173Smrg 1115c43cc173Smrg 1116dc9477beSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117dc9477beSmrg# --------------------------------- 1118dc9477beSmrg# Checks for linker and compiler features on darwin 1119dc9477beSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1120dc9477beSmrg[ 1121dc9477beSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1122dc9477beSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1123dc9477beSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1124dc9477beSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1125dc9477beSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 112648e5ce07Smrg if test yes = "$lt_cv_ld_force_load"; then 112748e5ce07Smrg _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\"`' 1128dc9477beSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129dc9477beSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130dc9477beSmrg else 1131dc9477beSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132dc9477beSmrg fi 1133dc9477beSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 113448e5ce07Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1135dc9477beSmrg case $cc_basename in 113648e5ce07Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1137dc9477beSmrg *) _lt_dar_can_shared=$GCC ;; 1138dc9477beSmrg esac 113948e5ce07Smrg if test yes = "$_lt_dar_can_shared"; then 1140dc9477beSmrg output_verbose_link_cmd=func_echo_all 114148e5ce07Smrg _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" 114248e5ce07Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 114348e5ce07Smrg _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" 114448e5ce07Smrg _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" 1145dc9477beSmrg m4_if([$1], [CXX], 114648e5ce07Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 114748e5ce07Smrg _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" 114848e5ce07Smrg _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" 1149dc9477beSmrg fi 1150dc9477beSmrg],[]) 1151dc9477beSmrg else 1152dc9477beSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1153dc9477beSmrg fi 1154dc9477beSmrg]) 1155c43cc173Smrg 1156dc9477beSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157dc9477beSmrg# ---------------------------------- 1158dc9477beSmrg# Links a minimal program and checks the executable 1159dc9477beSmrg# for the system default hardcoded library path. In most cases, 1160dc9477beSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1161dc9477beSmrg# the location of the communication and MPI libs are included too. 1162dc9477beSmrg# If we don't find anything, use the default library path according 1163dc9477beSmrg# to the aix ld manual. 1164dc9477beSmrg# Store the results from the different compilers for each TAGNAME. 1165dc9477beSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1166dc9477beSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1167dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 116848e5ce07Smrgif test set = "${lt_cv_aix_libpath+set}"; then 1169dc9477beSmrg aix_libpath=$lt_cv_aix_libpath 1170dc9477beSmrgelse 1171dc9477beSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172dc9477beSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173dc9477beSmrg lt_aix_libpath_sed='[ 1174dc9477beSmrg /Import File Strings/,/^$/ { 1175dc9477beSmrg /^0/ { 1176dc9477beSmrg s/^0 *\([^ ]*\) *$/\1/ 1177dc9477beSmrg p 1178dc9477beSmrg } 1179dc9477beSmrg }]' 1180dc9477beSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181dc9477beSmrg # Check for a 64-bit object if we didn't find anything. 1182dc9477beSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183dc9477beSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184dc9477beSmrg fi],[]) 1185dc9477beSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 118648e5ce07Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187dc9477beSmrg fi 1188dc9477beSmrg ]) 1189dc9477beSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190dc9477beSmrgfi 1191dc9477beSmrg])# _LT_SYS_MODULE_PATH_AIX 1192c43cc173Smrg 1193b789ec8aSmrg 1194dc9477beSmrg# _LT_SHELL_INIT(ARG) 1195dc9477beSmrg# ------------------- 1196dc9477beSmrgm4_define([_LT_SHELL_INIT], 1197dc9477beSmrg[m4_divert_text([M4SH-INIT], [$1 1198dc9477beSmrg])])# _LT_SHELL_INIT 1199b789ec8aSmrg 1200b789ec8aSmrg 1201c43cc173Smrg 1202dc9477beSmrg# _LT_PROG_ECHO_BACKSLASH 120306c34b88Smrg# ----------------------- 1204dc9477beSmrg# Find how we can fake an echo command that does not interpret backslash. 1205dc9477beSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 120648e5ce07Smrg# of the generated configure script that will find a shell with a builtin 120748e5ce07Smrg# printf (that we can use as an echo command). 1208dc9477beSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1209dc9477beSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1210dc9477beSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1211dc9477beSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212c43cc173Smrg 1213dc9477beSmrgAC_MSG_CHECKING([how to print strings]) 1214dc9477beSmrg# Test print first, because it will be a builtin if present. 1215dc9477beSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1216dc9477beSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1217dc9477beSmrg ECHO='print -r --' 1218dc9477beSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1219dc9477beSmrg ECHO='printf %s\n' 1220dc9477beSmrgelse 1221dc9477beSmrg # Use this function as a fallback that always works. 1222dc9477beSmrg func_fallback_echo () 1223dc9477beSmrg { 1224dc9477beSmrg eval 'cat <<_LTECHO_EOF 1225dc9477beSmrg$[]1 1226dc9477beSmrg_LTECHO_EOF' 1227dc9477beSmrg } 1228dc9477beSmrg ECHO='func_fallback_echo' 1229dc9477beSmrgfi 1230c43cc173Smrg 1231dc9477beSmrg# func_echo_all arg... 1232dc9477beSmrg# Invoke $ECHO with all args, space-separated. 1233dc9477beSmrgfunc_echo_all () 1234dc9477beSmrg{ 123548e5ce07Smrg $ECHO "$*" 1236dc9477beSmrg} 1237c27c18e8Smrg 123848e5ce07Smrgcase $ECHO in 1239dc9477beSmrg printf*) AC_MSG_RESULT([printf]) ;; 1240dc9477beSmrg print*) AC_MSG_RESULT([print -r]) ;; 1241dc9477beSmrg *) AC_MSG_RESULT([cat]) ;; 1242dc9477beSmrgesac 1243c27c18e8Smrg 1244dc9477beSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1245dc9477beSmrg[_AS_DETECT_SUGGESTED([ 1246dc9477beSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1247dc9477beSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1248dc9477beSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1249dc9477beSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1250dc9477beSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1251dc9477beSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1252dc9477beSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253b789ec8aSmrg 1254dc9477beSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1255dc9477beSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1256dc9477beSmrg])# _LT_PROG_ECHO_BACKSLASH 1257b789ec8aSmrg 1258b789ec8aSmrg 1259dc9477beSmrg# _LT_WITH_SYSROOT 1260dc9477beSmrg# ---------------- 1261dc9477beSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1262dc9477beSmrg[AC_MSG_CHECKING([for sysroot]) 1263dc9477beSmrgAC_ARG_WITH([sysroot], 126448e5ce07Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 126548e5ce07Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 126648e5ce07Smrg if not specified).])], 1267dc9477beSmrg[], [with_sysroot=no]) 1268b789ec8aSmrg 1269dc9477beSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 1270dc9477beSmrgdnl in case the user passed a directory name. 1271dc9477beSmrglt_sysroot= 127248e5ce07Smrgcase $with_sysroot in #( 1273dc9477beSmrg yes) 127448e5ce07Smrg if test yes = "$GCC"; then 1275dc9477beSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1276dc9477beSmrg fi 1277dc9477beSmrg ;; #( 1278dc9477beSmrg /*) 1279dc9477beSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1280dc9477beSmrg ;; #( 1281dc9477beSmrg no|'') 1282dc9477beSmrg ;; #( 1283dc9477beSmrg *) 128448e5ce07Smrg AC_MSG_RESULT([$with_sysroot]) 1285dc9477beSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1286dc9477beSmrg ;; 1287dc9477beSmrgesac 1288c27c18e8Smrg 1289dc9477beSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1290dc9477beSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 129148e5ce07Smrg[dependent libraries, and where our libraries should be installed.])]) 1292c27c18e8Smrg 1293dc9477beSmrg# _LT_ENABLE_LOCK 1294dc9477beSmrg# --------------- 1295dc9477beSmrgm4_defun([_LT_ENABLE_LOCK], 1296dc9477beSmrg[AC_ARG_ENABLE([libtool-lock], 1297dc9477beSmrg [AS_HELP_STRING([--disable-libtool-lock], 1298dc9477beSmrg [avoid locking (might break parallel builds)])]) 129948e5ce07Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1300c27c18e8Smrg 1301dc9477beSmrg# Some flags need to be propagated to the compiler or linker for good 1302dc9477beSmrg# libtool support. 1303dc9477beSmrgcase $host in 1304dc9477beSmrgia64-*-hpux*) 130548e5ce07Smrg # Find out what ABI is being produced by ac_compile, and set mode 130648e5ce07Smrg # options accordingly. 1307dc9477beSmrg echo 'int i;' > conftest.$ac_ext 1308dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 1309dc9477beSmrg case `/usr/bin/file conftest.$ac_objext` in 1310dc9477beSmrg *ELF-32*) 131148e5ce07Smrg HPUX_IA64_MODE=32 1312dc9477beSmrg ;; 1313dc9477beSmrg *ELF-64*) 131448e5ce07Smrg HPUX_IA64_MODE=64 1315dc9477beSmrg ;; 131606c34b88Smrg esac 1317dc9477beSmrg fi 1318dc9477beSmrg rm -rf conftest* 1319dc9477beSmrg ;; 1320dc9477beSmrg*-*-irix6*) 132148e5ce07Smrg # Find out what ABI is being produced by ac_compile, and set linker 132248e5ce07Smrg # options accordingly. 1323dc9477beSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1324dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 132548e5ce07Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 1326dc9477beSmrg case `/usr/bin/file conftest.$ac_objext` in 1327dc9477beSmrg *32-bit*) 1328dc9477beSmrg LD="${LD-ld} -melf32bsmip" 1329dc9477beSmrg ;; 1330dc9477beSmrg *N32*) 1331dc9477beSmrg LD="${LD-ld} -melf32bmipn32" 1332dc9477beSmrg ;; 1333dc9477beSmrg *64-bit*) 1334dc9477beSmrg LD="${LD-ld} -melf64bmip" 1335dc9477beSmrg ;; 1336dc9477beSmrg esac 1337dc9477beSmrg else 1338dc9477beSmrg case `/usr/bin/file conftest.$ac_objext` in 1339dc9477beSmrg *32-bit*) 1340dc9477beSmrg LD="${LD-ld} -32" 1341dc9477beSmrg ;; 1342dc9477beSmrg *N32*) 1343dc9477beSmrg LD="${LD-ld} -n32" 1344dc9477beSmrg ;; 1345dc9477beSmrg *64-bit*) 1346dc9477beSmrg LD="${LD-ld} -64" 1347dc9477beSmrg ;; 1348dc9477beSmrg esac 1349dc9477beSmrg fi 1350dc9477beSmrg fi 1351dc9477beSmrg rm -rf conftest* 1352dc9477beSmrg ;; 1353c43cc173Smrg 135448e5ce07Smrgmips64*-*linux*) 135548e5ce07Smrg # Find out what ABI is being produced by ac_compile, and set linker 135648e5ce07Smrg # options accordingly. 135748e5ce07Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 135848e5ce07Smrg if AC_TRY_EVAL(ac_compile); then 135948e5ce07Smrg emul=elf 136048e5ce07Smrg case `/usr/bin/file conftest.$ac_objext` in 136148e5ce07Smrg *32-bit*) 136248e5ce07Smrg emul="${emul}32" 136348e5ce07Smrg ;; 136448e5ce07Smrg *64-bit*) 136548e5ce07Smrg emul="${emul}64" 136648e5ce07Smrg ;; 136748e5ce07Smrg esac 136848e5ce07Smrg case `/usr/bin/file conftest.$ac_objext` in 136948e5ce07Smrg *MSB*) 137048e5ce07Smrg emul="${emul}btsmip" 137148e5ce07Smrg ;; 137248e5ce07Smrg *LSB*) 137348e5ce07Smrg emul="${emul}ltsmip" 137448e5ce07Smrg ;; 137548e5ce07Smrg esac 137648e5ce07Smrg case `/usr/bin/file conftest.$ac_objext` in 137748e5ce07Smrg *N32*) 137848e5ce07Smrg emul="${emul}n32" 137948e5ce07Smrg ;; 138048e5ce07Smrg esac 138148e5ce07Smrg LD="${LD-ld} -m $emul" 138248e5ce07Smrg fi 138348e5ce07Smrg rm -rf conftest* 138448e5ce07Smrg ;; 138548e5ce07Smrg 1386dc9477beSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1387dc9477beSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 138848e5ce07Smrg # Find out what ABI is being produced by ac_compile, and set linker 138948e5ce07Smrg # options accordingly. Note that the listed cases only cover the 139048e5ce07Smrg # situations where additional linker options are needed (such as when 139148e5ce07Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 139248e5ce07Smrg # vice versa); the common cases where no linker options are needed do 139348e5ce07Smrg # not appear in the list. 1394dc9477beSmrg echo 'int i;' > conftest.$ac_ext 1395dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 1396dc9477beSmrg case `/usr/bin/file conftest.o` in 1397dc9477beSmrg *32-bit*) 1398dc9477beSmrg case $host in 1399dc9477beSmrg x86_64-*kfreebsd*-gnu) 1400dc9477beSmrg LD="${LD-ld} -m elf_i386_fbsd" 1401dc9477beSmrg ;; 1402dc9477beSmrg x86_64-*linux*) 140344584a44Smrg case `/usr/bin/file conftest.o` in 140444584a44Smrg *x86-64*) 140544584a44Smrg LD="${LD-ld} -m elf32_x86_64" 140644584a44Smrg ;; 140744584a44Smrg *) 140844584a44Smrg LD="${LD-ld} -m elf_i386" 140944584a44Smrg ;; 141044584a44Smrg esac 1411dc9477beSmrg ;; 141248e5ce07Smrg powerpc64le-*linux*) 1413dc9477beSmrg LD="${LD-ld} -m elf32lppclinux" 1414dc9477beSmrg ;; 141548e5ce07Smrg powerpc64-*linux*) 1416dc9477beSmrg LD="${LD-ld} -m elf32ppclinux" 1417dc9477beSmrg ;; 1418dc9477beSmrg s390x-*linux*) 1419dc9477beSmrg LD="${LD-ld} -m elf_s390" 1420dc9477beSmrg ;; 1421dc9477beSmrg sparc64-*linux*) 1422dc9477beSmrg LD="${LD-ld} -m elf32_sparc" 1423dc9477beSmrg ;; 1424dc9477beSmrg esac 1425dc9477beSmrg ;; 1426dc9477beSmrg *64-bit*) 1427dc9477beSmrg case $host in 1428dc9477beSmrg x86_64-*kfreebsd*-gnu) 1429dc9477beSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1430dc9477beSmrg ;; 1431dc9477beSmrg x86_64-*linux*) 1432dc9477beSmrg LD="${LD-ld} -m elf_x86_64" 1433dc9477beSmrg ;; 14344940c694Smrg powerpcle-*linux*|powerpc64le-*linux*) 1435dc9477beSmrg LD="${LD-ld} -m elf64lppc" 1436dc9477beSmrg ;; 14374940c694Smrg powerpc-*linux*|powerpc64-*linux*) 1438dc9477beSmrg LD="${LD-ld} -m elf64ppc" 1439dc9477beSmrg ;; 1440dc9477beSmrg s390*-*linux*|s390*-*tpf*) 1441dc9477beSmrg LD="${LD-ld} -m elf64_s390" 1442dc9477beSmrg ;; 1443dc9477beSmrg sparc*-*linux*) 1444dc9477beSmrg LD="${LD-ld} -m elf64_sparc" 1445dc9477beSmrg ;; 1446dc9477beSmrg esac 1447dc9477beSmrg ;; 144806c34b88Smrg esac 1449dc9477beSmrg fi 1450dc9477beSmrg rm -rf conftest* 1451dc9477beSmrg ;; 1452c43cc173Smrg 1453dc9477beSmrg*-*-sco3.2v5*) 1454dc9477beSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 145548e5ce07Smrg SAVE_CFLAGS=$CFLAGS 1456dc9477beSmrg CFLAGS="$CFLAGS -belf" 1457dc9477beSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1458dc9477beSmrg [AC_LANG_PUSH(C) 1459dc9477beSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1460dc9477beSmrg AC_LANG_POP]) 146148e5ce07Smrg if test yes != "$lt_cv_cc_needs_belf"; then 1462dc9477beSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 146348e5ce07Smrg CFLAGS=$SAVE_CFLAGS 1464dc9477beSmrg fi 1465dc9477beSmrg ;; 1466dc9477beSmrg*-*solaris*) 146748e5ce07Smrg # Find out what ABI is being produced by ac_compile, and set linker 146848e5ce07Smrg # options accordingly. 1469dc9477beSmrg echo 'int i;' > conftest.$ac_ext 1470dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 1471dc9477beSmrg case `/usr/bin/file conftest.o` in 1472dc9477beSmrg *64-bit*) 1473dc9477beSmrg case $lt_cv_prog_gnu_ld in 1474dc9477beSmrg yes*) 1475dc9477beSmrg case $host in 147648e5ce07Smrg i?86-*-solaris*|x86_64-*-solaris*) 1477dc9477beSmrg LD="${LD-ld} -m elf_x86_64" 1478dc9477beSmrg ;; 1479dc9477beSmrg sparc*-*-solaris*) 1480dc9477beSmrg LD="${LD-ld} -m elf64_sparc" 1481dc9477beSmrg ;; 1482dc9477beSmrg esac 1483dc9477beSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1484dc9477beSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 148548e5ce07Smrg LD=${LD-ld}_sol2 1486dc9477beSmrg fi 1487dc9477beSmrg ;; 1488dc9477beSmrg *) 1489dc9477beSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1490dc9477beSmrg LD="${LD-ld} -64" 1491dc9477beSmrg fi 1492dc9477beSmrg ;; 1493dc9477beSmrg esac 1494dc9477beSmrg ;; 1495dc9477beSmrg esac 1496dc9477beSmrg fi 1497dc9477beSmrg rm -rf conftest* 1498dc9477beSmrg ;; 1499dc9477beSmrgesac 1500c43cc173Smrg 150148e5ce07Smrgneed_locks=$enable_libtool_lock 1502dc9477beSmrg])# _LT_ENABLE_LOCK 1503c43cc173Smrg 1504c27c18e8Smrg 1505dc9477beSmrg# _LT_PROG_AR 1506dc9477beSmrg# ----------- 1507dc9477beSmrgm4_defun([_LT_PROG_AR], 1508dc9477beSmrg[AC_CHECK_TOOLS(AR, [ar], false) 1509dc9477beSmrg: ${AR=ar} 1510dc9477beSmrg: ${AR_FLAGS=cru} 1511dc9477beSmrg_LT_DECL([], [AR], [1], [The archiver]) 1512dc9477beSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1513c43cc173Smrg 1514dc9477beSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1515dc9477beSmrg [lt_cv_ar_at_file=no 1516dc9477beSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1517dc9477beSmrg [echo conftest.$ac_objext > conftest.lst 1518dc9477beSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1519dc9477beSmrg AC_TRY_EVAL([lt_ar_try]) 152048e5ce07Smrg if test 0 -eq "$ac_status"; then 1521dc9477beSmrg # Ensure the archiver fails upon bogus file names. 1522dc9477beSmrg rm -f conftest.$ac_objext libconftest.a 1523dc9477beSmrg AC_TRY_EVAL([lt_ar_try]) 152448e5ce07Smrg if test 0 -ne "$ac_status"; then 1525dc9477beSmrg lt_cv_ar_at_file=@ 1526dc9477beSmrg fi 1527dc9477beSmrg fi 1528dc9477beSmrg rm -f conftest.* libconftest.a 1529dc9477beSmrg ]) 1530dc9477beSmrg ]) 1531c43cc173Smrg 153248e5ce07Smrgif test no = "$lt_cv_ar_at_file"; then 1533dc9477beSmrg archiver_list_spec= 1534dc9477beSmrgelse 1535dc9477beSmrg archiver_list_spec=$lt_cv_ar_at_file 1536dc9477beSmrgfi 1537dc9477beSmrg_LT_DECL([], [archiver_list_spec], [1], 1538dc9477beSmrg [How to feed a file listing to the archiver]) 1539dc9477beSmrg])# _LT_PROG_AR 1540c43cc173Smrg 1541c27c18e8Smrg 1542dc9477beSmrg# _LT_CMD_OLD_ARCHIVE 1543dc9477beSmrg# ------------------- 1544dc9477beSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1545dc9477beSmrg[_LT_PROG_AR 1546c43cc173Smrg 1547dc9477beSmrgAC_CHECK_TOOL(STRIP, strip, :) 1548dc9477beSmrgtest -z "$STRIP" && STRIP=: 1549dc9477beSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1550c43cc173Smrg 1551dc9477beSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1552dc9477beSmrgtest -z "$RANLIB" && RANLIB=: 1553dc9477beSmrg_LT_DECL([], [RANLIB], [1], 1554dc9477beSmrg [Commands used to install an old-style archive]) 1555c43cc173Smrg 1556dc9477beSmrg# Determine commands to create old-style static archives. 1557dc9477beSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1558dc9477beSmrgold_postinstall_cmds='chmod 644 $oldlib' 1559dc9477beSmrgold_postuninstall_cmds= 1560c43cc173Smrg 1561dc9477beSmrgif test -n "$RANLIB"; then 1562dc9477beSmrg case $host_os in 156348e5ce07Smrg bitrig* | openbsd*) 1564dc9477beSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1565dc9477beSmrg ;; 1566dc9477beSmrg *) 1567dc9477beSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1568dc9477beSmrg ;; 156906c34b88Smrg esac 1570dc9477beSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 157106c34b88Smrgfi 1572c43cc173Smrg 1573dc9477beSmrgcase $host_os in 1574dc9477beSmrg darwin*) 1575dc9477beSmrg lock_old_archive_extraction=yes ;; 1576dc9477beSmrg *) 1577dc9477beSmrg lock_old_archive_extraction=no ;; 1578dc9477beSmrgesac 1579dc9477beSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1580dc9477beSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1581dc9477beSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1582dc9477beSmrg [Commands used to build an old-style archive]) 1583dc9477beSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1584dc9477beSmrg [Whether to use a lock for old archive extraction]) 1585dc9477beSmrg])# _LT_CMD_OLD_ARCHIVE 1586f1ee322dSmrg 158706c34b88Smrg 1588dc9477beSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1589dc9477beSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1590dc9477beSmrg# ---------------------------------------------------------------- 1591dc9477beSmrg# Check whether the given compiler option works 1592dc9477beSmrgAC_DEFUN([_LT_COMPILER_OPTION], 159306c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1594dc9477beSmrgm4_require([_LT_DECL_SED])dnl 1595dc9477beSmrgAC_CACHE_CHECK([$1], [$2], 1596dc9477beSmrg [$2=no 1597dc9477beSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1598dc9477beSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 159948e5ce07Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1600dc9477beSmrg # Insert the option either (1) after the last *FLAGS variable, or 1601dc9477beSmrg # (2) before a word containing "conftest.", or (3) at the end. 1602dc9477beSmrg # Note that $ac_compile itself does not contain backslashes and begins 1603dc9477beSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1604dc9477beSmrg # The option is referenced via a variable to avoid confusing sed. 1605dc9477beSmrg lt_compile=`echo "$ac_compile" | $SED \ 1606dc9477beSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1607dc9477beSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1608dc9477beSmrg -e 's:$: $lt_compiler_flag:'` 1609dc9477beSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1610dc9477beSmrg (eval "$lt_compile" 2>conftest.err) 1611dc9477beSmrg ac_status=$? 1612dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1613dc9477beSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1614dc9477beSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1615dc9477beSmrg # The compiler can only warn and ignore the option if not recognized 1616dc9477beSmrg # So say no if there are warnings other than the usual output. 1617dc9477beSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1618dc9477beSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1619dc9477beSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1620dc9477beSmrg $2=yes 1621dc9477beSmrg fi 1622dc9477beSmrg fi 1623dc9477beSmrg $RM conftest* 1624dc9477beSmrg]) 1625c43cc173Smrg 162648e5ce07Smrgif test yes = "[$]$2"; then 1627dc9477beSmrg m4_if([$5], , :, [$5]) 1628dc9477beSmrgelse 1629dc9477beSmrg m4_if([$6], , :, [$6]) 163006c34b88Smrgfi 1631dc9477beSmrg])# _LT_COMPILER_OPTION 1632c43cc173Smrg 1633dc9477beSmrg# Old name: 1634dc9477beSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1635dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 1636dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1637c43cc173Smrg 163821e67964Smrg 1639dc9477beSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1640dc9477beSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1641dc9477beSmrg# ---------------------------------------------------- 1642dc9477beSmrg# Check whether the given linker option works 1643dc9477beSmrgAC_DEFUN([_LT_LINKER_OPTION], 1644dc9477beSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1645dc9477beSmrgm4_require([_LT_DECL_SED])dnl 1646dc9477beSmrgAC_CACHE_CHECK([$1], [$2], 1647dc9477beSmrg [$2=no 164848e5ce07Smrg save_LDFLAGS=$LDFLAGS 1649dc9477beSmrg LDFLAGS="$LDFLAGS $3" 1650dc9477beSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1651dc9477beSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1652dc9477beSmrg # The linker can only warn and ignore the option if not recognized 1653dc9477beSmrg # So say no if there are warnings 1654dc9477beSmrg if test -s conftest.err; then 1655dc9477beSmrg # Append any errors to the config.log. 1656dc9477beSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1657dc9477beSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1658dc9477beSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1659dc9477beSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1660dc9477beSmrg $2=yes 1661dc9477beSmrg fi 1662dc9477beSmrg else 1663dc9477beSmrg $2=yes 1664dc9477beSmrg fi 1665dc9477beSmrg fi 1666dc9477beSmrg $RM -r conftest* 166748e5ce07Smrg LDFLAGS=$save_LDFLAGS 1668dc9477beSmrg]) 166937eb1ca1Smrg 167048e5ce07Smrgif test yes = "[$]$2"; then 1671dc9477beSmrg m4_if([$4], , :, [$4]) 1672dc9477beSmrgelse 1673dc9477beSmrg m4_if([$5], , :, [$5]) 1674dc9477beSmrgfi 1675dc9477beSmrg])# _LT_LINKER_OPTION 167621e67964Smrg 1677dc9477beSmrg# Old name: 1678dc9477beSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1679dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 1680dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 168121e67964Smrg 1682c43cc173Smrg 1683dc9477beSmrg# LT_CMD_MAX_LEN 1684dc9477beSmrg#--------------- 1685dc9477beSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1686dc9477beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1687dc9477beSmrg# find the maximum length of command line arguments 1688dc9477beSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1689dc9477beSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1690dc9477beSmrg i=0 169148e5ce07Smrg teststring=ABCD 1692c43cc173Smrg 1693dc9477beSmrg case $build_os in 1694dc9477beSmrg msdosdjgpp*) 1695dc9477beSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1696dc9477beSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1697dc9477beSmrg # during glob expansion). Even if it were fixed, the result of this 1698dc9477beSmrg # check would be larger than it should be. 1699dc9477beSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1700dc9477beSmrg ;; 1701c43cc173Smrg 1702dc9477beSmrg gnu*) 1703dc9477beSmrg # Under GNU Hurd, this test is not required because there is 1704dc9477beSmrg # no limit to the length of command line arguments. 1705dc9477beSmrg # Libtool will interpret -1 as no limit whatsoever 1706dc9477beSmrg lt_cv_sys_max_cmd_len=-1; 1707dc9477beSmrg ;; 1708c43cc173Smrg 1709dc9477beSmrg cygwin* | mingw* | cegcc*) 1710dc9477beSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1711dc9477beSmrg # about 5 minutes as the teststring grows exponentially. 1712dc9477beSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1713dc9477beSmrg # you end up with a "frozen" computer, even though with patience 1714dc9477beSmrg # the test eventually succeeds (with a max line length of 256k). 1715dc9477beSmrg # Instead, let's just punt: use the minimum linelength reported by 1716dc9477beSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1717dc9477beSmrg lt_cv_sys_max_cmd_len=8192; 1718dc9477beSmrg ;; 1719c43cc173Smrg 1720dc9477beSmrg mint*) 1721dc9477beSmrg # On MiNT this can take a long time and run out of memory. 1722dc9477beSmrg lt_cv_sys_max_cmd_len=8192; 1723dc9477beSmrg ;; 1724c43cc173Smrg 1725dc9477beSmrg amigaos*) 1726dc9477beSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1727dc9477beSmrg # So we just punt and use a minimum line length of 8192. 1728dc9477beSmrg lt_cv_sys_max_cmd_len=8192; 1729dc9477beSmrg ;; 173021e67964Smrg 173148e5ce07Smrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1732dc9477beSmrg # This has been around since 386BSD, at least. Likely further. 1733dc9477beSmrg if test -x /sbin/sysctl; then 1734dc9477beSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1735dc9477beSmrg elif test -x /usr/sbin/sysctl; then 1736dc9477beSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1737dc9477beSmrg else 1738dc9477beSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1739dc9477beSmrg fi 1740dc9477beSmrg # And add a safety zone 1741dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1742dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1743dc9477beSmrg ;; 1744c43cc173Smrg 1745dc9477beSmrg interix*) 1746dc9477beSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1747dc9477beSmrg lt_cv_sys_max_cmd_len=196608 1748dc9477beSmrg ;; 1749c43cc173Smrg 1750dc9477beSmrg os2*) 1751dc9477beSmrg # The test takes a long time on OS/2. 1752dc9477beSmrg lt_cv_sys_max_cmd_len=8192 1753dc9477beSmrg ;; 1754c43cc173Smrg 1755dc9477beSmrg osf*) 1756dc9477beSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1757dc9477beSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1758dc9477beSmrg # nice to cause kernel panics so lets avoid the loop below. 1759dc9477beSmrg # First set a reasonable default. 1760dc9477beSmrg lt_cv_sys_max_cmd_len=16384 1761dc9477beSmrg # 1762dc9477beSmrg if test -x /sbin/sysconfig; then 1763dc9477beSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1764dc9477beSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1765dc9477beSmrg esac 1766dc9477beSmrg fi 1767dc9477beSmrg ;; 1768dc9477beSmrg sco3.2v5*) 1769dc9477beSmrg lt_cv_sys_max_cmd_len=102400 1770dc9477beSmrg ;; 1771dc9477beSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1772dc9477beSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1773dc9477beSmrg if test -n "$kargmax"; then 1774dc9477beSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1775dc9477beSmrg else 1776dc9477beSmrg lt_cv_sys_max_cmd_len=32768 1777dc9477beSmrg fi 1778dc9477beSmrg ;; 1779dc9477beSmrg *) 1780dc9477beSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 178144584a44Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 178248e5ce07Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1783dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1784dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1785dc9477beSmrg else 1786dc9477beSmrg # Make teststring a little bigger before we do anything with it. 1787dc9477beSmrg # a 1K string should be a reasonable start. 178848e5ce07Smrg for i in 1 2 3 4 5 6 7 8; do 1789dc9477beSmrg teststring=$teststring$teststring 1790dc9477beSmrg done 1791dc9477beSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1792dc9477beSmrg # If test is not a shell built-in, we'll probably end up computing a 1793dc9477beSmrg # maximum length that is only half of the actual maximum length, but 1794dc9477beSmrg # we can't tell. 179548e5ce07Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1796dc9477beSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 179748e5ce07Smrg test 17 != "$i" # 1/2 MB should be enough 1798dc9477beSmrg do 1799dc9477beSmrg i=`expr $i + 1` 1800dc9477beSmrg teststring=$teststring$teststring 1801dc9477beSmrg done 1802dc9477beSmrg # Only check the string length outside the loop. 1803dc9477beSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1804dc9477beSmrg teststring= 1805dc9477beSmrg # Add a significant safety factor because C++ compilers can tack on 1806dc9477beSmrg # massive amounts of additional arguments before passing them to the 1807dc9477beSmrg # linker. It appears as though 1/2 is a usable value. 1808dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1809dc9477beSmrg fi 1810dc9477beSmrg ;; 1811dc9477beSmrg esac 1812dc9477beSmrg]) 181348e5ce07Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 1814dc9477beSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1815dc9477beSmrgelse 1816dc9477beSmrg AC_MSG_RESULT(none) 1817dc9477beSmrgfi 1818dc9477beSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1819dc9477beSmrg_LT_DECL([], [max_cmd_len], [0], 1820dc9477beSmrg [What is the maximum length of a command?]) 1821dc9477beSmrg])# LT_CMD_MAX_LEN 1822c43cc173Smrg 1823dc9477beSmrg# Old name: 1824dc9477beSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1825dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 1826dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827c43cc173Smrg 1828c43cc173Smrg 1829dc9477beSmrg# _LT_HEADER_DLFCN 1830dc9477beSmrg# ---------------- 1831dc9477beSmrgm4_defun([_LT_HEADER_DLFCN], 1832dc9477beSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1833dc9477beSmrg])# _LT_HEADER_DLFCN 1834c43cc173Smrg 1835c43cc173Smrg 1836dc9477beSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1837dc9477beSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1838dc9477beSmrg# ---------------------------------------------------------------- 1839dc9477beSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1840dc9477beSmrg[m4_require([_LT_HEADER_DLFCN])dnl 184148e5ce07Smrgif test yes = "$cross_compiling"; then : 1842dc9477beSmrg [$4] 1843dc9477beSmrgelse 1844dc9477beSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1845dc9477beSmrg lt_status=$lt_dlunknown 1846dc9477beSmrg cat > conftest.$ac_ext <<_LT_EOF 1847dc9477beSmrg[#line $LINENO "configure" 1848dc9477beSmrg#include "confdefs.h" 1849c43cc173Smrg 1850dc9477beSmrg#if HAVE_DLFCN_H 1851dc9477beSmrg#include <dlfcn.h> 1852dc9477beSmrg#endif 1853c27c18e8Smrg 1854dc9477beSmrg#include <stdio.h> 1855c43cc173Smrg 1856dc9477beSmrg#ifdef RTLD_GLOBAL 1857dc9477beSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1858dc9477beSmrg#else 1859dc9477beSmrg# ifdef DL_GLOBAL 1860dc9477beSmrg# define LT_DLGLOBAL DL_GLOBAL 1861dc9477beSmrg# else 1862dc9477beSmrg# define LT_DLGLOBAL 0 1863dc9477beSmrg# endif 1864dc9477beSmrg#endif 1865c43cc173Smrg 1866dc9477beSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1867dc9477beSmrg find out it does not work in some platform. */ 1868dc9477beSmrg#ifndef LT_DLLAZY_OR_NOW 1869dc9477beSmrg# ifdef RTLD_LAZY 1870dc9477beSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1871dc9477beSmrg# else 1872dc9477beSmrg# ifdef DL_LAZY 1873dc9477beSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1874dc9477beSmrg# else 1875dc9477beSmrg# ifdef RTLD_NOW 1876dc9477beSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1877dc9477beSmrg# else 1878dc9477beSmrg# ifdef DL_NOW 1879dc9477beSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1880dc9477beSmrg# else 1881dc9477beSmrg# define LT_DLLAZY_OR_NOW 0 1882dc9477beSmrg# endif 1883dc9477beSmrg# endif 1884dc9477beSmrg# endif 1885dc9477beSmrg# endif 1886dc9477beSmrg#endif 1887c43cc173Smrg 188848e5ce07Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 1889dc9477beSmrg correspondingly for the symbols needed. */ 189048e5ce07Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1891dc9477beSmrgint fnord () __attribute__((visibility("default"))); 1892dc9477beSmrg#endif 1893c43cc173Smrg 1894dc9477beSmrgint fnord () { return 42; } 1895dc9477beSmrgint main () 1896dc9477beSmrg{ 1897dc9477beSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1898dc9477beSmrg int status = $lt_dlunknown; 1899c43cc173Smrg 1900dc9477beSmrg if (self) 1901dc9477beSmrg { 1902dc9477beSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1903dc9477beSmrg else 1904dc9477beSmrg { 1905dc9477beSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1906dc9477beSmrg else puts (dlerror ()); 1907dc9477beSmrg } 1908dc9477beSmrg /* dlclose (self); */ 1909dc9477beSmrg } 1910dc9477beSmrg else 1911dc9477beSmrg puts (dlerror ()); 1912c43cc173Smrg 1913dc9477beSmrg return status; 1914dc9477beSmrg}] 1915dc9477beSmrg_LT_EOF 191648e5ce07Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1917dc9477beSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1918dc9477beSmrg lt_status=$? 1919dc9477beSmrg case x$lt_status in 1920dc9477beSmrg x$lt_dlno_uscore) $1 ;; 1921dc9477beSmrg x$lt_dlneed_uscore) $2 ;; 1922dc9477beSmrg x$lt_dlunknown|x*) $3 ;; 1923dc9477beSmrg esac 1924dc9477beSmrg else : 1925dc9477beSmrg # compilation failed 1926dc9477beSmrg $3 1927dc9477beSmrg fi 1928dc9477beSmrgfi 1929dc9477beSmrgrm -fr conftest* 1930dc9477beSmrg])# _LT_TRY_DLOPEN_SELF 1931c43cc173Smrg 1932c43cc173Smrg 1933dc9477beSmrg# LT_SYS_DLOPEN_SELF 1934dc9477beSmrg# ------------------ 1935dc9477beSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1936dc9477beSmrg[m4_require([_LT_HEADER_DLFCN])dnl 193748e5ce07Smrgif test yes != "$enable_dlopen"; then 1938dc9477beSmrg enable_dlopen=unknown 1939dc9477beSmrg enable_dlopen_self=unknown 1940dc9477beSmrg enable_dlopen_self_static=unknown 1941dc9477beSmrgelse 1942dc9477beSmrg lt_cv_dlopen=no 1943dc9477beSmrg lt_cv_dlopen_libs= 1944c43cc173Smrg 1945c43cc173Smrg case $host_os in 1946dc9477beSmrg beos*) 194748e5ce07Smrg lt_cv_dlopen=load_add_on 1948dc9477beSmrg lt_cv_dlopen_libs= 1949dc9477beSmrg lt_cv_dlopen_self=yes 1950dc9477beSmrg ;; 1951c43cc173Smrg 1952dc9477beSmrg mingw* | pw32* | cegcc*) 195348e5ce07Smrg lt_cv_dlopen=LoadLibrary 1954dc9477beSmrg lt_cv_dlopen_libs= 1955dc9477beSmrg ;; 1956c43cc173Smrg 1957dc9477beSmrg cygwin*) 195848e5ce07Smrg lt_cv_dlopen=dlopen 1959dc9477beSmrg lt_cv_dlopen_libs= 1960dc9477beSmrg ;; 196106c34b88Smrg 1962dc9477beSmrg darwin*) 196348e5ce07Smrg # if libdl is installed we need to link against it 1964dc9477beSmrg AC_CHECK_LIB([dl], [dlopen], 196548e5ce07Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 196648e5ce07Smrg lt_cv_dlopen=dyld 1967dc9477beSmrg lt_cv_dlopen_libs= 1968dc9477beSmrg lt_cv_dlopen_self=yes 196906c34b88Smrg ]) 197037eb1ca1Smrg ;; 1971dc9477beSmrg 197248e5ce07Smrg tpf*) 197348e5ce07Smrg # Don't try to run any link tests for TPF. We know it's impossible 197448e5ce07Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 197548e5ce07Smrg lt_cv_dlopen=dlopen 197648e5ce07Smrg lt_cv_dlopen_libs= 197748e5ce07Smrg lt_cv_dlopen_self=no 197848e5ce07Smrg ;; 197948e5ce07Smrg 1980dc9477beSmrg *) 1981dc9477beSmrg AC_CHECK_FUNC([shl_load], 198248e5ce07Smrg [lt_cv_dlopen=shl_load], 1983dc9477beSmrg [AC_CHECK_LIB([dld], [shl_load], 198448e5ce07Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1985dc9477beSmrg [AC_CHECK_FUNC([dlopen], 198648e5ce07Smrg [lt_cv_dlopen=dlopen], 1987dc9477beSmrg [AC_CHECK_LIB([dl], [dlopen], 198848e5ce07Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1989dc9477beSmrg [AC_CHECK_LIB([svld], [dlopen], 199048e5ce07Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1991dc9477beSmrg [AC_CHECK_LIB([dld], [dld_link], 199248e5ce07Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1993dc9477beSmrg ]) 1994dc9477beSmrg ]) 1995dc9477beSmrg ]) 1996dc9477beSmrg ]) 1997dc9477beSmrg ]) 1998c27c18e8Smrg ;; 1999c27c18e8Smrg esac 2000c43cc173Smrg 200148e5ce07Smrg if test no = "$lt_cv_dlopen"; then 20020eb1301bSmrg enable_dlopen=no 200348e5ce07Smrg else 200448e5ce07Smrg enable_dlopen=yes 200506c34b88Smrg fi 2006b789ec8aSmrg 2007dc9477beSmrg case $lt_cv_dlopen in 2008dc9477beSmrg dlopen) 200948e5ce07Smrg save_CPPFLAGS=$CPPFLAGS 201048e5ce07Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011b789ec8aSmrg 201248e5ce07Smrg save_LDFLAGS=$LDFLAGS 2013dc9477beSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014b789ec8aSmrg 201548e5ce07Smrg save_LIBS=$LIBS 2016dc9477beSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2017c43cc173Smrg 2018dc9477beSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 2019dc9477beSmrg lt_cv_dlopen_self, [dnl 2020dc9477beSmrg _LT_TRY_DLOPEN_SELF( 2021dc9477beSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2022dc9477beSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2023dc9477beSmrg ]) 2024c43cc173Smrg 202548e5ce07Smrg if test yes = "$lt_cv_dlopen_self"; then 2026dc9477beSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2027dc9477beSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2028dc9477beSmrg lt_cv_dlopen_self_static, [dnl 2029dc9477beSmrg _LT_TRY_DLOPEN_SELF( 2030dc9477beSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2031dc9477beSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2032dc9477beSmrg ]) 2033dc9477beSmrg fi 2034c43cc173Smrg 203548e5ce07Smrg CPPFLAGS=$save_CPPFLAGS 203648e5ce07Smrg LDFLAGS=$save_LDFLAGS 203748e5ce07Smrg LIBS=$save_LIBS 2038dc9477beSmrg ;; 2039dc9477beSmrg esac 2040c43cc173Smrg 2041dc9477beSmrg case $lt_cv_dlopen_self in 2042dc9477beSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2043dc9477beSmrg *) enable_dlopen_self=unknown ;; 2044dc9477beSmrg esac 204521e67964Smrg 2046dc9477beSmrg case $lt_cv_dlopen_self_static in 2047dc9477beSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2048dc9477beSmrg *) enable_dlopen_self_static=unknown ;; 2049dc9477beSmrg esac 2050dc9477beSmrgfi 2051dc9477beSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2052dc9477beSmrg [Whether dlopen is supported]) 2053dc9477beSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2054dc9477beSmrg [Whether dlopen of programs is supported]) 2055dc9477beSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2056dc9477beSmrg [Whether dlopen of statically linked programs is supported]) 2057dc9477beSmrg])# LT_SYS_DLOPEN_SELF 2058c43cc173Smrg 2059dc9477beSmrg# Old name: 2060dc9477beSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2061dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 2062dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063c43cc173Smrg 206437eb1ca1Smrg 2065dc9477beSmrg# _LT_COMPILER_C_O([TAGNAME]) 2066dc9477beSmrg# --------------------------- 2067dc9477beSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 2068dc9477beSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2069dc9477beSmrgm4_defun([_LT_COMPILER_C_O], 2070dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 2071dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2072dc9477beSmrgm4_require([_LT_TAG_COMPILER])dnl 2073dc9477beSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2074dc9477beSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2075dc9477beSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2076dc9477beSmrg $RM -r conftest 2>/dev/null 2077dc9477beSmrg mkdir conftest 2078dc9477beSmrg cd conftest 2079dc9477beSmrg mkdir out 2080dc9477beSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2081c27c18e8Smrg 2082dc9477beSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2083dc9477beSmrg # Insert the option either (1) after the last *FLAGS variable, or 2084dc9477beSmrg # (2) before a word containing "conftest.", or (3) at the end. 2085dc9477beSmrg # Note that $ac_compile itself does not contain backslashes and begins 2086dc9477beSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2087dc9477beSmrg lt_compile=`echo "$ac_compile" | $SED \ 2088dc9477beSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2089dc9477beSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2090dc9477beSmrg -e 's:$: $lt_compiler_flag:'` 2091dc9477beSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2092dc9477beSmrg (eval "$lt_compile" 2>out/conftest.err) 2093dc9477beSmrg ac_status=$? 2094dc9477beSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2095dc9477beSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2096dc9477beSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2097dc9477beSmrg then 2098dc9477beSmrg # The compiler can only warn and ignore the option if not recognized 2099dc9477beSmrg # So say no if there are warnings 2100dc9477beSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2101dc9477beSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2102dc9477beSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2103dc9477beSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2104dc9477beSmrg fi 210506c34b88Smrg fi 2106dc9477beSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2107dc9477beSmrg $RM conftest* 2108dc9477beSmrg # SGI C++ compiler will create directory out/ii_files/ for 2109dc9477beSmrg # template instantiation 2110dc9477beSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2111dc9477beSmrg $RM out/* && rmdir out 2112dc9477beSmrg cd .. 2113dc9477beSmrg $RM -r conftest 2114dc9477beSmrg $RM conftest* 2115dc9477beSmrg]) 2116dc9477beSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2117dc9477beSmrg [Does compiler simultaneously support -c and -o options?]) 2118dc9477beSmrg])# _LT_COMPILER_C_O 2119c27c18e8Smrg 2120c43cc173Smrg 2121dc9477beSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2122dc9477beSmrg# ---------------------------------- 2123dc9477beSmrg# Check to see if we can do hard links to lock some files if needed 2124dc9477beSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2125dc9477beSmrg[m4_require([_LT_ENABLE_LOCK])dnl 2126dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2127dc9477beSmrg_LT_COMPILER_C_O([$1]) 212837eb1ca1Smrg 212948e5ce07Smrghard_links=nottested 213048e5ce07Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2131dc9477beSmrg # do not overwrite the value of need_locks provided by the user 2132dc9477beSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2133dc9477beSmrg hard_links=yes 2134dc9477beSmrg $RM conftest* 2135dc9477beSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2136dc9477beSmrg touch conftest.a 2137dc9477beSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2138dc9477beSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2139dc9477beSmrg AC_MSG_RESULT([$hard_links]) 214048e5ce07Smrg if test no = "$hard_links"; then 214148e5ce07Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2142dc9477beSmrg need_locks=warn 2143c43cc173Smrg fi 2144dc9477beSmrgelse 2145dc9477beSmrg need_locks=no 2146dc9477beSmrgfi 2147dc9477beSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2148dc9477beSmrg])# _LT_COMPILER_FILE_LOCKS 2149c43cc173Smrg 2150c43cc173Smrg 2151dc9477beSmrg# _LT_CHECK_OBJDIR 2152dc9477beSmrg# ---------------- 2153dc9477beSmrgm4_defun([_LT_CHECK_OBJDIR], 2154dc9477beSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2155dc9477beSmrg[rm -f .libs 2>/dev/null 2156dc9477beSmrgmkdir .libs 2>/dev/null 2157dc9477beSmrgif test -d .libs; then 2158dc9477beSmrg lt_cv_objdir=.libs 215906c34b88Smrgelse 2160dc9477beSmrg # MS-DOS does not allow filenames that begin with a dot. 2161dc9477beSmrg lt_cv_objdir=_libs 216206c34b88Smrgfi 2163dc9477beSmrgrmdir .libs 2>/dev/null]) 2164dc9477beSmrgobjdir=$lt_cv_objdir 2165dc9477beSmrg_LT_DECL([], [objdir], [0], 2166dc9477beSmrg [The name of the directory that contains temporary libtool files])dnl 2167dc9477beSmrgm4_pattern_allow([LT_OBJDIR])dnl 216848e5ce07SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 216948e5ce07Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2170dc9477beSmrg])# _LT_CHECK_OBJDIR 2171c43cc173Smrg 2172c43cc173Smrg 2173dc9477beSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2174dc9477beSmrg# -------------------------------------- 2175dc9477beSmrg# Check hardcoding attributes. 2176dc9477beSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2177dc9477beSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2178dc9477beSmrg_LT_TAGVAR(hardcode_action, $1)= 2179dc9477beSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2180dc9477beSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 218148e5ce07Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2182c43cc173Smrg 2183dc9477beSmrg # We can hardcode non-existent directories. 218448e5ce07Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2185dc9477beSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2186dc9477beSmrg # have to relink, otherwise we might link with an installed library 2187dc9477beSmrg # when we should be linking with a yet-to-be-installed one 218848e5ce07Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 218948e5ce07Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2190dc9477beSmrg # Linking always hardcodes the temporary library directory. 2191dc9477beSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2192dc9477beSmrg else 2193dc9477beSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2194dc9477beSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2195dc9477beSmrg fi 2196dc9477beSmrgelse 2197dc9477beSmrg # We cannot hardcode anything, or else we can only hardcode existing 2198dc9477beSmrg # directories. 2199dc9477beSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2200dc9477beSmrgfi 2201dc9477beSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202c43cc173Smrg 220348e5ce07Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 220448e5ce07Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2205dc9477beSmrg # Fast installation is not supported 2206dc9477beSmrg enable_fast_install=no 220748e5ce07Smrgelif test yes = "$shlibpath_overrides_runpath" || 220848e5ce07Smrg test no = "$enable_shared"; then 2209dc9477beSmrg # Fast installation is not necessary 2210dc9477beSmrg enable_fast_install=needless 2211dc9477beSmrgfi 2212dc9477beSmrg_LT_TAGDECL([], [hardcode_action], [0], 2213dc9477beSmrg [How to hardcode a shared library path into an executable]) 2214dc9477beSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2215c27c18e8Smrg 2216c43cc173Smrg 2217dc9477beSmrg# _LT_CMD_STRIPLIB 2218dc9477beSmrg# ---------------- 2219dc9477beSmrgm4_defun([_LT_CMD_STRIPLIB], 2220dc9477beSmrg[m4_require([_LT_DECL_EGREP]) 2221dc9477beSmrgstriplib= 2222dc9477beSmrgold_striplib= 2223dc9477beSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2224dc9477beSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225dc9477beSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2226dc9477beSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2227dc9477beSmrg AC_MSG_RESULT([yes]) 2228dc9477beSmrgelse 2229dc9477beSmrg# FIXME - insert some real tests, host_os isn't really good enough 223006c34b88Smrg case $host_os in 2231dc9477beSmrg darwin*) 223248e5ce07Smrg if test -n "$STRIP"; then 2233dc9477beSmrg striplib="$STRIP -x" 2234dc9477beSmrg old_striplib="$STRIP -S" 2235dc9477beSmrg AC_MSG_RESULT([yes]) 2236dc9477beSmrg else 2237dc9477beSmrg AC_MSG_RESULT([no]) 2238dc9477beSmrg fi 223906c34b88Smrg ;; 224006c34b88Smrg *) 2241dc9477beSmrg AC_MSG_RESULT([no]) 224206c34b88Smrg ;; 224306c34b88Smrg esac 224406c34b88Smrgfi 2245dc9477beSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2246dc9477beSmrg_LT_DECL([], [striplib], [1]) 2247dc9477beSmrg])# _LT_CMD_STRIPLIB 2248c43cc173Smrg 2249c43cc173Smrg 225048e5ce07Smrg# _LT_PREPARE_MUNGE_PATH_LIST 225148e5ce07Smrg# --------------------------- 225248e5ce07Smrg# Make sure func_munge_path_list() is defined correctly. 225348e5ce07Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 225448e5ce07Smrg[[# func_munge_path_list VARIABLE PATH 225548e5ce07Smrg# ----------------------------------- 225648e5ce07Smrg# VARIABLE is name of variable containing _space_ separated list of 225748e5ce07Smrg# directories to be munged by the contents of PATH, which is string 225848e5ce07Smrg# having a format: 225948e5ce07Smrg# "DIR[:DIR]:" 226048e5ce07Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 226148e5ce07Smrg# ":DIR[:DIR]" 226248e5ce07Smrg# string "DIR[ DIR]" will be appended to VARIABLE 226348e5ce07Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 226448e5ce07Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 226548e5ce07Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 226648e5ce07Smrg# "DIR[:DIR]" 226748e5ce07Smrg# VARIABLE will be replaced by "DIR[ DIR]" 226848e5ce07Smrgfunc_munge_path_list () 226948e5ce07Smrg{ 227048e5ce07Smrg case x@S|@2 in 227148e5ce07Smrg x) 227248e5ce07Smrg ;; 227348e5ce07Smrg *:) 227448e5ce07Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 227548e5ce07Smrg ;; 227648e5ce07Smrg x:*) 227748e5ce07Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 227848e5ce07Smrg ;; 227948e5ce07Smrg *::*) 228048e5ce07Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 228148e5ce07Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 228248e5ce07Smrg ;; 228348e5ce07Smrg *) 228448e5ce07Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 228548e5ce07Smrg ;; 228648e5ce07Smrg esac 228748e5ce07Smrg} 228848e5ce07Smrg]])# _LT_PREPARE_PATH_LIST 228948e5ce07Smrg 229048e5ce07Smrg 2291dc9477beSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2292dc9477beSmrg# ----------------------------- 2293dc9477beSmrg# PORTME Fill in your ld.so characteristics 2294dc9477beSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2295dc9477beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2296dc9477beSmrgm4_require([_LT_DECL_EGREP])dnl 2297dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2298dc9477beSmrgm4_require([_LT_DECL_OBJDUMP])dnl 229906c34b88Smrgm4_require([_LT_DECL_SED])dnl 2300dc9477beSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 230148e5ce07Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2302dc9477beSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2303dc9477beSmrgm4_if([$1], 2304dc9477beSmrg [], [ 230548e5ce07Smrgif test yes = "$GCC"; then 2306dc9477beSmrg case $host_os in 230748e5ce07Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 230848e5ce07Smrg *) lt_awk_arg='/^libraries:/' ;; 2309dc9477beSmrg esac 2310dc9477beSmrg case $host_os in 231148e5ce07Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 231248e5ce07Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2313dc9477beSmrg esac 2314dc9477beSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2315dc9477beSmrg case $lt_search_path_spec in 2316dc9477beSmrg *\;*) 2317dc9477beSmrg # if the path contains ";" then we assume it to be the separator 2318dc9477beSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2319dc9477beSmrg # assumed that no part of a normal pathname contains ";" but that should 2320dc9477beSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2321dc9477beSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2322dc9477beSmrg ;; 2323dc9477beSmrg *) 2324dc9477beSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2325dc9477beSmrg ;; 2326dc9477beSmrg esac 2327dc9477beSmrg # Ok, now we have the path, separated by spaces, we can step through it 232848e5ce07Smrg # and add multilib dir if necessary... 2329dc9477beSmrg lt_tmp_lt_search_path_spec= 233048e5ce07Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 233148e5ce07Smrg # ...but if some path component already ends with the multilib dir we assume 233248e5ce07Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 233348e5ce07Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 233448e5ce07Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 233548e5ce07Smrg lt_multi_os_dir= 233648e5ce07Smrg ;; 233748e5ce07Smrg esac 2338dc9477beSmrg for lt_sys_path in $lt_search_path_spec; do 233948e5ce07Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 234048e5ce07Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 234148e5ce07Smrg elif test -n "$lt_multi_os_dir"; then 2342dc9477beSmrg test -d "$lt_sys_path" && \ 2343dc9477beSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2344dc9477beSmrg fi 2345dc9477beSmrg done 2346dc9477beSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 234748e5ce07SmrgBEGIN {RS = " "; FS = "/|\n";} { 234848e5ce07Smrg lt_foo = ""; 234948e5ce07Smrg lt_count = 0; 2350dc9477beSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2351dc9477beSmrg if ($lt_i != "" && $lt_i != ".") { 2352dc9477beSmrg if ($lt_i == "..") { 2353dc9477beSmrg lt_count++; 2354dc9477beSmrg } else { 2355dc9477beSmrg if (lt_count == 0) { 235648e5ce07Smrg lt_foo = "/" $lt_i lt_foo; 2357dc9477beSmrg } else { 2358dc9477beSmrg lt_count--; 2359dc9477beSmrg } 2360dc9477beSmrg } 2361dc9477beSmrg } 2362dc9477beSmrg } 2363dc9477beSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2364dc9477beSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2365dc9477beSmrg}'` 2366dc9477beSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2367dc9477beSmrg # for these hosts. 2368dc9477beSmrg case $host_os in 2369dc9477beSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 237048e5ce07Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2371dc9477beSmrg esac 2372dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2373c43cc173Smrgelse 2374dc9477beSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2375dc9477beSmrgfi]) 2376dc9477beSmrglibrary_names_spec= 2377dc9477beSmrglibname_spec='lib$name' 2378dc9477beSmrgsoname_spec= 237948e5ce07Smrgshrext_cmds=.so 2380dc9477beSmrgpostinstall_cmds= 2381dc9477beSmrgpostuninstall_cmds= 2382dc9477beSmrgfinish_cmds= 2383dc9477beSmrgfinish_eval= 2384dc9477beSmrgshlibpath_var= 2385dc9477beSmrgshlibpath_overrides_runpath=unknown 2386dc9477beSmrgversion_type=none 2387dc9477beSmrgdynamic_linker="$host_os ld.so" 2388dc9477beSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2389dc9477beSmrgneed_lib_prefix=unknown 2390dc9477beSmrghardcode_into_libs=no 2391c43cc173Smrg 2392dc9477beSmrg# when you set need_version to no, make sure it does not cause -set_version 2393dc9477beSmrg# flags to be left without arguments 2394dc9477beSmrgneed_version=unknown 2395c43cc173Smrg 239648e5ce07SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 239748e5ce07Smrg[User-defined run-time library search path.]) 239848e5ce07Smrg 2399dc9477beSmrgcase $host_os in 2400dc9477beSmrgaix3*) 2401dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 240248e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2403dc9477beSmrg shlibpath_var=LIBPATH 2404c27c18e8Smrg 2405dc9477beSmrg # AIX 3 has no versioning support, so we append a major version to the name. 240648e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 2407dc9477beSmrg ;; 2408c43cc173Smrg 2409dc9477beSmrgaix[[4-9]]*) 2410dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2411dc9477beSmrg need_lib_prefix=no 2412dc9477beSmrg need_version=no 2413dc9477beSmrg hardcode_into_libs=yes 241448e5ce07Smrg if test ia64 = "$host_cpu"; then 2415dc9477beSmrg # AIX 5 supports IA64 241648e5ce07Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2417dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2418dc9477beSmrg else 2419dc9477beSmrg # With GCC up to 2.95.x, collect2 would create an import file 2420dc9477beSmrg # for dependence libraries. The import file would start with 242148e5ce07Smrg # the line '#! .'. This would cause the generated library to 242248e5ce07Smrg # depend on '.', always an invalid library. This was fixed in 2423dc9477beSmrg # development snapshots of GCC prior to 3.0. 2424dc9477beSmrg case $host_os in 2425dc9477beSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2426dc9477beSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2427dc9477beSmrg echo ' yes ' 242848e5ce07Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2429dc9477beSmrg : 2430dc9477beSmrg else 2431dc9477beSmrg can_build_shared=no 2432dc9477beSmrg fi 2433dc9477beSmrg ;; 2434dc9477beSmrg esac 243548e5ce07Smrg # Using Import Files as archive members, it is possible to support 243648e5ce07Smrg # filename-based versioning of shared library archives on AIX. While 243748e5ce07Smrg # this would work for both with and without runtime linking, it will 243848e5ce07Smrg # prevent static linking of such archives. So we do filename-based 243948e5ce07Smrg # shared library versioning with .so extension only, which is used 244048e5ce07Smrg # when both runtime linking and shared linking is enabled. 244148e5ce07Smrg # Unfortunately, runtime linking may impact performance, so we do 244248e5ce07Smrg # not want this to be the default eventually. Also, we use the 244348e5ce07Smrg # versioned .so libs for executables only if there is the -brtl 244448e5ce07Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 244548e5ce07Smrg # To allow for filename-based versioning support, we need to create 244648e5ce07Smrg # libNAME.so.V as an archive file, containing: 244748e5ce07Smrg # *) an Import File, referring to the versioned filename of the 244848e5ce07Smrg # archive as well as the shared archive member, telling the 244948e5ce07Smrg # bitwidth (32 or 64) of that shared object, and providing the 245048e5ce07Smrg # list of exported symbols of that shared object, eventually 245148e5ce07Smrg # decorated with the 'weak' keyword 245248e5ce07Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 245348e5ce07Smrg # it being seen by the linker. 245448e5ce07Smrg # At run time we better use the real file rather than another symlink, 245548e5ce07Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 245648e5ce07Smrg 245748e5ce07Smrg case $with_aix_soname,$aix_use_runtimelinking in 245848e5ce07Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2459dc9477beSmrg # soname into executable. Probably we can add versioning support to 2460dc9477beSmrg # collect2, so additional links can be useful in future. 246148e5ce07Smrg aix,yes) # traditional libtool 246248e5ce07Smrg dynamic_linker='AIX unversionable lib.so' 2463dc9477beSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2464dc9477beSmrg # instead of lib<name>.a to let people know that these are not 2465dc9477beSmrg # typical AIX shared libraries. 246648e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 246748e5ce07Smrg ;; 246848e5ce07Smrg aix,no) # traditional AIX only 246948e5ce07Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2470dc9477beSmrg # We preserve .a as extension for shared libraries through AIX4.2 2471dc9477beSmrg # and later when we are not doing run time linking. 247248e5ce07Smrg library_names_spec='$libname$release.a $libname.a' 247348e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 247448e5ce07Smrg ;; 247548e5ce07Smrg svr4,*) # full svr4 only 247648e5ce07Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 247748e5ce07Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 247848e5ce07Smrg # We do not specify a path in Import Files, so LIBPATH fires. 247948e5ce07Smrg shlibpath_overrides_runpath=yes 248048e5ce07Smrg ;; 248148e5ce07Smrg *,yes) # both, prefer svr4 248248e5ce07Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 248348e5ce07Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 248448e5ce07Smrg # unpreferred sharedlib libNAME.a needs extra handling 248548e5ce07Smrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 248648e5ce07Smrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 248748e5ce07Smrg # We do not specify a path in Import Files, so LIBPATH fires. 248848e5ce07Smrg shlibpath_overrides_runpath=yes 248948e5ce07Smrg ;; 249048e5ce07Smrg *,no) # both, prefer aix 249148e5ce07Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 249248e5ce07Smrg library_names_spec='$libname$release.a $libname.a' 249348e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 249448e5ce07Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 249548e5ce07Smrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 249648e5ce07Smrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 249748e5ce07Smrg ;; 249848e5ce07Smrg esac 2499dc9477beSmrg shlibpath_var=LIBPATH 2500dc9477beSmrg fi 2501dc9477beSmrg ;; 2502c43cc173Smrg 2503dc9477beSmrgamigaos*) 2504dc9477beSmrg case $host_cpu in 2505dc9477beSmrg powerpc) 2506dc9477beSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2507dc9477beSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 250848e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 250906c34b88Smrg ;; 2510dc9477beSmrg m68k) 2511dc9477beSmrg library_names_spec='$libname.ixlibrary $libname.a' 2512dc9477beSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 251348e5ce07Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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' 251406c34b88Smrg ;; 2515dc9477beSmrg esac 2516dc9477beSmrg ;; 2517c27c18e8Smrg 2518dc9477beSmrgbeos*) 251948e5ce07Smrg library_names_spec='$libname$shared_ext' 2520dc9477beSmrg dynamic_linker="$host_os ld.so" 2521dc9477beSmrg shlibpath_var=LIBRARY_PATH 2522dc9477beSmrg ;; 252306c34b88Smrg 2524dc9477beSmrgbsdi[[45]]*) 2525dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2526dc9477beSmrg need_version=no 252748e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 252848e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 2529dc9477beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2530dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2531dc9477beSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2532dc9477beSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2533dc9477beSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2534dc9477beSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2535dc9477beSmrg # libtool to hard-code these into programs 2536dc9477beSmrg ;; 253706c34b88Smrg 2538dc9477beSmrgcygwin* | mingw* | pw32* | cegcc*) 2539dc9477beSmrg version_type=windows 254048e5ce07Smrg shrext_cmds=.dll 2541dc9477beSmrg need_version=no 2542dc9477beSmrg need_lib_prefix=no 254306c34b88Smrg 2544dc9477beSmrg case $GCC,$cc_basename in 2545dc9477beSmrg yes,*) 2546dc9477beSmrg # gcc 2547dc9477beSmrg library_names_spec='$libname.dll.a' 2548dc9477beSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 254948e5ce07Smrg postinstall_cmds='base_file=`basename \$file`~ 255048e5ce07Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2551dc9477beSmrg dldir=$destdir/`dirname \$dlpath`~ 2552dc9477beSmrg test -d \$dldir || mkdir -p \$dldir~ 2553dc9477beSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2554dc9477beSmrg chmod a+x \$dldir/$dlname~ 2555dc9477beSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2556dc9477beSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2557dc9477beSmrg fi' 2558dc9477beSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2559dc9477beSmrg dlpath=$dir/\$dldll~ 2560dc9477beSmrg $RM \$dlpath' 2561dc9477beSmrg shlibpath_overrides_runpath=yes 256206c34b88Smrg 2563dc9477beSmrg case $host_os in 2564dc9477beSmrg cygwin*) 2565dc9477beSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 256648e5ce07Smrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2567dc9477beSmrgm4_if([$1], [],[ 2568dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2569dc9477beSmrg ;; 2570dc9477beSmrg mingw* | cegcc*) 2571dc9477beSmrg # MinGW DLLs use traditional 'lib' prefix 257248e5ce07Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2573dc9477beSmrg ;; 2574dc9477beSmrg pw32*) 2575dc9477beSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 257648e5ce07Smrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2577dc9477beSmrg ;; 2578dc9477beSmrg esac 2579dc9477beSmrg dynamic_linker='Win32 ld.exe' 258006c34b88Smrg ;; 258106c34b88Smrg 2582dc9477beSmrg *,cl*) 2583dc9477beSmrg # Native MSVC 2584dc9477beSmrg libname_spec='$name' 258548e5ce07Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 258648e5ce07Smrg library_names_spec='$libname.dll.lib' 2587dc9477beSmrg 2588dc9477beSmrg case $build_os in 2589dc9477beSmrg mingw*) 2590dc9477beSmrg sys_lib_search_path_spec= 2591dc9477beSmrg lt_save_ifs=$IFS 2592dc9477beSmrg IFS=';' 2593dc9477beSmrg for lt_path in $LIB 259406c34b88Smrg do 2595dc9477beSmrg IFS=$lt_save_ifs 2596dc9477beSmrg # Let DOS variable expansion print the short 8.3 style file name. 2597dc9477beSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2598dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 259906c34b88Smrg done 2600dc9477beSmrg IFS=$lt_save_ifs 2601dc9477beSmrg # Convert to MSYS style. 2602dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2603dc9477beSmrg ;; 2604dc9477beSmrg cygwin*) 2605dc9477beSmrg # Convert to unix form, then to dos form, then back to unix form 2606dc9477beSmrg # but this time dos style (no spaces!) so that the unix form looks 2607dc9477beSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 2608dc9477beSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2609dc9477beSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2610dc9477beSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2611dc9477beSmrg ;; 2612dc9477beSmrg *) 261348e5ce07Smrg sys_lib_search_path_spec=$LIB 2614dc9477beSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2615dc9477beSmrg # It is most probably a Windows format PATH. 2616dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2617dc9477beSmrg else 2618dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2619dc9477beSmrg fi 2620dc9477beSmrg # FIXME: find the short name or the path components, as spaces are 2621dc9477beSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 2622dc9477beSmrg ;; 2623dc9477beSmrg esac 2624c27c18e8Smrg 2625dc9477beSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 262648e5ce07Smrg postinstall_cmds='base_file=`basename \$file`~ 262748e5ce07Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2628dc9477beSmrg dldir=$destdir/`dirname \$dlpath`~ 2629dc9477beSmrg test -d \$dldir || mkdir -p \$dldir~ 2630dc9477beSmrg $install_prog $dir/$dlname \$dldir/$dlname' 2631dc9477beSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2632dc9477beSmrg dlpath=$dir/\$dldll~ 2633dc9477beSmrg $RM \$dlpath' 2634dc9477beSmrg shlibpath_overrides_runpath=yes 2635dc9477beSmrg dynamic_linker='Win32 link.exe' 2636dc9477beSmrg ;; 2637c27c18e8Smrg 2638dc9477beSmrg *) 2639dc9477beSmrg # Assume MSVC wrapper 264048e5ce07Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2641dc9477beSmrg dynamic_linker='Win32 ld.exe' 2642dc9477beSmrg ;; 2643dc9477beSmrg esac 2644dc9477beSmrg # FIXME: first we should search . and the directory the executable is in 2645dc9477beSmrg shlibpath_var=PATH 2646dc9477beSmrg ;; 2647c43cc173Smrg 2648dc9477beSmrgdarwin* | rhapsody*) 2649dc9477beSmrg dynamic_linker="$host_os dyld" 2650dc9477beSmrg version_type=darwin 2651dc9477beSmrg need_lib_prefix=no 2652dc9477beSmrg need_version=no 265348e5ce07Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 265448e5ce07Smrg soname_spec='$libname$release$major$shared_ext' 2655dc9477beSmrg shlibpath_overrides_runpath=yes 2656dc9477beSmrg shlibpath_var=DYLD_LIBRARY_PATH 2657dc9477beSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2658dc9477beSmrgm4_if([$1], [],[ 2659dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2660dc9477beSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2661dc9477beSmrg ;; 266221e67964Smrg 2663dc9477beSmrgdgux*) 2664dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2665dc9477beSmrg need_lib_prefix=no 2666dc9477beSmrg need_version=no 266748e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 266848e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 2669dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2670dc9477beSmrg ;; 2671c43cc173Smrg 2672dc9477beSmrgfreebsd* | dragonfly*) 2673dc9477beSmrg # DragonFly does not have aout. When/if they implement a new 2674dc9477beSmrg # versioning mechanism, adjust this. 2675dc9477beSmrg if test -x /usr/bin/objformat; then 2676dc9477beSmrg objformat=`/usr/bin/objformat` 267721e67964Smrg else 2678dc9477beSmrg case $host_os in 2679dc9477beSmrg freebsd[[23]].*) objformat=aout ;; 2680dc9477beSmrg *) objformat=elf ;; 2681c43cc173Smrg esac 268221e67964Smrg fi 26834940c694Smrg # Handle Gentoo/FreeBSD as it was Linux 26844940c694Smrg case $host_vendor in 26854940c694Smrg gentoo) 26864940c694Smrg version_type=linux ;; 26874940c694Smrg *) 26884940c694Smrg version_type=freebsd-$objformat ;; 26894940c694Smrg esac 26904940c694Smrg 2691dc9477beSmrg case $version_type in 2692dc9477beSmrg freebsd-elf*) 269348e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 269448e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 2695dc9477beSmrg need_version=no 2696dc9477beSmrg need_lib_prefix=no 2697dc9477beSmrg ;; 2698dc9477beSmrg freebsd-*) 269948e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2700dc9477beSmrg need_version=yes 2701dc9477beSmrg ;; 27024940c694Smrg linux) 27034940c694Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27044940c694Smrg soname_spec='${libname}${release}${shared_ext}$major' 27054940c694Smrg need_lib_prefix=no 27064940c694Smrg need_version=no 27074940c694Smrg ;; 2708dc9477beSmrg esac 2709dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 271006c34b88Smrg case $host_os in 2711dc9477beSmrg freebsd2.*) 2712dc9477beSmrg shlibpath_overrides_runpath=yes 271306c34b88Smrg ;; 2714dc9477beSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2715dc9477beSmrg shlibpath_overrides_runpath=yes 2716dc9477beSmrg hardcode_into_libs=yes 271706c34b88Smrg ;; 2718dc9477beSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2719dc9477beSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2720dc9477beSmrg shlibpath_overrides_runpath=no 2721dc9477beSmrg hardcode_into_libs=yes 272221e67964Smrg ;; 2723dc9477beSmrg *) # from 4.6 on, and DragonFly 2724dc9477beSmrg shlibpath_overrides_runpath=yes 2725dc9477beSmrg hardcode_into_libs=yes 2726c43cc173Smrg ;; 2727c43cc173Smrg esac 2728dc9477beSmrg ;; 2729c43cc173Smrg 2730dc9477beSmrghaiku*) 2731dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2732dc9477beSmrg need_lib_prefix=no 2733dc9477beSmrg need_version=no 2734dc9477beSmrg dynamic_linker="$host_os runtime_loader" 273548e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 273648e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 2737dc9477beSmrg shlibpath_var=LIBRARY_PATH 273848e5ce07Smrg shlibpath_overrides_runpath=no 2739dc9477beSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2740dc9477beSmrg hardcode_into_libs=yes 2741dc9477beSmrg ;; 274221e67964Smrg 2743dc9477beSmrghpux9* | hpux10* | hpux11*) 2744dc9477beSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2745dc9477beSmrg # link against other versions. 2746dc9477beSmrg version_type=sunos 2747dc9477beSmrg need_lib_prefix=no 2748dc9477beSmrg need_version=no 2749dc9477beSmrg case $host_cpu in 2750dc9477beSmrg ia64*) 2751dc9477beSmrg shrext_cmds='.so' 2752dc9477beSmrg hardcode_into_libs=yes 2753dc9477beSmrg dynamic_linker="$host_os dld.so" 2754dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2755dc9477beSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 275648e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 275748e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 275848e5ce07Smrg if test 32 = "$HPUX_IA64_MODE"; then 2759dc9477beSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 276048e5ce07Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2761dc9477beSmrg else 2762dc9477beSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 276348e5ce07Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 276406c34b88Smrg fi 2765c43cc173Smrg ;; 2766dc9477beSmrg hppa*64*) 2767dc9477beSmrg shrext_cmds='.sl' 2768dc9477beSmrg hardcode_into_libs=yes 2769dc9477beSmrg dynamic_linker="$host_os dld.sl" 2770dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2771dc9477beSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 277248e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 277348e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 2774dc9477beSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2775dc9477beSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2776dc9477beSmrg ;; 2777dc9477beSmrg *) 2778dc9477beSmrg shrext_cmds='.sl' 2779dc9477beSmrg dynamic_linker="$host_os dld.sl" 2780dc9477beSmrg shlibpath_var=SHLIB_PATH 2781dc9477beSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 278248e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 278348e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 2784dc9477beSmrg ;; 2785dc9477beSmrg esac 2786dc9477beSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2787dc9477beSmrg postinstall_cmds='chmod 555 $lib' 2788dc9477beSmrg # or fails outright, so override atomically: 2789dc9477beSmrg install_override_mode=555 2790dc9477beSmrg ;; 2791c43cc173Smrg 2792dc9477beSmrginterix[[3-9]]*) 2793dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2794dc9477beSmrg need_lib_prefix=no 2795dc9477beSmrg need_version=no 279648e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 279748e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 2798dc9477beSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2799dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2800dc9477beSmrg shlibpath_overrides_runpath=no 2801dc9477beSmrg hardcode_into_libs=yes 2802dc9477beSmrg ;; 2803c43cc173Smrg 2804dc9477beSmrgirix5* | irix6* | nonstopux*) 2805dc9477beSmrg case $host_os in 2806dc9477beSmrg nonstopux*) version_type=nonstopux ;; 2807dc9477beSmrg *) 280848e5ce07Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 2809dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2810dc9477beSmrg else 2811dc9477beSmrg version_type=irix 2812dc9477beSmrg fi ;; 2813dc9477beSmrg esac 2814dc9477beSmrg need_lib_prefix=no 2815dc9477beSmrg need_version=no 281648e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 281748e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2818dc9477beSmrg case $host_os in 2819dc9477beSmrg irix5* | nonstopux*) 2820dc9477beSmrg libsuff= shlibsuff= 2821dc9477beSmrg ;; 2822dc9477beSmrg *) 2823dc9477beSmrg case $LD in # libtool.m4 will add one of these switches to LD 2824dc9477beSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2825dc9477beSmrg libsuff= shlibsuff= libmagic=32-bit;; 2826dc9477beSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2827dc9477beSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2828dc9477beSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2829dc9477beSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2830dc9477beSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2831dc9477beSmrg esac 2832dc9477beSmrg ;; 2833dc9477beSmrg esac 2834dc9477beSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2835dc9477beSmrg shlibpath_overrides_runpath=no 283648e5ce07Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 283748e5ce07Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2838dc9477beSmrg hardcode_into_libs=yes 2839dc9477beSmrg ;; 2840c27c18e8Smrg 2841dc9477beSmrg# No shared lib support for Linux oldld, aout, or coff. 2842dc9477beSmrglinux*oldld* | linux*aout* | linux*coff*) 2843dc9477beSmrg dynamic_linker=no 2844dc9477beSmrg ;; 284506c34b88Smrg 284648e5ce07Smrglinux*android*) 284748e5ce07Smrg version_type=none # Android doesn't support versioned libraries. 284848e5ce07Smrg need_lib_prefix=no 284948e5ce07Smrg need_version=no 285048e5ce07Smrg library_names_spec='$libname$release$shared_ext' 285148e5ce07Smrg soname_spec='$libname$release$shared_ext' 285248e5ce07Smrg finish_cmds= 285348e5ce07Smrg shlibpath_var=LD_LIBRARY_PATH 285448e5ce07Smrg shlibpath_overrides_runpath=yes 285548e5ce07Smrg 285648e5ce07Smrg # This implies no fast_install, which is unacceptable. 285748e5ce07Smrg # Some rework will be needed to allow for fast_install 285848e5ce07Smrg # before this can be enabled. 285948e5ce07Smrg hardcode_into_libs=yes 286048e5ce07Smrg 286148e5ce07Smrg dynamic_linker='Android linker' 286248e5ce07Smrg # Don't embed -rpath directories since the linker doesn't support them. 286348e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 286448e5ce07Smrg ;; 286548e5ce07Smrg 2866dc9477beSmrg# This must be glibc/ELF. 286744584a44Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2868dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2869dc9477beSmrg need_lib_prefix=no 2870dc9477beSmrg need_version=no 287148e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 287248e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 2873dc9477beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2874dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2875dc9477beSmrg shlibpath_overrides_runpath=no 287606c34b88Smrg 2877dc9477beSmrg # Some binutils ld are patched to set DT_RUNPATH 2878dc9477beSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2879dc9477beSmrg [lt_cv_shlibpath_overrides_runpath=no 2880dc9477beSmrg save_LDFLAGS=$LDFLAGS 2881dc9477beSmrg save_libdir=$libdir 2882dc9477beSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2883dc9477beSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2884dc9477beSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2885dc9477beSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2886dc9477beSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2887dc9477beSmrg LDFLAGS=$save_LDFLAGS 2888dc9477beSmrg libdir=$save_libdir 2889dc9477beSmrg ]) 2890dc9477beSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 289106c34b88Smrg 2892dc9477beSmrg # This implies no fast_install, which is unacceptable. 2893dc9477beSmrg # Some rework will be needed to allow for fast_install 2894dc9477beSmrg # before this can be enabled. 2895dc9477beSmrg hardcode_into_libs=yes 2896c43cc173Smrg 289748e5ce07Smrg # Ideally, we could use ldconfig to report *all* directores which are 289848e5ce07Smrg # searched for libraries, however this is still not possible. Aside from not 289948e5ce07Smrg # being certain /sbin/ldconfig is available, command 290048e5ce07Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 290148e5ce07Smrg # even though it is searched at run-time. Try to do the best guess by 290248e5ce07Smrg # appending ld.so.conf contents (and includes) to the search path. 2903dc9477beSmrg if test -f /etc/ld.so.conf; then 2904dc9477beSmrg 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' ' '` 29054940c694Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2906dc9477beSmrg fi 2907b789ec8aSmrg 2908dc9477beSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2909dc9477beSmrg # powerpc, because MkLinux only supported shared libraries with the 2910dc9477beSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2911dc9477beSmrg # most powerpc-linux boxes support dynamic linking these days and 2912dc9477beSmrg # people can always --disable-shared, the test was removed, and we 2913dc9477beSmrg # assume the GNU/Linux dynamic linker is in use. 2914dc9477beSmrg dynamic_linker='GNU/Linux ld.so' 2915dc9477beSmrg ;; 2916b789ec8aSmrg 2917dc9477beSmrgnetbsd*) 2918dc9477beSmrg version_type=sunos 2919dc9477beSmrg need_lib_prefix=no 2920dc9477beSmrg need_version=no 2921dc9477beSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 292248e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2923dc9477beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2924dc9477beSmrg dynamic_linker='NetBSD (a.out) ld.so' 292506c34b88Smrg else 292648e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 292748e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 2928dc9477beSmrg dynamic_linker='NetBSD ld.elf_so' 2929b789ec8aSmrg fi 2930dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2931dc9477beSmrg shlibpath_overrides_runpath=yes 2932dc9477beSmrg hardcode_into_libs=yes 2933dc9477beSmrg ;; 2934c43cc173Smrg 2935dc9477beSmrgnewsos6) 2936dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 293748e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2938dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2939dc9477beSmrg shlibpath_overrides_runpath=yes 2940dc9477beSmrg ;; 2941c43cc173Smrg 2942dc9477beSmrg*nto* | *qnx*) 2943dc9477beSmrg version_type=qnx 2944dc9477beSmrg need_lib_prefix=no 2945dc9477beSmrg need_version=no 294648e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 294748e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 2948dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2949dc9477beSmrg shlibpath_overrides_runpath=no 2950dc9477beSmrg hardcode_into_libs=yes 2951dc9477beSmrg dynamic_linker='ldqnx.so' 2952dc9477beSmrg ;; 2953c43cc173Smrg 295448e5ce07Smrgopenbsd* | bitrig*) 2955dc9477beSmrg version_type=sunos 295648e5ce07Smrg sys_lib_dlsearch_path_spec=/usr/lib 2957dc9477beSmrg need_lib_prefix=no 295848e5ce07Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 295948e5ce07Smrg need_version=no 29600eb1301bSmrg else 296148e5ce07Smrg need_version=yes 29620eb1301bSmrg fi 296348e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 296448e5ce07Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 296548e5ce07Smrg shlibpath_var=LD_LIBRARY_PATH 296648e5ce07Smrg shlibpath_overrides_runpath=yes 2967dc9477beSmrg ;; 2968c43cc173Smrg 2969dc9477beSmrgos2*) 2970dc9477beSmrg libname_spec='$name' 297148e5ce07Smrg version_type=windows 297248e5ce07Smrg shrext_cmds=.dll 297348e5ce07Smrg need_version=no 2974dc9477beSmrg need_lib_prefix=no 297548e5ce07Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 297648e5ce07Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 297748e5ce07Smrg v=$($ECHO $release$versuffix | tr -d .-); 297848e5ce07Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 297948e5ce07Smrg $ECHO $n$v`$shared_ext' 298048e5ce07Smrg library_names_spec='${libname}_dll.$libext' 2981dc9477beSmrg dynamic_linker='OS/2 ld.exe' 298248e5ce07Smrg shlibpath_var=BEGINLIBPATH 298348e5ce07Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 298448e5ce07Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 298548e5ce07Smrg postinstall_cmds='base_file=`basename \$file`~ 298648e5ce07Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 298748e5ce07Smrg dldir=$destdir/`dirname \$dlpath`~ 298848e5ce07Smrg test -d \$dldir || mkdir -p \$dldir~ 298948e5ce07Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 299048e5ce07Smrg chmod a+x \$dldir/$dlname~ 299148e5ce07Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 299248e5ce07Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 299348e5ce07Smrg fi' 299448e5ce07Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 299548e5ce07Smrg dlpath=$dir/\$dldll~ 299648e5ce07Smrg $RM \$dlpath' 2997dc9477beSmrg ;; 299806c34b88Smrg 2999dc9477beSmrgosf3* | osf4* | osf5*) 3000dc9477beSmrg version_type=osf 3001dc9477beSmrg need_lib_prefix=no 3002dc9477beSmrg need_version=no 300348e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 300448e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3005dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 3006dc9477beSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 300748e5ce07Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3008c27c18e8Smrg ;; 300906c34b88Smrg 3010dc9477beSmrgrdos*) 3011dc9477beSmrg dynamic_linker=no 3012dc9477beSmrg ;; 3013dc9477beSmrg 3014dc9477beSmrgsolaris*) 301506c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 301606c34b88Smrg need_lib_prefix=no 301706c34b88Smrg need_version=no 301848e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 301948e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 3020dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 3021dc9477beSmrg shlibpath_overrides_runpath=yes 302206c34b88Smrg hardcode_into_libs=yes 3023dc9477beSmrg # ldd complains unless libraries are executable 3024dc9477beSmrg postinstall_cmds='chmod +x $lib' 302506c34b88Smrg ;; 3026c43cc173Smrg 3027dc9477beSmrgsunos4*) 3028dc9477beSmrg version_type=sunos 302948e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3030dc9477beSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3031dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 3032dc9477beSmrg shlibpath_overrides_runpath=yes 303348e5ce07Smrg if test yes = "$with_gnu_ld"; then 3034dc9477beSmrg need_lib_prefix=no 3035dc9477beSmrg fi 3036dc9477beSmrg need_version=yes 3037c27c18e8Smrg ;; 3038c43cc173Smrg 3039dc9477beSmrgsysv4 | sysv4.3*) 304006c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 304148e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 304248e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 304306c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 3044dc9477beSmrg case $host_vendor in 3045dc9477beSmrg sni) 3046dc9477beSmrg shlibpath_overrides_runpath=no 3047dc9477beSmrg need_lib_prefix=no 3048dc9477beSmrg runpath_var=LD_RUN_PATH 304906c34b88Smrg ;; 3050dc9477beSmrg siemens) 3051dc9477beSmrg need_lib_prefix=no 305206c34b88Smrg ;; 3053dc9477beSmrg motorola) 3054dc9477beSmrg need_lib_prefix=no 3055dc9477beSmrg need_version=no 3056dc9477beSmrg shlibpath_overrides_runpath=no 3057dc9477beSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 305806c34b88Smrg ;; 305906c34b88Smrg esac 306006c34b88Smrg ;; 3061c43cc173Smrg 3062dc9477beSmrgsysv4*MP*) 306348e5ce07Smrg if test -d /usr/nec; then 3064dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 306548e5ce07Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 306648e5ce07Smrg soname_spec='$libname$shared_ext.$major' 3067dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 3068dc9477beSmrg fi 306906c34b88Smrg ;; 3070c43cc173Smrg 3071dc9477beSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 307248e5ce07Smrg version_type=sco 307306c34b88Smrg need_lib_prefix=no 307406c34b88Smrg need_version=no 307548e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 307648e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 307706c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 3078dc9477beSmrg shlibpath_overrides_runpath=yes 3079dc9477beSmrg hardcode_into_libs=yes 308048e5ce07Smrg if test yes = "$with_gnu_ld"; then 3081dc9477beSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3082c27c18e8Smrg else 3083dc9477beSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 308406c34b88Smrg case $host_os in 3085dc9477beSmrg sco3.2v5*) 3086dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3087dc9477beSmrg ;; 308806c34b88Smrg esac 3089c27c18e8Smrg fi 3090dc9477beSmrg sys_lib_dlsearch_path_spec='/usr/lib' 309106c34b88Smrg ;; 3092c43cc173Smrg 3093dc9477beSmrgtpf*) 3094dc9477beSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 309506c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 309606c34b88Smrg need_lib_prefix=no 309706c34b88Smrg need_version=no 309848e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 309906c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 310006c34b88Smrg shlibpath_overrides_runpath=no 310106c34b88Smrg hardcode_into_libs=yes 310206c34b88Smrg ;; 3103c43cc173Smrg 3104dc9477beSmrguts4*) 310506c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 310648e5ce07Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 310748e5ce07Smrg soname_spec='$libname$release$shared_ext$major' 3108dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 310906c34b88Smrg ;; 3110c43cc173Smrg 3111dc9477beSmrg*) 311206c34b88Smrg dynamic_linker=no 311306c34b88Smrg ;; 3114dc9477beSmrgesac 3115dc9477beSmrgAC_MSG_RESULT([$dynamic_linker]) 311648e5ce07Smrgtest no = "$dynamic_linker" && can_build_shared=no 3117c43cc173Smrg 3118dc9477beSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 311948e5ce07Smrgif test yes = "$GCC"; then 3120dc9477beSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3121dc9477beSmrgfi 3122c43cc173Smrg 312348e5ce07Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 312448e5ce07Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3125dc9477beSmrgfi 312648e5ce07Smrg 312748e5ce07Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 312848e5ce07Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3129dc9477beSmrgfi 3130c43cc173Smrg 313148e5ce07Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 313248e5ce07Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 313348e5ce07Smrg 313448e5ce07Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 313548e5ce07Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 313648e5ce07Smrg 313748e5ce07Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 313848e5ce07Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 313948e5ce07Smrg 3140dc9477beSmrg_LT_DECL([], [variables_saved_for_relink], [1], 3141dc9477beSmrg [Variables whose values should be saved in libtool wrapper scripts and 3142dc9477beSmrg restored at link time]) 3143dc9477beSmrg_LT_DECL([], [need_lib_prefix], [0], 3144dc9477beSmrg [Do we need the "lib" prefix for modules?]) 3145dc9477beSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3146dc9477beSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3147dc9477beSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3148dc9477beSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3149dc9477beSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3150dc9477beSmrg [Is shlibpath searched before the hard-coded library search path?]) 3151dc9477beSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3152dc9477beSmrg_LT_DECL([], [library_names_spec], [1], 3153dc9477beSmrg [[List of archive names. First name is the real one, the rest are links. 3154dc9477beSmrg The last name is the one that the linker finds with -lNAME]]) 3155dc9477beSmrg_LT_DECL([], [soname_spec], [1], 3156dc9477beSmrg [[The coded name of the library, if different from the real name]]) 3157dc9477beSmrg_LT_DECL([], [install_override_mode], [1], 3158dc9477beSmrg [Permission mode override for installation of shared libraries]) 3159dc9477beSmrg_LT_DECL([], [postinstall_cmds], [2], 3160dc9477beSmrg [Command to use after installation of a shared archive]) 3161dc9477beSmrg_LT_DECL([], [postuninstall_cmds], [2], 3162dc9477beSmrg [Command to use after uninstallation of a shared archive]) 3163dc9477beSmrg_LT_DECL([], [finish_cmds], [2], 3164dc9477beSmrg [Commands used to finish a libtool library installation in a directory]) 3165dc9477beSmrg_LT_DECL([], [finish_eval], [1], 3166dc9477beSmrg [[As "finish_cmds", except a single script fragment to be evaled but 3167dc9477beSmrg not shown]]) 3168dc9477beSmrg_LT_DECL([], [hardcode_into_libs], [0], 3169dc9477beSmrg [Whether we should hardcode library paths into libraries]) 3170dc9477beSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3171dc9477beSmrg [Compile-time system search path for libraries]) 317248e5ce07Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 317348e5ce07Smrg [Detected run-time system search path for libraries]) 317448e5ce07Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 317548e5ce07Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3176dc9477beSmrg])# _LT_SYS_DYNAMIC_LINKER 317721e67964Smrg 317821e67964Smrg 3179dc9477beSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 3180dc9477beSmrg# -------------------------- 318148e5ce07Smrg# find a file program that can recognize shared library 3182dc9477beSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3183dc9477beSmrg[m4_require([_LT_DECL_EGREP])dnl 3184dc9477beSmrgAC_MSG_CHECKING([for $1]) 3185dc9477beSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3186dc9477beSmrg[case $MAGIC_CMD in 3187dc9477beSmrg[[\\/*] | ?:[\\/]*]) 318848e5ce07Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3189dc9477beSmrg ;; 3190dc9477beSmrg*) 319148e5ce07Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 319248e5ce07Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3193dc9477beSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3194dc9477beSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3195dc9477beSmrgdnl not every word. This closes a longstanding sh security hole. 3196dc9477beSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3197dc9477beSmrg for ac_dir in $ac_dummy; do 319848e5ce07Smrg IFS=$lt_save_ifs 3199dc9477beSmrg test -z "$ac_dir" && ac_dir=. 320048e5ce07Smrg if test -f "$ac_dir/$1"; then 320148e5ce07Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3202dc9477beSmrg if test -n "$file_magic_test_file"; then 3203dc9477beSmrg case $deplibs_check_method in 3204dc9477beSmrg "file_magic "*) 3205dc9477beSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 320648e5ce07Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3207dc9477beSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3208dc9477beSmrg $EGREP "$file_magic_regex" > /dev/null; then 3209dc9477beSmrg : 3210dc9477beSmrg else 3211dc9477beSmrg cat <<_LT_EOF 1>&2 321221e67964Smrg 3213dc9477beSmrg*** Warning: the command libtool uses to detect shared libraries, 3214dc9477beSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3215dc9477beSmrg*** The result is that libtool may fail to recognize shared libraries 3216dc9477beSmrg*** as such. This will affect the creation of libtool libraries that 3217dc9477beSmrg*** depend on shared libraries, but programs linked with such libtool 3218dc9477beSmrg*** libraries will work regardless of this problem. Nevertheless, you 3219dc9477beSmrg*** may want to report the problem to your system manager and/or to 3220dc9477beSmrg*** bug-libtool@gnu.org 322121e67964Smrg 3222dc9477beSmrg_LT_EOF 3223dc9477beSmrg fi ;; 3224dc9477beSmrg esac 3225dc9477beSmrg fi 3226dc9477beSmrg break 3227dc9477beSmrg fi 3228dc9477beSmrg done 322948e5ce07Smrg IFS=$lt_save_ifs 323048e5ce07Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 323106c34b88Smrg ;; 3232dc9477beSmrgesac]) 323348e5ce07SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3234dc9477beSmrgif test -n "$MAGIC_CMD"; then 3235dc9477beSmrg AC_MSG_RESULT($MAGIC_CMD) 3236dc9477beSmrgelse 3237dc9477beSmrg AC_MSG_RESULT(no) 3238dc9477beSmrgfi 3239dc9477beSmrg_LT_DECL([], [MAGIC_CMD], [0], 3240dc9477beSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3241dc9477beSmrg])# _LT_PATH_TOOL_PREFIX 324221e67964Smrg 3243dc9477beSmrg# Old name: 3244dc9477beSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3245dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 3246dc9477beSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3247dc9477beSmrg 3248dc9477beSmrg 3249dc9477beSmrg# _LT_PATH_MAGIC 3250dc9477beSmrg# -------------- 325148e5ce07Smrg# find a file program that can recognize a shared library 3252dc9477beSmrgm4_defun([_LT_PATH_MAGIC], 3253dc9477beSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3254dc9477beSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3255dc9477beSmrg if test -n "$ac_tool_prefix"; then 3256dc9477beSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 325706c34b88Smrg else 3258dc9477beSmrg MAGIC_CMD=: 325906c34b88Smrg fi 3260dc9477beSmrgfi 3261dc9477beSmrg])# _LT_PATH_MAGIC 326221e67964Smrg 3263c43cc173Smrg 3264dc9477beSmrg# LT_PATH_LD 3265dc9477beSmrg# ---------- 3266dc9477beSmrg# find the pathname to the GNU or non-GNU linker 3267dc9477beSmrgAC_DEFUN([LT_PATH_LD], 3268dc9477beSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3269dc9477beSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3270dc9477beSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3271dc9477beSmrgm4_require([_LT_DECL_SED])dnl 3272dc9477beSmrgm4_require([_LT_DECL_EGREP])dnl 3273dc9477beSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3274c43cc173Smrg 3275dc9477beSmrgAC_ARG_WITH([gnu-ld], 3276dc9477beSmrg [AS_HELP_STRING([--with-gnu-ld], 3277dc9477beSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 327848e5ce07Smrg [test no = "$withval" || with_gnu_ld=yes], 3279dc9477beSmrg [with_gnu_ld=no])dnl 3280dc9477beSmrg 3281dc9477beSmrgac_prog=ld 328248e5ce07Smrgif test yes = "$GCC"; then 3283dc9477beSmrg # Check if gcc -print-prog-name=ld gives a path. 3284dc9477beSmrg AC_MSG_CHECKING([for ld used by $CC]) 3285dc9477beSmrg case $host in 3286dc9477beSmrg *-*-mingw*) 328748e5ce07Smrg # gcc leaves a trailing carriage return, which upsets mingw 3288dc9477beSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3289dc9477beSmrg *) 3290dc9477beSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 329106c34b88Smrg esac 3292dc9477beSmrg case $ac_prog in 3293dc9477beSmrg # Accept absolute paths. 3294dc9477beSmrg [[\\/]]* | ?:[[\\/]]*) 3295dc9477beSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3296dc9477beSmrg # Canonicalize the pathname of ld 3297dc9477beSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3298dc9477beSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3299dc9477beSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3300dc9477beSmrg done 330148e5ce07Smrg test -z "$LD" && LD=$ac_prog 3302dc9477beSmrg ;; 3303dc9477beSmrg "") 3304dc9477beSmrg # If it fails, then pretend we aren't using GCC. 3305dc9477beSmrg ac_prog=ld 3306dc9477beSmrg ;; 3307dc9477beSmrg *) 3308dc9477beSmrg # If it is relative, then search for the first ld in PATH. 3309dc9477beSmrg with_gnu_ld=unknown 3310dc9477beSmrg ;; 3311dc9477beSmrg esac 331248e5ce07Smrgelif test yes = "$with_gnu_ld"; then 3313dc9477beSmrg AC_MSG_CHECKING([for GNU ld]) 3314dc9477beSmrgelse 3315dc9477beSmrg AC_MSG_CHECKING([for non-GNU ld]) 3316dc9477beSmrgfi 3317dc9477beSmrgAC_CACHE_VAL(lt_cv_path_LD, 3318dc9477beSmrg[if test -z "$LD"; then 331948e5ce07Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3320dc9477beSmrg for ac_dir in $PATH; do 332148e5ce07Smrg IFS=$lt_save_ifs 3322dc9477beSmrg test -z "$ac_dir" && ac_dir=. 3323dc9477beSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 332448e5ce07Smrg lt_cv_path_LD=$ac_dir/$ac_prog 3325dc9477beSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3326dc9477beSmrg # but apparently some variants of GNU ld only accept -v. 3327dc9477beSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3328dc9477beSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3329dc9477beSmrg *GNU* | *'with BFD'*) 333048e5ce07Smrg test no != "$with_gnu_ld" && break 333106c34b88Smrg ;; 333206c34b88Smrg *) 333348e5ce07Smrg test yes != "$with_gnu_ld" && break 333406c34b88Smrg ;; 333506c34b88Smrg esac 3336dc9477beSmrg fi 3337dc9477beSmrg done 333848e5ce07Smrg IFS=$lt_save_ifs 3339dc9477beSmrgelse 334048e5ce07Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 3341dc9477beSmrgfi]) 334248e5ce07SmrgLD=$lt_cv_path_LD 3343dc9477beSmrgif test -n "$LD"; then 3344dc9477beSmrg AC_MSG_RESULT($LD) 3345dc9477beSmrgelse 3346dc9477beSmrg AC_MSG_RESULT(no) 3347dc9477beSmrgfi 3348dc9477beSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3349dc9477beSmrg_LT_PATH_LD_GNU 3350dc9477beSmrgAC_SUBST([LD]) 335121e67964Smrg 3352dc9477beSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3353dc9477beSmrg])# LT_PATH_LD 335421e67964Smrg 3355dc9477beSmrg# Old names: 3356dc9477beSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3357dc9477beSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3358dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 3359dc9477beSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3360dc9477beSmrgdnl AC_DEFUN([AC_PROG_LD], []) 336121e67964Smrg 3362c27c18e8Smrg 3363dc9477beSmrg# _LT_PATH_LD_GNU 3364dc9477beSmrg#- -------------- 3365dc9477beSmrgm4_defun([_LT_PATH_LD_GNU], 3366dc9477beSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3367dc9477beSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3368dc9477beSmrgcase `$LD -v 2>&1 </dev/null` in 3369dc9477beSmrg*GNU* | *'with BFD'*) 3370dc9477beSmrg lt_cv_prog_gnu_ld=yes 337106c34b88Smrg ;; 3372dc9477beSmrg*) 3373dc9477beSmrg lt_cv_prog_gnu_ld=no 337406c34b88Smrg ;; 3375dc9477beSmrgesac]) 3376dc9477beSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3377dc9477beSmrg])# _LT_PATH_LD_GNU 3378c43cc173Smrg 337906c34b88Smrg 3380dc9477beSmrg# _LT_CMD_RELOAD 3381dc9477beSmrg# -------------- 3382dc9477beSmrg# find reload flag for linker 3383dc9477beSmrg# -- PORTME Some linkers may need a different reload flag. 3384dc9477beSmrgm4_defun([_LT_CMD_RELOAD], 3385dc9477beSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3386dc9477beSmrg lt_cv_ld_reload_flag, 3387dc9477beSmrg [lt_cv_ld_reload_flag='-r']) 3388dc9477beSmrgreload_flag=$lt_cv_ld_reload_flag 3389dc9477beSmrgcase $reload_flag in 3390dc9477beSmrg"" | " "*) ;; 3391dc9477beSmrg*) reload_flag=" $reload_flag" ;; 339206c34b88Smrgesac 3393dc9477beSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3394dc9477beSmrgcase $host_os in 3395dc9477beSmrg cygwin* | mingw* | pw32* | cegcc*) 339648e5ce07Smrg if test yes != "$GCC"; then 3397dc9477beSmrg reload_cmds=false 3398dc9477beSmrg fi 3399dc9477beSmrg ;; 3400dc9477beSmrg darwin*) 340148e5ce07Smrg if test yes = "$GCC"; then 340248e5ce07Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3403dc9477beSmrg else 3404dc9477beSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3405dc9477beSmrg fi 3406dc9477beSmrg ;; 3407dc9477beSmrgesac 3408dc9477beSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3409dc9477beSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3410dc9477beSmrg])# _LT_CMD_RELOAD 341121e67964Smrg 341237eb1ca1Smrg 341348e5ce07Smrg# _LT_PATH_DD 341448e5ce07Smrg# ----------- 341548e5ce07Smrg# find a working dd 341648e5ce07Smrgm4_defun([_LT_PATH_DD], 341748e5ce07Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 341848e5ce07Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 341948e5ce07Smrgcat conftest.i conftest.i >conftest2.i 342048e5ce07Smrg: ${lt_DD:=$DD} 342148e5ce07SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 342248e5ce07Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 342348e5ce07Smrg cmp -s conftest.i conftest.out \ 342448e5ce07Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 342548e5ce07Smrgfi]) 342648e5ce07Smrgrm -f conftest.i conftest2.i conftest.out]) 342748e5ce07Smrg])# _LT_PATH_DD 342848e5ce07Smrg 342948e5ce07Smrg 343048e5ce07Smrg# _LT_CMD_TRUNCATE 343148e5ce07Smrg# ---------------- 343248e5ce07Smrg# find command to truncate a binary pipe 343348e5ce07Smrgm4_defun([_LT_CMD_TRUNCATE], 343448e5ce07Smrg[m4_require([_LT_PATH_DD]) 343548e5ce07SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 343648e5ce07Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 343748e5ce07Smrgcat conftest.i conftest.i >conftest2.i 343848e5ce07Smrglt_cv_truncate_bin= 343948e5ce07Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 344048e5ce07Smrg cmp -s conftest.i conftest.out \ 344148e5ce07Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 344248e5ce07Smrgfi 344348e5ce07Smrgrm -f conftest.i conftest2.i conftest.out 344448e5ce07Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 344548e5ce07Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 344648e5ce07Smrg [Command to truncate a binary pipe]) 344748e5ce07Smrg])# _LT_CMD_TRUNCATE 344848e5ce07Smrg 344948e5ce07Smrg 3450dc9477beSmrg# _LT_CHECK_MAGIC_METHOD 3451dc9477beSmrg# ---------------------- 3452dc9477beSmrg# how to check for library dependencies 3453dc9477beSmrg# -- PORTME fill in with the dynamic library characteristics 3454dc9477beSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3455dc9477beSmrg[m4_require([_LT_DECL_EGREP]) 3456dc9477beSmrgm4_require([_LT_DECL_OBJDUMP]) 3457dc9477beSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3458dc9477beSmrglt_cv_deplibs_check_method, 3459dc9477beSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3460dc9477beSmrglt_cv_file_magic_test_file= 3461dc9477beSmrglt_cv_deplibs_check_method='unknown' 3462dc9477beSmrg# Need to set the preceding variable on all platforms that support 3463dc9477beSmrg# interlibrary dependencies. 3464dc9477beSmrg# 'none' -- dependencies not supported. 346548e5ce07Smrg# 'unknown' -- same as none, but documents that we really don't know. 3466dc9477beSmrg# 'pass_all' -- all dependencies passed with no checks. 3467dc9477beSmrg# 'test_compile' -- check by making test program. 3468dc9477beSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 346948e5ce07Smrg# that responds to the $file_magic_cmd with a given extended regex. 347048e5ce07Smrg# If you have 'file' or equivalent on your system and you're not sure 347148e5ce07Smrg# whether 'pass_all' will *always* work, you probably want this one. 347221e67964Smrg 3473dc9477beSmrgcase $host_os in 3474dc9477beSmrgaix[[4-9]]*) 3475dc9477beSmrg lt_cv_deplibs_check_method=pass_all 3476dc9477beSmrg ;; 3477c43cc173Smrg 3478dc9477beSmrgbeos*) 3479dc9477beSmrg lt_cv_deplibs_check_method=pass_all 3480dc9477beSmrg ;; 3481c43cc173Smrg 3482dc9477beSmrgbsdi[[45]]*) 3483dc9477beSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3484dc9477beSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3485dc9477beSmrg lt_cv_file_magic_test_file=/shlib/libc.so 348606c34b88Smrg ;; 348706c34b88Smrg 3488dc9477beSmrgcygwin*) 3489dc9477beSmrg # func_win32_libid is a shell function defined in ltmain.sh 3490dc9477beSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3491dc9477beSmrg lt_cv_file_magic_cmd='func_win32_libid' 3492dc9477beSmrg ;; 349306c34b88Smrg 3494dc9477beSmrgmingw* | pw32*) 3495dc9477beSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3496dc9477beSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3497dc9477beSmrg # unless we find 'file', for example because we are cross-compiling. 349848e5ce07Smrg if ( file / ) >/dev/null 2>&1; then 3499dc9477beSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3500dc9477beSmrg lt_cv_file_magic_cmd='func_win32_libid' 3501dc9477beSmrg else 3502dc9477beSmrg # Keep this pattern in sync with the one in func_win32_libid. 3503dc9477beSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3504dc9477beSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3505dc9477beSmrg fi 350606c34b88Smrg ;; 3507c43cc173Smrg 3508dc9477beSmrgcegcc*) 3509dc9477beSmrg # use the weaker test based on 'objdump'. See mingw*. 3510dc9477beSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3511dc9477beSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3512dc9477beSmrg ;; 3513c43cc173Smrg 3514dc9477beSmrgdarwin* | rhapsody*) 3515dc9477beSmrg lt_cv_deplibs_check_method=pass_all 3516dc9477beSmrg ;; 3517c43cc173Smrg 3518dc9477beSmrgfreebsd* | dragonfly*) 3519dc9477beSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3520dc9477beSmrg case $host_cpu in 3521dc9477beSmrg i*86 ) 3522dc9477beSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3523dc9477beSmrg # Let's accept both of them until this is cleared up. 3524dc9477beSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3525dc9477beSmrg lt_cv_file_magic_cmd=/usr/bin/file 3526dc9477beSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3527dc9477beSmrg ;; 3528dc9477beSmrg esac 352906c34b88Smrg else 3530dc9477beSmrg lt_cv_deplibs_check_method=pass_all 353106c34b88Smrg fi 3532dc9477beSmrg ;; 3533c43cc173Smrg 353406c34b88Smrghaiku*) 353506c34b88Smrg lt_cv_deplibs_check_method=pass_all 353606c34b88Smrg ;; 3537c43cc173Smrg 353806c34b88Smrghpux10.20* | hpux11*) 353906c34b88Smrg lt_cv_file_magic_cmd=/usr/bin/file 354006c34b88Smrg case $host_cpu in 354106c34b88Smrg ia64*) 354206c34b88Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 354306c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 354406c34b88Smrg ;; 354506c34b88Smrg hppa*64*) 354606c34b88Smrg [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]'] 354706c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 354806c34b88Smrg ;; 354906c34b88Smrg *) 355006c34b88Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 355106c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 355206c34b88Smrg ;; 355306c34b88Smrg esac 355406c34b88Smrg ;; 3555c43cc173Smrg 355606c34b88Smrginterix[[3-9]]*) 355706c34b88Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 355806c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 355906c34b88Smrg ;; 3560c43cc173Smrg 356106c34b88Smrgirix5* | irix6* | nonstopux*) 356206c34b88Smrg case $LD in 356306c34b88Smrg *-32|*"-32 ") libmagic=32-bit;; 356406c34b88Smrg *-n32|*"-n32 ") libmagic=N32;; 356506c34b88Smrg *-64|*"-64 ") libmagic=64-bit;; 356606c34b88Smrg *) libmagic=never-match;; 356706c34b88Smrg esac 356806c34b88Smrg lt_cv_deplibs_check_method=pass_all 356906c34b88Smrg ;; 3570c43cc173Smrg 357106c34b88Smrg# This must be glibc/ELF. 357244584a44Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 357306c34b88Smrg lt_cv_deplibs_check_method=pass_all 357406c34b88Smrg ;; 3575c43cc173Smrg 357648e5ce07Smrgnetbsd*) 357706c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 357806c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 357906c34b88Smrg else 358006c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 358106c34b88Smrg fi 358206c34b88Smrg ;; 3583c43cc173Smrg 358406c34b88Smrgnewos6*) 358506c34b88Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 358606c34b88Smrg lt_cv_file_magic_cmd=/usr/bin/file 358706c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 358806c34b88Smrg ;; 3589c27c18e8Smrg 359006c34b88Smrg*nto* | *qnx*) 359106c34b88Smrg lt_cv_deplibs_check_method=pass_all 359206c34b88Smrg ;; 3593c27c18e8Smrg 359448e5ce07Smrgopenbsd* | bitrig*) 359548e5ce07Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 359606c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 359706c34b88Smrg else 359806c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 359906c34b88Smrg fi 360006c34b88Smrg ;; 360121e67964Smrg 360206c34b88Smrgosf3* | osf4* | osf5*) 360306c34b88Smrg lt_cv_deplibs_check_method=pass_all 360406c34b88Smrg ;; 3605c43cc173Smrg 360606c34b88Smrgrdos*) 360706c34b88Smrg lt_cv_deplibs_check_method=pass_all 360806c34b88Smrg ;; 3609c43cc173Smrg 361006c34b88Smrgsolaris*) 361106c34b88Smrg lt_cv_deplibs_check_method=pass_all 361206c34b88Smrg ;; 3613c43cc173Smrg 361406c34b88Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 361506c34b88Smrg lt_cv_deplibs_check_method=pass_all 361606c34b88Smrg ;; 3617c43cc173Smrg 361806c34b88Smrgsysv4 | sysv4.3*) 361906c34b88Smrg case $host_vendor in 362006c34b88Smrg motorola) 362106c34b88Smrg 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]]' 362206c34b88Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 362306c34b88Smrg ;; 362406c34b88Smrg ncr) 362506c34b88Smrg lt_cv_deplibs_check_method=pass_all 362606c34b88Smrg ;; 362706c34b88Smrg sequent) 362806c34b88Smrg lt_cv_file_magic_cmd='/bin/file' 362906c34b88Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 363006c34b88Smrg ;; 363106c34b88Smrg sni) 363206c34b88Smrg lt_cv_file_magic_cmd='/bin/file' 363306c34b88Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 363406c34b88Smrg lt_cv_file_magic_test_file=/lib/libc.so 363506c34b88Smrg ;; 363606c34b88Smrg siemens) 363706c34b88Smrg lt_cv_deplibs_check_method=pass_all 363806c34b88Smrg ;; 363906c34b88Smrg pc) 364006c34b88Smrg lt_cv_deplibs_check_method=pass_all 364106c34b88Smrg ;; 364206c34b88Smrg esac 364306c34b88Smrg ;; 3644c43cc173Smrg 364506c34b88Smrgtpf*) 364606c34b88Smrg lt_cv_deplibs_check_method=pass_all 364706c34b88Smrg ;; 364848e5ce07Smrgos2*) 364948e5ce07Smrg lt_cv_deplibs_check_method=pass_all 365048e5ce07Smrg ;; 365106c34b88Smrgesac 365206c34b88Smrg]) 3653c43cc173Smrg 365406c34b88Smrgfile_magic_glob= 365506c34b88Smrgwant_nocaseglob=no 365606c34b88Smrgif test "$build" = "$host"; then 365706c34b88Smrg case $host_os in 365806c34b88Smrg mingw* | pw32*) 365906c34b88Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 366006c34b88Smrg want_nocaseglob=yes 366106c34b88Smrg else 366206c34b88Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 366306c34b88Smrg fi 366406c34b88Smrg ;; 366506c34b88Smrg esac 366606c34b88Smrgfi 3667c43cc173Smrg 366806c34b88Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 366906c34b88Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 367006c34b88Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3671c43cc173Smrg 367206c34b88Smrg_LT_DECL([], [deplibs_check_method], [1], 367306c34b88Smrg [Method to check whether dependent libraries are shared objects]) 367406c34b88Smrg_LT_DECL([], [file_magic_cmd], [1], 367506c34b88Smrg [Command to use when deplibs_check_method = "file_magic"]) 367606c34b88Smrg_LT_DECL([], [file_magic_glob], [1], 367706c34b88Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 367806c34b88Smrg_LT_DECL([], [want_nocaseglob], [1], 367906c34b88Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 368006c34b88Smrg])# _LT_CHECK_MAGIC_METHOD 368106c34b88Smrg 368206c34b88Smrg 368306c34b88Smrg# LT_PATH_NM 368406c34b88Smrg# ---------- 368506c34b88Smrg# find the pathname to a BSD- or MS-compatible name lister 368606c34b88SmrgAC_DEFUN([LT_PATH_NM], 368706c34b88Smrg[AC_REQUIRE([AC_PROG_CC])dnl 368806c34b88SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 368906c34b88Smrg[if test -n "$NM"; then 369006c34b88Smrg # Let the user override the test. 369148e5ce07Smrg lt_cv_path_NM=$NM 369206c34b88Smrgelse 369348e5ce07Smrg lt_nm_to_check=${ac_tool_prefix}nm 369406c34b88Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 369506c34b88Smrg lt_nm_to_check="$lt_nm_to_check nm" 369606c34b88Smrg fi 369706c34b88Smrg for lt_tmp_nm in $lt_nm_to_check; do 369848e5ce07Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 369906c34b88Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 370048e5ce07Smrg IFS=$lt_save_ifs 370106c34b88Smrg test -z "$ac_dir" && ac_dir=. 370248e5ce07Smrg tmp_nm=$ac_dir/$lt_tmp_nm 370348e5ce07Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 370406c34b88Smrg # Check to see if the nm accepts a BSD-compat flag. 370548e5ce07Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 370606c34b88Smrg # nm: unknown option "B" ignored 370706c34b88Smrg # Tru64's nm complains that /dev/null is an invalid object file 370848e5ce07Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 370948e5ce07Smrg case $build_os in 371048e5ce07Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 371148e5ce07Smrg *) lt_bad_file=/dev/null ;; 371248e5ce07Smrg esac 371348e5ce07Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 371448e5ce07Smrg *$lt_bad_file* | *'Invalid file or object type'*) 371506c34b88Smrg lt_cv_path_NM="$tmp_nm -B" 371648e5ce07Smrg break 2 3717c27c18e8Smrg ;; 3718c27c18e8Smrg *) 371906c34b88Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 372006c34b88Smrg */dev/null*) 372106c34b88Smrg lt_cv_path_NM="$tmp_nm -p" 372248e5ce07Smrg break 2 372306c34b88Smrg ;; 372406c34b88Smrg *) 372506c34b88Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 372606c34b88Smrg continue # so that we can try to find one that supports BSD flags 372706c34b88Smrg ;; 372806c34b88Smrg esac 3729c27c18e8Smrg ;; 3730c27c18e8Smrg esac 3731c27c18e8Smrg fi 373206c34b88Smrg done 373348e5ce07Smrg IFS=$lt_save_ifs 373406c34b88Smrg done 373506c34b88Smrg : ${lt_cv_path_NM=no} 373606c34b88Smrgfi]) 373748e5ce07Smrgif test no != "$lt_cv_path_NM"; then 373848e5ce07Smrg NM=$lt_cv_path_NM 373906c34b88Smrgelse 374006c34b88Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 374106c34b88Smrg if test -n "$DUMPBIN"; then : 374206c34b88Smrg # Let the user override the test. 374306c34b88Smrg else 374406c34b88Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 374548e5ce07Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 374606c34b88Smrg *COFF*) 374748e5ce07Smrg DUMPBIN="$DUMPBIN -symbols -headers" 3748c27c18e8Smrg ;; 374906c34b88Smrg *) 375006c34b88Smrg DUMPBIN=: 3751c27c18e8Smrg ;; 375206c34b88Smrg esac 375306c34b88Smrg fi 375406c34b88Smrg AC_SUBST([DUMPBIN]) 375548e5ce07Smrg if test : != "$DUMPBIN"; then 375648e5ce07Smrg NM=$DUMPBIN 375706c34b88Smrg fi 375806c34b88Smrgfi 375906c34b88Smrgtest -z "$NM" && NM=nm 376006c34b88SmrgAC_SUBST([NM]) 376106c34b88Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3762c43cc173Smrg 376306c34b88SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 376406c34b88Smrg [lt_cv_nm_interface="BSD nm" 376506c34b88Smrg echo "int some_variable = 0;" > conftest.$ac_ext 376606c34b88Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 376706c34b88Smrg (eval "$ac_compile" 2>conftest.err) 376806c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 376906c34b88Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 377006c34b88Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 377106c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 377206c34b88Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 377306c34b88Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 377406c34b88Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 377506c34b88Smrg lt_cv_nm_interface="MS dumpbin" 377606c34b88Smrg fi 377706c34b88Smrg rm -f conftest*]) 377806c34b88Smrg])# LT_PATH_NM 3779c43cc173Smrg 378006c34b88Smrg# Old names: 378106c34b88SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 378206c34b88SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 378306c34b88Smrgdnl aclocal-1.4 backwards compatibility: 378406c34b88Smrgdnl AC_DEFUN([AM_PROG_NM], []) 378506c34b88Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3786c43cc173Smrg 378706c34b88Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 378806c34b88Smrg# -------------------------------- 378906c34b88Smrg# how to determine the name of the shared library 379006c34b88Smrg# associated with a specific link library. 379106c34b88Smrg# -- PORTME fill in with the dynamic library characteristics 379206c34b88Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 379306c34b88Smrg[m4_require([_LT_DECL_EGREP]) 379406c34b88Smrgm4_require([_LT_DECL_OBJDUMP]) 379506c34b88Smrgm4_require([_LT_DECL_DLLTOOL]) 379606c34b88SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 379706c34b88Smrglt_cv_sharedlib_from_linklib_cmd, 379806c34b88Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3799c43cc173Smrg 380006c34b88Smrgcase $host_os in 380106c34b88Smrgcygwin* | mingw* | pw32* | cegcc*) 380248e5ce07Smrg # two different shell functions defined in ltmain.sh; 380348e5ce07Smrg # decide which one to use based on capabilities of $DLLTOOL 380406c34b88Smrg case `$DLLTOOL --help 2>&1` in 380506c34b88Smrg *--identify-strict*) 380606c34b88Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 380706c34b88Smrg ;; 380806c34b88Smrg *) 380906c34b88Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 381006c34b88Smrg ;; 381106c34b88Smrg esac 381206c34b88Smrg ;; 381306c34b88Smrg*) 381406c34b88Smrg # fallback: assume linklib IS sharedlib 381548e5ce07Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 381606c34b88Smrg ;; 381706c34b88Smrgesac 381806c34b88Smrg]) 381906c34b88Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 382006c34b88Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3821c43cc173Smrg 382206c34b88Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 382306c34b88Smrg [Command to associate shared and link libraries]) 382406c34b88Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3825c43cc173Smrg 3826c43cc173Smrg 382706c34b88Smrg# _LT_PATH_MANIFEST_TOOL 382806c34b88Smrg# ---------------------- 382906c34b88Smrg# locate the manifest tool 383006c34b88Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 383106c34b88Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 383206c34b88Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 383306c34b88SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 383406c34b88Smrg [lt_cv_path_mainfest_tool=no 383506c34b88Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 383606c34b88Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 383706c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 383806c34b88Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 383906c34b88Smrg lt_cv_path_mainfest_tool=yes 384006c34b88Smrg fi 384106c34b88Smrg rm -f conftest*]) 384248e5ce07Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 384306c34b88Smrg MANIFEST_TOOL=: 384406c34b88Smrgfi 384506c34b88Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 384606c34b88Smrg])# _LT_PATH_MANIFEST_TOOL 3847c43cc173Smrg 3848c43cc173Smrg 384948e5ce07Smrg# _LT_DLL_DEF_P([FILE]) 385048e5ce07Smrg# --------------------- 385148e5ce07Smrg# True iff FILE is a Windows DLL '.def' file. 385248e5ce07Smrg# Keep in sync with func_dll_def_p in the libtool script 385348e5ce07SmrgAC_DEFUN([_LT_DLL_DEF_P], 385448e5ce07Smrg[dnl 385548e5ce07Smrg test DEF = "`$SED -n dnl 385648e5ce07Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 385748e5ce07Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 385848e5ce07Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 385948e5ce07Smrg -e q dnl Only consider the first "real" line 386048e5ce07Smrg $1`" dnl 386148e5ce07Smrg])# _LT_DLL_DEF_P 386248e5ce07Smrg 386348e5ce07Smrg 386406c34b88Smrg# LT_LIB_M 386506c34b88Smrg# -------- 386606c34b88Smrg# check for math library 386706c34b88SmrgAC_DEFUN([LT_LIB_M], 386806c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 386906c34b88SmrgLIBM= 387006c34b88Smrgcase $host in 387106c34b88Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 387206c34b88Smrg # These system don't have libm, or don't need it 387306c34b88Smrg ;; 387406c34b88Smrg*-ncr-sysv4.3*) 387548e5ce07Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 387606c34b88Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 387706c34b88Smrg ;; 387806c34b88Smrg*) 387948e5ce07Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 388006c34b88Smrg ;; 388106c34b88Smrgesac 388206c34b88SmrgAC_SUBST([LIBM]) 388306c34b88Smrg])# LT_LIB_M 388406c34b88Smrg 388506c34b88Smrg# Old name: 388606c34b88SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 388706c34b88Smrgdnl aclocal-1.4 backwards compatibility: 388806c34b88Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 388906c34b88Smrg 389006c34b88Smrg 389106c34b88Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 389206c34b88Smrg# ------------------------------- 389306c34b88Smrgm4_defun([_LT_COMPILER_NO_RTTI], 389406c34b88Smrg[m4_require([_LT_TAG_COMPILER])dnl 389506c34b88Smrg 389606c34b88Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 389706c34b88Smrg 389848e5ce07Smrgif test yes = "$GCC"; then 389906c34b88Smrg case $cc_basename in 390006c34b88Smrg nvcc*) 390106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 390206c34b88Smrg *) 390306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 390406c34b88Smrg esac 390506c34b88Smrg 390606c34b88Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 390706c34b88Smrg lt_cv_prog_compiler_rtti_exceptions, 390806c34b88Smrg [-fno-rtti -fno-exceptions], [], 390906c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 391006c34b88Smrgfi 391106c34b88Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 391206c34b88Smrg [Compiler flag to turn off builtin functions]) 391306c34b88Smrg])# _LT_COMPILER_NO_RTTI 3914c43cc173Smrg 3915c43cc173Smrg 391606c34b88Smrg# _LT_CMD_GLOBAL_SYMBOLS 391706c34b88Smrg# ---------------------- 391806c34b88Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 391906c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 392006c34b88SmrgAC_REQUIRE([AC_PROG_CC])dnl 392106c34b88SmrgAC_REQUIRE([AC_PROG_AWK])dnl 392206c34b88SmrgAC_REQUIRE([LT_PATH_NM])dnl 392306c34b88SmrgAC_REQUIRE([LT_PATH_LD])dnl 392406c34b88Smrgm4_require([_LT_DECL_SED])dnl 392506c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 392606c34b88Smrgm4_require([_LT_TAG_COMPILER])dnl 3927c43cc173Smrg 392806c34b88Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 392906c34b88SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 393006c34b88SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 393106c34b88Smrg[ 393206c34b88Smrg# These are sane defaults that work on at least a few old systems. 393306c34b88Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3934c43cc173Smrg 393506c34b88Smrg# Character class describing NM global symbol codes. 393606c34b88Smrgsymcode='[[BCDEGRST]]' 3937c43cc173Smrg 393806c34b88Smrg# Regexp to match symbols that can be accessed directly from C. 393906c34b88Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 394037eb1ca1Smrg 394106c34b88Smrg# Define system-specific variables. 394206c34b88Smrgcase $host_os in 394306c34b88Smrgaix*) 394406c34b88Smrg symcode='[[BCDT]]' 394506c34b88Smrg ;; 394606c34b88Smrgcygwin* | mingw* | pw32* | cegcc*) 394706c34b88Smrg symcode='[[ABCDGISTW]]' 394806c34b88Smrg ;; 394906c34b88Smrghpux*) 395048e5ce07Smrg if test ia64 = "$host_cpu"; then 395106c34b88Smrg symcode='[[ABCDEGRST]]' 3952c27c18e8Smrg fi 3953c27c18e8Smrg ;; 395406c34b88Smrgirix* | nonstopux*) 395506c34b88Smrg symcode='[[BCDEGRST]]' 395606c34b88Smrg ;; 395706c34b88Smrgosf*) 395806c34b88Smrg symcode='[[BCDEGQRST]]' 395906c34b88Smrg ;; 396006c34b88Smrgsolaris*) 396106c34b88Smrg symcode='[[BDRT]]' 396206c34b88Smrg ;; 396306c34b88Smrgsco3.2v5*) 396406c34b88Smrg symcode='[[DT]]' 396506c34b88Smrg ;; 396606c34b88Smrgsysv4.2uw2*) 396706c34b88Smrg symcode='[[DT]]' 396806c34b88Smrg ;; 396906c34b88Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 397006c34b88Smrg symcode='[[ABDT]]' 397106c34b88Smrg ;; 397206c34b88Smrgsysv4) 397306c34b88Smrg symcode='[[DFNSTU]]' 397406c34b88Smrg ;; 3975c27c18e8Smrgesac 3976c43cc173Smrg 397706c34b88Smrg# If we're using GNU nm, then use its standard symbol codes. 397806c34b88Smrgcase `$NM -V 2>&1` in 397906c34b88Smrg*GNU* | *'with BFD'*) 398006c34b88Smrg symcode='[[ABCDGIRSTW]]' ;; 398106c34b88Smrgesac 3982c27c18e8Smrg 398348e5ce07Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 398448e5ce07Smrg # Gets list of data symbols to import. 398548e5ce07Smrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 398648e5ce07Smrg # Adjust the below global symbol transforms to fixup imported variables. 398748e5ce07Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 398848e5ce07Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 398948e5ce07Smrg lt_c_name_lib_hook="\ 399048e5ce07Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 399148e5ce07Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 399248e5ce07Smrgelse 399348e5ce07Smrg # Disable hooks by default. 399448e5ce07Smrg lt_cv_sys_global_symbol_to_import= 399548e5ce07Smrg lt_cdecl_hook= 399648e5ce07Smrg lt_c_name_hook= 399748e5ce07Smrg lt_c_name_lib_hook= 399848e5ce07Smrgfi 399948e5ce07Smrg 400006c34b88Smrg# Transform an extracted symbol line into a proper C declaration. 400106c34b88Smrg# Some systems (esp. on ia64) link data and code symbols differently, 400206c34b88Smrg# so use this general approach. 400348e5ce07Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 400448e5ce07Smrg$lt_cdecl_hook\ 400548e5ce07Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 400648e5ce07Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4007c27c18e8Smrg 400806c34b88Smrg# Transform an extracted symbol line into symbol name and symbol address 400948e5ce07Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 401048e5ce07Smrg$lt_c_name_hook\ 401148e5ce07Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 401248e5ce07Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 401348e5ce07Smrg 401448e5ce07Smrg# Transform an extracted symbol line into symbol name with lib prefix and 401548e5ce07Smrg# symbol address. 401648e5ce07Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 401748e5ce07Smrg$lt_c_name_lib_hook\ 401848e5ce07Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 401948e5ce07Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 402048e5ce07Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4021c43cc173Smrg 402206c34b88Smrg# Handle CRLF in mingw tool chain 402306c34b88Smrgopt_cr= 402406c34b88Smrgcase $build_os in 402506c34b88Smrgmingw*) 402606c34b88Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 402706c34b88Smrg ;; 402806c34b88Smrgesac 402906c34b88Smrg 403006c34b88Smrg# Try without a prefix underscore, then with it. 403106c34b88Smrgfor ac_symprfx in "" "_"; do 403206c34b88Smrg 403306c34b88Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 403406c34b88Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 403506c34b88Smrg 403606c34b88Smrg # Write the raw and C identifiers. 403706c34b88Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 403848e5ce07Smrg # Fake it for dumpbin and say T for any non-static function, 403948e5ce07Smrg # D for any global variable and I for any imported variable. 404006c34b88Smrg # Also find C++ and __fastcall symbols from MSVC++, 404106c34b88Smrg # which start with @ or ?. 404206c34b88Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 404306c34b88Smrg" {last_section=section; section=\$ 3};"\ 404406c34b88Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 404506c34b88Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 404648e5ce07Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 404748e5ce07Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 404848e5ce07Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 404906c34b88Smrg" \$ 0!~/External *\|/{next};"\ 405006c34b88Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 405106c34b88Smrg" {if(hide[section]) next};"\ 405248e5ce07Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 405348e5ce07Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 405448e5ce07Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 405548e5ce07Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 405606c34b88Smrg" ' prfx=^$ac_symprfx]" 405706c34b88Smrg else 405806c34b88Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 405906c34b88Smrg fi 406006c34b88Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4061c43cc173Smrg 406206c34b88Smrg # Check to see that the pipe works correctly. 406306c34b88Smrg pipe_works=no 4064c43cc173Smrg 406506c34b88Smrg rm -f conftest* 406606c34b88Smrg cat > conftest.$ac_ext <<_LT_EOF 406706c34b88Smrg#ifdef __cplusplus 406806c34b88Smrgextern "C" { 406906c34b88Smrg#endif 407006c34b88Smrgchar nm_test_var; 407106c34b88Smrgvoid nm_test_func(void); 407206c34b88Smrgvoid nm_test_func(void){} 407306c34b88Smrg#ifdef __cplusplus 407406c34b88Smrg} 407506c34b88Smrg#endif 407606c34b88Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 407706c34b88Smrg_LT_EOF 4078c43cc173Smrg 407906c34b88Smrg if AC_TRY_EVAL(ac_compile); then 408006c34b88Smrg # Now try to grab the symbols. 408106c34b88Smrg nlist=conftest.nm 408206c34b88Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 408306c34b88Smrg # Try sorting and uniquifying the output. 408406c34b88Smrg if sort "$nlist" | uniq > "$nlist"T; then 408506c34b88Smrg mv -f "$nlist"T "$nlist" 408606c34b88Smrg else 408706c34b88Smrg rm -f "$nlist"T 408806c34b88Smrg fi 4089c43cc173Smrg 409006c34b88Smrg # Make sure that we snagged all the symbols we need. 409106c34b88Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 409206c34b88Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 409306c34b88Smrg cat <<_LT_EOF > conftest.$ac_ext 409406c34b88Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 409548e5ce07Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 409648e5ce07Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 409706c34b88Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 409806c34b88Smrg# define LT@&t@_DLSYM_CONST 409948e5ce07Smrg#elif defined __osf__ 410006c34b88Smrg/* This system does not cope well with relocations in const data. */ 410106c34b88Smrg# define LT@&t@_DLSYM_CONST 410206c34b88Smrg#else 410306c34b88Smrg# define LT@&t@_DLSYM_CONST const 410406c34b88Smrg#endif 4105c43cc173Smrg 410606c34b88Smrg#ifdef __cplusplus 410706c34b88Smrgextern "C" { 410806c34b88Smrg#endif 4109c43cc173Smrg 411006c34b88Smrg_LT_EOF 411106c34b88Smrg # Now generate the symbol file. 411206c34b88Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4113c27c18e8Smrg 411406c34b88Smrg cat <<_LT_EOF >> conftest.$ac_ext 4115c27c18e8Smrg 411606c34b88Smrg/* The mapping between symbol names and symbols. */ 411706c34b88SmrgLT@&t@_DLSYM_CONST struct { 411806c34b88Smrg const char *name; 411906c34b88Smrg void *address; 412006c34b88Smrg} 412106c34b88Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 412206c34b88Smrg{ 412306c34b88Smrg { "@PROGRAM@", (void *) 0 }, 412406c34b88Smrg_LT_EOF 412548e5ce07Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 412606c34b88Smrg cat <<\_LT_EOF >> conftest.$ac_ext 412706c34b88Smrg {0, (void *) 0} 412806c34b88Smrg}; 4129c27c18e8Smrg 413006c34b88Smrg/* This works around a problem in FreeBSD linker */ 413106c34b88Smrg#ifdef FREEBSD_WORKAROUND 413206c34b88Smrgstatic const void *lt_preloaded_setup() { 413306c34b88Smrg return lt__PROGRAM__LTX_preloaded_symbols; 413406c34b88Smrg} 413506c34b88Smrg#endif 4136c43cc173Smrg 413706c34b88Smrg#ifdef __cplusplus 413806c34b88Smrg} 413906c34b88Smrg#endif 414006c34b88Smrg_LT_EOF 414106c34b88Smrg # Now try linking the two files. 414206c34b88Smrg mv conftest.$ac_objext conftstm.$ac_objext 414306c34b88Smrg lt_globsym_save_LIBS=$LIBS 414406c34b88Smrg lt_globsym_save_CFLAGS=$CFLAGS 414548e5ce07Smrg LIBS=conftstm.$ac_objext 414606c34b88Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 414748e5ce07Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 414806c34b88Smrg pipe_works=yes 414906c34b88Smrg fi 415006c34b88Smrg LIBS=$lt_globsym_save_LIBS 415106c34b88Smrg CFLAGS=$lt_globsym_save_CFLAGS 415206c34b88Smrg else 415306c34b88Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 415406c34b88Smrg fi 415506c34b88Smrg else 415606c34b88Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 415706c34b88Smrg fi 415806c34b88Smrg else 415906c34b88Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4160c27c18e8Smrg fi 416106c34b88Smrg else 416206c34b88Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 416306c34b88Smrg cat conftest.$ac_ext >&5 416406c34b88Smrg fi 416506c34b88Smrg rm -rf conftest* conftst* 4166c43cc173Smrg 416706c34b88Smrg # Do not use the global_symbol_pipe unless it works. 416848e5ce07Smrg if test yes = "$pipe_works"; then 416906c34b88Smrg break 417006c34b88Smrg else 417106c34b88Smrg lt_cv_sys_global_symbol_pipe= 417206c34b88Smrg fi 417306c34b88Smrgdone 417406c34b88Smrg]) 417506c34b88Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 417606c34b88Smrg lt_cv_sys_global_symbol_to_cdecl= 4177c27c18e8Smrgfi 417806c34b88Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 417906c34b88Smrg AC_MSG_RESULT(failed) 418037eb1ca1Smrgelse 418106c34b88Smrg AC_MSG_RESULT(ok) 418237eb1ca1Smrgfi 4183c27c18e8Smrg 418406c34b88Smrg# Response file support. 418506c34b88Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 418606c34b88Smrg nm_file_list_spec='@' 418706c34b88Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 418806c34b88Smrg nm_file_list_spec='@' 418906c34b88Smrgfi 4190c43cc173Smrg 419106c34b88Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 419206c34b88Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 419306c34b88Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 419406c34b88Smrg [Transform the output of nm in a proper C declaration]) 419548e5ce07Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 419648e5ce07Smrg [Transform the output of nm into a list of symbols to manually relocate]) 419706c34b88Smrg_LT_DECL([global_symbol_to_c_name_address], 419806c34b88Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 419906c34b88Smrg [Transform the output of nm in a C name address pair]) 420006c34b88Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 420106c34b88Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 420206c34b88Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 420348e5ce07Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 420448e5ce07Smrg [The name lister interface]) 420506c34b88Smrg_LT_DECL([], [nm_file_list_spec], [1], 420606c34b88Smrg [Specify filename containing input files for $NM]) 420706c34b88Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4208c43cc173Smrg 4209c27c18e8Smrg 421006c34b88Smrg# _LT_COMPILER_PIC([TAGNAME]) 421106c34b88Smrg# --------------------------- 421206c34b88Smrgm4_defun([_LT_COMPILER_PIC], 421306c34b88Smrg[m4_require([_LT_TAG_COMPILER])dnl 421406c34b88Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 421506c34b88Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 421606c34b88Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4217c27c18e8Smrg 421806c34b88Smrgm4_if([$1], [CXX], [ 421906c34b88Smrg # C++ specific cases for pic, static, wl, etc. 422048e5ce07Smrg if test yes = "$GXX"; then 422106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 422206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4223c27c18e8Smrg 422406c34b88Smrg case $host_os in 422506c34b88Smrg aix*) 422606c34b88Smrg # All AIX code is PIC. 422748e5ce07Smrg if test ia64 = "$host_cpu"; then 422806c34b88Smrg # AIX 5 now supports IA64 processor 422906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 423006c34b88Smrg fi 423148e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 423206c34b88Smrg ;; 4233c27c18e8Smrg 423406c34b88Smrg amigaos*) 423506c34b88Smrg case $host_cpu in 423606c34b88Smrg powerpc) 423706c34b88Smrg # see comment about AmigaOS4 .so support 423806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 423906c34b88Smrg ;; 424006c34b88Smrg m68k) 424106c34b88Smrg # FIXME: we need at least 68020 code to build shared libraries, but 424248e5ce07Smrg # adding the '-m68020' flag to GCC prevents building anything better, 424348e5ce07Smrg # like '-m68040'. 424406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 424506c34b88Smrg ;; 424606c34b88Smrg esac 424706c34b88Smrg ;; 4248c27c18e8Smrg 424906c34b88Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 425006c34b88Smrg # PIC is the default for these OSes. 425106c34b88Smrg ;; 425206c34b88Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 425306c34b88Smrg # This hack is so that the source file can tell whether it is being 425406c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 425506c34b88Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 425606c34b88Smrg # (--disable-auto-import) libraries 425706c34b88Smrg m4_if([$1], [GCJ], [], 425806c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 425948e5ce07Smrg case $host_os in 426048e5ce07Smrg os2*) 426148e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 426248e5ce07Smrg ;; 426348e5ce07Smrg esac 426406c34b88Smrg ;; 426506c34b88Smrg darwin* | rhapsody*) 426606c34b88Smrg # PIC is the default on this platform 426706c34b88Smrg # Common symbols not allowed in MH_DYLIB files 426806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 426906c34b88Smrg ;; 427006c34b88Smrg *djgpp*) 427106c34b88Smrg # DJGPP does not support shared libraries at all 427206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 427306c34b88Smrg ;; 427406c34b88Smrg haiku*) 427506c34b88Smrg # PIC is the default for Haiku. 427606c34b88Smrg # The "-static" flag exists, but is broken. 427706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 427806c34b88Smrg ;; 427906c34b88Smrg interix[[3-9]]*) 428006c34b88Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 428106c34b88Smrg # Instead, we relocate shared libraries at runtime. 428206c34b88Smrg ;; 428306c34b88Smrg sysv4*MP*) 428406c34b88Smrg if test -d /usr/nec; then 428506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 428606c34b88Smrg fi 428706c34b88Smrg ;; 428806c34b88Smrg hpux*) 428906c34b88Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 429006c34b88Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 429106c34b88Smrg # sets the default TLS model and affects inlining. 429206c34b88Smrg case $host_cpu in 429306c34b88Smrg hppa*64*) 429406c34b88Smrg ;; 429506c34b88Smrg *) 429606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 429706c34b88Smrg ;; 429806c34b88Smrg esac 429906c34b88Smrg ;; 430006c34b88Smrg *qnx* | *nto*) 430106c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 430206c34b88Smrg # it will coredump. 430306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 430406c34b88Smrg ;; 430506c34b88Smrg *) 430606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 430706c34b88Smrg ;; 430806c34b88Smrg esac 4309c27c18e8Smrg else 431006c34b88Smrg case $host_os in 431106c34b88Smrg aix[[4-9]]*) 431206c34b88Smrg # All AIX code is PIC. 431348e5ce07Smrg if test ia64 = "$host_cpu"; then 431406c34b88Smrg # AIX 5 now supports IA64 processor 431506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 431606c34b88Smrg else 431706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 431806c34b88Smrg fi 431906c34b88Smrg ;; 432006c34b88Smrg chorus*) 432106c34b88Smrg case $cc_basename in 432206c34b88Smrg cxch68*) 432306c34b88Smrg # Green Hills C++ Compiler 432406c34b88Smrg # _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" 432506c34b88Smrg ;; 432606c34b88Smrg esac 432706c34b88Smrg ;; 432806c34b88Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 432906c34b88Smrg # This hack is so that the source file can tell whether it is being 433006c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 433106c34b88Smrg m4_if([$1], [GCJ], [], 433206c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 433306c34b88Smrg ;; 433406c34b88Smrg dgux*) 433506c34b88Smrg case $cc_basename in 433606c34b88Smrg ec++*) 433706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 433806c34b88Smrg ;; 433906c34b88Smrg ghcx*) 434006c34b88Smrg # Green Hills C++ Compiler 434106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 434206c34b88Smrg ;; 434306c34b88Smrg *) 434406c34b88Smrg ;; 434506c34b88Smrg esac 434606c34b88Smrg ;; 434706c34b88Smrg freebsd* | dragonfly*) 434806c34b88Smrg # FreeBSD uses GNU C++ 434906c34b88Smrg ;; 435006c34b88Smrg hpux9* | hpux10* | hpux11*) 435106c34b88Smrg case $cc_basename in 435206c34b88Smrg CC*) 435306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 435448e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 435548e5ce07Smrg if test ia64 != "$host_cpu"; then 435606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 435706c34b88Smrg fi 435806c34b88Smrg ;; 435906c34b88Smrg aCC*) 436006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 436148e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 436206c34b88Smrg case $host_cpu in 436306c34b88Smrg hppa*64*|ia64*) 436406c34b88Smrg # +Z the default 436506c34b88Smrg ;; 436606c34b88Smrg *) 436706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 436806c34b88Smrg ;; 436906c34b88Smrg esac 437006c34b88Smrg ;; 437106c34b88Smrg *) 437206c34b88Smrg ;; 437306c34b88Smrg esac 437406c34b88Smrg ;; 437506c34b88Smrg interix*) 437606c34b88Smrg # This is c89, which is MS Visual C++ (no shared libs) 437706c34b88Smrg # Anyone wants to do a port? 437806c34b88Smrg ;; 437906c34b88Smrg irix5* | irix6* | nonstopux*) 438006c34b88Smrg case $cc_basename in 438106c34b88Smrg CC*) 438206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 438306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 438406c34b88Smrg # CC pic flag -KPIC is the default. 438506c34b88Smrg ;; 438606c34b88Smrg *) 438706c34b88Smrg ;; 438806c34b88Smrg esac 438906c34b88Smrg ;; 439044584a44Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 439106c34b88Smrg case $cc_basename in 439206c34b88Smrg KCC*) 439306c34b88Smrg # KAI C++ Compiler 439406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 439506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 439606c34b88Smrg ;; 439706c34b88Smrg ecpc* ) 439848e5ce07Smrg # old Intel C++ for x86_64, which still supported -KPIC. 439906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 440006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 440106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 440206c34b88Smrg ;; 440306c34b88Smrg icpc* ) 440406c34b88Smrg # Intel C++, used to be incompatible with GCC. 440506c34b88Smrg # ICC 10 doesn't accept -KPIC any more. 440606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 440706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 440806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 440906c34b88Smrg ;; 441006c34b88Smrg pgCC* | pgcpp*) 441106c34b88Smrg # Portland Group C++ compiler 441206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 441306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 441406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 441506c34b88Smrg ;; 441606c34b88Smrg cxx*) 441706c34b88Smrg # Compaq C++ 441806c34b88Smrg # Make sure the PIC flag is empty. It appears that all Alpha 441906c34b88Smrg # Linux and Compaq Tru64 Unix objects are PIC. 442006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 442106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 442206c34b88Smrg ;; 442306c34b88Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 442406c34b88Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 442506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 442706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 442806c34b88Smrg ;; 442906c34b88Smrg *) 443006c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 443106c34b88Smrg *Sun\ C*) 443206c34b88Smrg # Sun C++ 5.9 443306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 443406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 443506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 443606c34b88Smrg ;; 443706c34b88Smrg esac 443806c34b88Smrg ;; 443906c34b88Smrg esac 444006c34b88Smrg ;; 444106c34b88Smrg lynxos*) 444206c34b88Smrg ;; 444306c34b88Smrg m88k*) 444406c34b88Smrg ;; 444506c34b88Smrg mvs*) 444606c34b88Smrg case $cc_basename in 444706c34b88Smrg cxx*) 444806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 444906c34b88Smrg ;; 445006c34b88Smrg *) 445106c34b88Smrg ;; 445206c34b88Smrg esac 445306c34b88Smrg ;; 445448e5ce07Smrg netbsd*) 445506c34b88Smrg ;; 445606c34b88Smrg *qnx* | *nto*) 445706c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 445806c34b88Smrg # it will coredump. 445906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 446006c34b88Smrg ;; 446106c34b88Smrg osf3* | osf4* | osf5*) 446206c34b88Smrg case $cc_basename in 446306c34b88Smrg KCC*) 446406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 446506c34b88Smrg ;; 446606c34b88Smrg RCC*) 446706c34b88Smrg # Rational C++ 2.4.1 446806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 446906c34b88Smrg ;; 447006c34b88Smrg cxx*) 447106c34b88Smrg # Digital/Compaq C++ 447206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 447306c34b88Smrg # Make sure the PIC flag is empty. It appears that all Alpha 447406c34b88Smrg # Linux and Compaq Tru64 Unix objects are PIC. 447506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 447606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 447706c34b88Smrg ;; 447806c34b88Smrg *) 447906c34b88Smrg ;; 448006c34b88Smrg esac 448106c34b88Smrg ;; 448206c34b88Smrg psos*) 448306c34b88Smrg ;; 448406c34b88Smrg solaris*) 448506c34b88Smrg case $cc_basename in 448606c34b88Smrg CC* | sunCC*) 448706c34b88Smrg # Sun C++ 4.2, 5.x and Centerline C++ 448806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 448906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 449006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 449106c34b88Smrg ;; 449206c34b88Smrg gcx*) 449306c34b88Smrg # Green Hills C++ Compiler 449406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 449506c34b88Smrg ;; 449606c34b88Smrg *) 449706c34b88Smrg ;; 449806c34b88Smrg esac 449906c34b88Smrg ;; 450006c34b88Smrg sunos4*) 450106c34b88Smrg case $cc_basename in 450206c34b88Smrg CC*) 450306c34b88Smrg # Sun C++ 4.x 450406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 450506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 450606c34b88Smrg ;; 450706c34b88Smrg lcc*) 450806c34b88Smrg # Lucid 450906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 451006c34b88Smrg ;; 451106c34b88Smrg *) 451206c34b88Smrg ;; 451306c34b88Smrg esac 451406c34b88Smrg ;; 451506c34b88Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 451606c34b88Smrg case $cc_basename in 451706c34b88Smrg CC*) 451806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 451906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 452006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 452106c34b88Smrg ;; 452206c34b88Smrg esac 452306c34b88Smrg ;; 452406c34b88Smrg tandem*) 452506c34b88Smrg case $cc_basename in 452606c34b88Smrg NCC*) 452706c34b88Smrg # NonStop-UX NCC 3.20 452806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 452906c34b88Smrg ;; 453006c34b88Smrg *) 453106c34b88Smrg ;; 453206c34b88Smrg esac 453306c34b88Smrg ;; 453406c34b88Smrg vxworks*) 453506c34b88Smrg ;; 453606c34b88Smrg *) 453706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 453806c34b88Smrg ;; 453906c34b88Smrg esac 4540c27c18e8Smrg fi 454106c34b88Smrg], 454206c34b88Smrg[ 454348e5ce07Smrg if test yes = "$GCC"; then 454406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 454506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4546c43cc173Smrg 454706c34b88Smrg case $host_os in 454806c34b88Smrg aix*) 454906c34b88Smrg # All AIX code is PIC. 455048e5ce07Smrg if test ia64 = "$host_cpu"; then 455106c34b88Smrg # AIX 5 now supports IA64 processor 455206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 455306c34b88Smrg fi 455448e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 455506c34b88Smrg ;; 4556c43cc173Smrg 455706c34b88Smrg amigaos*) 455806c34b88Smrg case $host_cpu in 455906c34b88Smrg powerpc) 456006c34b88Smrg # see comment about AmigaOS4 .so support 456106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 456206c34b88Smrg ;; 456306c34b88Smrg m68k) 456406c34b88Smrg # FIXME: we need at least 68020 code to build shared libraries, but 456548e5ce07Smrg # adding the '-m68020' flag to GCC prevents building anything better, 456648e5ce07Smrg # like '-m68040'. 456706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 456806c34b88Smrg ;; 456906c34b88Smrg esac 457006c34b88Smrg ;; 4571c43cc173Smrg 457206c34b88Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 457306c34b88Smrg # PIC is the default for these OSes. 457406c34b88Smrg ;; 4575c27c18e8Smrg 457606c34b88Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 457706c34b88Smrg # This hack is so that the source file can tell whether it is being 457806c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 457906c34b88Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 458006c34b88Smrg # (--disable-auto-import) libraries 458106c34b88Smrg m4_if([$1], [GCJ], [], 458206c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 458348e5ce07Smrg case $host_os in 458448e5ce07Smrg os2*) 458548e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 458648e5ce07Smrg ;; 458748e5ce07Smrg esac 458806c34b88Smrg ;; 4589c43cc173Smrg 459006c34b88Smrg darwin* | rhapsody*) 459106c34b88Smrg # PIC is the default on this platform 459206c34b88Smrg # Common symbols not allowed in MH_DYLIB files 459306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 459406c34b88Smrg ;; 4595c43cc173Smrg 459606c34b88Smrg haiku*) 459706c34b88Smrg # PIC is the default for Haiku. 459806c34b88Smrg # The "-static" flag exists, but is broken. 459906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 460006c34b88Smrg ;; 4601c43cc173Smrg 460206c34b88Smrg hpux*) 460306c34b88Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 460406c34b88Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 460506c34b88Smrg # sets the default TLS model and affects inlining. 460606c34b88Smrg case $host_cpu in 460706c34b88Smrg hppa*64*) 460806c34b88Smrg # +Z the default 460906c34b88Smrg ;; 461006c34b88Smrg *) 461106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 461206c34b88Smrg ;; 461306c34b88Smrg esac 461406c34b88Smrg ;; 4615c27c18e8Smrg 461606c34b88Smrg interix[[3-9]]*) 461706c34b88Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 461806c34b88Smrg # Instead, we relocate shared libraries at runtime. 461906c34b88Smrg ;; 4620c43cc173Smrg 462106c34b88Smrg msdosdjgpp*) 462206c34b88Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 462306c34b88Smrg # on systems that don't support them. 462406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 462506c34b88Smrg enable_shared=no 462606c34b88Smrg ;; 4627c43cc173Smrg 462806c34b88Smrg *nto* | *qnx*) 462906c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 463006c34b88Smrg # it will coredump. 463106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 463206c34b88Smrg ;; 4633c27c18e8Smrg 463406c34b88Smrg sysv4*MP*) 463506c34b88Smrg if test -d /usr/nec; then 463606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 463706c34b88Smrg fi 463806c34b88Smrg ;; 4639c27c18e8Smrg 464006c34b88Smrg *) 464106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 464206c34b88Smrg ;; 464306c34b88Smrg esac 4644c43cc173Smrg 464506c34b88Smrg case $cc_basename in 464606c34b88Smrg nvcc*) # Cuda Compiler Driver 2.2 464706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 464806c34b88Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 464906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 465006c34b88Smrg fi 465106c34b88Smrg ;; 465206c34b88Smrg esac 465306c34b88Smrg else 465406c34b88Smrg # PORTME Check for flag to pass linker flags through the system compiler. 465506c34b88Smrg case $host_os in 465606c34b88Smrg aix*) 465706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 465848e5ce07Smrg if test ia64 = "$host_cpu"; then 465906c34b88Smrg # AIX 5 now supports IA64 processor 466006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 466106c34b88Smrg else 466206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 466306c34b88Smrg fi 466406c34b88Smrg ;; 4665c27c18e8Smrg 466648e5ce07Smrg darwin* | rhapsody*) 466748e5ce07Smrg # PIC is the default on this platform 466848e5ce07Smrg # Common symbols not allowed in MH_DYLIB files 466948e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 467048e5ce07Smrg case $cc_basename in 467148e5ce07Smrg nagfor*) 467248e5ce07Smrg # NAG Fortran compiler 467348e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 467448e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 467548e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 467648e5ce07Smrg ;; 467748e5ce07Smrg esac 467848e5ce07Smrg ;; 467948e5ce07Smrg 468006c34b88Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 468106c34b88Smrg # This hack is so that the source file can tell whether it is being 468206c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 468306c34b88Smrg m4_if([$1], [GCJ], [], 468406c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 468548e5ce07Smrg case $host_os in 468648e5ce07Smrg os2*) 468748e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 468848e5ce07Smrg ;; 468948e5ce07Smrg esac 469006c34b88Smrg ;; 4691c43cc173Smrg 469206c34b88Smrg hpux9* | hpux10* | hpux11*) 469306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 469406c34b88Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 469506c34b88Smrg # not for PA HP-UX. 469606c34b88Smrg case $host_cpu in 469706c34b88Smrg hppa*64*|ia64*) 469806c34b88Smrg # +Z the default 469906c34b88Smrg ;; 470006c34b88Smrg *) 470106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4702c27c18e8Smrg ;; 470306c34b88Smrg esac 470406c34b88Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 470548e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 470606c34b88Smrg ;; 4707c43cc173Smrg 470806c34b88Smrg irix5* | irix6* | nonstopux*) 470906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 471006c34b88Smrg # PIC (with -KPIC) is the default. 471106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 471206c34b88Smrg ;; 4713c43cc173Smrg 471444584a44Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 471506c34b88Smrg case $cc_basename in 471648e5ce07Smrg # old Intel for x86_64, which still supported -KPIC. 471706c34b88Smrg ecc*) 471806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 471906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 472006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 472106c34b88Smrg ;; 472206c34b88Smrg # icc used to be incompatible with GCC. 472306c34b88Smrg # ICC 10 doesn't accept -KPIC any more. 472406c34b88Smrg icc* | ifort*) 472506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 472606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 472706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 472806c34b88Smrg ;; 472906c34b88Smrg # Lahey Fortran 8.1. 473006c34b88Smrg lf95*) 473106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 473206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 473306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 473406c34b88Smrg ;; 473506c34b88Smrg nagfor*) 473606c34b88Smrg # NAG Fortran compiler 473706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 473806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 473906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 474006c34b88Smrg ;; 474148e5ce07Smrg tcc*) 474248e5ce07Smrg # Fabrice Bellard et al's Tiny C Compiler 474348e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 474448e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 474548e5ce07Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 474648e5ce07Smrg ;; 474706c34b88Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 474806c34b88Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 474906c34b88Smrg # which looks to be a dead project) 475006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 475106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 475206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 475306c34b88Smrg ;; 475406c34b88Smrg ccc*) 475506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 475606c34b88Smrg # All Alpha code is PIC. 475706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 475806c34b88Smrg ;; 475906c34b88Smrg xl* | bgxl* | bgf* | mpixl*) 476006c34b88Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 476106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 476206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 476306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 476406c34b88Smrg ;; 476506c34b88Smrg *) 476606c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 476706c34b88Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 476806c34b88Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 476906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 477006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 477106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 477206c34b88Smrg ;; 477306c34b88Smrg *Sun\ F* | *Sun*Fortran*) 477406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 477506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 477606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 477706c34b88Smrg ;; 477806c34b88Smrg *Sun\ C*) 477906c34b88Smrg # Sun C 5.9 478006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 478106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 478206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 478306c34b88Smrg ;; 478406c34b88Smrg *Intel*\ [[CF]]*Compiler*) 478506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 478606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 478706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4788b789ec8aSmrg ;; 478906c34b88Smrg *Portland\ Group*) 479006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 479106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 479206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4793b789ec8aSmrg ;; 4794b789ec8aSmrg esac 4795b789ec8aSmrg ;; 479606c34b88Smrg esac 479706c34b88Smrg ;; 4798c43cc173Smrg 479906c34b88Smrg newsos6) 480006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 480106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 480206c34b88Smrg ;; 4803c27c18e8Smrg 480406c34b88Smrg *nto* | *qnx*) 480506c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 480606c34b88Smrg # it will coredump. 480706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 480806c34b88Smrg ;; 4809c43cc173Smrg 481006c34b88Smrg osf3* | osf4* | osf5*) 481106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 481206c34b88Smrg # All OSF/1 code is PIC. 481306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 481406c34b88Smrg ;; 4815c43cc173Smrg 481606c34b88Smrg rdos*) 481706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 481806c34b88Smrg ;; 4819c43cc173Smrg 482006c34b88Smrg solaris*) 482106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 482206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 482306c34b88Smrg case $cc_basename in 482406c34b88Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 482506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 482606c34b88Smrg *) 482706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 482806c34b88Smrg esac 482906c34b88Smrg ;; 4830c43cc173Smrg 483106c34b88Smrg sunos4*) 483206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 483306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 483406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 483506c34b88Smrg ;; 483637eb1ca1Smrg 483706c34b88Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 483806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 483906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 484006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484106c34b88Smrg ;; 4842c27c18e8Smrg 484306c34b88Smrg sysv4*MP*) 484448e5ce07Smrg if test -d /usr/nec; then 484506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 484606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484706c34b88Smrg fi 484806c34b88Smrg ;; 4849c43cc173Smrg 485006c34b88Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 485106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 485206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 485306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 485406c34b88Smrg ;; 4855c27c18e8Smrg 485606c34b88Smrg unicos*) 485706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 485806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 485906c34b88Smrg ;; 4860c27c18e8Smrg 486106c34b88Smrg uts4*) 486206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 486306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 486406c34b88Smrg ;; 4865c43cc173Smrg 486606c34b88Smrg *) 486706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 486806c34b88Smrg ;; 486906c34b88Smrg esac 487006c34b88Smrg fi 487106c34b88Smrg]) 487206c34b88Smrgcase $host_os in 487348e5ce07Smrg # For platforms that do not support PIC, -DPIC is meaningless: 487406c34b88Smrg *djgpp*) 487506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 487606c34b88Smrg ;; 487706c34b88Smrg *) 487806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 487906c34b88Smrg ;; 488006c34b88Smrgesac 4881c27c18e8Smrg 488206c34b88SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 488306c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 488406c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 488506c34b88Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4886c43cc173Smrg 488706c34b88Smrg# 488806c34b88Smrg# Check to make sure the PIC flag actually works. 488906c34b88Smrg# 489006c34b88Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 489106c34b88Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 489206c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 489306c34b88Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 489406c34b88Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 489506c34b88Smrg "" | " "*) ;; 489606c34b88Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 489706c34b88Smrg esac], 489806c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 489906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 490006c34b88Smrgfi 490106c34b88Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 490206c34b88Smrg [Additional compiler flags for building library objects]) 4903c27c18e8Smrg 490406c34b88Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 490506c34b88Smrg [How to pass a linker flag through the compiler]) 490606c34b88Smrg# 490706c34b88Smrg# Check to make sure the static flag actually works. 490806c34b88Smrg# 490906c34b88Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 491006c34b88Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 491106c34b88Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 491206c34b88Smrg $lt_tmp_static_flag, 491306c34b88Smrg [], 491406c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 491506c34b88Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 491606c34b88Smrg [Compiler flag to prevent dynamic linking]) 491706c34b88Smrg])# _LT_COMPILER_PIC 4918c27c18e8Smrg 4919c27c18e8Smrg 492006c34b88Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 492106c34b88Smrg# ---------------------------- 492206c34b88Smrg# See if the linker supports building shared libraries. 492306c34b88Smrgm4_defun([_LT_LINKER_SHLIBS], 492406c34b88Smrg[AC_REQUIRE([LT_PATH_LD])dnl 492506c34b88SmrgAC_REQUIRE([LT_PATH_NM])dnl 492606c34b88Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 492706c34b88Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 492806c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 492906c34b88Smrgm4_require([_LT_DECL_SED])dnl 493006c34b88Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 493106c34b88Smrgm4_require([_LT_TAG_COMPILER])dnl 493206c34b88SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 493306c34b88Smrgm4_if([$1], [CXX], [ 493406c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 493506c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 493606c34b88Smrg case $host_os in 493706c34b88Smrg aix[[4-9]]*) 493806c34b88Smrg # If we're using GNU nm, then we don't want the "-C" option. 493948e5ce07Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 494048e5ce07Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 494148e5ce07Smrg # weak defined symbols like other global defined symbols, whereas 494248e5ce07Smrg # GNU nm marks them as "W". 494348e5ce07Smrg # While the 'weak' keyword is ignored in the Export File, we need 494448e5ce07Smrg # it in the Import File for the 'aix-soname' feature, so we have 494548e5ce07Smrg # to replace the "-B" option with "-P" for AIX nm. 494606c34b88Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 494748e5ce07Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 494806c34b88Smrg else 494948e5ce07Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 495006c34b88Smrg fi 495106c34b88Smrg ;; 495206c34b88Smrg pw32*) 495348e5ce07Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 495406c34b88Smrg ;; 495506c34b88Smrg cygwin* | mingw* | cegcc*) 495606c34b88Smrg case $cc_basename in 495706c34b88Smrg cl*) 495806c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 495906c34b88Smrg ;; 496006c34b88Smrg *) 496106c34b88Smrg _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' 496206c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 496306c34b88Smrg ;; 496406c34b88Smrg esac 496506c34b88Smrg ;; 496606c34b88Smrg *) 496706c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 496806c34b88Smrg ;; 496906c34b88Smrg esac 497006c34b88Smrg], [ 497106c34b88Smrg runpath_var= 497206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 497306c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 497406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)= 497506c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 497606c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 497706c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 497806c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 497906c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 498006c34b88Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 498106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 498206c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 498306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 498406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 498506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 498606c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 498706c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=no 498806c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 498906c34b88Smrg _LT_TAGVAR(module_cmds, $1)= 499006c34b88Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 499106c34b88Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 499206c34b88Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 499306c34b88Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 499406c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 499506c34b88Smrg # include_expsyms should be a list of space-separated symbols to be *always* 499606c34b88Smrg # included in the symbol list 499706c34b88Smrg _LT_TAGVAR(include_expsyms, $1)= 499806c34b88Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 499948e5ce07Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 500048e5ce07Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 500148e5ce07Smrg # as well as any symbol that contains 'd'. 500206c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 500306c34b88Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 500406c34b88Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 500506c34b88Smrg # the symbol is explicitly referenced. Since portable code cannot 500606c34b88Smrg # rely on this symbol name, it's probably fine to never include it in 500706c34b88Smrg # preloaded symbol tables. 500806c34b88Smrg # Exclude shared library initialization/finalization symbols. 500906c34b88Smrgdnl Note also adjust exclude_expsyms for C++ above. 501006c34b88Smrg extract_expsyms_cmds= 5011c43cc173Smrg 501206c34b88Smrg case $host_os in 501306c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 501406c34b88Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 501506c34b88Smrg # When not using gcc, we currently assume that we are using 501606c34b88Smrg # Microsoft Visual C++. 501748e5ce07Smrg if test yes != "$GCC"; then 501806c34b88Smrg with_gnu_ld=no 501906c34b88Smrg fi 502006c34b88Smrg ;; 502106c34b88Smrg interix*) 502206c34b88Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 502306c34b88Smrg with_gnu_ld=yes 502406c34b88Smrg ;; 502548e5ce07Smrg openbsd* | bitrig*) 502606c34b88Smrg with_gnu_ld=no 502706c34b88Smrg ;; 502806c34b88Smrg esac 5029c43cc173Smrg 503006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 503121e67964Smrg 503206c34b88Smrg # On some targets, GNU ld is compatible enough with the native linker 503306c34b88Smrg # that we're better off using the native interface for both. 503406c34b88Smrg lt_use_gnu_ld_interface=no 503548e5ce07Smrg if test yes = "$with_gnu_ld"; then 503606c34b88Smrg case $host_os in 503706c34b88Smrg aix*) 503806c34b88Smrg # The AIX port of GNU ld has always aspired to compatibility 503906c34b88Smrg # with the native linker. However, as the warning in the GNU ld 504006c34b88Smrg # block says, versions before 2.19.5* couldn't really create working 504106c34b88Smrg # shared libraries, regardless of the interface used. 504206c34b88Smrg case `$LD -v 2>&1` in 504306c34b88Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 504406c34b88Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 504506c34b88Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5046c27c18e8Smrg *) 504706c34b88Smrg lt_use_gnu_ld_interface=yes 5048c27c18e8Smrg ;; 5049c27c18e8Smrg esac 5050c27c18e8Smrg ;; 505106c34b88Smrg *) 505206c34b88Smrg lt_use_gnu_ld_interface=yes 505306c34b88Smrg ;; 505406c34b88Smrg esac 505506c34b88Smrg fi 5056c43cc173Smrg 505748e5ce07Smrg if test yes = "$lt_use_gnu_ld_interface"; then 505806c34b88Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 505948e5ce07Smrg wlarc='$wl' 506006c34b88Smrg 506106c34b88Smrg # Set some defaults for GNU ld with shared library support. These 506206c34b88Smrg # are reset later if shared libraries are not supported. Putting them 506306c34b88Smrg # here allows them to be overridden if necessary. 506406c34b88Smrg runpath_var=LD_RUN_PATH 506548e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 506648e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 506706c34b88Smrg # ancient GNU ld didn't support --whole-archive et. al. 506806c34b88Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 506948e5ce07Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 507006c34b88Smrg else 507106c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 507206c34b88Smrg fi 507306c34b88Smrg supports_anon_versioning=no 507448e5ce07Smrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 507506c34b88Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 507606c34b88Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 507706c34b88Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 507806c34b88Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 507906c34b88Smrg *\ 2.11.*) ;; # other 2.11 versions 508006c34b88Smrg *) supports_anon_versioning=yes ;; 508106c34b88Smrg esac 508206c34b88Smrg 508306c34b88Smrg # See if GNU ld supports shared libraries. 508406c34b88Smrg case $host_os in 508506c34b88Smrg aix[[3-9]]*) 508606c34b88Smrg # On AIX/PPC, the GNU linker is very broken 508748e5ce07Smrg if test ia64 != "$host_cpu"; then 5088c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 508906c34b88Smrg cat <<_LT_EOF 1>&2 5090c43cc173Smrg 509106c34b88Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 509206c34b88Smrg*** to be unable to reliably create shared libraries on AIX. 509306c34b88Smrg*** Therefore, libtool is disabling shared libraries support. If you 509406c34b88Smrg*** really care for shared libraries, you may want to install binutils 509506c34b88Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 509606c34b88Smrg*** You will then need to restart the configuration process. 5097c43cc173Smrg 509806c34b88Smrg_LT_EOF 509906c34b88Smrg fi 510006c34b88Smrg ;; 5101c43cc173Smrg 510206c34b88Smrg amigaos*) 510306c34b88Smrg case $host_cpu in 510406c34b88Smrg powerpc) 510506c34b88Smrg # see comment about AmigaOS4 .so support 510648e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 510706c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 510806c34b88Smrg ;; 510906c34b88Smrg m68k) 511006c34b88Smrg _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)' 511106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 511206c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 511306c34b88Smrg ;; 511406c34b88Smrg esac 511506c34b88Smrg ;; 5116c43cc173Smrg 511706c34b88Smrg beos*) 511806c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 511906c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 512006c34b88Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 512106c34b88Smrg # support --undefined. This deserves some investigation. FIXME 512248e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 512306c34b88Smrg else 512406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 512506c34b88Smrg fi 512606c34b88Smrg ;; 512706c34b88Smrg 512806c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 512906c34b88Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 513006c34b88Smrg # as there is no search path for DLLs. 513106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 513248e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 513306c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 513406c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 513506c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 513606c34b88Smrg _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' 513706c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 513806c34b88Smrg 513906c34b88Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 514048e5ce07Smrg _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' 514148e5ce07Smrg # If the export-symbols file already is a .def file, use it as 514248e5ce07Smrg # is; otherwise, prepend EXPORTS... 514348e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 514448e5ce07Smrg cp $export_symbols $output_objdir/$soname.def; 514548e5ce07Smrg else 514648e5ce07Smrg echo EXPORTS > $output_objdir/$soname.def; 514748e5ce07Smrg cat $export_symbols >> $output_objdir/$soname.def; 514848e5ce07Smrg fi~ 514948e5ce07Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 515006c34b88Smrg else 515106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 515206c34b88Smrg fi 515306c34b88Smrg ;; 515406c34b88Smrg 515506c34b88Smrg haiku*) 515648e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 515706c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 515806c34b88Smrg ;; 515906c34b88Smrg 516048e5ce07Smrg os2*) 516148e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 516248e5ce07Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 516348e5ce07Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 516448e5ce07Smrg shrext_cmds=.dll 516548e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 516648e5ce07Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 516748e5ce07Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 516848e5ce07Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 516948e5ce07Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 517048e5ce07Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 517148e5ce07Smrg emximp -o $lib $output_objdir/$libname.def' 517248e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 517348e5ce07Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 517448e5ce07Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 517548e5ce07Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 517648e5ce07Smrg prefix_cmds="$SED"~ 517748e5ce07Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 517848e5ce07Smrg prefix_cmds="$prefix_cmds -e 1d"; 517948e5ce07Smrg fi~ 518048e5ce07Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 518148e5ce07Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 518248e5ce07Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 518348e5ce07Smrg emximp -o $lib $output_objdir/$libname.def' 518448e5ce07Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 518548e5ce07Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 518648e5ce07Smrg ;; 518748e5ce07Smrg 518806c34b88Smrg interix[[3-9]]*) 518906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 519006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 519148e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 519248e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 519306c34b88Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 519406c34b88Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 519506c34b88Smrg # default) and relocated if they conflict, which is a slow very memory 519606c34b88Smrg # consuming and fragmenting process. To avoid this, we pick a random, 519706c34b88Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 519806c34b88Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 519948e5ce07Smrg _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' 520048e5ce07Smrg _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' 520106c34b88Smrg ;; 520206c34b88Smrg 520306c34b88Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 520406c34b88Smrg tmp_diet=no 520548e5ce07Smrg if test linux-dietlibc = "$host_os"; then 520606c34b88Smrg case $cc_basename in 520706c34b88Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 520806c34b88Smrg esac 520906c34b88Smrg fi 521006c34b88Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 521148e5ce07Smrg && test no = "$tmp_diet" 521206c34b88Smrg then 521306c34b88Smrg tmp_addflag=' $pic_flag' 521406c34b88Smrg tmp_sharedflag='-shared' 521506c34b88Smrg case $cc_basename,$host_cpu in 521606c34b88Smrg pgcc*) # Portland Group C compiler 521748e5ce07Smrg _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' 521806c34b88Smrg tmp_addflag=' $pic_flag' 521906c34b88Smrg ;; 522006c34b88Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 522106c34b88Smrg # Portland Group f77 and f90 compilers 522248e5ce07Smrg _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' 522306c34b88Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 522406c34b88Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 522506c34b88Smrg tmp_addflag=' -i_dynamic' ;; 522606c34b88Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 522706c34b88Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 522806c34b88Smrg ifc* | ifort*) # Intel Fortran compiler 522906c34b88Smrg tmp_addflag=' -nofor_main' ;; 523006c34b88Smrg lf95*) # Lahey Fortran 8.1 523106c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 523206c34b88Smrg tmp_sharedflag='--shared' ;; 523348e5ce07Smrg nagfor*) # NAGFOR 5.3 523448e5ce07Smrg tmp_sharedflag='-Wl,-shared' ;; 523506c34b88Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 523606c34b88Smrg tmp_sharedflag='-qmkshrobj' 523706c34b88Smrg tmp_addflag= ;; 523806c34b88Smrg nvcc*) # Cuda Compiler Driver 2.2 523948e5ce07Smrg _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' 524006c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 524106c34b88Smrg ;; 524206c34b88Smrg esac 524306c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 524406c34b88Smrg *Sun\ C*) # Sun C 5.9 524548e5ce07Smrg _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' 524606c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 524706c34b88Smrg tmp_sharedflag='-G' ;; 524806c34b88Smrg *Sun\ F*) # Sun Fortran 8.3 524906c34b88Smrg tmp_sharedflag='-G' ;; 525006c34b88Smrg esac 525148e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5252c43cc173Smrg 525348e5ce07Smrg if test yes = "$supports_anon_versioning"; then 525406c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 525548e5ce07Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 525648e5ce07Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 525748e5ce07Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 525806c34b88Smrg fi 5259c43cc173Smrg 526006c34b88Smrg case $cc_basename in 526148e5ce07Smrg tcc*) 526248e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 526348e5ce07Smrg ;; 526406c34b88Smrg xlf* | bgf* | bgxlf* | mpixlf*) 526506c34b88Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 526606c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 526748e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 526806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 526948e5ce07Smrg if test yes = "$supports_anon_versioning"; then 527006c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 527148e5ce07Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 527248e5ce07Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 527348e5ce07Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5274c27c18e8Smrg fi 527506c34b88Smrg ;; 527606c34b88Smrg esac 527706c34b88Smrg else 527806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 527906c34b88Smrg fi 528006c34b88Smrg ;; 5281c27c18e8Smrg 528248e5ce07Smrg netbsd*) 528306c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 528406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 528506c34b88Smrg wlarc= 528606c34b88Smrg else 528748e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 528848e5ce07Smrg _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' 528906c34b88Smrg fi 529006c34b88Smrg ;; 5291c27c18e8Smrg 529206c34b88Smrg solaris*) 529306c34b88Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 529406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 529506c34b88Smrg cat <<_LT_EOF 1>&2 5296c27c18e8Smrg 529706c34b88Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 529806c34b88Smrg*** create shared libraries on Solaris systems. Therefore, libtool 529906c34b88Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 530006c34b88Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 530106c34b88Smrg*** your PATH or compiler configuration so that the native linker is 530206c34b88Smrg*** used, and then restart. 5303c43cc173Smrg 530406c34b88Smrg_LT_EOF 530506c34b88Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 530648e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 530748e5ce07Smrg _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' 530806c34b88Smrg else 530906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 531006c34b88Smrg fi 531106c34b88Smrg ;; 5312c43cc173Smrg 531306c34b88Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 531406c34b88Smrg case `$LD -v 2>&1` in 531506c34b88Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 531606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 531706c34b88Smrg cat <<_LT_EOF 1>&2 5318c27c18e8Smrg 531948e5ce07Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 532006c34b88Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 532106c34b88Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 532206c34b88Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 532306c34b88Smrg*** your PATH or compiler configuration so that the native linker is 532406c34b88Smrg*** used, and then restart. 5325c27c18e8Smrg 532606c34b88Smrg_LT_EOF 532706c34b88Smrg ;; 532806c34b88Smrg *) 532906c34b88Smrg # For security reasons, it is highly recommended that you always 533006c34b88Smrg # use absolute paths for naming shared libraries, and exclude the 533106c34b88Smrg # DT_RUNPATH tag from executables and libraries. But doing so 533206c34b88Smrg # requires that you compile everything twice, which is a pain. 533306c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 533448e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 533548e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 533648e5ce07Smrg _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' 533706c34b88Smrg else 533806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 533906c34b88Smrg fi 534006c34b88Smrg ;; 534106c34b88Smrg esac 534206c34b88Smrg ;; 5343c27c18e8Smrg 534406c34b88Smrg sunos4*) 534506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 534606c34b88Smrg wlarc= 534706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 534806c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 534906c34b88Smrg ;; 5350c43cc173Smrg 535106c34b88Smrg *) 535206c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 535348e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 535448e5ce07Smrg _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' 535506c34b88Smrg else 535606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 535706c34b88Smrg fi 535806c34b88Smrg ;; 535906c34b88Smrg esac 5360c43cc173Smrg 536148e5ce07Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 536206c34b88Smrg runpath_var= 536306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 536406c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 536506c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 536606c34b88Smrg fi 536706c34b88Smrg else 536806c34b88Smrg # PORTME fill in a description of your system's linker (not GNU ld) 536906c34b88Smrg case $host_os in 537006c34b88Smrg aix3*) 537106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 537206c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 537306c34b88Smrg _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' 537406c34b88Smrg # Note: this linker hardcodes the directories in LIBPATH if there 537506c34b88Smrg # are no directories specified by -L. 537606c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 537748e5ce07Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 537806c34b88Smrg # Neither direct hardcoding nor static linking is supported with a 537906c34b88Smrg # broken collect2. 538006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 538106c34b88Smrg fi 538206c34b88Smrg ;; 5383c43cc173Smrg 538406c34b88Smrg aix[[4-9]]*) 538548e5ce07Smrg if test ia64 = "$host_cpu"; then 538606c34b88Smrg # On IA64, the linker does run time linking by default, so we don't 538706c34b88Smrg # have to do anything special. 538806c34b88Smrg aix_use_runtimelinking=no 538906c34b88Smrg exp_sym_flag='-Bexport' 539048e5ce07Smrg no_entry_flag= 539106c34b88Smrg else 539206c34b88Smrg # If we're using GNU nm, then we don't want the "-C" option. 539348e5ce07Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 539448e5ce07Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 539548e5ce07Smrg # weak defined symbols like other global defined symbols, whereas 539648e5ce07Smrg # GNU nm marks them as "W". 539748e5ce07Smrg # While the 'weak' keyword is ignored in the Export File, we need 539848e5ce07Smrg # it in the Import File for the 'aix-soname' feature, so we have 539948e5ce07Smrg # to replace the "-B" option with "-P" for AIX nm. 540006c34b88Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 540148e5ce07Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 540206c34b88Smrg else 540348e5ce07Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 540406c34b88Smrg fi 540506c34b88Smrg aix_use_runtimelinking=no 5406c27c18e8Smrg 540706c34b88Smrg # Test if we are trying to use run time linking or normal 540806c34b88Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 540948e5ce07Smrg # have runtime linking enabled, and use it for executables. 541048e5ce07Smrg # For shared libraries, we enable/disable runtime linking 541148e5ce07Smrg # depending on the kind of the shared library created - 541248e5ce07Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 541348e5ce07Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 541448e5ce07Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 541548e5ce07Smrg # lib.a static archive 541648e5ce07Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 541748e5ce07Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 541848e5ce07Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 541948e5ce07Smrg # lib.a(lib.so.V) shared, rtl:no 542048e5ce07Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 542148e5ce07Smrg # lib.a static archive 542206c34b88Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 542306c34b88Smrg for ld_flag in $LDFLAGS; do 542448e5ce07Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 542506c34b88Smrg aix_use_runtimelinking=yes 542606c34b88Smrg break 542706c34b88Smrg fi 542806c34b88Smrg done 542948e5ce07Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 543048e5ce07Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 543148e5ce07Smrg # so we don't have lib.a shared libs to link our executables. 543248e5ce07Smrg # We have to force runtime linking in this case. 543348e5ce07Smrg aix_use_runtimelinking=yes 543448e5ce07Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 543548e5ce07Smrg fi 543606c34b88Smrg ;; 543706c34b88Smrg esac 5438c43cc173Smrg 543906c34b88Smrg exp_sym_flag='-bexport' 544006c34b88Smrg no_entry_flag='-bnoentry' 544106c34b88Smrg fi 5442c43cc173Smrg 544306c34b88Smrg # When large executables or shared objects are built, AIX ld can 544406c34b88Smrg # have problems creating the table of contents. If linking a library 544506c34b88Smrg # or program results in "error TOC overflow" add -mminimal-toc to 544606c34b88Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 544706c34b88Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5448c43cc173Smrg 544906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='' 545006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 545106c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 545206c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 545306c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 545448e5ce07Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 545548e5ce07Smrg case $with_aix_soname,$aix_use_runtimelinking in 545648e5ce07Smrg aix,*) ;; # traditional, no import file 545748e5ce07Smrg svr4,* | *,yes) # use import file 545848e5ce07Smrg # The Import File defines what to hardcode. 545948e5ce07Smrg _LT_TAGVAR(hardcode_direct, $1)=no 546048e5ce07Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 546148e5ce07Smrg ;; 546248e5ce07Smrg esac 5463c27c18e8Smrg 546448e5ce07Smrg if test yes = "$GCC"; then 546506c34b88Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 546606c34b88Smrg # We only want to do this on AIX 4.2 and lower, the check 546706c34b88Smrg # below for broken collect2 doesn't work under 4.3+ 546848e5ce07Smrg collect2name=`$CC -print-prog-name=collect2` 546906c34b88Smrg if test -f "$collect2name" && 547006c34b88Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 547106c34b88Smrg then 547206c34b88Smrg # We have reworked collect2 547306c34b88Smrg : 547406c34b88Smrg else 547506c34b88Smrg # We have old collect2 547606c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 547706c34b88Smrg # It fails to find uninstalled libraries when the uninstalled 547806c34b88Smrg # path is not listed in the libpath. Setting hardcode_minus_L 547906c34b88Smrg # to unsupported forces relinking 548006c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 548106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 548206c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 548306c34b88Smrg fi 548406c34b88Smrg ;; 548506c34b88Smrg esac 548606c34b88Smrg shared_flag='-shared' 548748e5ce07Smrg if test yes = "$aix_use_runtimelinking"; then 548848e5ce07Smrg shared_flag="$shared_flag "'$wl-G' 548906c34b88Smrg fi 549048e5ce07Smrg # Need to ensure runtime linking is disabled for the traditional 549148e5ce07Smrg # shared library, or the linker may eventually find shared libraries 549248e5ce07Smrg # /with/ Import File - we do not want to mix them. 549348e5ce07Smrg shared_flag_aix='-shared' 549448e5ce07Smrg shared_flag_svr4='-shared $wl-G' 549506c34b88Smrg else 549606c34b88Smrg # not using gcc 549748e5ce07Smrg if test ia64 = "$host_cpu"; then 549806c34b88Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 549906c34b88Smrg # chokes on -Wl,-G. The following line is correct: 550006c34b88Smrg shared_flag='-G' 550106c34b88Smrg else 550248e5ce07Smrg if test yes = "$aix_use_runtimelinking"; then 550348e5ce07Smrg shared_flag='$wl-G' 550406c34b88Smrg else 550548e5ce07Smrg shared_flag='$wl-bM:SRE' 550606c34b88Smrg fi 550748e5ce07Smrg shared_flag_aix='$wl-bM:SRE' 550848e5ce07Smrg shared_flag_svr4='$wl-G' 550906c34b88Smrg fi 551006c34b88Smrg fi 5511c27c18e8Smrg 551248e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 551306c34b88Smrg # It seems that -bexpall does not export symbols beginning with 551406c34b88Smrg # underscore (_), so it is better to generate a list of symbols to export. 551506c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 551648e5ce07Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 551706c34b88Smrg # Warning - without using the other runtime loading flags (-brtl), 551806c34b88Smrg # -berok will link without error, but may produce a broken library. 551906c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 552006c34b88Smrg # Determine the default libpath from the value encoded in an 552106c34b88Smrg # empty executable. 552206c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 552348e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 552448e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 552506c34b88Smrg else 552648e5ce07Smrg if test ia64 = "$host_cpu"; then 552748e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 552806c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 552948e5ce07Smrg _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" 553006c34b88Smrg else 553106c34b88Smrg # Determine the default libpath from the value encoded in an 553206c34b88Smrg # empty executable. 553306c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 553448e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 553506c34b88Smrg # Warning - without using the other run time loading flags, 553606c34b88Smrg # -berok will link without error, but may produce a broken library. 553748e5ce07Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 553848e5ce07Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 553948e5ce07Smrg if test yes = "$with_gnu_ld"; then 554006c34b88Smrg # We only use this code for GNU lds that support --whole-archive. 554148e5ce07Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 554206c34b88Smrg else 554306c34b88Smrg # Exported symbols can be pulled into shared objects from archives 554406c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 554506c34b88Smrg fi 554606c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 554748e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 554848e5ce07Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 554948e5ce07Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 555048e5ce07Smrg if test svr4 != "$with_aix_soname"; then 555148e5ce07Smrg # This is similar to how AIX traditionally builds its shared libraries. 555248e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 555348e5ce07Smrg fi 555448e5ce07Smrg if test aix != "$with_aix_soname"; then 555548e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 555648e5ce07Smrg else 555748e5ce07Smrg # used by -dlpreopen to get the symbols 555848e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 555948e5ce07Smrg fi 556048e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 556106c34b88Smrg fi 556206c34b88Smrg fi 556306c34b88Smrg ;; 5564c27c18e8Smrg 556506c34b88Smrg amigaos*) 556606c34b88Smrg case $host_cpu in 556706c34b88Smrg powerpc) 556806c34b88Smrg # see comment about AmigaOS4 .so support 556948e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 557006c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 557106c34b88Smrg ;; 557206c34b88Smrg m68k) 557306c34b88Smrg _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)' 557406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 557506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5576c27c18e8Smrg ;; 557706c34b88Smrg esac 557806c34b88Smrg ;; 5579c43cc173Smrg 558006c34b88Smrg bsdi[[45]]*) 558106c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 558206c34b88Smrg ;; 5583c43cc173Smrg 558406c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 558506c34b88Smrg # When not using gcc, we currently assume that we are using 558606c34b88Smrg # Microsoft Visual C++. 558706c34b88Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 558806c34b88Smrg # no search path for DLLs. 5589c27c18e8Smrg case $cc_basename in 559006c34b88Smrg cl*) 559106c34b88Smrg # Native MSVC 559206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 559306c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 559406c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 559506c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='@' 559606c34b88Smrg # Tell ltmain to make .lib files, not .a files. 559706c34b88Smrg libext=lib 559806c34b88Smrg # Tell ltmain to make .dll files, not .so files. 559948e5ce07Smrg shrext_cmds=.dll 560006c34b88Smrg # FIXME: Setting linknames here is a bad hack. 560148e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 560248e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 560348e5ce07Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 560448e5ce07Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 560548e5ce07Smrg else 560648e5ce07Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 560748e5ce07Smrg fi~ 560848e5ce07Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 560948e5ce07Smrg linknames=' 561006c34b88Smrg # The linker will not automatically build a static lib if we build a DLL. 561106c34b88Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 561206c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 561306c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 561406c34b88Smrg _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' 561506c34b88Smrg # Don't use ranlib 561606c34b88Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 561706c34b88Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 561848e5ce07Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 561948e5ce07Smrg case $lt_outputfile in 562048e5ce07Smrg *.exe|*.EXE) ;; 562148e5ce07Smrg *) 562248e5ce07Smrg lt_outputfile=$lt_outputfile.exe 562348e5ce07Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 562448e5ce07Smrg ;; 562548e5ce07Smrg esac~ 562648e5ce07Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 562748e5ce07Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 562848e5ce07Smrg $RM "$lt_outputfile.manifest"; 562948e5ce07Smrg fi' 563006c34b88Smrg ;; 563106c34b88Smrg *) 563206c34b88Smrg # Assume MSVC wrapper 563306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 563406c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 563506c34b88Smrg # Tell ltmain to make .lib files, not .a files. 563606c34b88Smrg libext=lib 563706c34b88Smrg # Tell ltmain to make .dll files, not .so files. 563848e5ce07Smrg shrext_cmds=.dll 563906c34b88Smrg # FIXME: Setting linknames here is a bad hack. 564006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 564106c34b88Smrg # The linker will automatically build a .lib file if we build a DLL. 564206c34b88Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 564306c34b88Smrg # FIXME: Should let the user specify the lib program. 564406c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 564506c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 564606c34b88Smrg ;; 5647c27c18e8Smrg esac 5648c27c18e8Smrg ;; 5649c43cc173Smrg 565006c34b88Smrg darwin* | rhapsody*) 565106c34b88Smrg _LT_DARWIN_LINKER_FEATURES($1) 5652c27c18e8Smrg ;; 5653c43cc173Smrg 565406c34b88Smrg dgux*) 565506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 565606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 565706c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 565806c34b88Smrg ;; 5659c27c18e8Smrg 566006c34b88Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 566106c34b88Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 566206c34b88Smrg # does not break anything, and helps significantly (at the cost of a little 566306c34b88Smrg # extra space). 566406c34b88Smrg freebsd2.2*) 566506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 566606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 566706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 566806c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 566906c34b88Smrg ;; 5670c27c18e8Smrg 567106c34b88Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 567206c34b88Smrg freebsd2.*) 567306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 567406c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 567506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 567606c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 567706c34b88Smrg ;; 5678c27c18e8Smrg 567906c34b88Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 568006c34b88Smrg freebsd* | dragonfly*) 568106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 568206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 568306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 568406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 568506c34b88Smrg ;; 5686c43cc173Smrg 568706c34b88Smrg hpux9*) 568848e5ce07Smrg if test yes = "$GCC"; then 568948e5ce07Smrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 569006c34b88Smrg else 569148e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 569206c34b88Smrg fi 569348e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 569406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 569506c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5696c43cc173Smrg 569706c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 569806c34b88Smrg # but as the default location of the library. 569906c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 570048e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 570106c34b88Smrg ;; 5702c43cc173Smrg 570306c34b88Smrg hpux10*) 570448e5ce07Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 570548e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 570606c34b88Smrg else 570706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 570806c34b88Smrg fi 570948e5ce07Smrg if test no = "$with_gnu_ld"; then 571048e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 571106c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 571206c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 571306c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 571448e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 571506c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 571606c34b88Smrg # but as the default location of the library. 571706c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 571806c34b88Smrg fi 571906c34b88Smrg ;; 5720b789ec8aSmrg 572106c34b88Smrg hpux11*) 572248e5ce07Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 572306c34b88Smrg case $host_cpu in 572406c34b88Smrg hppa*64*) 572548e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 572606c34b88Smrg ;; 572706c34b88Smrg ia64*) 572848e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 572906c34b88Smrg ;; 573006c34b88Smrg *) 573148e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 573206c34b88Smrg ;; 573306c34b88Smrg esac 573406c34b88Smrg else 573506c34b88Smrg case $host_cpu in 573606c34b88Smrg hppa*64*) 573748e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 573806c34b88Smrg ;; 573906c34b88Smrg ia64*) 574048e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 574106c34b88Smrg ;; 574206c34b88Smrg *) 574306c34b88Smrg m4_if($1, [], [ 574406c34b88Smrg # Older versions of the 11.00 compiler do not understand -b yet 574506c34b88Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 574606c34b88Smrg _LT_LINKER_OPTION([if $CC understands -b], 574706c34b88Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 574848e5ce07Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 574906c34b88Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 575048e5ce07Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 575106c34b88Smrg ;; 575206c34b88Smrg esac 575306c34b88Smrg fi 575448e5ce07Smrg if test no = "$with_gnu_ld"; then 575548e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 575606c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5757c43cc173Smrg 575806c34b88Smrg case $host_cpu in 575906c34b88Smrg hppa*64*|ia64*) 576006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 576106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 576206c34b88Smrg ;; 576306c34b88Smrg *) 576406c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 576506c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 576648e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 576706c34b88Smrg 576806c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 576906c34b88Smrg # but as the default location of the library. 577006c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 577106c34b88Smrg ;; 577206c34b88Smrg esac 577306c34b88Smrg fi 577406c34b88Smrg ;; 577506c34b88Smrg 577606c34b88Smrg irix5* | irix6* | nonstopux*) 577748e5ce07Smrg if test yes = "$GCC"; then 577848e5ce07Smrg _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' 577906c34b88Smrg # Try to use the -exported_symbol ld option, if it does not 578006c34b88Smrg # work, assume that -exports_file does not work either and 578106c34b88Smrg # implicitly export all symbols. 578206c34b88Smrg # This should be the same for all languages, so no per-tag cache variable. 578306c34b88Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 578406c34b88Smrg [lt_cv_irix_exported_symbol], 578548e5ce07Smrg [save_LDFLAGS=$LDFLAGS 578648e5ce07Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 578706c34b88Smrg AC_LINK_IFELSE( 578806c34b88Smrg [AC_LANG_SOURCE( 578906c34b88Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 579006c34b88Smrg [C++], [[int foo (void) { return 0; }]], 579106c34b88Smrg [Fortran 77], [[ 5792c27c18e8Smrg subroutine foo 579306c34b88Smrg end]], 579406c34b88Smrg [Fortran], [[ 5795c27c18e8Smrg subroutine foo 579606c34b88Smrg end]])])], 579706c34b88Smrg [lt_cv_irix_exported_symbol=yes], 579806c34b88Smrg [lt_cv_irix_exported_symbol=no]) 579948e5ce07Smrg LDFLAGS=$save_LDFLAGS]) 580048e5ce07Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 580148e5ce07Smrg _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' 580206c34b88Smrg fi 580306c34b88Smrg else 580448e5ce07Smrg _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' 580548e5ce07Smrg _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' 580606c34b88Smrg fi 580706c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 580848e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 580906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 581006c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 581106c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 581206c34b88Smrg ;; 5813b789ec8aSmrg 581448e5ce07Smrg linux*) 581548e5ce07Smrg case $cc_basename in 581648e5ce07Smrg tcc*) 581748e5ce07Smrg # Fabrice Bellard et al's Tiny C Compiler 581848e5ce07Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 581948e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 582048e5ce07Smrg ;; 582148e5ce07Smrg esac 582248e5ce07Smrg ;; 582348e5ce07Smrg 582448e5ce07Smrg netbsd*) 582506c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 582606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 582706c34b88Smrg else 582806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 582906c34b88Smrg fi 583006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 583106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 583206c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 583306c34b88Smrg ;; 5834b789ec8aSmrg 583506c34b88Smrg newsos6) 583606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 583706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 583848e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 583906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 584006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 584106c34b88Smrg ;; 5842c43cc173Smrg 584306c34b88Smrg *nto* | *qnx*) 584406c34b88Smrg ;; 5845c43cc173Smrg 584648e5ce07Smrg openbsd* | bitrig*) 584706c34b88Smrg if test -f /usr/libexec/ld.so; then 584806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 584906c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 585006c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 585148e5ce07Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 585206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 585348e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 585448e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 585548e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 585606c34b88Smrg else 585748e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 585848e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 585906c34b88Smrg fi 586006c34b88Smrg else 586106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 586206c34b88Smrg fi 586306c34b88Smrg ;; 5864c43cc173Smrg 586506c34b88Smrg os2*) 586606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 586706c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 586806c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 586948e5ce07Smrg shrext_cmds=.dll 587048e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 587148e5ce07Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 587248e5ce07Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 587348e5ce07Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 587448e5ce07Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 587548e5ce07Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 587648e5ce07Smrg emximp -o $lib $output_objdir/$libname.def' 587748e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 587848e5ce07Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 587948e5ce07Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 588048e5ce07Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 588148e5ce07Smrg prefix_cmds="$SED"~ 588248e5ce07Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 588348e5ce07Smrg prefix_cmds="$prefix_cmds -e 1d"; 588448e5ce07Smrg fi~ 588548e5ce07Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 588648e5ce07Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 588748e5ce07Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 588848e5ce07Smrg emximp -o $lib $output_objdir/$libname.def' 588948e5ce07Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 589048e5ce07Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 589106c34b88Smrg ;; 5892c43cc173Smrg 589306c34b88Smrg osf3*) 589448e5ce07Smrg if test yes = "$GCC"; then 589548e5ce07Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 589648e5ce07Smrg _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' 589706c34b88Smrg else 589806c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 589948e5ce07Smrg _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' 590006c34b88Smrg fi 590106c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 590248e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 590306c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 590406c34b88Smrg ;; 5905c43cc173Smrg 590606c34b88Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 590748e5ce07Smrg if test yes = "$GCC"; then 590848e5ce07Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 590948e5ce07Smrg _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' 591048e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 591106c34b88Smrg else 591206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 591348e5ce07Smrg _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' 591406c34b88Smrg _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~ 591548e5ce07Smrg $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' 591606c34b88Smrg 591706c34b88Smrg # Both c and cxx compiler support -rpath directly 591806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 591906c34b88Smrg fi 592006c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 592106c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 592206c34b88Smrg ;; 592306c34b88Smrg 592406c34b88Smrg solaris*) 592506c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 592648e5ce07Smrg if test yes = "$GCC"; then 592748e5ce07Smrg wlarc='$wl' 592848e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 592906c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 593048e5ce07Smrg $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' 593106c34b88Smrg else 593206c34b88Smrg case `$CC -V 2>&1` in 593306c34b88Smrg *"Compilers 5.0"*) 593406c34b88Smrg wlarc='' 593548e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 593606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 593748e5ce07Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 593806c34b88Smrg ;; 593906c34b88Smrg *) 594048e5ce07Smrg wlarc='$wl' 594148e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 594206c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 594348e5ce07Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 594406c34b88Smrg ;; 594506c34b88Smrg esac 594606c34b88Smrg fi 594706c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 594806c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 594906c34b88Smrg case $host_os in 595006c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 595106c34b88Smrg *) 595206c34b88Smrg # The compiler driver will combine and reorder linker options, 595348e5ce07Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 595406c34b88Smrg # but is careful enough not to reorder. 595506c34b88Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 595648e5ce07Smrg if test yes = "$GCC"; then 595748e5ce07Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 595806c34b88Smrg else 595906c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 596006c34b88Smrg fi 596106c34b88Smrg ;; 596206c34b88Smrg esac 596306c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 596406c34b88Smrg ;; 5965c43cc173Smrg 596606c34b88Smrg sunos4*) 596748e5ce07Smrg if test sequent = "$host_vendor"; then 596806c34b88Smrg # Use $CC to link under sequent, because it throws in some extra .o 596906c34b88Smrg # files that make .init and .fini sections work. 597048e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 597106c34b88Smrg else 597206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 597306c34b88Smrg fi 597406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 597506c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 597606c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 597706c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 597806c34b88Smrg ;; 5979c43cc173Smrg 598006c34b88Smrg sysv4) 598106c34b88Smrg case $host_vendor in 598206c34b88Smrg sni) 598306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 598406c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 598506c34b88Smrg ;; 598606c34b88Smrg siemens) 598706c34b88Smrg ## LD is ld it makes a PLAMLIB 598806c34b88Smrg ## CC just makes a GrossModule. 598906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 599006c34b88Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 599106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 599206c34b88Smrg ;; 599306c34b88Smrg motorola) 599406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 599506c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 599606c34b88Smrg ;; 599706c34b88Smrg esac 599806c34b88Smrg runpath_var='LD_RUN_PATH' 599906c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 600006c34b88Smrg ;; 6001c43cc173Smrg 600206c34b88Smrg sysv4.3*) 600306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 600406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 600506c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 600606c34b88Smrg ;; 6007c43cc173Smrg 600806c34b88Smrg sysv4*MP*) 600906c34b88Smrg if test -d /usr/nec; then 601006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 601106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 601206c34b88Smrg runpath_var=LD_RUN_PATH 601306c34b88Smrg hardcode_runpath_var=yes 601406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 601506c34b88Smrg fi 601606c34b88Smrg ;; 6017c43cc173Smrg 601806c34b88Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 601948e5ce07Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 602006c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 602106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 602206c34b88Smrg runpath_var='LD_RUN_PATH' 6023c43cc173Smrg 602448e5ce07Smrg if test yes = "$GCC"; then 602548e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602648e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602706c34b88Smrg else 602848e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602948e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 603006c34b88Smrg fi 603106c34b88Smrg ;; 6032c43cc173Smrg 603306c34b88Smrg sysv5* | sco3.2v5* | sco5v6*) 603448e5ce07Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 603506c34b88Smrg # link with -lc, and that would cause any symbols used from libc to 603606c34b88Smrg # always be unresolved, which means just about no library would 603706c34b88Smrg # ever link correctly. If we're not using GNU ld we use -z text 603806c34b88Smrg # though, which does catch some bad symbols but isn't as heavy-handed 603906c34b88Smrg # as -z defs. 604048e5ce07Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 604148e5ce07Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 604206c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 604306c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 604448e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 604506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 604606c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 604748e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 604806c34b88Smrg runpath_var='LD_RUN_PATH' 6049c43cc173Smrg 605048e5ce07Smrg if test yes = "$GCC"; then 605148e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605248e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605306c34b88Smrg else 605448e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605548e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605606c34b88Smrg fi 6057c27c18e8Smrg ;; 6058c43cc173Smrg 605906c34b88Smrg uts4*) 606006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 606106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 606206c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 606306c34b88Smrg ;; 6064c27c18e8Smrg 606506c34b88Smrg *) 606606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6067c27c18e8Smrg ;; 6068c27c18e8Smrg esac 6069c43cc173Smrg 607048e5ce07Smrg if test sni = "$host_vendor"; then 607106c34b88Smrg case $host in 607206c34b88Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 607348e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 607406c34b88Smrg ;; 607506c34b88Smrg esac 6076c27c18e8Smrg fi 607706c34b88Smrg fi 6078c27c18e8Smrg]) 607906c34b88SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 608048e5ce07Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6081c43cc173Smrg 608206c34b88Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 608306c34b88Smrg 608406c34b88Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 608506c34b88Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 608606c34b88Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 608706c34b88Smrg [The commands to extract the exported symbol list from a shared archive]) 608806c34b88Smrg 608906c34b88Smrg# 609006c34b88Smrg# Do we need to explicitly link libc? 609106c34b88Smrg# 609206c34b88Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 609306c34b88Smrgx|xyes) 609406c34b88Smrg # Assume -lc should be added 609506c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 609606c34b88Smrg 609748e5ce07Smrg if test yes,yes = "$GCC,$enable_shared"; then 609806c34b88Smrg case $_LT_TAGVAR(archive_cmds, $1) in 609906c34b88Smrg *'~'*) 610006c34b88Smrg # FIXME: we may have to deal with multi-command sequences. 610106c34b88Smrg ;; 610206c34b88Smrg '$CC '*) 610306c34b88Smrg # Test whether the compiler implicitly links with -lc since on some 610406c34b88Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 610506c34b88Smrg # to ld, don't add -lc before -lgcc. 610606c34b88Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 610706c34b88Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 610806c34b88Smrg [$RM conftest* 610906c34b88Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 611006c34b88Smrg 611106c34b88Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 611206c34b88Smrg soname=conftest 611306c34b88Smrg lib=conftest 611406c34b88Smrg libobjs=conftest.$ac_objext 611506c34b88Smrg deplibs= 611606c34b88Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 611706c34b88Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 611806c34b88Smrg compiler_flags=-v 611906c34b88Smrg linker_flags=-v 612006c34b88Smrg verstring= 612106c34b88Smrg output_objdir=. 612206c34b88Smrg libname=conftest 612306c34b88Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 612406c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 612506c34b88Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 612606c34b88Smrg then 612706c34b88Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 612806c34b88Smrg else 612906c34b88Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 613006c34b88Smrg fi 613106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 613206c34b88Smrg else 613306c34b88Smrg cat conftest.err 1>&5 613406c34b88Smrg fi 613506c34b88Smrg $RM conftest* 613606c34b88Smrg ]) 613706c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 613806c34b88Smrg ;; 613906c34b88Smrg esac 614006c34b88Smrg fi 614106c34b88Smrg ;; 614206c34b88Smrgesac 6143c27c18e8Smrg 614406c34b88Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 614506c34b88Smrg [Whether or not to add -lc for building shared libraries]) 614606c34b88Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 614706c34b88Smrg [enable_shared_with_static_runtimes], [0], 614806c34b88Smrg [Whether or not to disallow shared libs when runtime libs are static]) 614906c34b88Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 615006c34b88Smrg [Compiler flag to allow reflexive dlopens]) 615106c34b88Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 615206c34b88Smrg [Compiler flag to generate shared objects directly from archives]) 615306c34b88Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 615406c34b88Smrg [Whether the compiler copes with passing no objects directly]) 615506c34b88Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 615606c34b88Smrg [Create an old-style archive from a shared archive]) 615706c34b88Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 615806c34b88Smrg [Create a temporary old-style archive to link instead of a shared archive]) 615906c34b88Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 616006c34b88Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 616106c34b88Smrg_LT_TAGDECL([], [module_cmds], [2], 616206c34b88Smrg [Commands used to build a loadable module if different from building 616306c34b88Smrg a shared archive.]) 616406c34b88Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 616506c34b88Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 616606c34b88Smrg [Whether we are building with GNU ld or not]) 616706c34b88Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 616806c34b88Smrg [Flag that allows shared libraries with undefined symbols to be built]) 616906c34b88Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 617006c34b88Smrg [Flag that enforces no undefined symbols]) 617106c34b88Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 617206c34b88Smrg [Flag to hardcode $libdir into a binary during linking. 617306c34b88Smrg This must work even if $libdir does not exist]) 617406c34b88Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 617506c34b88Smrg [Whether we need a single "-rpath" flag with a separated argument]) 617606c34b88Smrg_LT_TAGDECL([], [hardcode_direct], [0], 617748e5ce07Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 617806c34b88Smrg DIR into the resulting binary]) 617906c34b88Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 618048e5ce07Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 618106c34b88Smrg DIR into the resulting binary and the resulting library dependency is 618248e5ce07Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 618306c34b88Smrg library is relocated]) 618406c34b88Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 618506c34b88Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 618606c34b88Smrg into the resulting binary]) 618706c34b88Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 618806c34b88Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 618906c34b88Smrg into the resulting binary]) 619006c34b88Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 619106c34b88Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 619206c34b88Smrg into the library and all subsequent libraries and executables linked 619306c34b88Smrg against it]) 619406c34b88Smrg_LT_TAGDECL([], [inherit_rpath], [0], 619506c34b88Smrg [Set to yes if linker adds runtime paths of dependent libraries 619606c34b88Smrg to runtime path list]) 619706c34b88Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 619806c34b88Smrg [Whether libtool must link a program against all its dependency libraries]) 619906c34b88Smrg_LT_TAGDECL([], [always_export_symbols], [0], 620006c34b88Smrg [Set to "yes" if exported symbols are required]) 620106c34b88Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 620206c34b88Smrg [The commands to list exported symbols]) 620306c34b88Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 620406c34b88Smrg [Symbols that should not be listed in the preloaded symbols]) 620506c34b88Smrg_LT_TAGDECL([], [include_expsyms], [1], 620606c34b88Smrg [Symbols that must always be exported]) 620706c34b88Smrg_LT_TAGDECL([], [prelink_cmds], [2], 620806c34b88Smrg [Commands necessary for linking programs (against libraries) with templates]) 620906c34b88Smrg_LT_TAGDECL([], [postlink_cmds], [2], 621006c34b88Smrg [Commands necessary for finishing linking programs]) 621106c34b88Smrg_LT_TAGDECL([], [file_list_spec], [1], 621206c34b88Smrg [Specify filename containing input files]) 621306c34b88Smrgdnl FIXME: Not yet implemented 621406c34b88Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 621506c34b88Smrgdnl [Compiler flag to generate thread safe objects]) 621606c34b88Smrg])# _LT_LINKER_SHLIBS 6217c27c18e8Smrg 6218c43cc173Smrg 621906c34b88Smrg# _LT_LANG_C_CONFIG([TAG]) 622006c34b88Smrg# ------------------------ 622106c34b88Smrg# Ensure that the configuration variables for a C compiler are suitably 622206c34b88Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 622348e5ce07Smrg# the compiler configuration to 'libtool'. 622406c34b88Smrgm4_defun([_LT_LANG_C_CONFIG], 622506c34b88Smrg[m4_require([_LT_DECL_EGREP])dnl 622648e5ce07Smrglt_save_CC=$CC 622706c34b88SmrgAC_LANG_PUSH(C) 6228c43cc173Smrg 622906c34b88Smrg# Source file extension for C test sources. 623006c34b88Smrgac_ext=c 6231c43cc173Smrg 623206c34b88Smrg# Object file extension for compiled C test sources. 6233c27c18e8Smrgobjext=o 6234c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 6235c27c18e8Smrg 623606c34b88Smrg# Code to be used in simple compile tests 623706c34b88Smrglt_simple_compile_test_code="int some_variable = 0;" 6238c43cc173Smrg 623906c34b88Smrg# Code to be used in simple link tests 624006c34b88Smrglt_simple_link_test_code='int main(){return(0);}' 6241c43cc173Smrg 624206c34b88Smrg_LT_TAG_COMPILER 624306c34b88Smrg# Save the default compiler, since it gets overwritten when the other 624406c34b88Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 624506c34b88Smrgcompiler_DEFAULT=$CC 6246c27c18e8Smrg 624706c34b88Smrg# save warnings/boilerplate of simple test code 624806c34b88Smrg_LT_COMPILER_BOILERPLATE 624906c34b88Smrg_LT_LINKER_BOILERPLATE 6250c27c18e8Smrg 625106c34b88Smrgif test -n "$compiler"; then 625206c34b88Smrg _LT_COMPILER_NO_RTTI($1) 625306c34b88Smrg _LT_COMPILER_PIC($1) 625406c34b88Smrg _LT_COMPILER_C_O($1) 625506c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 625606c34b88Smrg _LT_LINKER_SHLIBS($1) 625706c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 625806c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 625906c34b88Smrg LT_SYS_DLOPEN_SELF 626006c34b88Smrg _LT_CMD_STRIPLIB 6261c27c18e8Smrg 626248e5ce07Smrg # Report what library types will actually be built 626306c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 626406c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 6265c27c18e8Smrg 626606c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 626748e5ce07Smrg test no = "$can_build_shared" && enable_shared=no 6268c27c18e8Smrg 626906c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 627006c34b88Smrg # are all built from PIC. 627106c34b88Smrg case $host_os in 627206c34b88Smrg aix3*) 627348e5ce07Smrg test yes = "$enable_shared" && enable_static=no 627406c34b88Smrg if test -n "$RANLIB"; then 627506c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 627606c34b88Smrg postinstall_cmds='$RANLIB $lib' 627706c34b88Smrg fi 627806c34b88Smrg ;; 6279c43cc173Smrg 628006c34b88Smrg aix[[4-9]]*) 628148e5ce07Smrg if test ia64 != "$host_cpu"; then 628248e5ce07Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 628348e5ce07Smrg yes,aix,yes) ;; # shared object as lib.so file only 628448e5ce07Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 628548e5ce07Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 628648e5ce07Smrg esac 628706c34b88Smrg fi 628806c34b88Smrg ;; 628906c34b88Smrg esac 629006c34b88Smrg AC_MSG_RESULT([$enable_shared]) 6291c43cc173Smrg 629206c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 629306c34b88Smrg # Make sure either enable_shared or enable_static is yes. 629448e5ce07Smrg test yes = "$enable_shared" || enable_static=yes 629506c34b88Smrg AC_MSG_RESULT([$enable_static]) 6296c43cc173Smrg 629706c34b88Smrg _LT_CONFIG($1) 629806c34b88Smrgfi 629906c34b88SmrgAC_LANG_POP 630048e5ce07SmrgCC=$lt_save_CC 630106c34b88Smrg])# _LT_LANG_C_CONFIG 630237eb1ca1Smrg 630306c34b88Smrg 630406c34b88Smrg# _LT_LANG_CXX_CONFIG([TAG]) 630506c34b88Smrg# -------------------------- 630606c34b88Smrg# Ensure that the configuration variables for a C++ compiler are suitably 630706c34b88Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 630848e5ce07Smrg# the compiler configuration to 'libtool'. 630906c34b88Smrgm4_defun([_LT_LANG_CXX_CONFIG], 631006c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 631106c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 631206c34b88Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 631348e5ce07Smrgif test -n "$CXX" && ( test no != "$CXX" && 631448e5ce07Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 631548e5ce07Smrg (test g++ != "$CXX"))); then 631606c34b88Smrg AC_PROG_CXXCPP 631706c34b88Smrgelse 631806c34b88Smrg _lt_caught_CXX_error=yes 631937eb1ca1Smrgfi 6320c27c18e8Smrg 632106c34b88SmrgAC_LANG_PUSH(C++) 6322c27c18e8Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6323c27c18e8Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6324c27c18e8Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6325c27c18e8Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 632606c34b88Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6327c27c18e8Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6328c27c18e8Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6329c27c18e8Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6330c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6331c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6332c27c18e8Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 633306c34b88Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6334c27c18e8Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6335c27c18e8Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6336c27c18e8Smrg_LT_TAGVAR(module_cmds, $1)= 6337c27c18e8Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6338c27c18e8Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6339c27c18e8Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 634037eb1ca1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 634137eb1ca1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6342c27c18e8Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6343c27c18e8Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6344c27c18e8Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6345c27c18e8Smrg 634606c34b88Smrg# Source file extension for C++ test sources. 634706c34b88Smrgac_ext=cpp 6348c27c18e8Smrg 634906c34b88Smrg# Object file extension for compiled C++ test sources. 6350c27c18e8Smrgobjext=o 6351c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 6352c27c18e8Smrg 6353c27c18e8Smrg# No sense in running all these tests if we already determined that 635406c34b88Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6355c27c18e8Smrg# are currently assumed to apply to all compilers on this platform, 6356c27c18e8Smrg# and will be corrupted by setting them based on a non-working compiler. 635748e5ce07Smrgif test yes != "$_lt_caught_CXX_error"; then 6358c27c18e8Smrg # Code to be used in simple compile tests 635906c34b88Smrg lt_simple_compile_test_code="int some_variable = 0;" 6360c43cc173Smrg 6361c27c18e8Smrg # Code to be used in simple link tests 636206c34b88Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6363c43cc173Smrg 6364c27c18e8Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6365c27c18e8Smrg _LT_TAG_COMPILER 6366c43cc173Smrg 6367c27c18e8Smrg # save warnings/boilerplate of simple test code 6368c27c18e8Smrg _LT_COMPILER_BOILERPLATE 6369c27c18e8Smrg _LT_LINKER_BOILERPLATE 6370c43cc173Smrg 6371c27c18e8Smrg # Allow CC to be a program name with arguments. 637206c34b88Smrg lt_save_CC=$CC 6373b789ec8aSmrg lt_save_CFLAGS=$CFLAGS 637406c34b88Smrg lt_save_LD=$LD 637506c34b88Smrg lt_save_GCC=$GCC 637606c34b88Smrg GCC=$GXX 637706c34b88Smrg lt_save_with_gnu_ld=$with_gnu_ld 637806c34b88Smrg lt_save_path_LD=$lt_cv_path_LD 637906c34b88Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 638006c34b88Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 638106c34b88Smrg else 638206c34b88Smrg $as_unset lt_cv_prog_gnu_ld 638306c34b88Smrg fi 638406c34b88Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 638506c34b88Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 638606c34b88Smrg else 638706c34b88Smrg $as_unset lt_cv_path_LD 638806c34b88Smrg fi 638906c34b88Smrg test -z "${LDCXX+set}" || LD=$LDCXX 639006c34b88Smrg CC=${CXX-"c++"} 639106c34b88Smrg CFLAGS=$CXXFLAGS 6392c27c18e8Smrg compiler=$CC 6393c27c18e8Smrg _LT_TAGVAR(compiler, $1)=$CC 6394c27c18e8Smrg _LT_CC_BASENAME([$compiler]) 6395c27c18e8Smrg 6396c27c18e8Smrg if test -n "$compiler"; then 639706c34b88Smrg # We don't want -fno-exception when compiling C++ code, so set the 639806c34b88Smrg # no_builtin_flag separately 639948e5ce07Smrg if test yes = "$GXX"; then 640006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 640106c34b88Smrg else 640206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 640306c34b88Smrg fi 6404c27c18e8Smrg 640548e5ce07Smrg if test yes = "$GXX"; then 640606c34b88Smrg # Set up default GNU C++ configuration 6407c27c18e8Smrg 640806c34b88Smrg LT_PATH_LD 640906c34b88Smrg 641006c34b88Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 641106c34b88Smrg # archiving commands below assume that GNU ld is being used. 641248e5ce07Smrg if test yes = "$with_gnu_ld"; then 641348e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 641448e5ce07Smrg _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' 641506c34b88Smrg 641648e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 641748e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 641806c34b88Smrg 641906c34b88Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 642006c34b88Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 642106c34b88Smrg # investigate it a little bit more. (MM) 642248e5ce07Smrg wlarc='$wl' 642306c34b88Smrg 642406c34b88Smrg # ancient GNU ld didn't support --whole-archive et. al. 642506c34b88Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 642606c34b88Smrg $GREP 'no-whole-archive' > /dev/null; then 642748e5ce07Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 642806c34b88Smrg else 642906c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 643006c34b88Smrg fi 643106c34b88Smrg else 643206c34b88Smrg with_gnu_ld=no 643306c34b88Smrg wlarc= 643406c34b88Smrg 643506c34b88Smrg # A generic and very simple default shared library creation 643606c34b88Smrg # command for GNU C++ for the case where it uses the native 643706c34b88Smrg # linker, instead of GNU ld. If possible, this setting should 643806c34b88Smrg # overridden to take advantage of the native linker features on 643906c34b88Smrg # the platform it is being used on. 644006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 644106c34b88Smrg fi 644206c34b88Smrg 644306c34b88Smrg # Commands to make compiler produce verbose output that lists 644406c34b88Smrg # what "hidden" libraries, object files and flags are used when 644506c34b88Smrg # linking a shared library. 644606c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 644706c34b88Smrg 644806c34b88Smrg else 644906c34b88Smrg GXX=no 645006c34b88Smrg with_gnu_ld=no 645106c34b88Smrg wlarc= 645206c34b88Smrg fi 645306c34b88Smrg 645406c34b88Smrg # PORTME: fill in a description of your system's C++ link characteristics 645506c34b88Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 645606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6457c43cc173Smrg case $host_os in 6458c27c18e8Smrg aix3*) 645906c34b88Smrg # FIXME: insert proper C++ library support 646006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6461c27c18e8Smrg ;; 646221e67964Smrg aix[[4-9]]*) 646348e5ce07Smrg if test ia64 = "$host_cpu"; then 646406c34b88Smrg # On IA64, the linker does run time linking by default, so we don't 646506c34b88Smrg # have to do anything special. 646606c34b88Smrg aix_use_runtimelinking=no 646706c34b88Smrg exp_sym_flag='-Bexport' 646848e5ce07Smrg no_entry_flag= 646906c34b88Smrg else 647006c34b88Smrg aix_use_runtimelinking=no 6471c27c18e8Smrg 647206c34b88Smrg # Test if we are trying to use run time linking or normal 647306c34b88Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 647448e5ce07Smrg # have runtime linking enabled, and use it for executables. 647548e5ce07Smrg # For shared libraries, we enable/disable runtime linking 647648e5ce07Smrg # depending on the kind of the shared library created - 647748e5ce07Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 647848e5ce07Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 647948e5ce07Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 648048e5ce07Smrg # lib.a static archive 648148e5ce07Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 648248e5ce07Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 648348e5ce07Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 648448e5ce07Smrg # lib.a(lib.so.V) shared, rtl:no 648548e5ce07Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 648648e5ce07Smrg # lib.a static archive 648706c34b88Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 648806c34b88Smrg for ld_flag in $LDFLAGS; do 648906c34b88Smrg case $ld_flag in 649006c34b88Smrg *-brtl*) 649106c34b88Smrg aix_use_runtimelinking=yes 649206c34b88Smrg break 649306c34b88Smrg ;; 649406c34b88Smrg esac 649506c34b88Smrg done 649648e5ce07Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 649748e5ce07Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 649848e5ce07Smrg # so we don't have lib.a shared libs to link our executables. 649948e5ce07Smrg # We have to force runtime linking in this case. 650048e5ce07Smrg aix_use_runtimelinking=yes 650148e5ce07Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 650248e5ce07Smrg fi 650306c34b88Smrg ;; 650406c34b88Smrg esac 6505c27c18e8Smrg 650606c34b88Smrg exp_sym_flag='-bexport' 650706c34b88Smrg no_entry_flag='-bnoentry' 650806c34b88Smrg fi 6509c27c18e8Smrg 651006c34b88Smrg # When large executables or shared objects are built, AIX ld can 651106c34b88Smrg # have problems creating the table of contents. If linking a library 651206c34b88Smrg # or program results in "error TOC overflow" add -mminimal-toc to 651306c34b88Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 651406c34b88Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6515c27c18e8Smrg 651606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='' 651706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 651806c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 651906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 652006c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 652148e5ce07Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 652248e5ce07Smrg case $with_aix_soname,$aix_use_runtimelinking in 652348e5ce07Smrg aix,*) ;; # no import file 652448e5ce07Smrg svr4,* | *,yes) # use import file 652548e5ce07Smrg # The Import File defines what to hardcode. 652648e5ce07Smrg _LT_TAGVAR(hardcode_direct, $1)=no 652748e5ce07Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 652848e5ce07Smrg ;; 652948e5ce07Smrg esac 6530c27c18e8Smrg 653148e5ce07Smrg if test yes = "$GXX"; then 653206c34b88Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 653306c34b88Smrg # We only want to do this on AIX 4.2 and lower, the check 653406c34b88Smrg # below for broken collect2 doesn't work under 4.3+ 653548e5ce07Smrg collect2name=`$CC -print-prog-name=collect2` 653606c34b88Smrg if test -f "$collect2name" && 653706c34b88Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 653806c34b88Smrg then 653906c34b88Smrg # We have reworked collect2 654006c34b88Smrg : 654106c34b88Smrg else 654206c34b88Smrg # We have old collect2 654306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 654406c34b88Smrg # It fails to find uninstalled libraries when the uninstalled 654506c34b88Smrg # path is not listed in the libpath. Setting hardcode_minus_L 654606c34b88Smrg # to unsupported forces relinking 654706c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 654806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 654906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 655006c34b88Smrg fi 655106c34b88Smrg esac 655206c34b88Smrg shared_flag='-shared' 655348e5ce07Smrg if test yes = "$aix_use_runtimelinking"; then 655448e5ce07Smrg shared_flag=$shared_flag' $wl-G' 655506c34b88Smrg fi 655648e5ce07Smrg # Need to ensure runtime linking is disabled for the traditional 655748e5ce07Smrg # shared library, or the linker may eventually find shared libraries 655848e5ce07Smrg # /with/ Import File - we do not want to mix them. 655948e5ce07Smrg shared_flag_aix='-shared' 656048e5ce07Smrg shared_flag_svr4='-shared $wl-G' 656106c34b88Smrg else 656206c34b88Smrg # not using gcc 656348e5ce07Smrg if test ia64 = "$host_cpu"; then 656406c34b88Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 656506c34b88Smrg # chokes on -Wl,-G. The following line is correct: 656606c34b88Smrg shared_flag='-G' 656706c34b88Smrg else 656848e5ce07Smrg if test yes = "$aix_use_runtimelinking"; then 656948e5ce07Smrg shared_flag='$wl-G' 657006c34b88Smrg else 657148e5ce07Smrg shared_flag='$wl-bM:SRE' 657206c34b88Smrg fi 657348e5ce07Smrg shared_flag_aix='$wl-bM:SRE' 657448e5ce07Smrg shared_flag_svr4='$wl-G' 657506c34b88Smrg fi 657606c34b88Smrg fi 657721e67964Smrg 657848e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 657906c34b88Smrg # It seems that -bexpall does not export symbols beginning with 658006c34b88Smrg # underscore (_), so it is better to generate a list of symbols to 658106c34b88Smrg # export. 658206c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 658348e5ce07Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 658406c34b88Smrg # Warning - without using the other runtime loading flags (-brtl), 658506c34b88Smrg # -berok will link without error, but may produce a broken library. 658648e5ce07Smrg # The "-G" linker flag allows undefined symbols. 658748e5ce07Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 658806c34b88Smrg # Determine the default libpath from the value encoded in an empty 658906c34b88Smrg # executable. 659006c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 659148e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 659221e67964Smrg 659348e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 659406c34b88Smrg else 659548e5ce07Smrg if test ia64 = "$host_cpu"; then 659648e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 659706c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 659848e5ce07Smrg _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" 659906c34b88Smrg else 660006c34b88Smrg # Determine the default libpath from the value encoded in an 660106c34b88Smrg # empty executable. 660206c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 660348e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 660406c34b88Smrg # Warning - without using the other run time loading flags, 660506c34b88Smrg # -berok will link without error, but may produce a broken library. 660648e5ce07Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 660748e5ce07Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 660848e5ce07Smrg if test yes = "$with_gnu_ld"; then 660906c34b88Smrg # We only use this code for GNU lds that support --whole-archive. 661048e5ce07Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 661106c34b88Smrg else 661206c34b88Smrg # Exported symbols can be pulled into shared objects from archives 661306c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 661406c34b88Smrg fi 661506c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 661648e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 661748e5ce07Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 661848e5ce07Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 661948e5ce07Smrg if test svr4 != "$with_aix_soname"; then 662048e5ce07Smrg # This is similar to how AIX traditionally builds its shared 662148e5ce07Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 662248e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 662348e5ce07Smrg fi 662448e5ce07Smrg if test aix != "$with_aix_soname"; then 662548e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 662648e5ce07Smrg else 662748e5ce07Smrg # used by -dlpreopen to get the symbols 662848e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 662948e5ce07Smrg fi 663048e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 663106c34b88Smrg fi 663206c34b88Smrg fi 663306c34b88Smrg ;; 663421e67964Smrg 663506c34b88Smrg beos*) 663606c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 663706c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 663806c34b88Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 663906c34b88Smrg # support --undefined. This deserves some investigation. FIXME 664048e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 664106c34b88Smrg else 664206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 664306c34b88Smrg fi 664406c34b88Smrg ;; 664521e67964Smrg 664606c34b88Smrg chorus*) 664706c34b88Smrg case $cc_basename in 664806c34b88Smrg *) 664906c34b88Smrg # FIXME: insert proper C++ library support 665006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 665106c34b88Smrg ;; 665206c34b88Smrg esac 665306c34b88Smrg ;; 6654c27c18e8Smrg 665506c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 665606c34b88Smrg case $GXX,$cc_basename in 665706c34b88Smrg ,cl* | no,cl*) 665806c34b88Smrg # Native MSVC 665906c34b88Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 666006c34b88Smrg # no search path for DLLs. 666106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 666206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 666306c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 666406c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='@' 666506c34b88Smrg # Tell ltmain to make .lib files, not .a files. 666606c34b88Smrg libext=lib 666706c34b88Smrg # Tell ltmain to make .dll files, not .so files. 666848e5ce07Smrg shrext_cmds=.dll 666906c34b88Smrg # FIXME: Setting linknames here is a bad hack. 667048e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 667148e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 667248e5ce07Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 667348e5ce07Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 667448e5ce07Smrg else 667548e5ce07Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 667648e5ce07Smrg fi~ 667748e5ce07Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 667848e5ce07Smrg linknames=' 667906c34b88Smrg # The linker will not automatically build a static lib if we build a DLL. 668006c34b88Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 668106c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 668206c34b88Smrg # Don't use ranlib 668306c34b88Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 668406c34b88Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 668548e5ce07Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 668648e5ce07Smrg case $lt_outputfile in 668748e5ce07Smrg *.exe|*.EXE) ;; 668848e5ce07Smrg *) 668948e5ce07Smrg lt_outputfile=$lt_outputfile.exe 669048e5ce07Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 669148e5ce07Smrg ;; 669248e5ce07Smrg esac~ 669348e5ce07Smrg func_to_tool_file "$lt_outputfile"~ 669448e5ce07Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 669548e5ce07Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 669648e5ce07Smrg $RM "$lt_outputfile.manifest"; 669748e5ce07Smrg fi' 669806c34b88Smrg ;; 669906c34b88Smrg *) 670006c34b88Smrg # g++ 670106c34b88Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 670206c34b88Smrg # as there is no search path for DLLs. 670306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 670448e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 670506c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 670606c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 670706c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6708c27c18e8Smrg 670906c34b88Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 671048e5ce07Smrg _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' 671148e5ce07Smrg # If the export-symbols file already is a .def file, use it as 671248e5ce07Smrg # is; otherwise, prepend EXPORTS... 671348e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 671448e5ce07Smrg cp $export_symbols $output_objdir/$soname.def; 671548e5ce07Smrg else 671648e5ce07Smrg echo EXPORTS > $output_objdir/$soname.def; 671748e5ce07Smrg cat $export_symbols >> $output_objdir/$soname.def; 671848e5ce07Smrg fi~ 671948e5ce07Smrg $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' 672006c34b88Smrg else 672106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 672206c34b88Smrg fi 672306c34b88Smrg ;; 672406c34b88Smrg esac 672506c34b88Smrg ;; 672606c34b88Smrg darwin* | rhapsody*) 672706c34b88Smrg _LT_DARWIN_LINKER_FEATURES($1) 672806c34b88Smrg ;; 6729c27c18e8Smrg 673048e5ce07Smrg os2*) 673148e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 673248e5ce07Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 673348e5ce07Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 673448e5ce07Smrg shrext_cmds=.dll 673548e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 673648e5ce07Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 673748e5ce07Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 673848e5ce07Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 673948e5ce07Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 674048e5ce07Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 674148e5ce07Smrg emximp -o $lib $output_objdir/$libname.def' 674248e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 674348e5ce07Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 674448e5ce07Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 674548e5ce07Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 674648e5ce07Smrg prefix_cmds="$SED"~ 674748e5ce07Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 674848e5ce07Smrg prefix_cmds="$prefix_cmds -e 1d"; 674948e5ce07Smrg fi~ 675048e5ce07Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 675148e5ce07Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 675248e5ce07Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 675348e5ce07Smrg emximp -o $lib $output_objdir/$libname.def' 675448e5ce07Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 675548e5ce07Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 675648e5ce07Smrg ;; 675748e5ce07Smrg 675806c34b88Smrg dgux*) 675906c34b88Smrg case $cc_basename in 676006c34b88Smrg ec++*) 676106c34b88Smrg # FIXME: insert proper C++ library support 676206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 676306c34b88Smrg ;; 676406c34b88Smrg ghcx*) 676506c34b88Smrg # Green Hills C++ Compiler 676606c34b88Smrg # FIXME: insert proper C++ library support 676706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 676806c34b88Smrg ;; 676906c34b88Smrg *) 677006c34b88Smrg # FIXME: insert proper C++ library support 677106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 677206c34b88Smrg ;; 677306c34b88Smrg esac 677406c34b88Smrg ;; 6775c27c18e8Smrg 677606c34b88Smrg freebsd2.*) 677706c34b88Smrg # C++ shared libraries reported to be fairly broken before 677806c34b88Smrg # switch to ELF 677906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 678006c34b88Smrg ;; 6781c27c18e8Smrg 678206c34b88Smrg freebsd-elf*) 678306c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 678406c34b88Smrg ;; 6785c27c18e8Smrg 678606c34b88Smrg freebsd* | dragonfly*) 678706c34b88Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 678806c34b88Smrg # conventions 678906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 679006c34b88Smrg ;; 6791c27c18e8Smrg 679206c34b88Smrg haiku*) 679348e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 679406c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 679506c34b88Smrg ;; 6796c27c18e8Smrg 679706c34b88Smrg hpux9*) 679848e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 679906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 680048e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 680106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 680206c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 680306c34b88Smrg # but as the default 680406c34b88Smrg # location of the library. 6805c27c18e8Smrg 680606c34b88Smrg case $cc_basename in 680706c34b88Smrg CC*) 680806c34b88Smrg # FIXME: insert proper C++ library support 680906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 681006c34b88Smrg ;; 681106c34b88Smrg aCC*) 681248e5ce07Smrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 681306c34b88Smrg # Commands to make compiler produce verbose output that lists 681406c34b88Smrg # what "hidden" libraries, object files and flags are used when 681506c34b88Smrg # linking a shared library. 681606c34b88Smrg # 681706c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 681806c34b88Smrg # explicitly linking system object files so we need to strip them 681906c34b88Smrg # from the output so that they don't get included in the library 682006c34b88Smrg # dependencies. 682148e5ce07Smrg 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"' 682206c34b88Smrg ;; 682306c34b88Smrg *) 682448e5ce07Smrg if test yes = "$GXX"; then 682548e5ce07Smrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 682606c34b88Smrg else 682706c34b88Smrg # FIXME: insert proper C++ library support 682806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 682906c34b88Smrg fi 683006c34b88Smrg ;; 683106c34b88Smrg esac 683206c34b88Smrg ;; 6833c27c18e8Smrg 683406c34b88Smrg hpux10*|hpux11*) 683548e5ce07Smrg if test no = "$with_gnu_ld"; then 683648e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 683706c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6838c27c18e8Smrg 683906c34b88Smrg case $host_cpu in 684006c34b88Smrg hppa*64*|ia64*) 684106c34b88Smrg ;; 684206c34b88Smrg *) 684348e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 684406c34b88Smrg ;; 684506c34b88Smrg esac 684606c34b88Smrg fi 684706c34b88Smrg case $host_cpu in 684806c34b88Smrg hppa*64*|ia64*) 684906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 685006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 685106c34b88Smrg ;; 685206c34b88Smrg *) 685306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 685406c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 685506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 685606c34b88Smrg # but as the default 685706c34b88Smrg # location of the library. 685806c34b88Smrg ;; 685906c34b88Smrg esac 6860c27c18e8Smrg 686106c34b88Smrg case $cc_basename in 686206c34b88Smrg CC*) 686306c34b88Smrg # FIXME: insert proper C++ library support 686406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 686506c34b88Smrg ;; 686606c34b88Smrg aCC*) 686706c34b88Smrg case $host_cpu in 686806c34b88Smrg hppa*64*) 686948e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 687006c34b88Smrg ;; 687106c34b88Smrg ia64*) 687248e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 687306c34b88Smrg ;; 687406c34b88Smrg *) 687548e5ce07Smrg _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' 687606c34b88Smrg ;; 687706c34b88Smrg esac 687806c34b88Smrg # Commands to make compiler produce verbose output that lists 687906c34b88Smrg # what "hidden" libraries, object files and flags are used when 688006c34b88Smrg # linking a shared library. 688106c34b88Smrg # 688206c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 688306c34b88Smrg # explicitly linking system object files so we need to strip them 688406c34b88Smrg # from the output so that they don't get included in the library 688506c34b88Smrg # dependencies. 688648e5ce07Smrg 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"' 688706c34b88Smrg ;; 688806c34b88Smrg *) 688948e5ce07Smrg if test yes = "$GXX"; then 689048e5ce07Smrg if test no = "$with_gnu_ld"; then 689106c34b88Smrg case $host_cpu in 689206c34b88Smrg hppa*64*) 689348e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 689406c34b88Smrg ;; 689506c34b88Smrg ia64*) 689648e5ce07Smrg _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' 689706c34b88Smrg ;; 689806c34b88Smrg *) 689948e5ce07Smrg _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' 690006c34b88Smrg ;; 690106c34b88Smrg esac 690206c34b88Smrg fi 690306c34b88Smrg else 690406c34b88Smrg # FIXME: insert proper C++ library support 690506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 690606c34b88Smrg fi 690706c34b88Smrg ;; 690806c34b88Smrg esac 690906c34b88Smrg ;; 6910c27c18e8Smrg 691106c34b88Smrg interix[[3-9]]*) 691206c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 691306c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 691448e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 691548e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 691606c34b88Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 691706c34b88Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 691806c34b88Smrg # default) and relocated if they conflict, which is a slow very memory 691906c34b88Smrg # consuming and fragmenting process. To avoid this, we pick a random, 692006c34b88Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 692106c34b88Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 692248e5ce07Smrg _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' 692348e5ce07Smrg _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' 692406c34b88Smrg ;; 692506c34b88Smrg irix5* | irix6*) 692606c34b88Smrg case $cc_basename in 692706c34b88Smrg CC*) 692806c34b88Smrg # SGI C++ 692948e5ce07Smrg _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' 6930f1ee322dSmrg 693106c34b88Smrg # Archives containing C++ object files must be created using 693206c34b88Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 693306c34b88Smrg # necessary to make sure instantiated templates are included 693406c34b88Smrg # in the archive. 693506c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 693606c34b88Smrg ;; 693706c34b88Smrg *) 693848e5ce07Smrg if test yes = "$GXX"; then 693948e5ce07Smrg if test no = "$with_gnu_ld"; then 694048e5ce07Smrg _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' 694106c34b88Smrg else 694248e5ce07Smrg _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' 694306c34b88Smrg fi 694406c34b88Smrg fi 694506c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 694606c34b88Smrg ;; 694706c34b88Smrg esac 694848e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 694906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 695006c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 695106c34b88Smrg ;; 6952f1ee322dSmrg 695344584a44Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 695406c34b88Smrg case $cc_basename in 695506c34b88Smrg KCC*) 695606c34b88Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6957f1ee322dSmrg 695806c34b88Smrg # KCC will only create a shared library if the output file 695906c34b88Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 696006c34b88Smrg # to its proper name (with version) after linking. 696148e5ce07Smrg _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' 696248e5ce07Smrg _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' 696306c34b88Smrg # Commands to make compiler produce verbose output that lists 696406c34b88Smrg # what "hidden" libraries, object files and flags are used when 696506c34b88Smrg # linking a shared library. 696606c34b88Smrg # 696706c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 696806c34b88Smrg # explicitly linking system object files so we need to strip them 696906c34b88Smrg # from the output so that they don't get included in the library 697006c34b88Smrg # dependencies. 697148e5ce07Smrg 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"' 6972f1ee322dSmrg 697348e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 697448e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6975f1ee322dSmrg 697606c34b88Smrg # Archives containing C++ object files must be created using 697706c34b88Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 697806c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 697906c34b88Smrg ;; 698006c34b88Smrg icpc* | ecpc* ) 698106c34b88Smrg # Intel C++ 698206c34b88Smrg with_gnu_ld=yes 698306c34b88Smrg # version 8.0 and above of icpc choke on multiply defined symbols 698406c34b88Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 698506c34b88Smrg # earlier do not add the objects themselves. 698606c34b88Smrg case `$CC -V 2>&1` in 698706c34b88Smrg *"Version 7."*) 698848e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 698948e5ce07Smrg _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' 699006c34b88Smrg ;; 699106c34b88Smrg *) # Version 8.0 or newer 699206c34b88Smrg tmp_idyn= 699306c34b88Smrg case $host_cpu in 699406c34b88Smrg ia64*) tmp_idyn=' -i_dynamic';; 699506c34b88Smrg esac 699648e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 699748e5ce07Smrg _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' 699806c34b88Smrg ;; 699906c34b88Smrg esac 700006c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 700148e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 700248e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 700348e5ce07Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 700406c34b88Smrg ;; 700506c34b88Smrg pgCC* | pgcpp*) 700606c34b88Smrg # Portland Group C++ compiler 700706c34b88Smrg case `$CC -V` in 700806c34b88Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 700906c34b88Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 701048e5ce07Smrg rm -rf $tpldir~ 701148e5ce07Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 701248e5ce07Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 701306c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 701448e5ce07Smrg rm -rf $tpldir~ 701548e5ce07Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 701648e5ce07Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 701748e5ce07Smrg $RANLIB $oldlib' 701806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 701948e5ce07Smrg rm -rf $tpldir~ 702048e5ce07Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 702148e5ce07Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 702206c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 702348e5ce07Smrg rm -rf $tpldir~ 702448e5ce07Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 702548e5ce07Smrg $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' 702606c34b88Smrg ;; 702706c34b88Smrg *) # Version 6 and above use weak symbols 702848e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 702948e5ce07Smrg _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' 703006c34b88Smrg ;; 703106c34b88Smrg esac 7032f1ee322dSmrg 703348e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 703448e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 703548e5ce07Smrg _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' 703606c34b88Smrg ;; 703706c34b88Smrg cxx*) 703806c34b88Smrg # Compaq C++ 703948e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 704048e5ce07Smrg _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' 7041f1ee322dSmrg 704206c34b88Smrg runpath_var=LD_RUN_PATH 704306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 704406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7045f1ee322dSmrg 704606c34b88Smrg # Commands to make compiler produce verbose output that lists 704706c34b88Smrg # what "hidden" libraries, object files and flags are used when 704806c34b88Smrg # linking a shared library. 704906c34b88Smrg # 705006c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 705106c34b88Smrg # explicitly linking system object files so we need to strip them 705206c34b88Smrg # from the output so that they don't get included in the library 705306c34b88Smrg # dependencies. 705448e5ce07Smrg 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' 705506c34b88Smrg ;; 705606c34b88Smrg xl* | mpixl* | bgxl*) 705706c34b88Smrg # IBM XL 8.0 on PPC, with GNU ld 705848e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 705948e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 706048e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 706148e5ce07Smrg if test yes = "$supports_anon_versioning"; then 706206c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 706348e5ce07Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 706448e5ce07Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 706548e5ce07Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 706606c34b88Smrg fi 706706c34b88Smrg ;; 706806c34b88Smrg *) 706906c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 707006c34b88Smrg *Sun\ C*) 707106c34b88Smrg # Sun C++ 5.9 707206c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 707348e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 707448e5ce07Smrg _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' 707506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 707648e5ce07Smrg _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' 707706c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7078f1ee322dSmrg 707906c34b88Smrg # Not sure whether something based on 708006c34b88Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 708106c34b88Smrg # would be better. 708206c34b88Smrg output_verbose_link_cmd='func_echo_all' 7083f1ee322dSmrg 708406c34b88Smrg # Archives containing C++ object files must be created using 708506c34b88Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 708606c34b88Smrg # necessary to make sure instantiated templates are included 708706c34b88Smrg # in the archive. 708806c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 708906c34b88Smrg ;; 709006c34b88Smrg esac 709106c34b88Smrg ;; 709206c34b88Smrg esac 709306c34b88Smrg ;; 7094f1ee322dSmrg 709506c34b88Smrg lynxos*) 709606c34b88Smrg # FIXME: insert proper C++ library support 709706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 709806c34b88Smrg ;; 7099f1ee322dSmrg 710006c34b88Smrg m88k*) 710106c34b88Smrg # FIXME: insert proper C++ library support 710206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 710306c34b88Smrg ;; 7104f1ee322dSmrg 710506c34b88Smrg mvs*) 710606c34b88Smrg case $cc_basename in 710706c34b88Smrg cxx*) 710806c34b88Smrg # FIXME: insert proper C++ library support 710906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 711006c34b88Smrg ;; 711106c34b88Smrg *) 711206c34b88Smrg # FIXME: insert proper C++ library support 711306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 711406c34b88Smrg ;; 711506c34b88Smrg esac 711606c34b88Smrg ;; 7117f1ee322dSmrg 711806c34b88Smrg netbsd*) 711906c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 712006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 712106c34b88Smrg wlarc= 712206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 712306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 712406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 712506c34b88Smrg fi 712606c34b88Smrg # Workaround some broken pre-1.5 toolchains 712706c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 712806c34b88Smrg ;; 7129f1ee322dSmrg 713006c34b88Smrg *nto* | *qnx*) 713106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 713206c34b88Smrg ;; 7133c27c18e8Smrg 713448e5ce07Smrg openbsd* | bitrig*) 713506c34b88Smrg if test -f /usr/libexec/ld.so; then 713606c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 713706c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 713806c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 713906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 714048e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 714148e5ce07Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 714248e5ce07Smrg _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' 714348e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 714448e5ce07Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 714506c34b88Smrg fi 714606c34b88Smrg output_verbose_link_cmd=func_echo_all 714706c34b88Smrg else 714806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 714906c34b88Smrg fi 715006c34b88Smrg ;; 715121e67964Smrg 715206c34b88Smrg osf3* | osf4* | osf5*) 715306c34b88Smrg case $cc_basename in 715406c34b88Smrg KCC*) 715506c34b88Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 715621e67964Smrg 715706c34b88Smrg # KCC will only create a shared library if the output file 715806c34b88Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 715906c34b88Smrg # to its proper name (with version) after linking. 716048e5ce07Smrg _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' 716121e67964Smrg 716248e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 716306c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 716421e67964Smrg 716506c34b88Smrg # Archives containing C++ object files must be created using 716606c34b88Smrg # the KAI C++ compiler. 716706c34b88Smrg case $host in 716806c34b88Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 716906c34b88Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 717006c34b88Smrg esac 717106c34b88Smrg ;; 717206c34b88Smrg RCC*) 717306c34b88Smrg # Rational C++ 2.4.1 717406c34b88Smrg # FIXME: insert proper C++ library support 717506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 717606c34b88Smrg ;; 717706c34b88Smrg cxx*) 717806c34b88Smrg case $host in 717906c34b88Smrg osf3*) 718048e5ce07Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 718148e5ce07Smrg _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' 718248e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 718306c34b88Smrg ;; 718406c34b88Smrg *) 718506c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 718648e5ce07Smrg _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' 718706c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 718848e5ce07Smrg echo "-hidden">> $lib.exp~ 718948e5ce07Smrg $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~ 719048e5ce07Smrg $RM $lib.exp' 719106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 719206c34b88Smrg ;; 719306c34b88Smrg esac 719421e67964Smrg 719506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 719621e67964Smrg 719706c34b88Smrg # Commands to make compiler produce verbose output that lists 719806c34b88Smrg # what "hidden" libraries, object files and flags are used when 719906c34b88Smrg # linking a shared library. 720006c34b88Smrg # 720106c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 720206c34b88Smrg # explicitly linking system object files so we need to strip them 720306c34b88Smrg # from the output so that they don't get included in the library 720406c34b88Smrg # dependencies. 720548e5ce07Smrg 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"' 720606c34b88Smrg ;; 720706c34b88Smrg *) 720848e5ce07Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 720948e5ce07Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 721006c34b88Smrg case $host in 721106c34b88Smrg osf3*) 721248e5ce07Smrg _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' 721306c34b88Smrg ;; 721406c34b88Smrg *) 721548e5ce07Smrg _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' 721606c34b88Smrg ;; 721706c34b88Smrg esac 721821e67964Smrg 721948e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 722006c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 722121e67964Smrg 722206c34b88Smrg # Commands to make compiler produce verbose output that lists 722306c34b88Smrg # what "hidden" libraries, object files and flags are used when 722406c34b88Smrg # linking a shared library. 722506c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 722621e67964Smrg 722706c34b88Smrg else 722806c34b88Smrg # FIXME: insert proper C++ library support 722906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 723006c34b88Smrg fi 723106c34b88Smrg ;; 723206c34b88Smrg esac 723306c34b88Smrg ;; 723421e67964Smrg 723506c34b88Smrg psos*) 723606c34b88Smrg # FIXME: insert proper C++ library support 723706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 723806c34b88Smrg ;; 723921e67964Smrg 724006c34b88Smrg sunos4*) 724106c34b88Smrg case $cc_basename in 724206c34b88Smrg CC*) 724306c34b88Smrg # Sun C++ 4.x 724406c34b88Smrg # FIXME: insert proper C++ library support 724506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 724606c34b88Smrg ;; 724706c34b88Smrg lcc*) 724806c34b88Smrg # Lucid 724906c34b88Smrg # FIXME: insert proper C++ library support 725006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 725106c34b88Smrg ;; 725206c34b88Smrg *) 725306c34b88Smrg # FIXME: insert proper C++ library support 725406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 725506c34b88Smrg ;; 725606c34b88Smrg esac 725706c34b88Smrg ;; 725821e67964Smrg 725906c34b88Smrg solaris*) 726006c34b88Smrg case $cc_basename in 726106c34b88Smrg CC* | sunCC*) 726206c34b88Smrg # Sun C++ 4.2, 5.x and Centerline C++ 726306c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 726406c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 726548e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 726606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 726748e5ce07Smrg $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' 7268f1ee322dSmrg 726906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 727006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 727106c34b88Smrg case $host_os in 727206c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 727306c34b88Smrg *) 727406c34b88Smrg # The compiler driver will combine and reorder linker options, 727548e5ce07Smrg # but understands '-z linker_flag'. 727606c34b88Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 727706c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 727806c34b88Smrg ;; 727906c34b88Smrg esac 728006c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7281f1ee322dSmrg 728206c34b88Smrg output_verbose_link_cmd='func_echo_all' 728321e67964Smrg 728406c34b88Smrg # Archives containing C++ object files must be created using 728506c34b88Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 728606c34b88Smrg # necessary to make sure instantiated templates are included 728706c34b88Smrg # in the archive. 728806c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 728906c34b88Smrg ;; 729006c34b88Smrg gcx*) 729106c34b88Smrg # Green Hills C++ Compiler 729248e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 729321e67964Smrg 729406c34b88Smrg # The C++ compiler must be used to create the archive. 729506c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 729606c34b88Smrg ;; 729706c34b88Smrg *) 729806c34b88Smrg # GNU C++ compiler with Solaris linker 729948e5ce07Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 730048e5ce07Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 730106c34b88Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 730248e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 730306c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 730448e5ce07Smrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 730521e67964Smrg 730606c34b88Smrg # Commands to make compiler produce verbose output that lists 730706c34b88Smrg # what "hidden" libraries, object files and flags are used when 730806c34b88Smrg # linking a shared library. 730906c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 731006c34b88Smrg else 731148e5ce07Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 731206c34b88Smrg # platform. 731348e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 731406c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 731548e5ce07Smrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 731621e67964Smrg 731706c34b88Smrg # Commands to make compiler produce verbose output that lists 731806c34b88Smrg # what "hidden" libraries, object files and flags are used when 731906c34b88Smrg # linking a shared library. 732006c34b88Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 732106c34b88Smrg fi 732221e67964Smrg 732348e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 732406c34b88Smrg case $host_os in 732506c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 732606c34b88Smrg *) 732748e5ce07Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 732806c34b88Smrg ;; 732906c34b88Smrg esac 733006c34b88Smrg fi 733106c34b88Smrg ;; 733206c34b88Smrg esac 733306c34b88Smrg ;; 733421e67964Smrg 733506c34b88Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 733648e5ce07Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 733706c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 733806c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 733906c34b88Smrg runpath_var='LD_RUN_PATH' 734021e67964Smrg 734106c34b88Smrg case $cc_basename in 734206c34b88Smrg CC*) 734348e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734448e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734506c34b88Smrg ;; 734606c34b88Smrg *) 734748e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734848e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734906c34b88Smrg ;; 735006c34b88Smrg esac 735106c34b88Smrg ;; 735221e67964Smrg 735306c34b88Smrg sysv5* | sco3.2v5* | sco5v6*) 735448e5ce07Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 735506c34b88Smrg # link with -lc, and that would cause any symbols used from libc to 735606c34b88Smrg # always be unresolved, which means just about no library would 735706c34b88Smrg # ever link correctly. If we're not using GNU ld we use -z text 735806c34b88Smrg # though, which does catch some bad symbols but isn't as heavy-handed 735906c34b88Smrg # as -z defs. 736048e5ce07Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 736148e5ce07Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 736206c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 736306c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 736448e5ce07Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 736506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 736606c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 736748e5ce07Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 736806c34b88Smrg runpath_var='LD_RUN_PATH' 7369c27c18e8Smrg 737006c34b88Smrg case $cc_basename in 737106c34b88Smrg CC*) 737248e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737348e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737406c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 737548e5ce07Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 737606c34b88Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 737748e5ce07Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 737806c34b88Smrg ;; 737906c34b88Smrg *) 738048e5ce07Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 738148e5ce07Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 738206c34b88Smrg ;; 738306c34b88Smrg esac 738406c34b88Smrg ;; 738521e67964Smrg 738606c34b88Smrg tandem*) 738706c34b88Smrg case $cc_basename in 738806c34b88Smrg NCC*) 738906c34b88Smrg # NonStop-UX NCC 3.20 739006c34b88Smrg # FIXME: insert proper C++ library support 739106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 739206c34b88Smrg ;; 739306c34b88Smrg *) 739406c34b88Smrg # FIXME: insert proper C++ library support 739506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 739606c34b88Smrg ;; 739706c34b88Smrg esac 739806c34b88Smrg ;; 7399c27c18e8Smrg 740006c34b88Smrg vxworks*) 740106c34b88Smrg # FIXME: insert proper C++ library support 740206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 740306c34b88Smrg ;; 7404c27c18e8Smrg 740506c34b88Smrg *) 740606c34b88Smrg # FIXME: insert proper C++ library support 740706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 740806c34b88Smrg ;; 740906c34b88Smrg esac 7410c27c18e8Smrg 741106c34b88Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 741248e5ce07Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7413c27c18e8Smrg 741448e5ce07Smrg _LT_TAGVAR(GCC, $1)=$GXX 741548e5ce07Smrg _LT_TAGVAR(LD, $1)=$LD 7416c27c18e8Smrg 741706c34b88Smrg ## CAVEAT EMPTOR: 741806c34b88Smrg ## There is no encapsulation within the following macros, do not change 741906c34b88Smrg ## the running order or otherwise move them around unless you know exactly 742006c34b88Smrg ## what you are doing... 742106c34b88Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 742206c34b88Smrg _LT_COMPILER_PIC($1) 742306c34b88Smrg _LT_COMPILER_C_O($1) 742406c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 742506c34b88Smrg _LT_LINKER_SHLIBS($1) 742606c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 742706c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 742821e67964Smrg 742906c34b88Smrg _LT_CONFIG($1) 743006c34b88Smrg fi # test -n "$compiler" 743121e67964Smrg 743206c34b88Smrg CC=$lt_save_CC 743306c34b88Smrg CFLAGS=$lt_save_CFLAGS 743406c34b88Smrg LDCXX=$LD 743506c34b88Smrg LD=$lt_save_LD 743606c34b88Smrg GCC=$lt_save_GCC 743706c34b88Smrg with_gnu_ld=$lt_save_with_gnu_ld 743806c34b88Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 743906c34b88Smrg lt_cv_path_LD=$lt_save_path_LD 744006c34b88Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 744106c34b88Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 744248e5ce07Smrgfi # test yes != "$_lt_caught_CXX_error" 744321e67964Smrg 744406c34b88SmrgAC_LANG_POP 744506c34b88Smrg])# _LT_LANG_CXX_CONFIG 7446c27c18e8Smrg 7447b789ec8aSmrg 744806c34b88Smrg# _LT_FUNC_STRIPNAME_CNF 744906c34b88Smrg# ---------------------- 745006c34b88Smrg# func_stripname_cnf prefix suffix name 745106c34b88Smrg# strip PREFIX and SUFFIX off of NAME. 745206c34b88Smrg# PREFIX and SUFFIX must not contain globbing or regex special 745306c34b88Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 745406c34b88Smrg# dot (in which case that matches only a dot). 745506c34b88Smrg# 745606c34b88Smrg# This function is identical to the (non-XSI) version of func_stripname, 745706c34b88Smrg# except this one can be used by m4 code that may be executed by configure, 745806c34b88Smrg# rather than the libtool script. 745906c34b88Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 746006c34b88SmrgAC_REQUIRE([_LT_DECL_SED]) 746106c34b88SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 746206c34b88Smrgfunc_stripname_cnf () 746306c34b88Smrg{ 746448e5ce07Smrg case @S|@2 in 746548e5ce07Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 746648e5ce07Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 746706c34b88Smrg esac 746806c34b88Smrg} # func_stripname_cnf 746906c34b88Smrg])# _LT_FUNC_STRIPNAME_CNF 7470b789ec8aSmrg 747148e5ce07Smrg 747206c34b88Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 747306c34b88Smrg# --------------------------------- 747406c34b88Smrg# Figure out "hidden" library dependencies from verbose 747506c34b88Smrg# compiler output when linking a shared library. 747606c34b88Smrg# Parse the compiler output and extract the necessary 747706c34b88Smrg# objects, libraries and library flags. 747806c34b88Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 747906c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 748006c34b88SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 748106c34b88Smrg# Dependencies to place before and after the object being linked: 748206c34b88Smrg_LT_TAGVAR(predep_objects, $1)= 748306c34b88Smrg_LT_TAGVAR(postdep_objects, $1)= 748406c34b88Smrg_LT_TAGVAR(predeps, $1)= 748506c34b88Smrg_LT_TAGVAR(postdeps, $1)= 748606c34b88Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7487c27c18e8Smrg 748806c34b88Smrgdnl we can't use the lt_simple_compile_test_code here, 748906c34b88Smrgdnl because it contains code intended for an executable, 749006c34b88Smrgdnl not a library. It's possible we should let each 749106c34b88Smrgdnl tag define a new lt_????_link_test_code variable, 749206c34b88Smrgdnl but it's only used here... 749306c34b88Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 749406c34b88Smrgint a; 749506c34b88Smrgvoid foo (void) { a = 0; } 749606c34b88Smrg_LT_EOF 749706c34b88Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 749806c34b88Smrgclass Foo 749906c34b88Smrg{ 750006c34b88Smrgpublic: 750106c34b88Smrg Foo (void) { a = 0; } 750206c34b88Smrgprivate: 750306c34b88Smrg int a; 750406c34b88Smrg}; 750506c34b88Smrg_LT_EOF 750606c34b88Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 750706c34b88Smrg subroutine foo 750806c34b88Smrg implicit none 750906c34b88Smrg integer*4 a 751006c34b88Smrg a=0 751106c34b88Smrg return 751206c34b88Smrg end 751306c34b88Smrg_LT_EOF 751406c34b88Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 751506c34b88Smrg subroutine foo 751606c34b88Smrg implicit none 751706c34b88Smrg integer a 751806c34b88Smrg a=0 751906c34b88Smrg return 752006c34b88Smrg end 752106c34b88Smrg_LT_EOF 752206c34b88Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 752306c34b88Smrgpublic class foo { 752406c34b88Smrg private int a; 752506c34b88Smrg public void bar (void) { 752606c34b88Smrg a = 0; 752706c34b88Smrg } 752806c34b88Smrg}; 752906c34b88Smrg_LT_EOF 753006c34b88Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 753106c34b88Smrgpackage foo 753206c34b88Smrgfunc foo() { 753306c34b88Smrg} 753406c34b88Smrg_LT_EOF 753506c34b88Smrg]) 7536c27c18e8Smrg 753706c34b88Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 753806c34b88Smrgcase "$CC $CFLAGS " in #( 753906c34b88Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 754006c34b88Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 754106c34b88Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 754206c34b88Smrgesac 7543c27c18e8Smrg 754406c34b88Smrgdnl Parse the compiler output and extract the necessary 754506c34b88Smrgdnl objects, libraries and library flags. 754606c34b88Smrgif AC_TRY_EVAL(ac_compile); then 754706c34b88Smrg # Parse the compiler output and extract the necessary 754806c34b88Smrg # objects, libraries and library flags. 7549c27c18e8Smrg 755006c34b88Smrg # Sentinel used to keep track of whether or not we are before 755106c34b88Smrg # the conftest object file. 755206c34b88Smrg pre_test_object_deps_done=no 7553c27c18e8Smrg 755406c34b88Smrg for p in `eval "$output_verbose_link_cmd"`; do 755548e5ce07Smrg case $prev$p in 755606c34b88Smrg 755706c34b88Smrg -L* | -R* | -l*) 755806c34b88Smrg # Some compilers place space between "-{L,R}" and the path. 755906c34b88Smrg # Remove the space. 756048e5ce07Smrg if test x-L = "$p" || 756148e5ce07Smrg test x-R = "$p"; then 756206c34b88Smrg prev=$p 756306c34b88Smrg continue 756406c34b88Smrg fi 756506c34b88Smrg 756606c34b88Smrg # Expand the sysroot to ease extracting the directories later. 756706c34b88Smrg if test -z "$prev"; then 756806c34b88Smrg case $p in 756906c34b88Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 757006c34b88Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 757106c34b88Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 757206c34b88Smrg esac 757306c34b88Smrg fi 757406c34b88Smrg case $p in 757506c34b88Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 757606c34b88Smrg esac 757748e5ce07Smrg if test no = "$pre_test_object_deps_done"; then 757848e5ce07Smrg case $prev in 757906c34b88Smrg -L | -R) 758006c34b88Smrg # Internal compiler library paths should come after those 758106c34b88Smrg # provided the user. The postdeps already come after the 758206c34b88Smrg # user supplied libs so there is no need to process them. 758306c34b88Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 758448e5ce07Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 758506c34b88Smrg else 758648e5ce07Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 758706c34b88Smrg fi 758806c34b88Smrg ;; 758906c34b88Smrg # The "-l" case would never come before the object being 759006c34b88Smrg # linked, so don't bother handling this case. 759106c34b88Smrg esac 759206c34b88Smrg else 759306c34b88Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 759448e5ce07Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 759506c34b88Smrg else 759648e5ce07Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 759706c34b88Smrg fi 759806c34b88Smrg fi 759906c34b88Smrg prev= 760006c34b88Smrg ;; 7601c27c18e8Smrg 760206c34b88Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 760306c34b88Smrg *.$objext) 760406c34b88Smrg # This assumes that the test object file only shows up 760506c34b88Smrg # once in the compiler output. 760606c34b88Smrg if test "$p" = "conftest.$objext"; then 760706c34b88Smrg pre_test_object_deps_done=yes 760806c34b88Smrg continue 760906c34b88Smrg fi 7610c27c18e8Smrg 761148e5ce07Smrg if test no = "$pre_test_object_deps_done"; then 761206c34b88Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 761348e5ce07Smrg _LT_TAGVAR(predep_objects, $1)=$p 761406c34b88Smrg else 761506c34b88Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 761606c34b88Smrg fi 761706c34b88Smrg else 761806c34b88Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 761948e5ce07Smrg _LT_TAGVAR(postdep_objects, $1)=$p 762006c34b88Smrg else 762106c34b88Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 762206c34b88Smrg fi 762306c34b88Smrg fi 762406c34b88Smrg ;; 7625c27c18e8Smrg 762606c34b88Smrg *) ;; # Ignore the rest. 7627c27c18e8Smrg 762806c34b88Smrg esac 762906c34b88Smrg done 7630c27c18e8Smrg 763106c34b88Smrg # Clean up. 763206c34b88Smrg rm -f a.out a.exe 7633b789ec8aSmrgelse 763406c34b88Smrg echo "libtool.m4: error: problem compiling $1 test program" 7635b789ec8aSmrgfi 7636c27c18e8Smrg 763706c34b88Smrg$RM -f confest.$objext 763806c34b88SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 763921e67964Smrg 764006c34b88Smrg# PORTME: override above test on systems where it is broken 764106c34b88Smrgm4_if([$1], [CXX], 764206c34b88Smrg[case $host_os in 764306c34b88Smrginterix[[3-9]]*) 764406c34b88Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 764506c34b88Smrg # hack all around it, let's just trust "g++" to DTRT. 764606c34b88Smrg _LT_TAGVAR(predep_objects,$1)= 764706c34b88Smrg _LT_TAGVAR(postdep_objects,$1)= 764806c34b88Smrg _LT_TAGVAR(postdeps,$1)= 764906c34b88Smrg ;; 765048e5ce07Smrgesac 765148e5ce07Smrg]) 765221e67964Smrg 765306c34b88Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 765406c34b88Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 765506c34b88Smrgesac 765606c34b88Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 765706c34b88Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 765848e5ce07Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 765906c34b88Smrgfi 766006c34b88Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 766106c34b88Smrg [The directories searched by this compiler when creating a shared library]) 766206c34b88Smrg_LT_TAGDECL([], [predep_objects], [1], 766306c34b88Smrg [Dependencies to place before and after the objects being linked to 766406c34b88Smrg create a shared library]) 766506c34b88Smrg_LT_TAGDECL([], [postdep_objects], [1]) 766606c34b88Smrg_LT_TAGDECL([], [predeps], [1]) 766706c34b88Smrg_LT_TAGDECL([], [postdeps], [1]) 766806c34b88Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 766906c34b88Smrg [The library search path used internally by the compiler when linking 767006c34b88Smrg a shared library]) 767106c34b88Smrg])# _LT_SYS_HIDDEN_LIBDEPS 767221e67964Smrg 767321e67964Smrg 767406c34b88Smrg# _LT_LANG_F77_CONFIG([TAG]) 767506c34b88Smrg# -------------------------- 767606c34b88Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 767706c34b88Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 767848e5ce07Smrg# to write the compiler configuration to 'libtool'. 767906c34b88Smrgm4_defun([_LT_LANG_F77_CONFIG], 768006c34b88Smrg[AC_LANG_PUSH(Fortran 77) 768148e5ce07Smrgif test -z "$F77" || test no = "$F77"; then 768206c34b88Smrg _lt_disable_F77=yes 768306c34b88Smrgfi 768421e67964Smrg 768506c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 768606c34b88Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 768706c34b88Smrg_LT_TAGVAR(always_export_symbols, $1)=no 768806c34b88Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 768906c34b88Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 769006c34b88Smrg_LT_TAGVAR(hardcode_direct, $1)=no 769106c34b88Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 769206c34b88Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 769306c34b88Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 769406c34b88Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 769506c34b88Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 769606c34b88Smrg_LT_TAGVAR(inherit_rpath, $1)=no 769706c34b88Smrg_LT_TAGVAR(module_cmds, $1)= 769806c34b88Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 769906c34b88Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 770006c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 770106c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 770206c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 770306c34b88Smrg_LT_TAGVAR(no_undefined_flag, $1)= 770406c34b88Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 770506c34b88Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 770621e67964Smrg 770706c34b88Smrg# Source file extension for f77 test sources. 770806c34b88Smrgac_ext=f 770921e67964Smrg 771006c34b88Smrg# Object file extension for compiled f77 test sources. 771106c34b88Smrgobjext=o 771206c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 771321e67964Smrg 771406c34b88Smrg# No sense in running all these tests if we already determined that 771506c34b88Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 771606c34b88Smrg# are currently assumed to apply to all compilers on this platform, 771706c34b88Smrg# and will be corrupted by setting them based on a non-working compiler. 771848e5ce07Smrgif test yes != "$_lt_disable_F77"; then 771906c34b88Smrg # Code to be used in simple compile tests 772006c34b88Smrg lt_simple_compile_test_code="\ 772106c34b88Smrg subroutine t 772206c34b88Smrg return 772306c34b88Smrg end 772406c34b88Smrg" 772521e67964Smrg 772606c34b88Smrg # Code to be used in simple link tests 772706c34b88Smrg lt_simple_link_test_code="\ 772806c34b88Smrg program t 772906c34b88Smrg end 773006c34b88Smrg" 7731c27c18e8Smrg 773206c34b88Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 773306c34b88Smrg _LT_TAG_COMPILER 7734c27c18e8Smrg 773506c34b88Smrg # save warnings/boilerplate of simple test code 773606c34b88Smrg _LT_COMPILER_BOILERPLATE 773706c34b88Smrg _LT_LINKER_BOILERPLATE 773821e67964Smrg 773906c34b88Smrg # Allow CC to be a program name with arguments. 774048e5ce07Smrg lt_save_CC=$CC 774106c34b88Smrg lt_save_GCC=$GCC 774206c34b88Smrg lt_save_CFLAGS=$CFLAGS 774306c34b88Smrg CC=${F77-"f77"} 774406c34b88Smrg CFLAGS=$FFLAGS 774506c34b88Smrg compiler=$CC 774606c34b88Smrg _LT_TAGVAR(compiler, $1)=$CC 774706c34b88Smrg _LT_CC_BASENAME([$compiler]) 774806c34b88Smrg GCC=$G77 774906c34b88Smrg if test -n "$compiler"; then 775006c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 775106c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 775221e67964Smrg 775306c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 775448e5ce07Smrg test no = "$can_build_shared" && enable_shared=no 7755c27c18e8Smrg 775606c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 775706c34b88Smrg # are all built from PIC. 775806c34b88Smrg case $host_os in 775906c34b88Smrg aix3*) 776048e5ce07Smrg test yes = "$enable_shared" && enable_static=no 776106c34b88Smrg if test -n "$RANLIB"; then 776206c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 776306c34b88Smrg postinstall_cmds='$RANLIB $lib' 776406c34b88Smrg fi 776506c34b88Smrg ;; 776606c34b88Smrg aix[[4-9]]*) 776748e5ce07Smrg if test ia64 != "$host_cpu"; then 776848e5ce07Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 776948e5ce07Smrg yes,aix,yes) ;; # shared object as lib.so file only 777048e5ce07Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 777148e5ce07Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 777248e5ce07Smrg esac 777306c34b88Smrg fi 777406c34b88Smrg ;; 777506c34b88Smrg esac 777606c34b88Smrg AC_MSG_RESULT([$enable_shared]) 777721e67964Smrg 777806c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 777906c34b88Smrg # Make sure either enable_shared or enable_static is yes. 778048e5ce07Smrg test yes = "$enable_shared" || enable_static=yes 778106c34b88Smrg AC_MSG_RESULT([$enable_static]) 778221e67964Smrg 778348e5ce07Smrg _LT_TAGVAR(GCC, $1)=$G77 778448e5ce07Smrg _LT_TAGVAR(LD, $1)=$LD 778521e67964Smrg 778606c34b88Smrg ## CAVEAT EMPTOR: 778706c34b88Smrg ## There is no encapsulation within the following macros, do not change 778806c34b88Smrg ## the running order or otherwise move them around unless you know exactly 778906c34b88Smrg ## what you are doing... 779006c34b88Smrg _LT_COMPILER_PIC($1) 779106c34b88Smrg _LT_COMPILER_C_O($1) 779206c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 779306c34b88Smrg _LT_LINKER_SHLIBS($1) 779406c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 779506c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7796c27c18e8Smrg 779706c34b88Smrg _LT_CONFIG($1) 779806c34b88Smrg fi # test -n "$compiler" 7799c27c18e8Smrg 780006c34b88Smrg GCC=$lt_save_GCC 780148e5ce07Smrg CC=$lt_save_CC 780248e5ce07Smrg CFLAGS=$lt_save_CFLAGS 780348e5ce07Smrgfi # test yes != "$_lt_disable_F77" 7804c27c18e8Smrg 780506c34b88SmrgAC_LANG_POP 780606c34b88Smrg])# _LT_LANG_F77_CONFIG 780721e67964Smrg 780821e67964Smrg 780906c34b88Smrg# _LT_LANG_FC_CONFIG([TAG]) 781006c34b88Smrg# ------------------------- 781106c34b88Smrg# Ensure that the configuration variables for a Fortran compiler are 781206c34b88Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 781348e5ce07Smrg# to write the compiler configuration to 'libtool'. 781406c34b88Smrgm4_defun([_LT_LANG_FC_CONFIG], 781506c34b88Smrg[AC_LANG_PUSH(Fortran) 781621e67964Smrg 781748e5ce07Smrgif test -z "$FC" || test no = "$FC"; then 781806c34b88Smrg _lt_disable_FC=yes 781906c34b88Smrgfi 782021e67964Smrg 782106c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 782206c34b88Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 782306c34b88Smrg_LT_TAGVAR(always_export_symbols, $1)=no 782406c34b88Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 782506c34b88Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 782606c34b88Smrg_LT_TAGVAR(hardcode_direct, $1)=no 782706c34b88Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 782806c34b88Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 782906c34b88Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 783006c34b88Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 783106c34b88Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 783206c34b88Smrg_LT_TAGVAR(inherit_rpath, $1)=no 783306c34b88Smrg_LT_TAGVAR(module_cmds, $1)= 783406c34b88Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 783506c34b88Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 783606c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 783706c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 783806c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 783906c34b88Smrg_LT_TAGVAR(no_undefined_flag, $1)= 784006c34b88Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 784106c34b88Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 784221e67964Smrg 784306c34b88Smrg# Source file extension for fc test sources. 784406c34b88Smrgac_ext=${ac_fc_srcext-f} 784521e67964Smrg 784606c34b88Smrg# Object file extension for compiled fc test sources. 784706c34b88Smrgobjext=o 784806c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 784921e67964Smrg 785006c34b88Smrg# No sense in running all these tests if we already determined that 785106c34b88Smrg# the FC compiler isn't working. Some variables (like enable_shared) 785206c34b88Smrg# are currently assumed to apply to all compilers on this platform, 785306c34b88Smrg# and will be corrupted by setting them based on a non-working compiler. 785448e5ce07Smrgif test yes != "$_lt_disable_FC"; then 785506c34b88Smrg # Code to be used in simple compile tests 785606c34b88Smrg lt_simple_compile_test_code="\ 785706c34b88Smrg subroutine t 785806c34b88Smrg return 785906c34b88Smrg end 786006c34b88Smrg" 786121e67964Smrg 786206c34b88Smrg # Code to be used in simple link tests 786306c34b88Smrg lt_simple_link_test_code="\ 786406c34b88Smrg program t 786506c34b88Smrg end 786606c34b88Smrg" 786721e67964Smrg 786806c34b88Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 786906c34b88Smrg _LT_TAG_COMPILER 787021e67964Smrg 787106c34b88Smrg # save warnings/boilerplate of simple test code 787206c34b88Smrg _LT_COMPILER_BOILERPLATE 787306c34b88Smrg _LT_LINKER_BOILERPLATE 787421e67964Smrg 787506c34b88Smrg # Allow CC to be a program name with arguments. 787648e5ce07Smrg lt_save_CC=$CC 787706c34b88Smrg lt_save_GCC=$GCC 787806c34b88Smrg lt_save_CFLAGS=$CFLAGS 787906c34b88Smrg CC=${FC-"f95"} 788006c34b88Smrg CFLAGS=$FCFLAGS 788106c34b88Smrg compiler=$CC 788206c34b88Smrg GCC=$ac_cv_fc_compiler_gnu 788321e67964Smrg 788406c34b88Smrg _LT_TAGVAR(compiler, $1)=$CC 788506c34b88Smrg _LT_CC_BASENAME([$compiler]) 7886c27c18e8Smrg 788706c34b88Smrg if test -n "$compiler"; then 788806c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 788906c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 789006c34b88Smrg 789106c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 789248e5ce07Smrg test no = "$can_build_shared" && enable_shared=no 789306c34b88Smrg 789406c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 789506c34b88Smrg # are all built from PIC. 789606c34b88Smrg case $host_os in 789706c34b88Smrg aix3*) 789848e5ce07Smrg test yes = "$enable_shared" && enable_static=no 789906c34b88Smrg if test -n "$RANLIB"; then 790006c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 790106c34b88Smrg postinstall_cmds='$RANLIB $lib' 790206c34b88Smrg fi 790306c34b88Smrg ;; 790406c34b88Smrg aix[[4-9]]*) 790548e5ce07Smrg if test ia64 != "$host_cpu"; then 790648e5ce07Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 790748e5ce07Smrg yes,aix,yes) ;; # shared object as lib.so file only 790848e5ce07Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 790948e5ce07Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 791048e5ce07Smrg esac 7911c27c18e8Smrg fi 791206c34b88Smrg ;; 791306c34b88Smrg esac 791406c34b88Smrg AC_MSG_RESULT([$enable_shared]) 791521e67964Smrg 791606c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 791706c34b88Smrg # Make sure either enable_shared or enable_static is yes. 791848e5ce07Smrg test yes = "$enable_shared" || enable_static=yes 791906c34b88Smrg AC_MSG_RESULT([$enable_static]) 792021e67964Smrg 792148e5ce07Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 792248e5ce07Smrg _LT_TAGVAR(LD, $1)=$LD 792321e67964Smrg 792406c34b88Smrg ## CAVEAT EMPTOR: 792506c34b88Smrg ## There is no encapsulation within the following macros, do not change 792606c34b88Smrg ## the running order or otherwise move them around unless you know exactly 792706c34b88Smrg ## what you are doing... 792806c34b88Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 792906c34b88Smrg _LT_COMPILER_PIC($1) 793006c34b88Smrg _LT_COMPILER_C_O($1) 793106c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 793206c34b88Smrg _LT_LINKER_SHLIBS($1) 793306c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 793406c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7935c27c18e8Smrg 793606c34b88Smrg _LT_CONFIG($1) 793706c34b88Smrg fi # test -n "$compiler" 793821e67964Smrg 793906c34b88Smrg GCC=$lt_save_GCC 794006c34b88Smrg CC=$lt_save_CC 794106c34b88Smrg CFLAGS=$lt_save_CFLAGS 794248e5ce07Smrgfi # test yes != "$_lt_disable_FC" 794321e67964Smrg 794406c34b88SmrgAC_LANG_POP 794506c34b88Smrg])# _LT_LANG_FC_CONFIG 794621e67964Smrg 794721e67964Smrg 794806c34b88Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 794906c34b88Smrg# -------------------------- 795006c34b88Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 795106c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 795248e5ce07Smrg# to write the compiler configuration to 'libtool'. 795306c34b88Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 795406c34b88Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 795506c34b88SmrgAC_LANG_SAVE 795621e67964Smrg 795706c34b88Smrg# Source file extension for Java test sources. 795806c34b88Smrgac_ext=java 795921e67964Smrg 796006c34b88Smrg# Object file extension for compiled Java test sources. 796106c34b88Smrgobjext=o 796206c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 796321e67964Smrg 796406c34b88Smrg# Code to be used in simple compile tests 796506c34b88Smrglt_simple_compile_test_code="class foo {}" 796621e67964Smrg 796706c34b88Smrg# Code to be used in simple link tests 796806c34b88Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 796921e67964Smrg 797006c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 797106c34b88Smrg_LT_TAG_COMPILER 797221e67964Smrg 797306c34b88Smrg# save warnings/boilerplate of simple test code 797406c34b88Smrg_LT_COMPILER_BOILERPLATE 797506c34b88Smrg_LT_LINKER_BOILERPLATE 797621e67964Smrg 797706c34b88Smrg# Allow CC to be a program name with arguments. 797806c34b88Smrglt_save_CC=$CC 797906c34b88Smrglt_save_CFLAGS=$CFLAGS 798006c34b88Smrglt_save_GCC=$GCC 798106c34b88SmrgGCC=yes 798206c34b88SmrgCC=${GCJ-"gcj"} 798306c34b88SmrgCFLAGS=$GCJFLAGS 798406c34b88Smrgcompiler=$CC 798506c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 798648e5ce07Smrg_LT_TAGVAR(LD, $1)=$LD 798706c34b88Smrg_LT_CC_BASENAME([$compiler]) 798821e67964Smrg 798906c34b88Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 799006c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 799121e67964Smrg 799206c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 799306c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 799406c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 799521e67964Smrg 799606c34b88Smrgif test -n "$compiler"; then 799706c34b88Smrg _LT_COMPILER_NO_RTTI($1) 799806c34b88Smrg _LT_COMPILER_PIC($1) 799906c34b88Smrg _LT_COMPILER_C_O($1) 800006c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 800106c34b88Smrg _LT_LINKER_SHLIBS($1) 800206c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 800321e67964Smrg 800406c34b88Smrg _LT_CONFIG($1) 800506c34b88Smrgfi 800621e67964Smrg 800706c34b88SmrgAC_LANG_RESTORE 800821e67964Smrg 800906c34b88SmrgGCC=$lt_save_GCC 801006c34b88SmrgCC=$lt_save_CC 801106c34b88SmrgCFLAGS=$lt_save_CFLAGS 801206c34b88Smrg])# _LT_LANG_GCJ_CONFIG 801321e67964Smrg 801421e67964Smrg 801506c34b88Smrg# _LT_LANG_GO_CONFIG([TAG]) 801606c34b88Smrg# -------------------------- 801706c34b88Smrg# Ensure that the configuration variables for the GNU Go compiler 801806c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 801948e5ce07Smrg# to write the compiler configuration to 'libtool'. 802006c34b88Smrgm4_defun([_LT_LANG_GO_CONFIG], 802106c34b88Smrg[AC_REQUIRE([LT_PROG_GO])dnl 802206c34b88SmrgAC_LANG_SAVE 802306c34b88Smrg 802406c34b88Smrg# Source file extension for Go test sources. 802506c34b88Smrgac_ext=go 802621e67964Smrg 802706c34b88Smrg# Object file extension for compiled Go test sources. 802806c34b88Smrgobjext=o 802906c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 803021e67964Smrg 803106c34b88Smrg# Code to be used in simple compile tests 803206c34b88Smrglt_simple_compile_test_code="package main; func main() { }" 803321e67964Smrg 803406c34b88Smrg# Code to be used in simple link tests 803506c34b88Smrglt_simple_link_test_code='package main; func main() { }' 803621e67964Smrg 803706c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 803806c34b88Smrg_LT_TAG_COMPILER 803921e67964Smrg 804006c34b88Smrg# save warnings/boilerplate of simple test code 804106c34b88Smrg_LT_COMPILER_BOILERPLATE 804206c34b88Smrg_LT_LINKER_BOILERPLATE 8043c27c18e8Smrg 804406c34b88Smrg# Allow CC to be a program name with arguments. 804506c34b88Smrglt_save_CC=$CC 804606c34b88Smrglt_save_CFLAGS=$CFLAGS 804706c34b88Smrglt_save_GCC=$GCC 804806c34b88SmrgGCC=yes 804906c34b88SmrgCC=${GOC-"gccgo"} 805006c34b88SmrgCFLAGS=$GOFLAGS 805106c34b88Smrgcompiler=$CC 805206c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 805348e5ce07Smrg_LT_TAGVAR(LD, $1)=$LD 805406c34b88Smrg_LT_CC_BASENAME([$compiler]) 805521e67964Smrg 805606c34b88Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 805706c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 805821e67964Smrg 805906c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 806006c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 806106c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 806221e67964Smrg 806306c34b88Smrgif test -n "$compiler"; then 806406c34b88Smrg _LT_COMPILER_NO_RTTI($1) 806506c34b88Smrg _LT_COMPILER_PIC($1) 806606c34b88Smrg _LT_COMPILER_C_O($1) 806706c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 806806c34b88Smrg _LT_LINKER_SHLIBS($1) 806906c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 807021e67964Smrg 807106c34b88Smrg _LT_CONFIG($1) 807206c34b88Smrgfi 807321e67964Smrg 807406c34b88SmrgAC_LANG_RESTORE 8075c27c18e8Smrg 807606c34b88SmrgGCC=$lt_save_GCC 807706c34b88SmrgCC=$lt_save_CC 807806c34b88SmrgCFLAGS=$lt_save_CFLAGS 807906c34b88Smrg])# _LT_LANG_GO_CONFIG 8080c27c18e8Smrg 8081c27c18e8Smrg 808206c34b88Smrg# _LT_LANG_RC_CONFIG([TAG]) 808306c34b88Smrg# ------------------------- 808406c34b88Smrg# Ensure that the configuration variables for the Windows resource compiler 808506c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 808648e5ce07Smrg# to write the compiler configuration to 'libtool'. 808706c34b88Smrgm4_defun([_LT_LANG_RC_CONFIG], 808806c34b88Smrg[AC_REQUIRE([LT_PROG_RC])dnl 808906c34b88SmrgAC_LANG_SAVE 8090c27c18e8Smrg 809106c34b88Smrg# Source file extension for RC test sources. 809206c34b88Smrgac_ext=rc 8093c27c18e8Smrg 809406c34b88Smrg# Object file extension for compiled RC test sources. 809506c34b88Smrgobjext=o 809606c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 8097c27c18e8Smrg 809806c34b88Smrg# Code to be used in simple compile tests 809906c34b88Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8100c27c18e8Smrg 810106c34b88Smrg# Code to be used in simple link tests 810248e5ce07Smrglt_simple_link_test_code=$lt_simple_compile_test_code 8103c27c18e8Smrg 810406c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 810506c34b88Smrg_LT_TAG_COMPILER 8106c27c18e8Smrg 810706c34b88Smrg# save warnings/boilerplate of simple test code 810806c34b88Smrg_LT_COMPILER_BOILERPLATE 810906c34b88Smrg_LT_LINKER_BOILERPLATE 8110c27c18e8Smrg 811106c34b88Smrg# Allow CC to be a program name with arguments. 811248e5ce07Smrglt_save_CC=$CC 811306c34b88Smrglt_save_CFLAGS=$CFLAGS 811406c34b88Smrglt_save_GCC=$GCC 811506c34b88SmrgGCC= 811606c34b88SmrgCC=${RC-"windres"} 811706c34b88SmrgCFLAGS= 811806c34b88Smrgcompiler=$CC 811906c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 812006c34b88Smrg_LT_CC_BASENAME([$compiler]) 812106c34b88Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8122c27c18e8Smrg 812306c34b88Smrgif test -n "$compiler"; then 812406c34b88Smrg : 812506c34b88Smrg _LT_CONFIG($1) 812606c34b88Smrgfi 8127c27c18e8Smrg 812806c34b88SmrgGCC=$lt_save_GCC 812906c34b88SmrgAC_LANG_RESTORE 813006c34b88SmrgCC=$lt_save_CC 813106c34b88SmrgCFLAGS=$lt_save_CFLAGS 813206c34b88Smrg])# _LT_LANG_RC_CONFIG 8133c27c18e8Smrg 8134c27c18e8Smrg 813506c34b88Smrg# LT_PROG_GCJ 813606c34b88Smrg# ----------- 813706c34b88SmrgAC_DEFUN([LT_PROG_GCJ], 813806c34b88Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 813906c34b88Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 814006c34b88Smrg [AC_CHECK_TOOL(GCJ, gcj,) 814148e5ce07Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 814206c34b88Smrg AC_SUBST(GCJFLAGS)])])[]dnl 814306c34b88Smrg]) 8144c27c18e8Smrg 814506c34b88Smrg# Old name: 814606c34b88SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 814706c34b88Smrgdnl aclocal-1.4 backwards compatibility: 814806c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 814921e67964Smrg 815021e67964Smrg 815106c34b88Smrg# LT_PROG_GO 815206c34b88Smrg# ---------- 815306c34b88SmrgAC_DEFUN([LT_PROG_GO], 815406c34b88Smrg[AC_CHECK_TOOL(GOC, gccgo,) 815506c34b88Smrg]) 8156c27c18e8Smrg 815721e67964Smrg 815806c34b88Smrg# LT_PROG_RC 815906c34b88Smrg# ---------- 816006c34b88SmrgAC_DEFUN([LT_PROG_RC], 816106c34b88Smrg[AC_CHECK_TOOL(RC, windres,) 816206c34b88Smrg]) 816321e67964Smrg 816406c34b88Smrg# Old name: 816506c34b88SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 816606c34b88Smrgdnl aclocal-1.4 backwards compatibility: 816706c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 816821e67964Smrg 816921e67964Smrg 817006c34b88Smrg# _LT_DECL_EGREP 817106c34b88Smrg# -------------- 817206c34b88Smrg# If we don't have a new enough Autoconf to choose the best grep 817306c34b88Smrg# available, choose the one first in the user's PATH. 817406c34b88Smrgm4_defun([_LT_DECL_EGREP], 817506c34b88Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 817606c34b88SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 817706c34b88Smrgtest -z "$GREP" && GREP=grep 817806c34b88Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 817906c34b88Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 818006c34b88Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 818106c34b88Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 818206c34b88SmrgAC_SUBST([GREP]) 818306c34b88Smrg]) 818421e67964Smrg 818506c34b88Smrg 818606c34b88Smrg# _LT_DECL_OBJDUMP 818706c34b88Smrg# -------------- 818806c34b88Smrg# If we don't have a new enough Autoconf to choose the best objdump 818906c34b88Smrg# available, choose the one first in the user's PATH. 819006c34b88Smrgm4_defun([_LT_DECL_OBJDUMP], 819106c34b88Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 819206c34b88Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 819306c34b88Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 819406c34b88SmrgAC_SUBST([OBJDUMP]) 819521e67964Smrg]) 819621e67964Smrg 819706c34b88Smrg# _LT_DECL_DLLTOOL 819806c34b88Smrg# ---------------- 819906c34b88Smrg# Ensure DLLTOOL variable is set. 820006c34b88Smrgm4_defun([_LT_DECL_DLLTOOL], 820106c34b88Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 820206c34b88Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 820306c34b88Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 820406c34b88SmrgAC_SUBST([DLLTOOL]) 820506c34b88Smrg]) 820621e67964Smrg 820706c34b88Smrg# _LT_DECL_SED 820806c34b88Smrg# ------------ 820906c34b88Smrg# Check for a fully-functional sed program, that truncates 821006c34b88Smrg# as few characters as possible. Prefer GNU sed if found. 821106c34b88Smrgm4_defun([_LT_DECL_SED], 821206c34b88Smrg[AC_PROG_SED 821306c34b88Smrgtest -z "$SED" && SED=sed 821406c34b88SmrgXsed="$SED -e 1s/^X//" 821506c34b88Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 821606c34b88Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 821706c34b88Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 821806c34b88Smrg])# _LT_DECL_SED 821921e67964Smrg 822006c34b88Smrgm4_ifndef([AC_PROG_SED], [ 822106c34b88Smrg# NOTE: This macro has been submitted for inclusion into # 822206c34b88Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 822306c34b88Smrg# a released version of Autoconf we should remove this # 822406c34b88Smrg# macro and use it instead. # 822521e67964Smrg 822606c34b88Smrgm4_defun([AC_PROG_SED], 822706c34b88Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 822806c34b88SmrgAC_CACHE_VAL(lt_cv_path_SED, 822906c34b88Smrg[# Loop through the user's path and test for sed and gsed. 823006c34b88Smrg# Then use that list of sed's as ones to test for truncation. 823106c34b88Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 823206c34b88Smrgfor as_dir in $PATH 823306c34b88Smrgdo 823406c34b88Smrg IFS=$as_save_IFS 823506c34b88Smrg test -z "$as_dir" && as_dir=. 823606c34b88Smrg for lt_ac_prog in sed gsed; do 823706c34b88Smrg for ac_exec_ext in '' $ac_executable_extensions; do 823806c34b88Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 823906c34b88Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 824006c34b88Smrg fi 824106c34b88Smrg done 824206c34b88Smrg done 824306c34b88Smrgdone 824406c34b88SmrgIFS=$as_save_IFS 824506c34b88Smrglt_ac_max=0 824606c34b88Smrglt_ac_count=0 824706c34b88Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 824806c34b88Smrg# along with /bin/sed that truncates output. 824906c34b88Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 825048e5ce07Smrg test ! -f "$lt_ac_sed" && continue 825106c34b88Smrg cat /dev/null > conftest.in 825206c34b88Smrg lt_ac_count=0 825306c34b88Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 825406c34b88Smrg # Check for GNU sed and select it if it is found. 825506c34b88Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 825606c34b88Smrg lt_cv_path_SED=$lt_ac_sed 825706c34b88Smrg break 825806c34b88Smrg fi 825906c34b88Smrg while true; do 826006c34b88Smrg cat conftest.in conftest.in >conftest.tmp 826106c34b88Smrg mv conftest.tmp conftest.in 826206c34b88Smrg cp conftest.in conftest.nl 826306c34b88Smrg echo >>conftest.nl 826406c34b88Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 826506c34b88Smrg cmp -s conftest.out conftest.nl || break 826606c34b88Smrg # 10000 chars as input seems more than enough 826748e5ce07Smrg test 10 -lt "$lt_ac_count" && break 826806c34b88Smrg lt_ac_count=`expr $lt_ac_count + 1` 826948e5ce07Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 827006c34b88Smrg lt_ac_max=$lt_ac_count 827106c34b88Smrg lt_cv_path_SED=$lt_ac_sed 827206c34b88Smrg fi 827306c34b88Smrg done 827406c34b88Smrgdone 827521e67964Smrg]) 827606c34b88SmrgSED=$lt_cv_path_SED 827706c34b88SmrgAC_SUBST([SED]) 827806c34b88SmrgAC_MSG_RESULT([$SED]) 827906c34b88Smrg])#AC_PROG_SED 828006c34b88Smrg])#m4_ifndef 8281c43cc173Smrg 828206c34b88Smrg# Old name: 828306c34b88SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 828406c34b88Smrgdnl aclocal-1.4 backwards compatibility: 828506c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8286c27c18e8Smrg 8287c27c18e8Smrg 828806c34b88Smrg# _LT_CHECK_SHELL_FEATURES 828906c34b88Smrg# ------------------------ 829006c34b88Smrg# Find out whether the shell is Bourne or XSI compatible, 829106c34b88Smrg# or has some other useful features. 829206c34b88Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 829348e5ce07Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 829406c34b88Smrg lt_unset=unset 829506c34b88Smrgelse 829606c34b88Smrg lt_unset=false 829706c34b88Smrgfi 829806c34b88Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 829906c34b88Smrg 830006c34b88Smrg# test EBCDIC or ASCII 830106c34b88Smrgcase `echo X|tr X '\101'` in 830206c34b88Smrg A) # ASCII based system 830306c34b88Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 830406c34b88Smrg lt_SP2NL='tr \040 \012' 830506c34b88Smrg lt_NL2SP='tr \015\012 \040\040' 830606c34b88Smrg ;; 830706c34b88Smrg *) # EBCDIC based system 830806c34b88Smrg lt_SP2NL='tr \100 \n' 830906c34b88Smrg lt_NL2SP='tr \r\n \100\100' 831006c34b88Smrg ;; 831106c34b88Smrgesac 831206c34b88Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 831306c34b88Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 831406c34b88Smrg])# _LT_CHECK_SHELL_FEATURES 831506c34b88Smrg 831606c34b88Smrg 831706c34b88Smrg# _LT_PATH_CONVERSION_FUNCTIONS 831806c34b88Smrg# ----------------------------- 831948e5ce07Smrg# Determine what file name conversion functions should be used by 832006c34b88Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 832106c34b88Smrg# for certain cross-compile configurations and native mingw. 832206c34b88Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 832306c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 832406c34b88SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 832506c34b88SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 832606c34b88SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 832706c34b88Smrg[case $host in 832806c34b88Smrg *-*-mingw* ) 832906c34b88Smrg case $build in 833006c34b88Smrg *-*-mingw* ) # actually msys 833106c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 833206c34b88Smrg ;; 833306c34b88Smrg *-*-cygwin* ) 833406c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 833506c34b88Smrg ;; 833606c34b88Smrg * ) # otherwise, assume *nix 833706c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 833806c34b88Smrg ;; 833906c34b88Smrg esac 834006c34b88Smrg ;; 834106c34b88Smrg *-*-cygwin* ) 834206c34b88Smrg case $build in 834306c34b88Smrg *-*-mingw* ) # actually msys 834406c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 834506c34b88Smrg ;; 834606c34b88Smrg *-*-cygwin* ) 834706c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 834806c34b88Smrg ;; 834906c34b88Smrg * ) # otherwise, assume *nix 835006c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 835106c34b88Smrg ;; 835206c34b88Smrg esac 835306c34b88Smrg ;; 835406c34b88Smrg * ) # unhandled hosts (and "normal" native builds) 835506c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 835606c34b88Smrg ;; 835706c34b88Smrgesac 835806c34b88Smrg]) 835906c34b88Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 836006c34b88SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 836106c34b88Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 836206c34b88Smrg [0], [convert $build file names to $host format])dnl 836306c34b88Smrg 836406c34b88SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 836506c34b88SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 836606c34b88Smrg[#assume ordinary cross tools, or native build. 836706c34b88Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 836806c34b88Smrgcase $host in 836906c34b88Smrg *-*-mingw* ) 837006c34b88Smrg case $build in 837106c34b88Smrg *-*-mingw* ) # actually msys 837206c34b88Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 837306c34b88Smrg ;; 837406c34b88Smrg esac 837506c34b88Smrg ;; 837606c34b88Smrgesac 837706c34b88Smrg]) 837806c34b88Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 837906c34b88SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 838006c34b88Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 838106c34b88Smrg [0], [convert $build files to toolchain format])dnl 838206c34b88Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8383c43cc173Smrg 838406c34b88Smrg# Helper functions for option handling. -*- Autoconf -*- 838506c34b88Smrg# 838648e5ce07Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 838748e5ce07Smrg# Foundation, Inc. 838806c34b88Smrg# Written by Gary V. Vaughan, 2004 838906c34b88Smrg# 839006c34b88Smrg# This file is free software; the Free Software Foundation gives 839106c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 839206c34b88Smrg# modifications, as long as this notice is preserved. 8393c43cc173Smrg 839448e5ce07Smrg# serial 8 ltoptions.m4 8395c43cc173Smrg 839606c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 839706c34b88SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8398f1ee322dSmrg 8399f1ee322dSmrg 840006c34b88Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 840106c34b88Smrg# ------------------------------------------ 840206c34b88Smrgm4_define([_LT_MANGLE_OPTION], 840306c34b88Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 840489069ce9Smrg 8405c43cc173Smrg 840606c34b88Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 840706c34b88Smrg# --------------------------------------- 840806c34b88Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 840906c34b88Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 841006c34b88Smrg# saved as a flag. 841106c34b88Smrgm4_define([_LT_SET_OPTION], 841206c34b88Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 841306c34b88Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 841406c34b88Smrg _LT_MANGLE_DEFUN([$1], [$2]), 841548e5ce07Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 841606c34b88Smrg]) 8417c43cc173Smrg 8418c43cc173Smrg 841906c34b88Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 842006c34b88Smrg# ------------------------------------------------------------ 842106c34b88Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 842206c34b88Smrgm4_define([_LT_IF_OPTION], 842306c34b88Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8424c43cc173Smrg 8425c27c18e8Smrg 842606c34b88Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 842706c34b88Smrg# ------------------------------------------------------- 842806c34b88Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 842906c34b88Smrg# are set. 843006c34b88Smrgm4_define([_LT_UNLESS_OPTIONS], 843106c34b88Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 843206c34b88Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 843306c34b88Smrg [m4_define([$0_found])])])[]dnl 843406c34b88Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 843506c34b88Smrg])[]dnl 843606c34b88Smrg]) 843721e67964Smrg 843821e67964Smrg 843906c34b88Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 844006c34b88Smrg# ---------------------------------------- 844106c34b88Smrg# OPTION-LIST is a space-separated list of Libtool options associated 844206c34b88Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 844306c34b88Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 844406c34b88Smrg# the unknown option and exit. 844506c34b88Smrgm4_defun([_LT_SET_OPTIONS], 844606c34b88Smrg[# Set options 844706c34b88Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 844806c34b88Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 844921e67964Smrg 845006c34b88Smrgm4_if([$1],[LT_INIT],[ 845106c34b88Smrg dnl 845206c34b88Smrg dnl Simply set some default values (i.e off) if boolean options were not 845306c34b88Smrg dnl specified: 845406c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 845506c34b88Smrg ]) 845606c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 845706c34b88Smrg ]) 845806c34b88Smrg dnl 845906c34b88Smrg dnl If no reference was made to various pairs of opposing options, then 846006c34b88Smrg dnl we run the default mode handler for the pair. For example, if neither 846148e5ce07Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 846206c34b88Smrg dnl archives by default: 846306c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 846406c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 846506c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 846606c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 846748e5ce07Smrg [_LT_ENABLE_FAST_INSTALL]) 846848e5ce07Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 846948e5ce07Smrg [_LT_WITH_AIX_SONAME([aix])]) 847006c34b88Smrg ]) 847106c34b88Smrg])# _LT_SET_OPTIONS 8472c43cc173Smrg 8473c43cc173Smrg 8474c43cc173Smrg 847506c34b88Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 847606c34b88Smrg# ----------------------------------------- 847706c34b88Smrgm4_define([_LT_MANGLE_DEFUN], 847806c34b88Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8479c43cc173Smrg 8480c43cc173Smrg 848106c34b88Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 848206c34b88Smrg# ----------------------------------------------- 848306c34b88Smrgm4_define([LT_OPTION_DEFINE], 848406c34b88Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 848506c34b88Smrg])# LT_OPTION_DEFINE 8486c43cc173Smrg 8487c43cc173Smrg 848806c34b88Smrg# dlopen 848906c34b88Smrg# ------ 849006c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 849106c34b88Smrg]) 8492c43cc173Smrg 849306c34b88SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 849406c34b88Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 849506c34b88SmrgAC_DIAGNOSE([obsolete], 849606c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 849748e5ce07Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 849806c34b88Smrg]) 8499c43cc173Smrg 850006c34b88Smrgdnl aclocal-1.4 backwards compatibility: 850106c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8502c43cc173Smrg 8503c43cc173Smrg 850406c34b88Smrg# win32-dll 850506c34b88Smrg# --------- 850606c34b88Smrg# Declare package support for building win32 dll's. 850706c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 850806c34b88Smrg[enable_win32_dll=yes 8509c43cc173Smrg 851006c34b88Smrgcase $host in 851106c34b88Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 851206c34b88Smrg AC_CHECK_TOOL(AS, as, false) 851306c34b88Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 851406c34b88Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 851506c34b88Smrg ;; 851606c34b88Smrgesac 8517c27c18e8Smrg 851806c34b88Smrgtest -z "$AS" && AS=as 851906c34b88Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 852089069ce9Smrg 852106c34b88Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 852206c34b88Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 852389069ce9Smrg 852406c34b88Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 852506c34b88Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 852606c34b88Smrg])# win32-dll 8527c43cc173Smrg 852806c34b88SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 852906c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 853006c34b88Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 853106c34b88SmrgAC_DIAGNOSE([obsolete], 853206c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 853348e5ce07Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 853406c34b88Smrg]) 8535c43cc173Smrg 853606c34b88Smrgdnl aclocal-1.4 backwards compatibility: 853706c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8538c43cc173Smrg 8539c43cc173Smrg 854006c34b88Smrg# _LT_ENABLE_SHARED([DEFAULT]) 854106c34b88Smrg# ---------------------------- 854248e5ce07Smrg# implement the --enable-shared flag, and supports the 'shared' and 854348e5ce07Smrg# 'disable-shared' LT_INIT options. 854448e5ce07Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 854506c34b88Smrgm4_define([_LT_ENABLE_SHARED], 854606c34b88Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 854706c34b88SmrgAC_ARG_ENABLE([shared], 854806c34b88Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 854906c34b88Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 855006c34b88Smrg [p=${PACKAGE-default} 855106c34b88Smrg case $enableval in 855206c34b88Smrg yes) enable_shared=yes ;; 855306c34b88Smrg no) enable_shared=no ;; 855406c34b88Smrg *) 855506c34b88Smrg enable_shared=no 855606c34b88Smrg # Look at the argument we got. We use all the common list separators. 855748e5ce07Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 855806c34b88Smrg for pkg in $enableval; do 855948e5ce07Smrg IFS=$lt_save_ifs 856006c34b88Smrg if test "X$pkg" = "X$p"; then 856106c34b88Smrg enable_shared=yes 856206c34b88Smrg fi 856306c34b88Smrg done 856448e5ce07Smrg IFS=$lt_save_ifs 856506c34b88Smrg ;; 856606c34b88Smrg esac], 856706c34b88Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8568c43cc173Smrg 856906c34b88Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 857006c34b88Smrg [Whether or not to build shared libraries]) 857106c34b88Smrg])# _LT_ENABLE_SHARED 8572c43cc173Smrg 857306c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 857406c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8575c43cc173Smrg 857606c34b88Smrg# Old names: 857706c34b88SmrgAC_DEFUN([AC_ENABLE_SHARED], 857806c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 857906c34b88Smrg]) 8580c43cc173Smrg 858106c34b88SmrgAC_DEFUN([AC_DISABLE_SHARED], 858206c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 858306c34b88Smrg]) 8584c43cc173Smrg 858506c34b88SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 858606c34b88SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8587c43cc173Smrg 858806c34b88Smrgdnl aclocal-1.4 backwards compatibility: 858906c34b88Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 859006c34b88Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8591c43cc173Smrg 8592c43cc173Smrg 8593c27c18e8Smrg 859406c34b88Smrg# _LT_ENABLE_STATIC([DEFAULT]) 859506c34b88Smrg# ---------------------------- 859648e5ce07Smrg# implement the --enable-static flag, and support the 'static' and 859748e5ce07Smrg# 'disable-static' LT_INIT options. 859848e5ce07Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 859906c34b88Smrgm4_define([_LT_ENABLE_STATIC], 860006c34b88Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 860106c34b88SmrgAC_ARG_ENABLE([static], 860206c34b88Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 860306c34b88Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 860406c34b88Smrg [p=${PACKAGE-default} 860506c34b88Smrg case $enableval in 860606c34b88Smrg yes) enable_static=yes ;; 860706c34b88Smrg no) enable_static=no ;; 860806c34b88Smrg *) 860906c34b88Smrg enable_static=no 861006c34b88Smrg # Look at the argument we got. We use all the common list separators. 861148e5ce07Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 861206c34b88Smrg for pkg in $enableval; do 861348e5ce07Smrg IFS=$lt_save_ifs 861406c34b88Smrg if test "X$pkg" = "X$p"; then 861506c34b88Smrg enable_static=yes 861606c34b88Smrg fi 861706c34b88Smrg done 861848e5ce07Smrg IFS=$lt_save_ifs 861906c34b88Smrg ;; 862006c34b88Smrg esac], 862106c34b88Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 862289069ce9Smrg 862306c34b88Smrg _LT_DECL([build_old_libs], [enable_static], [0], 862406c34b88Smrg [Whether or not to build static libraries]) 862506c34b88Smrg])# _LT_ENABLE_STATIC 8626c43cc173Smrg 862706c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 862806c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 862989069ce9Smrg 863006c34b88Smrg# Old names: 863106c34b88SmrgAC_DEFUN([AC_ENABLE_STATIC], 863206c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 863306c34b88Smrg]) 8634c43cc173Smrg 863506c34b88SmrgAC_DEFUN([AC_DISABLE_STATIC], 863606c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 863706c34b88Smrg]) 8638c27c18e8Smrg 863906c34b88SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 864006c34b88SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8641c43cc173Smrg 864206c34b88Smrgdnl aclocal-1.4 backwards compatibility: 864306c34b88Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 864406c34b88Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8645c27c18e8Smrg 8646c43cc173Smrg 8647b789ec8aSmrg 864806c34b88Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 864906c34b88Smrg# ---------------------------------- 865048e5ce07Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 865148e5ce07Smrg# and 'disable-fast-install' LT_INIT options. 865248e5ce07Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 865306c34b88Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 865406c34b88Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 865506c34b88SmrgAC_ARG_ENABLE([fast-install], 865606c34b88Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 865706c34b88Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 865806c34b88Smrg [p=${PACKAGE-default} 865906c34b88Smrg case $enableval in 866006c34b88Smrg yes) enable_fast_install=yes ;; 866106c34b88Smrg no) enable_fast_install=no ;; 866206c34b88Smrg *) 866306c34b88Smrg enable_fast_install=no 866406c34b88Smrg # Look at the argument we got. We use all the common list separators. 866548e5ce07Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 866606c34b88Smrg for pkg in $enableval; do 866748e5ce07Smrg IFS=$lt_save_ifs 866806c34b88Smrg if test "X$pkg" = "X$p"; then 866906c34b88Smrg enable_fast_install=yes 867006c34b88Smrg fi 867106c34b88Smrg done 867248e5ce07Smrg IFS=$lt_save_ifs 867306c34b88Smrg ;; 867406c34b88Smrg esac], 867506c34b88Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 867689069ce9Smrg 867706c34b88Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 867806c34b88Smrg [Whether or not to optimize for fast installation])dnl 867906c34b88Smrg])# _LT_ENABLE_FAST_INSTALL 868089069ce9Smrg 868106c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 868206c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8683f1ee322dSmrg 868406c34b88Smrg# Old names: 868506c34b88SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 868606c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 868706c34b88SmrgAC_DIAGNOSE([obsolete], 868806c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 868948e5ce07Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 869006c34b88Smrg]) 8691f1ee322dSmrg 869206c34b88SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 869306c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 869406c34b88SmrgAC_DIAGNOSE([obsolete], 869506c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 869648e5ce07Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 869706c34b88Smrg]) 869889069ce9Smrg 869906c34b88Smrgdnl aclocal-1.4 backwards compatibility: 870006c34b88Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 870106c34b88Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 870289069ce9Smrg 8703c43cc173Smrg 870448e5ce07Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 870548e5ce07Smrg# ---------------------------------- 870648e5ce07Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 870748e5ce07Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 870848e5ce07Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 870948e5ce07Smrgm4_define([_LT_WITH_AIX_SONAME], 871048e5ce07Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 871148e5ce07Smrgshared_archive_member_spec= 871248e5ce07Smrgcase $host,$enable_shared in 871348e5ce07Smrgpower*-*-aix[[5-9]]*,yes) 871448e5ce07Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 871548e5ce07Smrg AC_ARG_WITH([aix-soname], 871648e5ce07Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 871748e5ce07Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 871848e5ce07Smrg [case $withval in 871948e5ce07Smrg aix|svr4|both) 872048e5ce07Smrg ;; 872148e5ce07Smrg *) 872248e5ce07Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 872348e5ce07Smrg ;; 872448e5ce07Smrg esac 872548e5ce07Smrg lt_cv_with_aix_soname=$with_aix_soname], 872648e5ce07Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 872748e5ce07Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 872848e5ce07Smrg with_aix_soname=$lt_cv_with_aix_soname]) 872948e5ce07Smrg AC_MSG_RESULT([$with_aix_soname]) 873048e5ce07Smrg if test aix != "$with_aix_soname"; then 873148e5ce07Smrg # For the AIX way of multilib, we name the shared archive member 873248e5ce07Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 873348e5ce07Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 873448e5ce07Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 873548e5ce07Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 873648e5ce07Smrg if test 64 = "${OBJECT_MODE-32}"; then 873748e5ce07Smrg shared_archive_member_spec=shr_64 873848e5ce07Smrg else 873948e5ce07Smrg shared_archive_member_spec=shr 874048e5ce07Smrg fi 874148e5ce07Smrg fi 874248e5ce07Smrg ;; 874348e5ce07Smrg*) 874448e5ce07Smrg with_aix_soname=aix 874548e5ce07Smrg ;; 874648e5ce07Smrgesac 874748e5ce07Smrg 874848e5ce07Smrg_LT_DECL([], [shared_archive_member_spec], [0], 874948e5ce07Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 875048e5ce07Smrg])# _LT_WITH_AIX_SONAME 875148e5ce07Smrg 875248e5ce07SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 875348e5ce07SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 875448e5ce07SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 875548e5ce07Smrg 875648e5ce07Smrg 875706c34b88Smrg# _LT_WITH_PIC([MODE]) 875806c34b88Smrg# -------------------- 875948e5ce07Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 876006c34b88Smrg# LT_INIT options. 876148e5ce07Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 876206c34b88Smrgm4_define([_LT_WITH_PIC], 876306c34b88Smrg[AC_ARG_WITH([pic], 876406c34b88Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 876506c34b88Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 876606c34b88Smrg [lt_p=${PACKAGE-default} 876706c34b88Smrg case $withval in 876806c34b88Smrg yes|no) pic_mode=$withval ;; 876906c34b88Smrg *) 877006c34b88Smrg pic_mode=default 877106c34b88Smrg # Look at the argument we got. We use all the common list separators. 877248e5ce07Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 877306c34b88Smrg for lt_pkg in $withval; do 877448e5ce07Smrg IFS=$lt_save_ifs 877506c34b88Smrg if test "X$lt_pkg" = "X$lt_p"; then 877606c34b88Smrg pic_mode=yes 877706c34b88Smrg fi 877806c34b88Smrg done 877948e5ce07Smrg IFS=$lt_save_ifs 878006c34b88Smrg ;; 878106c34b88Smrg esac], 878248e5ce07Smrg [pic_mode=m4_default([$1], [default])]) 8783c43cc173Smrg 878406c34b88Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 878506c34b88Smrg])# _LT_WITH_PIC 878637eb1ca1Smrg 878706c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 878806c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 878989069ce9Smrg 879006c34b88Smrg# Old name: 879106c34b88SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 879206c34b88Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 879306c34b88SmrgAC_DIAGNOSE([obsolete], 879406c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 879548e5ce07Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 879606c34b88Smrg]) 879789069ce9Smrg 879806c34b88Smrgdnl aclocal-1.4 backwards compatibility: 879906c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 880089069ce9Smrg 880189069ce9Smrg 880206c34b88Smrgm4_define([_LTDL_MODE], []) 880306c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 880406c34b88Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 880506c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 880606c34b88Smrg [m4_define([_LTDL_MODE], [recursive])]) 880706c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 880806c34b88Smrg [m4_define([_LTDL_MODE], [subproject])]) 880906c34b88Smrg 881006c34b88Smrgm4_define([_LTDL_TYPE], []) 881106c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 881206c34b88Smrg [m4_define([_LTDL_TYPE], [installable])]) 881306c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 881406c34b88Smrg [m4_define([_LTDL_TYPE], [convenience])]) 881506c34b88Smrg 881606c34b88Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8817b789ec8aSmrg# 881848e5ce07Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 881948e5ce07Smrg# Foundation, Inc. 882006c34b88Smrg# Written by Gary V. Vaughan, 2004 8821b789ec8aSmrg# 882206c34b88Smrg# This file is free software; the Free Software Foundation gives 882306c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 882406c34b88Smrg# modifications, as long as this notice is preserved. 882589069ce9Smrg 882606c34b88Smrg# serial 6 ltsugar.m4 8827f1ee322dSmrg 882806c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 882906c34b88SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 883089069ce9Smrg 883106c34b88Smrg 883206c34b88Smrg# lt_join(SEP, ARG1, [ARG2...]) 883306c34b88Smrg# ----------------------------- 883406c34b88Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 883506c34b88Smrg# associated separator. 883606c34b88Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 883706c34b88Smrg# versions in m4sugar had bugs. 883806c34b88Smrgm4_define([lt_join], 883906c34b88Smrg[m4_if([$#], [1], [], 884006c34b88Smrg [$#], [2], [[$2]], 884106c34b88Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 884206c34b88Smrgm4_define([_lt_join], 884306c34b88Smrg[m4_if([$#$2], [2], [], 884406c34b88Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 884506c34b88Smrg 884606c34b88Smrg 884706c34b88Smrg# lt_car(LIST) 884806c34b88Smrg# lt_cdr(LIST) 884906c34b88Smrg# ------------ 885006c34b88Smrg# Manipulate m4 lists. 885106c34b88Smrg# These macros are necessary as long as will still need to support 885248e5ce07Smrg# Autoconf-2.59, which quotes differently. 885306c34b88Smrgm4_define([lt_car], [[$1]]) 885406c34b88Smrgm4_define([lt_cdr], 885506c34b88Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 885606c34b88Smrg [$#], 1, [], 885706c34b88Smrg [m4_dquote(m4_shift($@))])]) 885806c34b88Smrgm4_define([lt_unquote], $1) 885906c34b88Smrg 886006c34b88Smrg 886106c34b88Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 886206c34b88Smrg# ------------------------------------------ 886348e5ce07Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 886406c34b88Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 886506c34b88Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 886606c34b88Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 886706c34b88Smrg# than defined and empty). 8868b789ec8aSmrg# 886906c34b88Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 887006c34b88Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 887106c34b88Smrgm4_define([lt_append], 887206c34b88Smrg[m4_define([$1], 887306c34b88Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 887406c34b88Smrg 887506c34b88Smrg 887606c34b88Smrg 887706c34b88Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 887806c34b88Smrg# ---------------------------------------------------------- 887906c34b88Smrg# Produce a SEP delimited list of all paired combinations of elements of 888006c34b88Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 888106c34b88Smrg# has the form PREFIXmINFIXSUFFIXn. 888206c34b88Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 888306c34b88Smrgm4_define([lt_combine], 888406c34b88Smrg[m4_if(m4_eval([$# > 3]), [1], 888506c34b88Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 888606c34b88Smrg[[m4_foreach([_Lt_prefix], [$2], 888706c34b88Smrg [m4_foreach([_Lt_suffix], 888806c34b88Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 888906c34b88Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 889006c34b88Smrg 889106c34b88Smrg 889206c34b88Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 889306c34b88Smrg# ----------------------------------------------------------------------- 889406c34b88Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 889506c34b88Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 889606c34b88Smrgm4_define([lt_if_append_uniq], 889706c34b88Smrg[m4_ifdef([$1], 889806c34b88Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 889906c34b88Smrg [lt_append([$1], [$2], [$3])$4], 890006c34b88Smrg [$5])], 890106c34b88Smrg [lt_append([$1], [$2], [$3])$4])]) 890206c34b88Smrg 890306c34b88Smrg 890406c34b88Smrg# lt_dict_add(DICT, KEY, VALUE) 890506c34b88Smrg# ----------------------------- 890606c34b88Smrgm4_define([lt_dict_add], 890706c34b88Smrg[m4_define([$1($2)], [$3])]) 890806c34b88Smrg 890906c34b88Smrg 891006c34b88Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 891106c34b88Smrg# -------------------------------------------- 891206c34b88Smrgm4_define([lt_dict_add_subkey], 891306c34b88Smrg[m4_define([$1($2:$3)], [$4])]) 891406c34b88Smrg 891506c34b88Smrg 891606c34b88Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 891706c34b88Smrg# ---------------------------------- 891806c34b88Smrgm4_define([lt_dict_fetch], 891906c34b88Smrg[m4_ifval([$3], 892006c34b88Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 892106c34b88Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8922c43cc173Smrg 8923c43cc173Smrg 892406c34b88Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 892506c34b88Smrg# ----------------------------------------------------------------- 892606c34b88Smrgm4_define([lt_if_dict_fetch], 892706c34b88Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 892806c34b88Smrg [$5], 892906c34b88Smrg [$6])]) 893006c34b88Smrg 893106c34b88Smrg 893206c34b88Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 893306c34b88Smrg# -------------------------------------------------------------- 893406c34b88Smrgm4_define([lt_dict_filter], 893506c34b88Smrg[m4_if([$5], [], [], 893606c34b88Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 893706c34b88Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 893806c34b88Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 893906c34b88Smrg]) 894006c34b88Smrg 894106c34b88Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8942b789ec8aSmrg# 894348e5ce07Smrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 894406c34b88Smrg# Written by Scott James Remnant, 2004 8945b789ec8aSmrg# 894606c34b88Smrg# This file is free software; the Free Software Foundation gives 894706c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 894806c34b88Smrg# modifications, as long as this notice is preserved. 894906c34b88Smrg 895006c34b88Smrg# @configure_input@ 895106c34b88Smrg 895248e5ce07Smrg# serial 4179 ltversion.m4 895306c34b88Smrg# This file is part of GNU Libtool 895406c34b88Smrg 895548e5ce07Smrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 895648e5ce07Smrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 895706c34b88Smrg 895806c34b88SmrgAC_DEFUN([LTVERSION_VERSION], 895948e5ce07Smrg[macro_version='2.4.6' 896048e5ce07Smrgmacro_revision='2.4.6' 896106c34b88Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 896206c34b88Smrg_LT_DECL(, macro_revision, 0) 896306c34b88Smrg]) 896406c34b88Smrg 896506c34b88Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8966b789ec8aSmrg# 896748e5ce07Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 896848e5ce07Smrg# Foundation, Inc. 896906c34b88Smrg# Written by Scott James Remnant, 2004. 897006c34b88Smrg# 897106c34b88Smrg# This file is free software; the Free Software Foundation gives 897206c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 897306c34b88Smrg# modifications, as long as this notice is preserved. 8974b789ec8aSmrg 897506c34b88Smrg# serial 5 lt~obsolete.m4 897606c34b88Smrg 897706c34b88Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8978b789ec8aSmrg# 897948e5ce07Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 898006c34b88Smrg# which have later been changed to m4_define as they aren't part of the 898106c34b88Smrg# exported API, or moved to Autoconf or Automake where they belong. 8982b789ec8aSmrg# 898306c34b88Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 898406c34b88Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 898506c34b88Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 898606c34b88Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 898706c34b88Smrg# and doesn't know about Autoconf macros at all.) 8988b789ec8aSmrg# 898906c34b88Smrg# So we provide this file, which has a silly filename so it's always 899006c34b88Smrg# included after everything else. This provides aclocal with the 899106c34b88Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 899206c34b88Smrg# because those macros already exist, or will be overwritten later. 899348e5ce07Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 899406c34b88Smrg# 899506c34b88Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 899606c34b88Smrg# Yes, that means every name once taken will need to remain here until 899706c34b88Smrg# we give up compatibility with versions before 1.7, at which point 899806c34b88Smrg# we need to keep only those names which we still refer to. 8999b789ec8aSmrg 900006c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 900106c34b88SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 900206c34b88Smrg 900306c34b88Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 900406c34b88Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 900506c34b88Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 900606c34b88Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 900706c34b88Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 900806c34b88Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 900906c34b88Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 901006c34b88Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 901106c34b88Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 901206c34b88Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 901306c34b88Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 901406c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 901506c34b88Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 901606c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 901706c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 901806c34b88Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 901906c34b88Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 902006c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 902106c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 902206c34b88Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 902306c34b88Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 902406c34b88Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 902506c34b88Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 902606c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 902706c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 902806c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 902906c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 903006c34b88Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 903106c34b88Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 903206c34b88Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 903306c34b88Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 903406c34b88Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 903506c34b88Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 903606c34b88Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 903706c34b88Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 903806c34b88Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 903906c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 904006c34b88Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 904106c34b88Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 904206c34b88Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 904306c34b88Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 904406c34b88Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 904506c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 904606c34b88Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 904706c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 904806c34b88Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 904906c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 905006c34b88Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 905106c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 905206c34b88Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 905306c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 905406c34b88Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 905506c34b88Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 905606c34b88Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 905706c34b88Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 905806c34b88Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 905906c34b88Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 906006c34b88Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 906106c34b88Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 906206c34b88Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 906306c34b88Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 906406c34b88Smrg 90654940c694Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 90664940c694Smrg# serial 11 (pkg-config-0.29.1) 90674940c694Smrg 906848e5ce07Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 906948e5ce07Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 907048e5ce07Smrgdnl 907148e5ce07Smrgdnl This program is free software; you can redistribute it and/or modify 907248e5ce07Smrgdnl it under the terms of the GNU General Public License as published by 907348e5ce07Smrgdnl the Free Software Foundation; either version 2 of the License, or 907448e5ce07Smrgdnl (at your option) any later version. 907548e5ce07Smrgdnl 907648e5ce07Smrgdnl This program is distributed in the hope that it will be useful, but 907748e5ce07Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 907848e5ce07Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 907948e5ce07Smrgdnl General Public License for more details. 908048e5ce07Smrgdnl 908148e5ce07Smrgdnl You should have received a copy of the GNU General Public License 908248e5ce07Smrgdnl along with this program; if not, write to the Free Software 908348e5ce07Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 908448e5ce07Smrgdnl 02111-1307, USA. 908548e5ce07Smrgdnl 908648e5ce07Smrgdnl As a special exception to the GNU General Public License, if you 908748e5ce07Smrgdnl distribute this file as part of a program that contains a 908848e5ce07Smrgdnl configuration script generated by Autoconf, you may include it under 908948e5ce07Smrgdnl the same distribution terms that you use for the rest of that 909048e5ce07Smrgdnl program. 909148e5ce07Smrg 909248e5ce07Smrgdnl PKG_PREREQ(MIN-VERSION) 909348e5ce07Smrgdnl ----------------------- 909448e5ce07Smrgdnl Since: 0.29 909548e5ce07Smrgdnl 909648e5ce07Smrgdnl Verify that the version of the pkg-config macros are at least 909748e5ce07Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 909848e5ce07Smrgdnl installed version of pkg-config, this checks the developer's version 909948e5ce07Smrgdnl of pkg.m4 when generating configure. 910048e5ce07Smrgdnl 910148e5ce07Smrgdnl To ensure that this macro is defined, also add: 910248e5ce07Smrgdnl m4_ifndef([PKG_PREREQ], 910348e5ce07Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 910448e5ce07Smrgdnl 910548e5ce07Smrgdnl See the "Since" comment for each macro you use to see what version 910648e5ce07Smrgdnl of the macros you require. 910748e5ce07Smrgm4_defun([PKG_PREREQ], 910848e5ce07Smrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 910948e5ce07Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 911048e5ce07Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 911148e5ce07Smrg])dnl PKG_PREREQ 911248e5ce07Smrg 911348e5ce07Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 911448e5ce07Smrgdnl ---------------------------------- 911548e5ce07Smrgdnl Since: 0.16 911648e5ce07Smrgdnl 911748e5ce07Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 911848e5ce07Smrgdnl first found in the path. Checks that the version of pkg-config found 911948e5ce07Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 912048e5ce07Smrgdnl used since that's the first version where most current features of 912148e5ce07Smrgdnl pkg-config existed. 912206c34b88SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 912306c34b88Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9124dc9477beSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9125dc9477beSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 912606c34b88SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 912706c34b88SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 912806c34b88SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 912906c34b88Smrg 913006c34b88Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 913106c34b88Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 913206c34b88Smrgfi 913306c34b88Smrgif test -n "$PKG_CONFIG"; then 913406c34b88Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 913506c34b88Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 913606c34b88Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 913706c34b88Smrg AC_MSG_RESULT([yes]) 913806c34b88Smrg else 913906c34b88Smrg AC_MSG_RESULT([no]) 914006c34b88Smrg PKG_CONFIG="" 914106c34b88Smrg fi 914206c34b88Smrgfi[]dnl 914348e5ce07Smrg])dnl PKG_PROG_PKG_CONFIG 9144b789ec8aSmrg 914548e5ce07Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 914648e5ce07Smrgdnl ------------------------------------------------------------------- 914748e5ce07Smrgdnl Since: 0.18 914848e5ce07Smrgdnl 914948e5ce07Smrgdnl Check to see whether a particular set of modules exists. Similar to 915048e5ce07Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 915148e5ce07Smrgdnl 915248e5ce07Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 915348e5ce07Smrgdnl only at the first occurence in configure.ac, so if the first place 915448e5ce07Smrgdnl it's called might be skipped (such as if it is within an "if", you 915548e5ce07Smrgdnl have to call PKG_CHECK_EXISTS manually 915606c34b88SmrgAC_DEFUN([PKG_CHECK_EXISTS], 915706c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 915806c34b88Smrgif test -n "$PKG_CONFIG" && \ 915906c34b88Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 916006c34b88Smrg m4_default([$2], [:]) 916106c34b88Smrgm4_ifvaln([$3], [else 916206c34b88Smrg $3])dnl 916306c34b88Smrgfi]) 9164b789ec8aSmrg 916548e5ce07Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 916648e5ce07Smrgdnl --------------------------------------------- 916748e5ce07Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 916848e5ce07Smrgdnl pkg_failed based on the result. 916906c34b88Smrgm4_define([_PKG_CONFIG], 917006c34b88Smrg[if test -n "$$1"; then 917106c34b88Smrg pkg_cv_[]$1="$$1" 917206c34b88Smrg elif test -n "$PKG_CONFIG"; then 917306c34b88Smrg PKG_CHECK_EXISTS([$3], 9174dc9477beSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9175dc9477beSmrg test "x$?" != "x0" && pkg_failed=yes ], 917606c34b88Smrg [pkg_failed=yes]) 917706c34b88Smrg else 917806c34b88Smrg pkg_failed=untried 917906c34b88Smrgfi[]dnl 918048e5ce07Smrg])dnl _PKG_CONFIG 918106c34b88Smrg 918248e5ce07Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 918348e5ce07Smrgdnl --------------------------- 918448e5ce07Smrgdnl Internal check to see if pkg-config supports short errors. 918506c34b88SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 918606c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 918706c34b88Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 918806c34b88Smrg _pkg_short_errors_supported=yes 918906c34b88Smrgelse 919006c34b88Smrg _pkg_short_errors_supported=no 919106c34b88Smrgfi[]dnl 919248e5ce07Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 919306c34b88Smrg 919406c34b88Smrg 919548e5ce07Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 919648e5ce07Smrgdnl [ACTION-IF-NOT-FOUND]) 919748e5ce07Smrgdnl -------------------------------------------------------------- 919848e5ce07Smrgdnl Since: 0.4.0 919948e5ce07Smrgdnl 920048e5ce07Smrgdnl Note that if there is a possibility the first call to 920148e5ce07Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 920248e5ce07Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 920306c34b88SmrgAC_DEFUN([PKG_CHECK_MODULES], 920406c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 920506c34b88SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 920606c34b88SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9207f1ee322dSmrg 920806c34b88Smrgpkg_failed=no 920906c34b88SmrgAC_MSG_CHECKING([for $1]) 921006c34b88Smrg 921106c34b88Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 921206c34b88Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 921306c34b88Smrg 921406c34b88Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 921506c34b88Smrgand $1[]_LIBS to avoid the need to call pkg-config. 921606c34b88SmrgSee the pkg-config man page for more details.]) 921706c34b88Smrg 921806c34b88Smrgif test $pkg_failed = yes; then 921906c34b88Smrg AC_MSG_RESULT([no]) 922006c34b88Smrg _PKG_SHORT_ERRORS_SUPPORTED 922106c34b88Smrg if test $_pkg_short_errors_supported = yes; then 9222dc9477beSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 922306c34b88Smrg else 9224dc9477beSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 922506c34b88Smrg fi 922606c34b88Smrg # Put the nasty error message in config.log where it belongs 922706c34b88Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 922806c34b88Smrg 922906c34b88Smrg m4_default([$4], [AC_MSG_ERROR( 923006c34b88Smrg[Package requirements ($2) were not met: 923106c34b88Smrg 923206c34b88Smrg$$1_PKG_ERRORS 923306c34b88Smrg 923406c34b88SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 923506c34b88Smrginstalled software in a non-standard prefix. 923606c34b88Smrg 9237dc9477beSmrg_PKG_TEXT])[]dnl 923806c34b88Smrg ]) 923906c34b88Smrgelif test $pkg_failed = untried; then 924006c34b88Smrg AC_MSG_RESULT([no]) 924106c34b88Smrg m4_default([$4], [AC_MSG_FAILURE( 924206c34b88Smrg[The pkg-config script could not be found or is too old. Make sure it 924306c34b88Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 924406c34b88Smrgpath to pkg-config. 924506c34b88Smrg 924606c34b88Smrg_PKG_TEXT 924706c34b88Smrg 9248dc9477beSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 924906c34b88Smrg ]) 925006c34b88Smrgelse 925106c34b88Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 925206c34b88Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 925306c34b88Smrg AC_MSG_RESULT([yes]) 925406c34b88Smrg $3 925506c34b88Smrgfi[]dnl 925648e5ce07Smrg])dnl PKG_CHECK_MODULES 925706c34b88Smrg 925806c34b88Smrg 925948e5ce07Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 926048e5ce07Smrgdnl [ACTION-IF-NOT-FOUND]) 926148e5ce07Smrgdnl --------------------------------------------------------------------- 926248e5ce07Smrgdnl Since: 0.29 926348e5ce07Smrgdnl 926448e5ce07Smrgdnl Checks for existence of MODULES and gathers its build flags with 926548e5ce07Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 926648e5ce07Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 926748e5ce07Smrgdnl 926848e5ce07Smrgdnl Note that if there is a possibility the first call to 926948e5ce07Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 927048e5ce07Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 927148e5ce07Smrgdnl configure.ac. 927248e5ce07SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 927348e5ce07Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 927448e5ce07Smrg_save_PKG_CONFIG=$PKG_CONFIG 927548e5ce07SmrgPKG_CONFIG="$PKG_CONFIG --static" 927648e5ce07SmrgPKG_CHECK_MODULES($@) 927748e5ce07SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 927848e5ce07Smrg])dnl PKG_CHECK_MODULES_STATIC 927944584a44Smrg 928044584a44Smrg 928148e5ce07Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 928248e5ce07Smrgdnl ------------------------- 928348e5ce07Smrgdnl Since: 0.27 928448e5ce07Smrgdnl 928548e5ce07Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 928648e5ce07Smrgdnl should install pkg-config .pc files. By default the directory is 928748e5ce07Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 928848e5ce07Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 928948e5ce07Smrgdnl parameter. 929048e5ce07SmrgAC_DEFUN([PKG_INSTALLDIR], 929148e5ce07Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 929248e5ce07Smrgm4_pushdef([pkg_description], 929348e5ce07Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 929448e5ce07SmrgAC_ARG_WITH([pkgconfigdir], 929548e5ce07Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 929648e5ce07Smrg [with_pkgconfigdir=]pkg_default) 929748e5ce07SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 929848e5ce07Smrgm4_popdef([pkg_default]) 929948e5ce07Smrgm4_popdef([pkg_description]) 930048e5ce07Smrg])dnl PKG_INSTALLDIR 930148e5ce07Smrg 930248e5ce07Smrg 930348e5ce07Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 930448e5ce07Smrgdnl -------------------------------- 930548e5ce07Smrgdnl Since: 0.27 930648e5ce07Smrgdnl 930748e5ce07Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 930848e5ce07Smrgdnl module should install arch-independent pkg-config .pc files. By 930948e5ce07Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 931048e5ce07Smrgdnl changed by passing DIRECTORY. The user can override through the 931148e5ce07Smrgdnl --with-noarch-pkgconfigdir parameter. 931248e5ce07SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 931348e5ce07Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 931448e5ce07Smrgm4_pushdef([pkg_description], 931548e5ce07Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 931648e5ce07SmrgAC_ARG_WITH([noarch-pkgconfigdir], 931748e5ce07Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 931848e5ce07Smrg [with_noarch_pkgconfigdir=]pkg_default) 931948e5ce07SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 932048e5ce07Smrgm4_popdef([pkg_default]) 932148e5ce07Smrgm4_popdef([pkg_description]) 932248e5ce07Smrg])dnl PKG_NOARCH_INSTALLDIR 932348e5ce07Smrg 932448e5ce07Smrg 932548e5ce07Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 932648e5ce07Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 932748e5ce07Smrgdnl ------------------------------------------- 932848e5ce07Smrgdnl Since: 0.28 932948e5ce07Smrgdnl 933048e5ce07Smrgdnl Retrieves the value of the pkg-config variable for the given module. 933148e5ce07SmrgAC_DEFUN([PKG_CHECK_VAR], 933248e5ce07Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 933348e5ce07SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 933444584a44Smrg 933548e5ce07Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 933648e5ce07SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 933744584a44Smrg 933848e5ce07SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 933948e5ce07Smrg])dnl PKG_CHECK_VAR 934044584a44Smrg 93414940c694Smrgdnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 93424940c694Smrgdnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 93434940c694Smrgdnl [DESCRIPTION], [DEFAULT]) 93444940c694Smrgdnl ------------------------------------------ 93454940c694Smrgdnl 93464940c694Smrgdnl Prepare a "--with-" configure option using the lowercase 93474940c694Smrgdnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 93484940c694Smrgdnl PKG_CHECK_MODULES in a single macro. 93494940c694SmrgAC_DEFUN([PKG_WITH_MODULES], 93504940c694Smrg[ 93514940c694Smrgm4_pushdef([with_arg], m4_tolower([$1])) 93524940c694Smrg 93534940c694Smrgm4_pushdef([description], 93544940c694Smrg [m4_default([$5], [build with ]with_arg[ support])]) 93554940c694Smrg 93564940c694Smrgm4_pushdef([def_arg], [m4_default([$6], [auto])]) 93574940c694Smrgm4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 93584940c694Smrgm4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 93594940c694Smrg 93604940c694Smrgm4_case(def_arg, 93614940c694Smrg [yes],[m4_pushdef([with_without], [--without-]with_arg)], 93624940c694Smrg [m4_pushdef([with_without],[--with-]with_arg)]) 93634940c694Smrg 93644940c694SmrgAC_ARG_WITH(with_arg, 93654940c694Smrg AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 93664940c694Smrg [AS_TR_SH([with_]with_arg)=def_arg]) 93674940c694Smrg 93684940c694SmrgAS_CASE([$AS_TR_SH([with_]with_arg)], 93694940c694Smrg [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 93704940c694Smrg [auto],[PKG_CHECK_MODULES([$1],[$2], 93714940c694Smrg [m4_n([def_action_if_found]) $3], 93724940c694Smrg [m4_n([def_action_if_not_found]) $4])]) 93734940c694Smrg 93744940c694Smrgm4_popdef([with_arg]) 93754940c694Smrgm4_popdef([description]) 93764940c694Smrgm4_popdef([def_arg]) 93774940c694Smrg 93784940c694Smrg])dnl PKG_WITH_MODULES 93794940c694Smrg 93804940c694Smrgdnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 93814940c694Smrgdnl [DESCRIPTION], [DEFAULT]) 93824940c694Smrgdnl ----------------------------------------------- 93834940c694Smrgdnl 93844940c694Smrgdnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 93854940c694Smrgdnl check._[VARIABLE-PREFIX] is exported as make variable. 93864940c694SmrgAC_DEFUN([PKG_HAVE_WITH_MODULES], 93874940c694Smrg[ 93884940c694SmrgPKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 93894940c694Smrg 93904940c694SmrgAM_CONDITIONAL([HAVE_][$1], 93914940c694Smrg [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 93924940c694Smrg])dnl PKG_HAVE_WITH_MODULES 93934940c694Smrg 93944940c694Smrgdnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 93954940c694Smrgdnl [DESCRIPTION], [DEFAULT]) 93964940c694Smrgdnl ------------------------------------------------------ 93974940c694Smrgdnl 93984940c694Smrgdnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 93994940c694Smrgdnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 94004940c694Smrgdnl and preprocessor variable. 94014940c694SmrgAC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 94024940c694Smrg[ 94034940c694SmrgPKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 94044940c694Smrg 94054940c694SmrgAS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 94064940c694Smrg [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 94074940c694Smrg])dnl PKG_HAVE_DEFINE_WITH_MODULES 94084940c694Smrg 940948e5ce07Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 941048e5ce07Smrgdnl 94114940c694Smrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 941248e5ce07Smrgdnl 941348e5ce07Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 941448e5ce07Smrgdnl copy of this software and associated documentation files (the "Software"), 941548e5ce07Smrgdnl to deal in the Software without restriction, including without limitation 941648e5ce07Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 941748e5ce07Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 941848e5ce07Smrgdnl Software is furnished to do so, subject to the following conditions: 941948e5ce07Smrgdnl 942048e5ce07Smrgdnl The above copyright notice and this permission notice (including the next 942148e5ce07Smrgdnl paragraph) shall be included in all copies or substantial portions of the 942248e5ce07Smrgdnl Software. 942348e5ce07Smrgdnl 942448e5ce07Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 942548e5ce07Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 942648e5ce07Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 942748e5ce07Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 942848e5ce07Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 942948e5ce07Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 943048e5ce07Smrgdnl DEALINGS IN THE SOFTWARE. 943148e5ce07Smrg 943248e5ce07Smrg# XORG_MACROS_VERSION(required-version) 943348e5ce07Smrg# ------------------------------------- 943448e5ce07Smrg# Minimum version: 1.1.0 9435b789ec8aSmrg# 943648e5ce07Smrg# If you're using a macro added in Version 1.1 or newer, include this in 943748e5ce07Smrg# your configure.ac with the minimum required version, such as: 943848e5ce07Smrg# XORG_MACROS_VERSION(1.1) 9439f1ee322dSmrg# 944048e5ce07Smrg# To ensure that this macro is defined, also add: 944148e5ce07Smrg# m4_ifndef([XORG_MACROS_VERSION], 944248e5ce07Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 944306c34b88Smrg# 944444584a44Smrg# 944548e5ce07Smrg# See the "minimum version" comment for each macro you use to see what 944648e5ce07Smrg# version you require. 944748e5ce07Smrgm4_defun([XORG_MACROS_VERSION],[ 94484940c694Smrgm4_define([vers_have], [1.19.2]) 944948e5ce07Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 945048e5ce07Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 945148e5ce07Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 945248e5ce07Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 945348e5ce07Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 945448e5ce07Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 945548e5ce07Smrgm4_undefine([vers_have]) 945648e5ce07Smrgm4_undefine([maj_have]) 945748e5ce07Smrgm4_undefine([maj_needed]) 945848e5ce07Smrg]) # XORG_MACROS_VERSION 945944584a44Smrg 946048e5ce07Smrg# XORG_PROG_RAWCPP() 946148e5ce07Smrg# ------------------ 946248e5ce07Smrg# Minimum version: 1.0.0 946344584a44Smrg# 946448e5ce07Smrg# Find cpp program and necessary flags for use in pre-processing text files 946548e5ce07Smrg# such as man pages and config files 946648e5ce07SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 946748e5ce07SmrgAC_REQUIRE([AC_PROG_CPP]) 946848e5ce07SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 946948e5ce07Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 947044584a44Smrg 947148e5ce07Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 947248e5ce07Smrg# which is not the best choice for supporting other OS'es, but covers most 947348e5ce07Smrg# of the ones we need for now. 947448e5ce07SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 947548e5ce07SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 947648e5ce07Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 947748e5ce07Smrg AC_MSG_RESULT([no]) 947806c34b88Smrgelse 947948e5ce07Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 948048e5ce07Smrg RAWCPPFLAGS=-undef 948148e5ce07Smrg AC_MSG_RESULT([yes]) 948248e5ce07Smrg # under Cygwin unix is still defined even with -undef 948348e5ce07Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 948448e5ce07Smrg RAWCPPFLAGS="-undef -ansi" 948548e5ce07Smrg AC_MSG_RESULT([yes, with -ansi]) 948648e5ce07Smrg else 948748e5ce07Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 948848e5ce07Smrg fi 948948e5ce07Smrgfi 949048e5ce07Smrgrm -f conftest.$ac_ext 9491c43cc173Smrg 949248e5ce07SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 949348e5ce07SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 949448e5ce07Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 949548e5ce07Smrg AC_MSG_RESULT([no]) 949648e5ce07Smrgelse 949748e5ce07Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 949848e5ce07Smrg TRADITIONALCPPFLAGS="-traditional" 949948e5ce07Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 950048e5ce07Smrg AC_MSG_RESULT([yes]) 950148e5ce07Smrg else 950248e5ce07Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 950348e5ce07Smrg fi 950448e5ce07Smrgfi 950548e5ce07Smrgrm -f conftest.$ac_ext 950648e5ce07SmrgAC_SUBST(RAWCPPFLAGS) 950748e5ce07SmrgAC_SUBST(TRADITIONALCPPFLAGS) 950848e5ce07Smrg]) # XORG_PROG_RAWCPP 9509c43cc173Smrg 951048e5ce07Smrg# XORG_MANPAGE_SECTIONS() 951148e5ce07Smrg# ----------------------- 951248e5ce07Smrg# Minimum version: 1.0.0 951344584a44Smrg# 951448e5ce07Smrg# Determine which sections man pages go in for the different man page types 951548e5ce07Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 951648e5ce07Smrg# Not sure if there's any better way than just hardcoding by OS name. 951748e5ce07Smrg# Override default settings by setting environment variables 951848e5ce07Smrg# Added MAN_SUBSTS in version 1.8 951948e5ce07Smrg# Added AC_PROG_SED in version 1.8 9520b789ec8aSmrg 952148e5ce07SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 952248e5ce07SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 952348e5ce07SmrgAC_REQUIRE([AC_PROG_SED]) 9524b789ec8aSmrg 95254940c694Smrgcase $host_os in 95264940c694Smrg solaris*) 95274940c694Smrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 95284940c694Smrg # check for a man page file found in later versions that use 95294940c694Smrg # traditional section numbers instead 95304940c694Smrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 95314940c694Smrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 95324940c694Smrg ;; 95334940c694Smrg *) SYSV_MAN_SECTIONS=false ;; 95344940c694Smrgesac 95354940c694Smrg 953648e5ce07Smrgif test x$APP_MAN_SUFFIX = x ; then 953748e5ce07Smrg APP_MAN_SUFFIX=1 953848e5ce07Smrgfi 953948e5ce07Smrgif test x$APP_MAN_DIR = x ; then 954048e5ce07Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 954148e5ce07Smrgfi 954244584a44Smrg 954348e5ce07Smrgif test x$LIB_MAN_SUFFIX = x ; then 954448e5ce07Smrg LIB_MAN_SUFFIX=3 954548e5ce07Smrgfi 954648e5ce07Smrgif test x$LIB_MAN_DIR = x ; then 954748e5ce07Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 954848e5ce07Smrgfi 954944584a44Smrg 955048e5ce07Smrgif test x$FILE_MAN_SUFFIX = x ; then 95514940c694Smrg case $SYSV_MAN_SECTIONS in 95524940c694Smrg true) FILE_MAN_SUFFIX=4 ;; 95534940c694Smrg *) FILE_MAN_SUFFIX=5 ;; 955406c34b88Smrg esac 955506c34b88Smrgfi 955648e5ce07Smrgif test x$FILE_MAN_DIR = x ; then 955748e5ce07Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 955848e5ce07Smrgfi 955906c34b88Smrg 956048e5ce07Smrgif test x$MISC_MAN_SUFFIX = x ; then 95614940c694Smrg case $SYSV_MAN_SECTIONS in 95624940c694Smrg true) MISC_MAN_SUFFIX=5 ;; 95634940c694Smrg *) MISC_MAN_SUFFIX=7 ;; 956448e5ce07Smrg esac 956548e5ce07Smrgfi 956648e5ce07Smrgif test x$MISC_MAN_DIR = x ; then 956748e5ce07Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 956848e5ce07Smrgfi 956906c34b88Smrg 957048e5ce07Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 95714940c694Smrg case $SYSV_MAN_SECTIONS in 95724940c694Smrg true) DRIVER_MAN_SUFFIX=7 ;; 95734940c694Smrg *) DRIVER_MAN_SUFFIX=4 ;; 957448e5ce07Smrg esac 957548e5ce07Smrgfi 957648e5ce07Smrgif test x$DRIVER_MAN_DIR = x ; then 957748e5ce07Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 957848e5ce07Smrgfi 957906c34b88Smrg 958048e5ce07Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 95814940c694Smrg case $SYSV_MAN_SECTIONS in 95824940c694Smrg true) ADMIN_MAN_SUFFIX=1m ;; 95834940c694Smrg *) ADMIN_MAN_SUFFIX=8 ;; 958448e5ce07Smrg esac 958548e5ce07Smrgfi 958648e5ce07Smrgif test x$ADMIN_MAN_DIR = x ; then 958748e5ce07Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 958844584a44Smrgfi 958906c34b88Smrg 9590c43cc173Smrg 959148e5ce07SmrgAC_SUBST([APP_MAN_SUFFIX]) 959248e5ce07SmrgAC_SUBST([LIB_MAN_SUFFIX]) 959348e5ce07SmrgAC_SUBST([FILE_MAN_SUFFIX]) 959448e5ce07SmrgAC_SUBST([MISC_MAN_SUFFIX]) 959548e5ce07SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 959648e5ce07SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 959748e5ce07SmrgAC_SUBST([APP_MAN_DIR]) 959848e5ce07SmrgAC_SUBST([LIB_MAN_DIR]) 959948e5ce07SmrgAC_SUBST([FILE_MAN_DIR]) 960048e5ce07SmrgAC_SUBST([MISC_MAN_DIR]) 960148e5ce07SmrgAC_SUBST([DRIVER_MAN_DIR]) 960248e5ce07SmrgAC_SUBST([ADMIN_MAN_DIR]) 9603c43cc173Smrg 960448e5ce07SmrgXORG_MAN_PAGE="X Version 11" 960548e5ce07SmrgAC_SUBST([XORG_MAN_PAGE]) 960648e5ce07SmrgMAN_SUBSTS="\ 960748e5ce07Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 960848e5ce07Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 960948e5ce07Smrg -e 's|__xservername__|Xorg|g' \ 961048e5ce07Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 961148e5ce07Smrg -e 's|__projectroot__|\$(prefix)|g' \ 961248e5ce07Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 961348e5ce07Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 961448e5ce07Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 961548e5ce07Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 961648e5ce07Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 961748e5ce07Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 961848e5ce07Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 961948e5ce07SmrgAC_SUBST([MAN_SUBSTS]) 9620b789ec8aSmrg 962148e5ce07Smrg]) # XORG_MANPAGE_SECTIONS 9622c43cc173Smrg 962348e5ce07Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 962448e5ce07Smrg# ------------------------ 962548e5ce07Smrg# Minimum version: 1.7.0 962644584a44Smrg# 962748e5ce07Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 962848e5ce07Smrg# provided by xorg-sgml-doctools, if installed. 962948e5ce07SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 963048e5ce07SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 963148e5ce07SmrgXORG_SGML_PATH= 963248e5ce07SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 963348e5ce07Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 963448e5ce07Smrg [m4_ifval([$1],[:], 963548e5ce07Smrg [if test x"$cross_compiling" != x"yes" ; then 963648e5ce07Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 963748e5ce07Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 963848e5ce07Smrg fi]) 963948e5ce07Smrg ]) 9640c43cc173Smrg 964148e5ce07Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 964248e5ce07Smrg# the path and the name of the doc stylesheet 964348e5ce07Smrgif test "x$XORG_SGML_PATH" != "x" ; then 964448e5ce07Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 964548e5ce07Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 964648e5ce07Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 964748e5ce07Smrgelse 964848e5ce07Smrg AC_MSG_RESULT([no]) 964948e5ce07Smrgfi 965048e5ce07Smrg 965148e5ce07SmrgAC_SUBST(XORG_SGML_PATH) 965248e5ce07SmrgAC_SUBST(STYLESHEET_SRCDIR) 965348e5ce07SmrgAC_SUBST(XSL_STYLESHEET) 965448e5ce07SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 965548e5ce07Smrg]) # XORG_CHECK_SGML_DOCTOOLS 96563e256790Smrg 965748e5ce07Smrg# XORG_CHECK_LINUXDOC 965848e5ce07Smrg# ------------------- 965948e5ce07Smrg# Minimum version: 1.0.0 966006c34b88Smrg# 966148e5ce07Smrg# Defines the variable MAKE_TEXT if the necessary tools and 966248e5ce07Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 966348e5ce07Smrg# Whether or not the necessary tools and files are found can be checked 966448e5ce07Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 966548e5ce07SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 966648e5ce07SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 966748e5ce07SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9668c43cc173Smrg 966948e5ce07SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9670c43cc173Smrg 967148e5ce07SmrgAC_MSG_CHECKING([whether to build documentation]) 967221e67964Smrg 967348e5ce07Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 967448e5ce07Smrg BUILDDOC=yes 967548e5ce07Smrgelse 967648e5ce07Smrg BUILDDOC=no 967706c34b88Smrgfi 9678c43cc173Smrg 967948e5ce07SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 968048e5ce07Smrg 968148e5ce07SmrgAC_MSG_RESULT([$BUILDDOC]) 968248e5ce07Smrg 968348e5ce07SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 968448e5ce07Smrg 968548e5ce07Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 968648e5ce07Smrg BUILDPDFDOC=yes 968748e5ce07Smrgelse 968848e5ce07Smrg BUILDPDFDOC=no 968906c34b88Smrgfi 9690c43cc173Smrg 969148e5ce07SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9692c43cc173Smrg 969348e5ce07SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9694c43cc173Smrg 969548e5ce07SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 969648e5ce07SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 969748e5ce07SmrgMAKE_PDF="$PS2PDF" 969848e5ce07SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 969921e67964Smrg 970048e5ce07SmrgAC_SUBST(MAKE_TEXT) 970148e5ce07SmrgAC_SUBST(MAKE_PS) 970248e5ce07SmrgAC_SUBST(MAKE_PDF) 970348e5ce07SmrgAC_SUBST(MAKE_HTML) 970448e5ce07Smrg]) # XORG_CHECK_LINUXDOC 970544584a44Smrg 970648e5ce07Smrg# XORG_CHECK_DOCBOOK 970748e5ce07Smrg# ------------------- 970848e5ce07Smrg# Minimum version: 1.0.0 970948e5ce07Smrg# 971048e5ce07Smrg# Checks for the ability to build output formats from SGML DocBook source. 971148e5ce07Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 971248e5ce07Smrg# indicates whether the necessary tools and files are found and, if set, 971348e5ce07Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 971448e5ce07SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 971548e5ce07SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 971644584a44Smrg 971748e5ce07SmrgBUILDTXTDOC=no 971848e5ce07SmrgBUILDPDFDOC=no 971948e5ce07SmrgBUILDPSDOC=no 972048e5ce07SmrgBUILDHTMLDOC=no 9721f1ee322dSmrg 972248e5ce07SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 972348e5ce07SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 972448e5ce07SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 972548e5ce07SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 972644584a44Smrg 972748e5ce07SmrgAC_MSG_CHECKING([whether to build text documentation]) 972848e5ce07Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 972948e5ce07Smrg test x$BUILD_TXTDOC != xno; then 973048e5ce07Smrg BUILDTXTDOC=yes 973148e5ce07Smrgfi 973248e5ce07SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 973348e5ce07SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 973444584a44Smrg 973548e5ce07SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 973648e5ce07Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 973748e5ce07Smrg test x$BUILD_PDFDOC != xno; then 973848e5ce07Smrg BUILDPDFDOC=yes 973948e5ce07Smrgfi 974048e5ce07SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 974148e5ce07SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 974244584a44Smrg 974348e5ce07SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 974448e5ce07Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 974548e5ce07Smrg test x$BUILD_PSDOC != xno; then 974648e5ce07Smrg BUILDPSDOC=yes 974748e5ce07Smrgfi 974848e5ce07SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 974948e5ce07SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9750f1ee322dSmrg 975148e5ce07SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 975248e5ce07Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 975348e5ce07Smrg test x$BUILD_HTMLDOC != xno; then 975448e5ce07Smrg BUILDHTMLDOC=yes 975548e5ce07Smrgfi 975648e5ce07SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 975748e5ce07SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9758f1ee322dSmrg 975948e5ce07SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 976048e5ce07SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 976148e5ce07SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 976248e5ce07SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9763f1ee322dSmrg 976448e5ce07SmrgAC_SUBST(MAKE_TEXT) 976548e5ce07SmrgAC_SUBST(MAKE_PS) 976648e5ce07SmrgAC_SUBST(MAKE_PDF) 976748e5ce07SmrgAC_SUBST(MAKE_HTML) 976848e5ce07Smrg]) # XORG_CHECK_DOCBOOK 976944584a44Smrg 977048e5ce07Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 977148e5ce07Smrg# ---------------- 977248e5ce07Smrg# Minimum version: 1.5.0 977348e5ce07Smrg# Minimum version for optional DEFAULT argument: 1.11.0 977406c34b88Smrg# 977548e5ce07Smrg# Documentation tools are not always available on all platforms and sometimes 977648e5ce07Smrg# not at the appropriate level. This macro enables a module to test for the 977748e5ce07Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 977848e5ce07Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 977948e5ce07Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 978048e5ce07Smrg# --with-xmlto assumes 'auto'. 978106c34b88Smrg# 978248e5ce07Smrg# Interface to module: 978348e5ce07Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 978448e5ce07Smrg# XMLTO: returns the path of the xmlto program found 978548e5ce07Smrg# returns the path set by the user in the environment 978648e5ce07Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 978748e5ce07Smrg# 'no' user instructs the module not to use xmlto 978848e5ce07Smrg# 978948e5ce07Smrg# Added in version 1.10.0 979048e5ce07Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 979148e5ce07Smrg# xmlto for text output requires either lynx, links, or w3m browsers 979248e5ce07Smrg# 979348e5ce07Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 979448e5ce07Smrg# 979548e5ce07SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 979648e5ce07SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 979748e5ce07Smrgm4_define([_defopt], m4_default([$2], [auto])) 979848e5ce07SmrgAC_ARG_WITH(xmlto, 979948e5ce07Smrg AS_HELP_STRING([--with-xmlto], 980048e5ce07Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 980148e5ce07Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 980248e5ce07Smrgm4_undefine([_defopt]) 9803f1ee322dSmrg 980448e5ce07Smrgif test "x$use_xmlto" = x"auto"; then 980548e5ce07Smrg AC_PATH_PROG([XMLTO], [xmlto]) 980648e5ce07Smrg if test "x$XMLTO" = "x"; then 980748e5ce07Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 980848e5ce07Smrg have_xmlto=no 980948e5ce07Smrg else 981048e5ce07Smrg have_xmlto=yes 981148e5ce07Smrg fi 981248e5ce07Smrgelif test "x$use_xmlto" = x"yes" ; then 981348e5ce07Smrg AC_PATH_PROG([XMLTO], [xmlto]) 981448e5ce07Smrg if test "x$XMLTO" = "x"; then 981548e5ce07Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 981648e5ce07Smrg fi 981748e5ce07Smrg have_xmlto=yes 981848e5ce07Smrgelif test "x$use_xmlto" = x"no" ; then 981948e5ce07Smrg if test "x$XMLTO" != "x"; then 982048e5ce07Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 982148e5ce07Smrg fi 982248e5ce07Smrg have_xmlto=no 982306c34b88Smrgelse 982448e5ce07Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 982506c34b88Smrgfi 9826f1ee322dSmrg 982748e5ce07Smrg# Test for a minimum version of xmlto, if provided. 982848e5ce07Smrgm4_ifval([$1], 982948e5ce07Smrg[if test "$have_xmlto" = yes; then 983048e5ce07Smrg # scrape the xmlto version 983148e5ce07Smrg AC_MSG_CHECKING([the xmlto version]) 983248e5ce07Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 983348e5ce07Smrg AC_MSG_RESULT([$xmlto_version]) 983448e5ce07Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 983548e5ce07Smrg [if test "x$use_xmlto" = xauto; then 983648e5ce07Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 983748e5ce07Smrg have_xmlto=no 983848e5ce07Smrg else 983948e5ce07Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 984048e5ce07Smrg fi]) 984148e5ce07Smrgfi]) 984206c34b88Smrg 984348e5ce07Smrg# Test for the ability of xmlto to generate a text target 98444940c694Smrg# 98454940c694Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 98464940c694Smrg# following test for empty XML docbook files. 98474940c694Smrg# For compatibility reasons use the following empty XML docbook file and if 98484940c694Smrg# it fails try it again with a non-empty XML file. 984948e5ce07Smrghave_xmlto_text=no 985048e5ce07Smrgcat > conftest.xml << "EOF" 985148e5ce07SmrgEOF 985248e5ce07SmrgAS_IF([test "$have_xmlto" = yes], 985348e5ce07Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 985448e5ce07Smrg [have_xmlto_text=yes], 98554940c694Smrg [# Try it again with a non-empty XML file. 98564940c694Smrg cat > conftest.xml << "EOF" 98574940c694Smrg<x></x> 98584940c694SmrgEOF 98594940c694Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 98604940c694Smrg [have_xmlto_text=yes], 98614940c694Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 986248e5ce07Smrgrm -f conftest.xml 986348e5ce07SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 986448e5ce07SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 986548e5ce07Smrg]) # XORG_WITH_XMLTO 9866f1ee322dSmrg 986748e5ce07Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 986848e5ce07Smrg# -------------------------------------------- 986948e5ce07Smrg# Minimum version: 1.12.0 987048e5ce07Smrg# Minimum version for optional DEFAULT argument: 1.12.0 987106c34b88Smrg# 987248e5ce07Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 987348e5ce07Smrg# XML-based language used for the transformation of XML documents. 987448e5ce07Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 987548e5ce07Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 987648e5ce07Smrg# The XSLT processor is often used as a standalone tool for transformations. 987748e5ce07Smrg# It should not be assumed that this tool is used only to work with documnetation. 987848e5ce07Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 987948e5ce07Smrg# 988048e5ce07Smrg# Interface to module: 988148e5ce07Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 988248e5ce07Smrg# XSLTPROC: returns the path of the xsltproc program found 988348e5ce07Smrg# returns the path set by the user in the environment 988448e5ce07Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 988548e5ce07Smrg# 'no' user instructs the module not to use xsltproc 988648e5ce07Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 988748e5ce07Smrg# 988848e5ce07Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 988948e5ce07Smrg# 989048e5ce07SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 989148e5ce07SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 989248e5ce07Smrg# Preserves the interface, should it be implemented later 989348e5ce07Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 989448e5ce07Smrgm4_define([_defopt], m4_default([$2], [auto])) 989548e5ce07SmrgAC_ARG_WITH(xsltproc, 989648e5ce07Smrg AS_HELP_STRING([--with-xsltproc], 989748e5ce07Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 989848e5ce07Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 989948e5ce07Smrgm4_undefine([_defopt]) 990044584a44Smrg 990148e5ce07Smrgif test "x$use_xsltproc" = x"auto"; then 990248e5ce07Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 990348e5ce07Smrg if test "x$XSLTPROC" = "x"; then 990448e5ce07Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 990548e5ce07Smrg have_xsltproc=no 990648e5ce07Smrg else 990748e5ce07Smrg have_xsltproc=yes 990848e5ce07Smrg fi 990948e5ce07Smrgelif test "x$use_xsltproc" = x"yes" ; then 991048e5ce07Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 991148e5ce07Smrg if test "x$XSLTPROC" = "x"; then 991248e5ce07Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 991348e5ce07Smrg fi 991448e5ce07Smrg have_xsltproc=yes 991548e5ce07Smrgelif test "x$use_xsltproc" = x"no" ; then 991648e5ce07Smrg if test "x$XSLTPROC" != "x"; then 991748e5ce07Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 991848e5ce07Smrg fi 991948e5ce07Smrg have_xsltproc=no 9920f1ee322dSmrgelse 992148e5ce07Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9922f1ee322dSmrgfi 9923f1ee322dSmrg 992448e5ce07SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 992548e5ce07Smrg]) # XORG_WITH_XSLTPROC 992644584a44Smrg 992748e5ce07Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 992848e5ce07Smrg# ---------------------------------------- 992948e5ce07Smrg# Minimum version: 1.15.0 993006c34b88Smrg# 993148e5ce07Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 993248e5ce07Smrg# scanning arbitrary text files, extracting information from those text files, 993348e5ce07Smrg# and printing reports based on that information. 993406c34b88Smrg# 993548e5ce07Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 993648e5ce07Smrg# 993748e5ce07Smrg# Interface to module: 993848e5ce07Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 993948e5ce07Smrg# PERL: returns the path of the perl program found 994048e5ce07Smrg# returns the path set by the user in the environment 994148e5ce07Smrg# --with-perl: 'yes' user instructs the module to use perl 994248e5ce07Smrg# 'no' user instructs the module not to use perl 994348e5ce07Smrg# have_perl: returns yes if perl found in PATH or no 994448e5ce07Smrg# 994548e5ce07Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 994648e5ce07Smrg# 994748e5ce07SmrgAC_DEFUN([XORG_WITH_PERL],[ 994848e5ce07SmrgAC_ARG_VAR([PERL], [Path to perl command]) 994948e5ce07Smrg# Preserves the interface, should it be implemented later 995048e5ce07Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 995148e5ce07Smrgm4_define([_defopt], m4_default([$2], [auto])) 995248e5ce07SmrgAC_ARG_WITH(perl, 995348e5ce07Smrg AS_HELP_STRING([--with-perl], 995448e5ce07Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 995548e5ce07Smrg [use_perl=$withval], [use_perl=]_defopt) 995648e5ce07Smrgm4_undefine([_defopt]) 995744584a44Smrg 995848e5ce07Smrgif test "x$use_perl" = x"auto"; then 995948e5ce07Smrg AC_PATH_PROG([PERL], [perl]) 996048e5ce07Smrg if test "x$PERL" = "x"; then 996148e5ce07Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 996248e5ce07Smrg have_perl=no 996348e5ce07Smrg else 996448e5ce07Smrg have_perl=yes 996548e5ce07Smrg fi 996648e5ce07Smrgelif test "x$use_perl" = x"yes" ; then 996748e5ce07Smrg AC_PATH_PROG([PERL], [perl]) 996848e5ce07Smrg if test "x$PERL" = "x"; then 996948e5ce07Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 997048e5ce07Smrg fi 997148e5ce07Smrg have_perl=yes 997248e5ce07Smrgelif test "x$use_perl" = x"no" ; then 997348e5ce07Smrg if test "x$PERL" != "x"; then 997448e5ce07Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 997548e5ce07Smrg fi 997648e5ce07Smrg have_perl=no 997748e5ce07Smrgelse 997848e5ce07Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 997944584a44Smrgfi 998044584a44Smrg 998148e5ce07SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 998248e5ce07Smrg]) # XORG_WITH_PERL 998344584a44Smrg 998448e5ce07Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 998548e5ce07Smrg# ---------------- 998648e5ce07Smrg# Minimum version: 1.5.0 998748e5ce07Smrg# Minimum version for optional DEFAULT argument: 1.11.0 998806c34b88Smrg# 998948e5ce07Smrg# Documentation tools are not always available on all platforms and sometimes 999048e5ce07Smrg# not at the appropriate level. This macro enables a module to test for the 999148e5ce07Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 999248e5ce07Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 999348e5ce07Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 999448e5ce07Smrg# --with-asciidoc assumes 'auto'. 999548e5ce07Smrg# 999648e5ce07Smrg# Interface to module: 999748e5ce07Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 999848e5ce07Smrg# ASCIIDOC: returns the path of the asciidoc program found 999948e5ce07Smrg# returns the path set by the user in the environment 1000048e5ce07Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1000148e5ce07Smrg# 'no' user instructs the module not to use asciidoc 1000248e5ce07Smrg# 1000348e5ce07Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1000448e5ce07Smrg# 1000548e5ce07SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1000648e5ce07SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1000748e5ce07Smrgm4_define([_defopt], m4_default([$2], [auto])) 1000848e5ce07SmrgAC_ARG_WITH(asciidoc, 1000948e5ce07Smrg AS_HELP_STRING([--with-asciidoc], 1001048e5ce07Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1001148e5ce07Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1001248e5ce07Smrgm4_undefine([_defopt]) 10013f1ee322dSmrg 1001448e5ce07Smrgif test "x$use_asciidoc" = x"auto"; then 1001548e5ce07Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1001648e5ce07Smrg if test "x$ASCIIDOC" = "x"; then 1001748e5ce07Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1001848e5ce07Smrg have_asciidoc=no 1001948e5ce07Smrg else 1002048e5ce07Smrg have_asciidoc=yes 1002148e5ce07Smrg fi 1002248e5ce07Smrgelif test "x$use_asciidoc" = x"yes" ; then 1002348e5ce07Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1002448e5ce07Smrg if test "x$ASCIIDOC" = "x"; then 1002548e5ce07Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1002648e5ce07Smrg fi 1002748e5ce07Smrg have_asciidoc=yes 1002848e5ce07Smrgelif test "x$use_asciidoc" = x"no" ; then 1002948e5ce07Smrg if test "x$ASCIIDOC" != "x"; then 1003048e5ce07Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1003148e5ce07Smrg fi 1003248e5ce07Smrg have_asciidoc=no 1003348e5ce07Smrgelse 1003448e5ce07Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1003548e5ce07Smrgfi 1003648e5ce07Smrgm4_ifval([$1], 1003748e5ce07Smrg[if test "$have_asciidoc" = yes; then 1003848e5ce07Smrg # scrape the asciidoc version 1003948e5ce07Smrg AC_MSG_CHECKING([the asciidoc version]) 1004048e5ce07Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1004148e5ce07Smrg AC_MSG_RESULT([$asciidoc_version]) 1004248e5ce07Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1004348e5ce07Smrg [if test "x$use_asciidoc" = xauto; then 1004448e5ce07Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1004548e5ce07Smrg have_asciidoc=no 1004648e5ce07Smrg else 1004748e5ce07Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1004848e5ce07Smrg fi]) 1004948e5ce07Smrgfi]) 1005048e5ce07SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1005148e5ce07Smrg]) # XORG_WITH_ASCIIDOC 1005244584a44Smrg 1005348e5ce07Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1005448e5ce07Smrg# ------------------------------------------- 1005548e5ce07Smrg# Minimum version: 1.5.0 1005648e5ce07Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1005748e5ce07Smrg# Minimum version for optional DOT checking: 1.18.0 1005806c34b88Smrg# 1005948e5ce07Smrg# Documentation tools are not always available on all platforms and sometimes 1006048e5ce07Smrg# not at the appropriate level. This macro enables a module to test for the 1006148e5ce07Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1006248e5ce07Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1006348e5ce07Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1006448e5ce07Smrg# --with-doxygen assumes 'auto'. 1006548e5ce07Smrg# 1006648e5ce07Smrg# Interface to module: 1006748e5ce07Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1006848e5ce07Smrg# DOXYGEN: returns the path of the doxygen program found 1006948e5ce07Smrg# returns the path set by the user in the environment 1007048e5ce07Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1007148e5ce07Smrg# 'no' user instructs the module not to use doxygen 1007248e5ce07Smrg# 1007348e5ce07Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1007448e5ce07Smrg# 1007548e5ce07SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1007648e5ce07SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1007748e5ce07SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 1007848e5ce07Smrgm4_define([_defopt], m4_default([$2], [auto])) 1007948e5ce07SmrgAC_ARG_WITH(doxygen, 1008048e5ce07Smrg AS_HELP_STRING([--with-doxygen], 1008148e5ce07Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1008248e5ce07Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1008348e5ce07Smrgm4_undefine([_defopt]) 10084f1ee322dSmrg 1008548e5ce07Smrgif test "x$use_doxygen" = x"auto"; then 1008648e5ce07Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1008748e5ce07Smrg if test "x$DOXYGEN" = "x"; then 1008848e5ce07Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1008948e5ce07Smrg have_doxygen=no 1009048e5ce07Smrg else 1009148e5ce07Smrg have_doxygen=yes 1009248e5ce07Smrg fi 1009348e5ce07Smrgelif test "x$use_doxygen" = x"yes" ; then 1009448e5ce07Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1009548e5ce07Smrg if test "x$DOXYGEN" = "x"; then 1009648e5ce07Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1009748e5ce07Smrg fi 1009848e5ce07Smrg have_doxygen=yes 1009948e5ce07Smrgelif test "x$use_doxygen" = x"no" ; then 1010048e5ce07Smrg if test "x$DOXYGEN" != "x"; then 1010148e5ce07Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1010248e5ce07Smrg fi 1010348e5ce07Smrg have_doxygen=no 1010448e5ce07Smrgelse 1010548e5ce07Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1010648e5ce07Smrgfi 1010748e5ce07Smrgm4_ifval([$1], 1010848e5ce07Smrg[if test "$have_doxygen" = yes; then 1010948e5ce07Smrg # scrape the doxygen version 1011048e5ce07Smrg AC_MSG_CHECKING([the doxygen version]) 1011148e5ce07Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1011248e5ce07Smrg AC_MSG_RESULT([$doxygen_version]) 1011348e5ce07Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1011448e5ce07Smrg [if test "x$use_doxygen" = xauto; then 1011548e5ce07Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1011648e5ce07Smrg have_doxygen=no 1011748e5ce07Smrg else 1011848e5ce07Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1011948e5ce07Smrg fi]) 1012048e5ce07Smrgfi]) 1012144584a44Smrg 1012248e5ce07Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 1012348e5ce07Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 1012448e5ce07Smrgdnl HAVE_DOT = @HAVE_DOT@ 1012548e5ce07SmrgHAVE_DOT=no 1012648e5ce07Smrgif test "x$have_doxygen" = "xyes"; then 1012748e5ce07Smrg AC_PATH_PROG([DOT], [dot]) 1012848e5ce07Smrg if test "x$DOT" != "x"; then 1012948e5ce07Smrg HAVE_DOT=yes 1013048e5ce07Smrg fi 1013148e5ce07Smrgfi 1013244584a44Smrg 1013348e5ce07SmrgAC_SUBST([HAVE_DOT]) 1013448e5ce07SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 1013548e5ce07SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1013648e5ce07Smrg]) # XORG_WITH_DOXYGEN 1013748e5ce07Smrg 1013848e5ce07Smrg# XORG_WITH_GROFF([DEFAULT]) 1013948e5ce07Smrg# ---------------- 1014048e5ce07Smrg# Minimum version: 1.6.0 1014148e5ce07Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1014248e5ce07Smrg# 1014348e5ce07Smrg# Documentation tools are not always available on all platforms and sometimes 1014448e5ce07Smrg# not at the appropriate level. This macro enables a module to test for the 1014548e5ce07Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1014648e5ce07Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1014748e5ce07Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1014848e5ce07Smrg# --with-groff assumes 'auto'. 1014948e5ce07Smrg# 1015048e5ce07Smrg# Interface to module: 1015148e5ce07Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1015248e5ce07Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1015348e5ce07Smrg# HAVE_GROFF_MS: the -ms macros package 1015448e5ce07Smrg# GROFF: returns the path of the groff program found 1015548e5ce07Smrg# returns the path set by the user in the environment 1015648e5ce07Smrg# --with-groff: 'yes' user instructs the module to use groff 1015748e5ce07Smrg# 'no' user instructs the module not to use groff 1015848e5ce07Smrg# 1015948e5ce07Smrg# Added in version 1.9.0: 1016048e5ce07Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1016148e5ce07Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1016248e5ce07Smrg# psselect from the psutils package. 1016348e5ce07Smrg# the ghostcript package. Refer to the grohtml man pages 1016448e5ce07Smrg# 1016548e5ce07Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1016648e5ce07Smrg# 1016748e5ce07Smrg# OS and distros often splits groff in a basic and full package, the former 1016848e5ce07Smrg# having the groff program and the later having devices, fonts and macros 1016948e5ce07Smrg# Checking for the groff executable is not enough. 1017048e5ce07Smrg# 1017148e5ce07Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1017248e5ce07Smrg# unset HAVE_GROFF or GROFF env variables. 1017348e5ce07Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1017448e5ce07Smrg# 1017548e5ce07SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1017648e5ce07SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1017748e5ce07Smrgm4_define([_defopt], m4_default([$1], [auto])) 1017848e5ce07SmrgAC_ARG_WITH(groff, 1017948e5ce07Smrg AS_HELP_STRING([--with-groff], 1018048e5ce07Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1018148e5ce07Smrg [use_groff=$withval], [use_groff=]_defopt) 1018248e5ce07Smrgm4_undefine([_defopt]) 1018348e5ce07Smrg 1018448e5ce07Smrgif test "x$use_groff" = x"auto"; then 1018548e5ce07Smrg AC_PATH_PROG([GROFF], [groff]) 1018648e5ce07Smrg if test "x$GROFF" = "x"; then 1018748e5ce07Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1018848e5ce07Smrg have_groff=no 1018948e5ce07Smrg else 1019048e5ce07Smrg have_groff=yes 1019148e5ce07Smrg fi 1019248e5ce07Smrgelif test "x$use_groff" = x"yes" ; then 1019348e5ce07Smrg AC_PATH_PROG([GROFF], [groff]) 1019448e5ce07Smrg if test "x$GROFF" = "x"; then 1019548e5ce07Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1019648e5ce07Smrg fi 1019748e5ce07Smrg have_groff=yes 1019848e5ce07Smrgelif test "x$use_groff" = x"no" ; then 1019948e5ce07Smrg if test "x$GROFF" != "x"; then 1020048e5ce07Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1020148e5ce07Smrg fi 1020248e5ce07Smrg have_groff=no 1020306c34b88Smrgelse 1020448e5ce07Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 102053e256790Smrgfi 1020648e5ce07Smrg 1020748e5ce07Smrg# We have groff, test for the presence of the macro packages 1020848e5ce07Smrgif test "x$have_groff" = x"yes"; then 1020948e5ce07Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1021048e5ce07Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1021148e5ce07Smrg groff_ms_works=yes 1021248e5ce07Smrg else 1021348e5ce07Smrg groff_ms_works=no 1021448e5ce07Smrg fi 1021548e5ce07Smrg AC_MSG_RESULT([$groff_ms_works]) 1021648e5ce07Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1021748e5ce07Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1021848e5ce07Smrg groff_mm_works=yes 1021948e5ce07Smrg else 1022048e5ce07Smrg groff_mm_works=no 1022148e5ce07Smrg fi 1022248e5ce07Smrg AC_MSG_RESULT([$groff_mm_works]) 1022306c34b88Smrgfi 1022448e5ce07Smrg 1022548e5ce07Smrg# We have groff, test for HTML dependencies, one command per package 1022648e5ce07Smrgif test "x$have_groff" = x"yes"; then 1022748e5ce07Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1022848e5ce07Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1022948e5ce07Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1023048e5ce07Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1023148e5ce07Smrg have_groff_html=yes 1023248e5ce07Smrg else 1023348e5ce07Smrg have_groff_html=no 1023448e5ce07Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1023548e5ce07Smrg fi 1023648e5ce07Smrgfi 1023748e5ce07Smrg 1023848e5ce07Smrg# Set Automake conditionals for Makefiles 1023948e5ce07SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1024048e5ce07SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1024148e5ce07SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1024248e5ce07SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1024348e5ce07Smrg]) # XORG_WITH_GROFF 1024448e5ce07Smrg 1024548e5ce07Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1024648e5ce07Smrg# --------------------------------------- 1024748e5ce07Smrg# Minimum version: 1.6.0 1024848e5ce07Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1024948e5ce07Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 1025048e5ce07Smrg# 1025148e5ce07Smrg# Documentation tools are not always available on all platforms and sometimes 1025248e5ce07Smrg# not at the appropriate level. This macro enables a module to test for the 1025348e5ce07Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1025448e5ce07Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1025548e5ce07Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1025648e5ce07Smrg# --with-fop assumes 'auto'. 1025748e5ce07Smrg# 1025848e5ce07Smrg# Interface to module: 1025948e5ce07Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1026048e5ce07Smrg# FOP: returns the path of the fop program found 1026148e5ce07Smrg# returns the path set by the user in the environment 1026248e5ce07Smrg# --with-fop: 'yes' user instructs the module to use fop 1026348e5ce07Smrg# 'no' user instructs the module not to use fop 1026448e5ce07Smrg# 1026548e5ce07Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1026648e5ce07Smrg# 1026748e5ce07SmrgAC_DEFUN([XORG_WITH_FOP],[ 1026848e5ce07SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1026948e5ce07Smrgm4_define([_defopt], m4_default([$2], [auto])) 1027048e5ce07SmrgAC_ARG_WITH(fop, 1027148e5ce07Smrg AS_HELP_STRING([--with-fop], 1027248e5ce07Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1027348e5ce07Smrg [use_fop=$withval], [use_fop=]_defopt) 1027448e5ce07Smrgm4_undefine([_defopt]) 1027548e5ce07Smrg 1027648e5ce07Smrgif test "x$use_fop" = x"auto"; then 1027748e5ce07Smrg AC_PATH_PROG([FOP], [fop]) 1027848e5ce07Smrg if test "x$FOP" = "x"; then 1027948e5ce07Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1028048e5ce07Smrg have_fop=no 1028148e5ce07Smrg else 1028248e5ce07Smrg have_fop=yes 1028348e5ce07Smrg fi 1028448e5ce07Smrgelif test "x$use_fop" = x"yes" ; then 1028548e5ce07Smrg AC_PATH_PROG([FOP], [fop]) 1028648e5ce07Smrg if test "x$FOP" = "x"; then 1028748e5ce07Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1028806c34b88Smrg fi 1028948e5ce07Smrg have_fop=yes 1029048e5ce07Smrgelif test "x$use_fop" = x"no" ; then 1029148e5ce07Smrg if test "x$FOP" != "x"; then 1029248e5ce07Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1029348e5ce07Smrg fi 1029448e5ce07Smrg have_fop=no 1029544584a44Smrgelse 1029648e5ce07Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1029744584a44Smrgfi 1029837eb1ca1Smrg 1029948e5ce07Smrg# Test for a minimum version of fop, if provided. 1030048e5ce07Smrgm4_ifval([$1], 1030148e5ce07Smrg[if test "$have_fop" = yes; then 1030248e5ce07Smrg # scrape the fop version 1030348e5ce07Smrg AC_MSG_CHECKING([for fop minimum version]) 1030448e5ce07Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1030548e5ce07Smrg AC_MSG_RESULT([$fop_version]) 1030648e5ce07Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1030748e5ce07Smrg [if test "x$use_fop" = xauto; then 1030848e5ce07Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1030948e5ce07Smrg have_fop=no 1031048e5ce07Smrg else 1031148e5ce07Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1031248e5ce07Smrg fi]) 1031348e5ce07Smrgfi]) 1031448e5ce07SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1031548e5ce07Smrg]) # XORG_WITH_FOP 1031648e5ce07Smrg 1031748e5ce07Smrg# XORG_WITH_M4([MIN-VERSION]) 1031848e5ce07Smrg# --------------------------- 1031948e5ce07Smrg# Minimum version: 1.19.0 1032006c34b88Smrg# 1032148e5ce07Smrg# This macro attempts to locate an m4 macro processor which supports 1032248e5ce07Smrg# -I option and is only useful for modules relying on M4 in order to 1032348e5ce07Smrg# expand macros in source code files. 1032448e5ce07Smrg# 1032548e5ce07Smrg# Interface to module: 1032648e5ce07Smrg# M4: returns the path of the m4 program found 1032748e5ce07Smrg# returns the path set by the user in the environment 1032848e5ce07Smrg# 1032948e5ce07SmrgAC_DEFUN([XORG_WITH_M4], [ 1033048e5ce07SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 1033148e5ce07Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 1033248e5ce07Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 1033348e5ce07Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 1033448e5ce07Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 1033548e5ce07Smrg [$PATH:/usr/gnu/bin])]) 1033637eb1ca1Smrg 1033748e5ce07SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 1033848e5ce07Smrg]) # XORG_WITH_M4 1033937eb1ca1Smrg 1034048e5ce07Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1034148e5ce07Smrg# ---------------- 1034248e5ce07Smrg# Minimum version: 1.6.0 1034348e5ce07Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1034406c34b88Smrg# 1034548e5ce07Smrg# Documentation tools are not always available on all platforms and sometimes 1034648e5ce07Smrg# not at the appropriate level. This macro enables a module to test for the 1034748e5ce07Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1034848e5ce07Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1034948e5ce07Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1035048e5ce07Smrg# --with-ps2pdf assumes 'auto'. 1035148e5ce07Smrg# 1035248e5ce07Smrg# Interface to module: 1035348e5ce07Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1035448e5ce07Smrg# PS2PDF: returns the path of the ps2pdf program found 1035548e5ce07Smrg# returns the path set by the user in the environment 1035648e5ce07Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1035748e5ce07Smrg# 'no' user instructs the module not to use ps2pdf 1035848e5ce07Smrg# 1035948e5ce07Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1036048e5ce07Smrg# 1036148e5ce07SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1036248e5ce07SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1036348e5ce07Smrgm4_define([_defopt], m4_default([$1], [auto])) 1036448e5ce07SmrgAC_ARG_WITH(ps2pdf, 1036548e5ce07Smrg AS_HELP_STRING([--with-ps2pdf], 1036648e5ce07Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1036748e5ce07Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1036848e5ce07Smrgm4_undefine([_defopt]) 1036944584a44Smrg 1037048e5ce07Smrgif test "x$use_ps2pdf" = x"auto"; then 1037148e5ce07Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1037248e5ce07Smrg if test "x$PS2PDF" = "x"; then 1037348e5ce07Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1037448e5ce07Smrg have_ps2pdf=no 1037548e5ce07Smrg else 1037648e5ce07Smrg have_ps2pdf=yes 1037748e5ce07Smrg fi 1037848e5ce07Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1037948e5ce07Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1038048e5ce07Smrg if test "x$PS2PDF" = "x"; then 1038148e5ce07Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1038248e5ce07Smrg fi 1038348e5ce07Smrg have_ps2pdf=yes 1038448e5ce07Smrgelif test "x$use_ps2pdf" = x"no" ; then 1038548e5ce07Smrg if test "x$PS2PDF" != "x"; then 1038648e5ce07Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1038748e5ce07Smrg fi 1038848e5ce07Smrg have_ps2pdf=no 1038948e5ce07Smrgelse 1039048e5ce07Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1039148e5ce07Smrgfi 1039248e5ce07SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1039348e5ce07Smrg]) # XORG_WITH_PS2PDF 1039444584a44Smrg 1039548e5ce07Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1039648e5ce07Smrg# ---------------- 1039748e5ce07Smrg# Minimum version: 1.6.0 1039848e5ce07Smrg# 1039948e5ce07Smrg# Documentation tools are not always available on all platforms and sometimes 1040048e5ce07Smrg# not at the appropriate level. This macro enables a builder to skip all 1040148e5ce07Smrg# documentation targets except traditional man pages. 1040248e5ce07Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1040348e5ce07Smrg# maximum flexibilty in controlling documentation building. 1040448e5ce07Smrg# Refer to: 1040548e5ce07Smrg# XORG_WITH_XMLTO --with-xmlto 1040648e5ce07Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1040748e5ce07Smrg# XORG_WITH_DOXYGEN --with-doxygen 1040848e5ce07Smrg# XORG_WITH_FOP --with-fop 1040948e5ce07Smrg# XORG_WITH_GROFF --with-groff 1041048e5ce07Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1041148e5ce07Smrg# 1041248e5ce07Smrg# Interface to module: 1041348e5ce07Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1041448e5ce07Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1041548e5ce07Smrg# 'no' user instructs the module not to generate docs 1041648e5ce07Smrg# parm1: specify the default value, yes or no. 1041748e5ce07Smrg# 1041848e5ce07SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1041948e5ce07Smrgm4_define([docs_default], m4_default([$1], [yes])) 1042048e5ce07SmrgAC_ARG_ENABLE(docs, 1042148e5ce07Smrg AS_HELP_STRING([--enable-docs], 1042248e5ce07Smrg [Enable building the documentation (default: ]docs_default[)]), 1042348e5ce07Smrg [build_docs=$enableval], [build_docs=]docs_default) 1042448e5ce07Smrgm4_undefine([docs_default]) 1042548e5ce07SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1042648e5ce07SmrgAC_MSG_CHECKING([whether to build documentation]) 1042748e5ce07SmrgAC_MSG_RESULT([$build_docs]) 1042848e5ce07Smrg]) # XORG_ENABLE_DOCS 1042944584a44Smrg 1043048e5ce07Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1043148e5ce07Smrg# ---------------- 1043248e5ce07Smrg# Minimum version: 1.6.0 1043348e5ce07Smrg# 1043448e5ce07Smrg# This macro enables a builder to skip all developer documentation. 1043548e5ce07Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1043648e5ce07Smrg# maximum flexibilty in controlling documentation building. 1043748e5ce07Smrg# Refer to: 1043848e5ce07Smrg# XORG_WITH_XMLTO --with-xmlto 1043948e5ce07Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1044048e5ce07Smrg# XORG_WITH_DOXYGEN --with-doxygen 1044148e5ce07Smrg# XORG_WITH_FOP --with-fop 1044248e5ce07Smrg# XORG_WITH_GROFF --with-groff 1044348e5ce07Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1044448e5ce07Smrg# 1044548e5ce07Smrg# Interface to module: 1044648e5ce07Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1044748e5ce07Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1044848e5ce07Smrg# 'no' user instructs the module not to generate developer docs 1044948e5ce07Smrg# parm1: specify the default value, yes or no. 1045048e5ce07Smrg# 1045148e5ce07SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1045248e5ce07Smrgm4_define([devel_default], m4_default([$1], [yes])) 1045348e5ce07SmrgAC_ARG_ENABLE(devel-docs, 1045448e5ce07Smrg AS_HELP_STRING([--enable-devel-docs], 1045548e5ce07Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1045648e5ce07Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1045748e5ce07Smrgm4_undefine([devel_default]) 1045848e5ce07SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1045948e5ce07SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1046048e5ce07SmrgAC_MSG_RESULT([$build_devel_docs]) 1046148e5ce07Smrg]) # XORG_ENABLE_DEVEL_DOCS 1046244584a44Smrg 1046348e5ce07Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1046448e5ce07Smrg# ---------------- 1046548e5ce07Smrg# Minimum version: 1.6.0 1046606c34b88Smrg# 1046748e5ce07Smrg# This macro enables a builder to skip all functional specification targets. 1046848e5ce07Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1046948e5ce07Smrg# maximum flexibilty in controlling documentation building. 1047048e5ce07Smrg# Refer to: 1047148e5ce07Smrg# XORG_WITH_XMLTO --with-xmlto 1047248e5ce07Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1047348e5ce07Smrg# XORG_WITH_DOXYGEN --with-doxygen 1047448e5ce07Smrg# XORG_WITH_FOP --with-fop 1047548e5ce07Smrg# XORG_WITH_GROFF --with-groff 1047648e5ce07Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1047748e5ce07Smrg# 1047848e5ce07Smrg# Interface to module: 1047948e5ce07Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1048048e5ce07Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1048148e5ce07Smrg# 'no' user instructs the module not to generate specs 1048248e5ce07Smrg# parm1: specify the default value, yes or no. 1048348e5ce07Smrg# 1048448e5ce07SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1048548e5ce07Smrgm4_define([spec_default], m4_default([$1], [yes])) 1048648e5ce07SmrgAC_ARG_ENABLE(specs, 1048748e5ce07Smrg AS_HELP_STRING([--enable-specs], 1048848e5ce07Smrg [Enable building the specs (default: ]spec_default[)]), 1048948e5ce07Smrg [build_specs=$enableval], [build_specs=]spec_default) 1049048e5ce07Smrgm4_undefine([spec_default]) 1049148e5ce07SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1049248e5ce07SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1049348e5ce07SmrgAC_MSG_RESULT([$build_specs]) 1049448e5ce07Smrg]) # XORG_ENABLE_SPECS 10495f1ee322dSmrg 1049648e5ce07Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1049748e5ce07Smrg# ---------------------------------------------- 1049848e5ce07Smrg# Minimum version: 1.13.0 1049989069ce9Smrg# 1050048e5ce07Smrg# This macro enables a builder to enable/disable unit testing 1050148e5ce07Smrg# It makes no assumption about the test cases implementation 1050248e5ce07Smrg# Test cases may or may not use Automake "Support for test suites" 1050348e5ce07Smrg# They may or may not use the software utility library GLib 1050489069ce9Smrg# 1050548e5ce07Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1050648e5ce07Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1050748e5ce07Smrg# The variable enable_unit_tests is used by other macros in this file. 1050889069ce9Smrg# 1050948e5ce07Smrg# Interface to module: 1051048e5ce07Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1051148e5ce07Smrg# enable_unit_tests: used in configure.ac for additional configuration 1051248e5ce07Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1051348e5ce07Smrg# 'no' user instructs the module not to build tests 1051448e5ce07Smrg# parm1: specify the default value, yes or no. 1051548e5ce07Smrg# 1051648e5ce07SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1051748e5ce07SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1051848e5ce07SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1051948e5ce07SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1052048e5ce07Smrgm4_define([_defopt], m4_default([$1], [auto])) 1052148e5ce07SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1052248e5ce07Smrg [Enable building unit test cases (default: ]_defopt[)]), 1052348e5ce07Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1052448e5ce07Smrgm4_undefine([_defopt]) 1052548e5ce07SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1052648e5ce07SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1052748e5ce07SmrgAC_MSG_RESULT([$enable_unit_tests]) 1052848e5ce07Smrg]) # XORG_ENABLE_UNIT_TESTS 10529dc9477beSmrg 1053048e5ce07Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1053148e5ce07Smrg# ------------------------------------------------------ 1053248e5ce07Smrg# Minimum version: 1.17.0 1053348e5ce07Smrg# 1053448e5ce07Smrg# This macro enables a builder to enable/disable integration testing 1053548e5ce07Smrg# It makes no assumption about the test cases' implementation 1053648e5ce07Smrg# Test cases may or may not use Automake "Support for test suites" 1053748e5ce07Smrg# 1053848e5ce07Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1053948e5ce07Smrg# usually requires less dependencies and may be built and run under less 1054048e5ce07Smrg# stringent environments than integration tests. 1054148e5ce07Smrg# 1054248e5ce07Smrg# Interface to module: 1054348e5ce07Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1054448e5ce07Smrg# enable_integration_tests: used in configure.ac for additional configuration 1054548e5ce07Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1054648e5ce07Smrg# 'no' user instructs the module not to build tests 1054748e5ce07Smrg# parm1: specify the default value, yes or no. 1054848e5ce07Smrg# 1054948e5ce07SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1055048e5ce07SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1055148e5ce07Smrgm4_define([_defopt], m4_default([$1], [auto])) 1055248e5ce07SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1055348e5ce07Smrg [Enable building integration test cases (default: ]_defopt[)]), 1055448e5ce07Smrg [enable_integration_tests=$enableval], 1055548e5ce07Smrg [enable_integration_tests=]_defopt) 1055648e5ce07Smrgm4_undefine([_defopt]) 1055748e5ce07SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1055848e5ce07Smrg [test "x$enable_integration_tests" != xno]) 1055948e5ce07SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1056048e5ce07SmrgAC_MSG_RESULT([$enable_integration_tests]) 1056148e5ce07Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 10562dc9477beSmrg 1056348e5ce07Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1056448e5ce07Smrg# ---------------------------------------- 1056548e5ce07Smrg# Minimum version: 1.13.0 10566dc9477beSmrg# 1056748e5ce07Smrg# GLib is a library which provides advanced data structures and functions. 1056848e5ce07Smrg# This macro enables a module to test for the presence of Glib. 10569dc9477beSmrg# 1057048e5ce07Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1057148e5ce07Smrg# Otherwise the value of $enable_unit_tests is blank. 10572dc9477beSmrg# 1057348e5ce07Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1057448e5ce07Smrg# test support usually requires less dependencies and may be built and run under 1057548e5ce07Smrg# less stringent environments than integration tests. 10576dc9477beSmrg# 1057748e5ce07Smrg# Interface to module: 1057848e5ce07Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 1057948e5ce07Smrg# with_glib: used in configure.ac to know if GLib has been found 1058048e5ce07Smrg# --with-glib: 'yes' user instructs the module to use glib 1058148e5ce07Smrg# 'no' user instructs the module not to use glib 1058244584a44Smrg# 1058348e5ce07SmrgAC_DEFUN([XORG_WITH_GLIB],[ 1058448e5ce07SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1058548e5ce07Smrgm4_define([_defopt], m4_default([$2], [auto])) 1058648e5ce07SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1058748e5ce07Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 1058848e5ce07Smrg [with_glib=$withval], [with_glib=]_defopt) 1058948e5ce07Smrgm4_undefine([_defopt]) 10590dc9477beSmrg 1059148e5ce07Smrghave_glib=no 1059248e5ce07Smrg# Do not probe GLib if user explicitly disabled unit testing 1059348e5ce07Smrgif test "x$enable_unit_tests" != x"no"; then 1059448e5ce07Smrg # Do not probe GLib if user explicitly disabled it 1059548e5ce07Smrg if test "x$with_glib" != x"no"; then 1059648e5ce07Smrg m4_ifval( 1059748e5ce07Smrg [$1], 1059848e5ce07Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1059948e5ce07Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1060048e5ce07Smrg ) 1060148e5ce07Smrg fi 10602dc9477beSmrgfi 10603dc9477beSmrg 1060448e5ce07Smrg# Not having GLib when unit testing has been explicitly requested is an error 1060548e5ce07Smrgif test "x$enable_unit_tests" = x"yes"; then 1060648e5ce07Smrg if test "x$have_glib" = x"no"; then 1060748e5ce07Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1060848e5ce07Smrg fi 1060944584a44Smrgfi 10610dc9477beSmrg 1061148e5ce07Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 1061248e5ce07Smrgif test "x$enable_unit_tests" = x"no"; then 1061348e5ce07Smrg if test "x$with_glib" = x"yes"; then 1061448e5ce07Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1061548e5ce07Smrg fi 1061644584a44Smrgfi 10617dc9477beSmrg 1061848e5ce07Smrg# Not having GLib when it has been explicitly requested is an error 1061948e5ce07Smrgif test "x$with_glib" = x"yes"; then 1062048e5ce07Smrg if test "x$have_glib" = x"no"; then 1062148e5ce07Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1062248e5ce07Smrg fi 10623dc9477beSmrgfi 10624dc9477beSmrg 1062548e5ce07SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1062648e5ce07Smrg]) # XORG_WITH_GLIB 10627dc9477beSmrg 1062848e5ce07Smrg# XORG_LD_WRAP([required|optional]) 1062948e5ce07Smrg# --------------------------------- 1063048e5ce07Smrg# Minimum version: 1.13.0 1063148e5ce07Smrg# 1063248e5ce07Smrg# Check if linker supports -wrap, passed via compiler flags 1063348e5ce07Smrg# 1063448e5ce07Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1063548e5ce07Smrg# Otherwise the value of $enable_unit_tests is blank. 1063648e5ce07Smrg# 1063748e5ce07Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1063848e5ce07Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1063948e5ce07Smrg# available, an argument of "optional" allows use when some unit tests require 1064048e5ce07Smrg# ld -wrap and others do not. 1064148e5ce07Smrg# 1064248e5ce07SmrgAC_DEFUN([XORG_LD_WRAP],[ 1064348e5ce07SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1064448e5ce07Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1064548e5ce07Smrg void __wrap_exit(int status) { return; }], 1064648e5ce07Smrg [exit(0);])]) 1064748e5ce07Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1064848e5ce07Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1064948e5ce07Smrg if test "x$have_ld_wrap" = x"no"; then 1065048e5ce07Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1065148e5ce07Smrg fi 1065244584a44Smrgfi 1065348e5ce07SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1065448e5ce07Smrg# 1065548e5ce07Smrg]) # XORG_LD_WRAP 10656dc9477beSmrg 1065748e5ce07Smrg# XORG_CHECK_LINKER_FLAGS 1065848e5ce07Smrg# ----------------------- 1065948e5ce07Smrg# SYNOPSIS 1066048e5ce07Smrg# 1066148e5ce07Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1066248e5ce07Smrg# 1066348e5ce07Smrg# DESCRIPTION 1066448e5ce07Smrg# 1066548e5ce07Smrg# Check whether the given linker FLAGS work with the current language's 1066648e5ce07Smrg# linker, or whether they give an error. 1066748e5ce07Smrg# 1066848e5ce07Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1066948e5ce07Smrg# success/failure. 1067048e5ce07Smrg# 1067148e5ce07Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1067248e5ce07Smrg# 1067348e5ce07Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1067448e5ce07Smrg# 1067548e5ce07Smrg# LICENSE 1067648e5ce07Smrg# 1067748e5ce07Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1067848e5ce07Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1067948e5ce07Smrg# Copyright (c) 2009 Matteo Frigo 1068048e5ce07Smrg# 1068148e5ce07Smrg# This program is free software: you can redistribute it and/or modify it 1068248e5ce07Smrg# under the terms of the GNU General Public License as published by the 1068348e5ce07Smrg# Free Software Foundation, either version 3 of the License, or (at your 1068448e5ce07Smrg# option) any later version. 1068548e5ce07Smrg# 1068648e5ce07Smrg# This program is distributed in the hope that it will be useful, but 1068748e5ce07Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1068848e5ce07Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1068948e5ce07Smrg# Public License for more details. 1069048e5ce07Smrg# 1069148e5ce07Smrg# You should have received a copy of the GNU General Public License along 1069248e5ce07Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1069348e5ce07Smrg# 1069448e5ce07Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1069548e5ce07Smrg# gives unlimited permission to copy, distribute and modify the configure 1069648e5ce07Smrg# scripts that are the output of Autoconf when processing the Macro. You 1069748e5ce07Smrg# need not follow the terms of the GNU General Public License when using 1069848e5ce07Smrg# or distributing such scripts, even though portions of the text of the 1069948e5ce07Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1070048e5ce07Smrg# all other use of the material that constitutes the Autoconf Macro. 1070148e5ce07Smrg# 1070248e5ce07Smrg# This special exception to the GPL applies to versions of the Autoconf 1070348e5ce07Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1070448e5ce07Smrg# modified version of the Autoconf Macro, you may extend this special 1070548e5ce07Smrg# exception to the GPL to apply to your modified version as well.# 1070648e5ce07SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1070748e5ce07Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1070848e5ce07Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1070948e5ce07SmrgAS_LITERAL_IF([$1], 1071048e5ce07Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1071148e5ce07Smrg ax_save_FLAGS=$LDFLAGS 1071248e5ce07Smrg LDFLAGS="$1" 1071348e5ce07Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1071448e5ce07Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1071548e5ce07Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1071648e5ce07Smrg LDFLAGS=$ax_save_FLAGS])], 1071748e5ce07Smrg [ax_save_FLAGS=$LDFLAGS 1071848e5ce07Smrg LDFLAGS="$1" 1071948e5ce07Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1072048e5ce07Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1072148e5ce07Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1072248e5ce07Smrg LDFLAGS=$ax_save_FLAGS]) 1072348e5ce07Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1072448e5ce07SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1072548e5ce07Smrgif test "x$xorg_check_linker_flags" = xyes; then 1072648e5ce07Smrg m4_default([$2], :) 1072748e5ce07Smrgelse 1072848e5ce07Smrg m4_default([$3], :) 1072944584a44Smrgfi 1073048e5ce07Smrg]) # XORG_CHECK_LINKER_FLAGS 10731dc9477beSmrg 1073248e5ce07Smrg# XORG_MEMORY_CHECK_FLAGS 1073348e5ce07Smrg# ----------------------- 1073448e5ce07Smrg# Minimum version: 1.16.0 1073548e5ce07Smrg# 1073648e5ce07Smrg# This macro attempts to find appropriate memory checking functionality 1073748e5ce07Smrg# for various platforms which unit testing code may use to catch various 1073848e5ce07Smrg# forms of memory allocation and access errors in testing. 1073948e5ce07Smrg# 1074048e5ce07Smrg# Interface to module: 1074148e5ce07Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1074248e5ce07Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1074348e5ce07Smrg# 1074448e5ce07Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1074548e5ce07Smrg# 1074648e5ce07SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10747dc9477beSmrg 1074848e5ce07SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1074948e5ce07SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1075048e5ce07Smrg [Environment variables to enable memory checking in tests]) 10751dc9477beSmrg 1075248e5ce07Smrg# Check for different types of support on different platforms 1075348e5ce07Smrgcase $host_os in 1075448e5ce07Smrg solaris*) 1075548e5ce07Smrg AC_CHECK_LIB([umem], [umem_alloc], 1075648e5ce07Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1075748e5ce07Smrg ;; 1075848e5ce07Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1075948e5ce07Smrg # both directly and inverted, so should not be 0 or 255. 1076048e5ce07Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1076148e5ce07Smrg ;; 1076248e5ce07Smrg darwin*) 1076348e5ce07Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1076448e5ce07Smrg ;; 1076548e5ce07Smrg *bsd*) 1076648e5ce07Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1076748e5ce07Smrg ;; 1076848e5ce07Smrgesac 10769dc9477beSmrg 1077048e5ce07Smrg# User supplied flags override default flags 1077148e5ce07Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1077248e5ce07Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1077348e5ce07Smrgfi 10774dc9477beSmrg 1077548e5ce07SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1077648e5ce07Smrg]) # XORG_WITH_LINT 1077748e5ce07Smrg 1077848e5ce07Smrg# XORG_CHECK_MALLOC_ZERO 1077948e5ce07Smrg# ---------------------- 1078048e5ce07Smrg# Minimum version: 1.0.0 1078144584a44Smrg# 1078248e5ce07Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1078348e5ce07Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1078448e5ce07Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1078548e5ce07SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1078648e5ce07SmrgAC_ARG_ENABLE(malloc0returnsnull, 1078748e5ce07Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1078848e5ce07Smrg [malloc(0) returns NULL (default: auto)]), 1078948e5ce07Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1079048e5ce07Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10791dc9477beSmrg 1079248e5ce07SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1079348e5ce07Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1079448e5ce07SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 1079548e5ce07Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1079648e5ce07Smrg#include <stdlib.h> 1079748e5ce07Smrg],[ 1079848e5ce07Smrg char *m0, *r0, *c0, *p; 1079948e5ce07Smrg m0 = malloc(0); 1080048e5ce07Smrg p = malloc(10); 1080148e5ce07Smrg r0 = realloc(p,0); 1080248e5ce07Smrg c0 = calloc(0,10); 1080348e5ce07Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1080448e5ce07Smrg])], 1080548e5ce07Smrg [xorg_cv_malloc0_returns_null=yes], 1080648e5ce07Smrg [xorg_cv_malloc0_returns_null=no])]) 1080748e5ce07SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 1080848e5ce07Smrgfi 1080948e5ce07SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1081048e5ce07Smrg 1081148e5ce07Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1081248e5ce07Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1081348e5ce07Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1081448e5ce07Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1081544584a44Smrgelse 1081648e5ce07Smrg MALLOC_ZERO_CFLAGS="" 1081748e5ce07Smrg XMALLOC_ZERO_CFLAGS="" 1081848e5ce07Smrg XTMALLOC_ZERO_CFLAGS="" 10819dc9477beSmrgfi 10820dc9477beSmrg 1082148e5ce07SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1082248e5ce07SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1082348e5ce07SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1082448e5ce07Smrg]) # XORG_CHECK_MALLOC_ZERO 10825dc9477beSmrg 1082648e5ce07Smrg# XORG_WITH_LINT() 1082748e5ce07Smrg# ---------------- 1082848e5ce07Smrg# Minimum version: 1.1.0 1082944584a44Smrg# 1083048e5ce07Smrg# This macro enables the use of a tool that flags some suspicious and 1083148e5ce07Smrg# non-portable constructs (likely to be bugs) in C language source code. 1083248e5ce07Smrg# It will attempt to locate the tool and use appropriate options. 1083348e5ce07Smrg# There are various lint type tools on different platforms. 1083448e5ce07Smrg# 1083548e5ce07Smrg# Interface to module: 1083648e5ce07Smrg# LINT: returns the path to the tool found on the platform 1083748e5ce07Smrg# or the value set to LINT on the configure cmd line 1083848e5ce07Smrg# also an Automake conditional 1083948e5ce07Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1084048e5ce07Smrg# 1084148e5ce07Smrg# --with-lint: 'yes' user instructs the module to use lint 1084248e5ce07Smrg# 'no' user instructs the module not to use lint (default) 1084348e5ce07Smrg# 1084448e5ce07Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1084548e5ce07Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1084648e5ce07Smrg# 1084748e5ce07SmrgAC_DEFUN([XORG_WITH_LINT],[ 10848dc9477beSmrg 1084948e5ce07SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1085048e5ce07SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1085148e5ce07SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1085248e5ce07Smrg [Use a lint-style source code checker (default: disabled)])], 1085348e5ce07Smrg [use_lint=$withval], [use_lint=no]) 10854dc9477beSmrg 1085548e5ce07Smrg# Obtain platform specific info like program name and options 1085648e5ce07Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1085748e5ce07Smrgcase $host_os in 1085848e5ce07Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1085948e5ce07Smrg lint_name=splint 1086048e5ce07Smrg lint_options="-badflag" 1086148e5ce07Smrg ;; 1086248e5ce07Smrg *freebsd* | *netbsd*) 1086348e5ce07Smrg lint_name=lint 1086448e5ce07Smrg lint_options="-u -b" 1086548e5ce07Smrg ;; 1086648e5ce07Smrg *solaris*) 1086748e5ce07Smrg lint_name=lint 1086848e5ce07Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1086948e5ce07Smrg ;; 1087048e5ce07Smrgesac 10871dc9477beSmrg 1087248e5ce07Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1087348e5ce07Smrgif test "x$use_lint" = x"yes" ; then 1087448e5ce07Smrg AC_PATH_PROG([LINT], [$lint_name]) 1087548e5ce07Smrg if test "x$LINT" = "x"; then 1087648e5ce07Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1087748e5ce07Smrg fi 1087848e5ce07Smrgelif test "x$use_lint" = x"no" ; then 1087948e5ce07Smrg if test "x$LINT" != "x"; then 1088048e5ce07Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1088148e5ce07Smrg fi 1088244584a44Smrgelse 1088348e5ce07Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1088444584a44Smrgfi 10885dc9477beSmrg 1088648e5ce07Smrg# User supplied flags override default flags 1088748e5ce07Smrgif test "x$LINT_FLAGS" != "x"; then 1088848e5ce07Smrg lint_options=$LINT_FLAGS 1088948e5ce07Smrgfi 10890dc9477beSmrg 1089148e5ce07SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1089248e5ce07SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10893dc9477beSmrg 1089448e5ce07Smrg]) # XORG_WITH_LINT 1089544584a44Smrg 1089648e5ce07Smrg# XORG_LINT_LIBRARY(LIBNAME) 1089748e5ce07Smrg# -------------------------- 1089848e5ce07Smrg# Minimum version: 1.1.0 1089948e5ce07Smrg# 1090048e5ce07Smrg# Sets up flags for building lint libraries for checking programs that call 1090148e5ce07Smrg# functions in the library. 1090248e5ce07Smrg# 1090348e5ce07Smrg# Interface to module: 1090448e5ce07Smrg# LINTLIB - Automake variable with the name of lint library file to make 1090548e5ce07Smrg# MAKE_LINT_LIB - Automake conditional 1090648e5ce07Smrg# 1090748e5ce07Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1090848e5ce07Smrg# - 'no' user instructs the module not to create a lint library (default) 10909dc9477beSmrg 1091048e5ce07SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1091148e5ce07SmrgAC_REQUIRE([XORG_WITH_LINT]) 1091248e5ce07SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1091348e5ce07Smrg [Create lint library (default: disabled)])], 1091448e5ce07Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10915dc9477beSmrg 1091648e5ce07Smrgif test "x$make_lint_lib" = x"yes" ; then 1091748e5ce07Smrg LINTLIB=llib-l$1.ln 1091848e5ce07Smrg if test "x$LINT" = "x"; then 1091948e5ce07Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1092048e5ce07Smrg fi 1092148e5ce07Smrgelif test "x$make_lint_lib" != x"no" ; then 1092248e5ce07Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1092348e5ce07Smrgfi 10924dc9477beSmrg 1092548e5ce07SmrgAC_SUBST(LINTLIB) 1092648e5ce07SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10927dc9477beSmrg 1092848e5ce07Smrg]) # XORG_LINT_LIBRARY 10929dc9477beSmrg 1093048e5ce07Smrg# XORG_COMPILER_BRAND 1093144584a44Smrg# ------------------- 1093248e5ce07Smrg# Minimum version: 1.14.0 1093344584a44Smrg# 1093448e5ce07Smrg# Checks for various brands of compilers and sets flags as appropriate: 1093548e5ce07Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1093648e5ce07Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1093748e5ce07Smrg# clang compiler - sets CLANGCC to "yes" 1093848e5ce07Smrg# Intel compiler - sets INTELCC to "yes" 1093948e5ce07Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1094048e5ce07Smrg# 1094148e5ce07SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1094248e5ce07SmrgAC_LANG_CASE( 1094348e5ce07Smrg [C], [ 1094448e5ce07Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1094548e5ce07Smrg ], 1094648e5ce07Smrg [C++], [ 1094748e5ce07Smrg AC_REQUIRE([AC_PROG_CXX]) 1094848e5ce07Smrg ] 1094948e5ce07Smrg) 1095048e5ce07SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1095148e5ce07SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1095248e5ce07SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1095348e5ce07Smrg]) # XORG_COMPILER_BRAND 10954dc9477beSmrg 1095548e5ce07Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1095648e5ce07Smrg# --------------- 1095748e5ce07Smrg# Minimum version: 1.16.0 1095848e5ce07Smrg# 1095948e5ce07Smrg# Test if the compiler works when passed the given flag as a command line argument. 1096048e5ce07Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1096148e5ce07Smrg# next flag in the list until there are no more options. 1096248e5ce07Smrg# 1096348e5ce07Smrg# Note that this does not guarantee that the compiler supports the flag as some 1096448e5ce07Smrg# compilers will simply ignore arguments that they do not understand, but we do 1096548e5ce07Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1096648e5ce07Smrg# -Werror=unused-command-line-argument 1096748e5ce07Smrg# 1096848e5ce07SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1096948e5ce07Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1097048e5ce07Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1097144584a44Smrg 1097248e5ce07SmrgAC_LANG_COMPILER_REQUIRE 1097344584a44Smrg 1097448e5ce07SmrgAC_LANG_CASE( 1097548e5ce07Smrg [C], [ 1097648e5ce07Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1097748e5ce07Smrg define([PREFIX], [C]) 1097848e5ce07Smrg define([CACHE_PREFIX], [cc]) 1097948e5ce07Smrg define([COMPILER], [$CC]) 1098048e5ce07Smrg ], 1098148e5ce07Smrg [C++], [ 1098248e5ce07Smrg define([PREFIX], [CXX]) 1098348e5ce07Smrg define([CACHE_PREFIX], [cxx]) 1098448e5ce07Smrg define([COMPILER], [$CXX]) 1098548e5ce07Smrg ] 1098648e5ce07Smrg) 10987dc9477beSmrg 1098848e5ce07Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10989dc9477beSmrg 1099048e5ce07Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1099148e5ce07Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1099248e5ce07Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1099348e5ce07Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1099448e5ce07Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1099548e5ce07Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1099648e5ce07Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1099748e5ce07Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1099848e5ce07Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1099944584a44Smrgfi 1100044584a44Smrg 1100148e5ce07Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1100248e5ce07Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1100348e5ce07Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1100448e5ce07Smrg fi 1100548e5ce07Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1100648e5ce07Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1100748e5ce07Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1100848e5ce07Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1100948e5ce07Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1101048e5ce07Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1101148e5ce07Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1101248e5ce07Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1101344584a44Smrgfi 1101444584a44Smrg 1101548e5ce07Smrgfound="no" 1101648e5ce07Smrgm4_foreach([flag], m4_cdr($@), [ 1101748e5ce07Smrg if test $found = "no" ; then 1101848e5ce07Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 1101948e5ce07Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1102048e5ce07Smrg fi 1102144584a44Smrg 1102248e5ce07Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 1102348e5ce07Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1102448e5ce07Smrg fi 1102544584a44Smrg 1102648e5ce07Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11027dc9477beSmrg 1102848e5ce07Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1102948e5ce07Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1103048e5ce07Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1103148e5ce07Smrg AC_CACHE_VAL($cacheid, 1103248e5ce07Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1103348e5ce07Smrg [eval $cacheid=yes], 1103448e5ce07Smrg [eval $cacheid=no])]) 11035dc9477beSmrg 1103648e5ce07Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1103744584a44Smrg 1103848e5ce07Smrg eval supported=\$$cacheid 1103948e5ce07Smrg AC_MSG_RESULT([$supported]) 1104048e5ce07Smrg if test "$supported" = "yes" ; then 1104148e5ce07Smrg $1="$$1 ]flag[" 1104248e5ce07Smrg found="yes" 1104348e5ce07Smrg fi 1104448e5ce07Smrg fi 1104548e5ce07Smrg]) 1104648e5ce07Smrg]) # XORG_TESTSET_CFLAG 1104744584a44Smrg 1104848e5ce07Smrg# XORG_COMPILER_FLAGS 1104948e5ce07Smrg# --------------- 1105048e5ce07Smrg# Minimum version: 1.16.0 11051dc9477beSmrg# 1105248e5ce07Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1105348e5ce07Smrg# arguments supported by the selected compiler which do NOT alter the generated 1105448e5ce07Smrg# code. These arguments will cause the compiler to print various warnings 1105548e5ce07Smrg# during compilation AND turn a conservative set of warnings into errors. 11056dc9477beSmrg# 1105748e5ce07Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1105848e5ce07Smrg# future versions of util-macros as options are added to new compilers. 11059dc9477beSmrg# 1106048e5ce07SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1106148e5ce07SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11062dc9477beSmrg 1106348e5ce07SmrgAC_ARG_ENABLE(selective-werror, 1106448e5ce07Smrg AS_HELP_STRING([--disable-selective-werror], 1106548e5ce07Smrg [Turn off selective compiler errors. (default: enabled)]), 1106648e5ce07Smrg [SELECTIVE_WERROR=$enableval], 1106748e5ce07Smrg [SELECTIVE_WERROR=yes]) 1106848e5ce07Smrg 1106948e5ce07SmrgAC_LANG_CASE( 1107048e5ce07Smrg [C], [ 1107148e5ce07Smrg define([PREFIX], [C]) 1107248e5ce07Smrg ], 1107348e5ce07Smrg [C++], [ 1107448e5ce07Smrg define([PREFIX], [CXX]) 1107548e5ce07Smrg ] 1107648e5ce07Smrg) 1107748e5ce07Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1107848e5ce07Smrgif test "x$SUNCC" = "xyes"; then 1107948e5ce07Smrg [BASE_]PREFIX[FLAGS]="-v" 1108044584a44Smrgelse 1108148e5ce07Smrg [BASE_]PREFIX[FLAGS]="" 1108244584a44Smrgfi 11083dc9477beSmrg 1108448e5ce07Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1108548e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1108648e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1108748e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1108848e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1108944584a44Smrg 1109048e5ce07SmrgAC_LANG_CASE( 1109148e5ce07Smrg [C], [ 1109248e5ce07Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1109348e5ce07Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1109448e5ce07Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1109548e5ce07Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1109648e5ce07Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 1109748e5ce07Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1109848e5ce07Smrg ] 1109948e5ce07Smrg) 1110048e5ce07Smrg 1110148e5ce07Smrg# This chunk adds additional warnings that could catch undesired effects. 1110248e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1110348e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1110448e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1110548e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1110648e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1110748e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1110848e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1110948e5ce07Smrg 1111048e5ce07Smrg# These are currently disabled because they are noisy. They will be enabled 1111148e5ce07Smrg# in the future once the codebase is sufficiently modernized to silence 1111248e5ce07Smrg# them. For now, I don't want them to drown out the other warnings. 1111348e5ce07Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1111448e5ce07Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1111548e5ce07Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1111648e5ce07Smrg 1111748e5ce07Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1111848e5ce07Smrg# when there are problems that should be fixed. 1111948e5ce07Smrg 1112048e5ce07Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1112148e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1112248e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1112348e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1112448e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1112548e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1112648e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1112748e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1112848e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1112948e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1113048e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1113148e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1113248e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1113348e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1113448e5ce07Smrgelse 1113548e5ce07SmrgAC_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]) 1113648e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1113748e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1113848e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1113948e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1114048e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1114148e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1114248e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1114348e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1114448e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1114548e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1114648e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1114748e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1114848e5ce07SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1114948e5ce07Smrgfi 1115048e5ce07Smrg 1115148e5ce07SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1115248e5ce07Smrg]) # XORG_COMPILER_FLAGS 1115348e5ce07Smrg 1115448e5ce07Smrg# XORG_CWARNFLAGS 1115548e5ce07Smrg# --------------- 1115648e5ce07Smrg# Minimum version: 1.2.0 1115748e5ce07Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11158dc9477beSmrg# 1115948e5ce07Smrg# Defines CWARNFLAGS to enable C compiler warnings. 11160dc9477beSmrg# 1116148e5ce07Smrg# This function is deprecated because it defines -fno-strict-aliasing 1116248e5ce07Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1116348e5ce07Smrg# is needed, then it should be added explicitly in the module when 1116448e5ce07Smrg# it is updated to use BASE_CFLAGS. 11165dc9477beSmrg# 1116648e5ce07SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1116748e5ce07SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1116848e5ce07SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1116948e5ce07SmrgAC_LANG_CASE( 1117048e5ce07Smrg [C], [ 1117148e5ce07Smrg CWARNFLAGS="$BASE_CFLAGS" 1117248e5ce07Smrg if test "x$GCC" = xyes ; then 1117348e5ce07Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1117448e5ce07Smrg fi 1117548e5ce07Smrg AC_SUBST(CWARNFLAGS) 1117648e5ce07Smrg ] 1117748e5ce07Smrg) 1117848e5ce07Smrg]) # XORG_CWARNFLAGS 1117948e5ce07Smrg 1118048e5ce07Smrg# XORG_STRICT_OPTION 1118148e5ce07Smrg# ----------------------- 1118248e5ce07Smrg# Minimum version: 1.3.0 11183dc9477beSmrg# 1118448e5ce07Smrg# Add configure option to enable strict compilation flags, such as treating 1118548e5ce07Smrg# warnings as fatal errors. 1118648e5ce07Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1118748e5ce07Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1118844584a44Smrg# 1118948e5ce07Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1119048e5ce07Smrg# when strict compilation is unconditionally desired. 1119148e5ce07SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1119248e5ce07SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1119348e5ce07SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11194dc9477beSmrg 1119548e5ce07SmrgAC_ARG_ENABLE(strict-compilation, 1119648e5ce07Smrg AS_HELP_STRING([--enable-strict-compilation], 1119748e5ce07Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1119848e5ce07Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11199dc9477beSmrg 1120048e5ce07SmrgAC_LANG_CASE( 1120148e5ce07Smrg [C], [ 1120248e5ce07Smrg define([PREFIX], [C]) 1120348e5ce07Smrg ], 1120448e5ce07Smrg [C++], [ 1120548e5ce07Smrg define([PREFIX], [CXX]) 1120648e5ce07Smrg ] 1120748e5ce07Smrg) 11208dc9477beSmrg 1120948e5ce07Smrg[STRICT_]PREFIX[FLAGS]="" 1121048e5ce07SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1121148e5ce07SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1121248e5ce07Smrg 1121348e5ce07Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1121448e5ce07Smrg# activate it with -Werror, so we add it here explicitly. 1121548e5ce07SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1121648e5ce07Smrg 1121748e5ce07Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1121848e5ce07Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1121948e5ce07Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1122048e5ce07Smrgfi 1122148e5ce07SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1122248e5ce07SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1122348e5ce07SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1122448e5ce07Smrg]) # XORG_STRICT_OPTION 1122548e5ce07Smrg 1122648e5ce07Smrg# XORG_DEFAULT_OPTIONS 1122748e5ce07Smrg# -------------------- 1122848e5ce07Smrg# Minimum version: 1.3.0 11229dc9477beSmrg# 1123048e5ce07Smrg# Defines default options for X.Org modules. 11231dc9477beSmrg# 1123248e5ce07SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1123348e5ce07SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1123448e5ce07SmrgXORG_COMPILER_FLAGS 1123548e5ce07SmrgXORG_CWARNFLAGS 1123648e5ce07SmrgXORG_STRICT_OPTION 1123748e5ce07SmrgXORG_RELEASE_VERSION 1123848e5ce07SmrgXORG_CHANGELOG 1123948e5ce07SmrgXORG_INSTALL 1124048e5ce07SmrgXORG_MANPAGE_SECTIONS 1124148e5ce07Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1124248e5ce07Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1124348e5ce07Smrg]) # XORG_DEFAULT_OPTIONS 1124448e5ce07Smrg 1124548e5ce07Smrg# XORG_INSTALL() 1124648e5ce07Smrg# ---------------- 1124748e5ce07Smrg# Minimum version: 1.4.0 11248dc9477beSmrg# 1124948e5ce07Smrg# Defines the variable INSTALL_CMD as the command to copy 1125048e5ce07Smrg# INSTALL from $prefix/share/util-macros. 11251dc9477beSmrg# 1125248e5ce07SmrgAC_DEFUN([XORG_INSTALL], [ 1125348e5ce07SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1125448e5ce07Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1125548e5ce07SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1125648e5ce07Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 112574940c694Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 112584940c694Smrgtouch \$(top_srcdir)/INSTALL; \ 112594940c694Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 1126048e5ce07SmrgAC_SUBST([INSTALL_CMD]) 1126148e5ce07Smrg]) # XORG_INSTALL 1126248e5ce07Smrgdnl Copyright 2005 Red Hat, Inc 1126348e5ce07Smrgdnl 1126448e5ce07Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1126548e5ce07Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1126648e5ce07Smrgdnl the above copyright notice appear in all copies and that both that 1126748e5ce07Smrgdnl copyright notice and this permission notice appear in supporting 1126848e5ce07Smrgdnl documentation. 1126948e5ce07Smrgdnl 1127048e5ce07Smrgdnl The above copyright notice and this permission notice shall be included 1127148e5ce07Smrgdnl in all copies or substantial portions of the Software. 1127248e5ce07Smrgdnl 1127348e5ce07Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1127448e5ce07Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1127548e5ce07Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1127648e5ce07Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1127748e5ce07Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1127848e5ce07Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1127948e5ce07Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1128048e5ce07Smrgdnl 1128148e5ce07Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1128248e5ce07Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1128348e5ce07Smrgdnl other dealings in this Software without prior written authorization 1128448e5ce07Smrgdnl from the copyright holders. 1128548e5ce07Smrgdnl 11286dc9477beSmrg 1128748e5ce07Smrg# XORG_RELEASE_VERSION 1128848e5ce07Smrg# -------------------- 1128948e5ce07Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11290dc9477beSmrg 1129148e5ce07SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1129248e5ce07Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1129348e5ce07Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1129448e5ce07Smrg [Major version of this package]) 1129548e5ce07Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1129648e5ce07Smrg if test "x$PVM" = "x"; then 1129748e5ce07Smrg PVM="0" 1129848e5ce07Smrg fi 1129948e5ce07Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1130048e5ce07Smrg [$PVM], 1130148e5ce07Smrg [Minor version of this package]) 1130248e5ce07Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1130348e5ce07Smrg if test "x$PVP" = "x"; then 1130448e5ce07Smrg PVP="0" 1130548e5ce07Smrg fi 1130648e5ce07Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1130748e5ce07Smrg [$PVP], 1130848e5ce07Smrg [Patch version of this package]) 1130948e5ce07Smrg]) 1131048e5ce07Smrg 1131148e5ce07Smrg# XORG_CHANGELOG() 1131248e5ce07Smrg# ---------------- 1131348e5ce07Smrg# Minimum version: 1.2.0 11314dc9477beSmrg# 1131548e5ce07Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1131648e5ce07Smrg# ChangeLog from git. 1131744584a44Smrg# 1131844584a44Smrg# 1131948e5ce07SmrgAC_DEFUN([XORG_CHANGELOG], [ 113204940c694SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 1132148e5ce07Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 113224940c694Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 113234940c694Smrgtouch \$(top_srcdir)/ChangeLog; \ 113244940c694Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 1132548e5ce07SmrgAC_SUBST([CHANGELOG_CMD]) 1132648e5ce07Smrg]) # XORG_CHANGELOG 1132748e5ce07Smrg 113284940c694Smrg# Copyright (C) 2002-2018 Free Software Foundation, Inc. 1132944584a44Smrg# 1133048e5ce07Smrg# This file is free software; the Free Software Foundation 1133148e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1133248e5ce07Smrg# with or without modifications, as long as this notice is preserved. 11333dc9477beSmrg 1133448e5ce07Smrg# AM_AUTOMAKE_VERSION(VERSION) 1133548e5ce07Smrg# ---------------------------- 1133648e5ce07Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1133748e5ce07Smrg# generated from the m4 files accompanying Automake X.Y. 1133848e5ce07Smrg# (This private macro should not be called outside this file.) 1133948e5ce07SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 113404940c694Smrg[am__api_version='1.16' 1134148e5ce07Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1134248e5ce07Smrgdnl require some minimum version. Point them to the right macro. 113434940c694Smrgm4_if([$1], [1.16.1], [], 1134448e5ce07Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1134548e5ce07Smrg]) 11346dc9477beSmrg 1134748e5ce07Smrg# _AM_AUTOCONF_VERSION(VERSION) 1134848e5ce07Smrg# ----------------------------- 1134948e5ce07Smrg# aclocal traces this macro to find the Autoconf version. 1135048e5ce07Smrg# This is a private macro too. Using m4_define simplifies 1135148e5ce07Smrg# the logic in aclocal, which can simply ignore this definition. 1135248e5ce07Smrgm4_define([_AM_AUTOCONF_VERSION], []) 11353dc9477beSmrg 1135448e5ce07Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1135548e5ce07Smrg# ------------------------------- 1135648e5ce07Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1135748e5ce07Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1135848e5ce07SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 113594940c694Smrg[AM_AUTOMAKE_VERSION([1.16.1])dnl 1136048e5ce07Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1136148e5ce07Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1136248e5ce07Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11363dc9477beSmrg 1136448e5ce07Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1136548e5ce07Smrg 113664940c694Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 11367dc9477beSmrg# 1136848e5ce07Smrg# This file is free software; the Free Software Foundation 1136948e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1137048e5ce07Smrg# with or without modifications, as long as this notice is preserved. 1137148e5ce07Smrg 1137248e5ce07Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1137348e5ce07Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 1137448e5ce07Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 1137544584a44Smrg# 1137648e5ce07Smrg# Of course, Automake must honor this variable whenever it calls a 1137748e5ce07Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 1137848e5ce07Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 1137948e5ce07Smrg# depending on how configure is run. This is pretty annoying, since 1138048e5ce07Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1138148e5ce07Smrg# source directory, any form will work fine, but in subdirectories a 1138248e5ce07Smrg# relative path needs to be adjusted first. 1138344584a44Smrg# 1138448e5ce07Smrg# $ac_aux_dir/missing 1138548e5ce07Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 1138648e5ce07Smrg# $top_srcdir/$ac_aux_dir/missing 1138748e5ce07Smrg# fails if $ac_aux_dir is absolute, 1138848e5ce07Smrg# fails when called from a subdirectory in a VPATH build with 1138948e5ce07Smrg# a relative $ac_aux_dir 1139044584a44Smrg# 1139148e5ce07Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1139248e5ce07Smrg# are both prefixed by $srcdir. In an in-source build this is usually 1139348e5ce07Smrg# harmless because $srcdir is '.', but things will broke when you 1139448e5ce07Smrg# start a VPATH build or use an absolute $srcdir. 1139544584a44Smrg# 1139648e5ce07Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1139748e5ce07Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1139848e5ce07Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1139948e5ce07Smrg# and then we would define $MISSING as 1140048e5ce07Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 1140148e5ce07Smrg# This will work as long as MISSING is not called from configure, because 1140248e5ce07Smrg# unfortunately $(top_srcdir) has no meaning in configure. 1140348e5ce07Smrg# However there are other variables, like CC, which are often used in 1140448e5ce07Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1140544584a44Smrg# 1140648e5ce07Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1140748e5ce07Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1140848e5ce07Smrg# configured tree to be moved without reconfiguration. 1140948e5ce07Smrg 1141048e5ce07SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1141148e5ce07Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1141248e5ce07Smrg# Expand $ac_aux_dir to an absolute path. 1141348e5ce07Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1141448e5ce07Smrg]) 1141548e5ce07Smrg 1141648e5ce07Smrg# AM_CONDITIONAL -*- Autoconf -*- 1141748e5ce07Smrg 114184940c694Smrg# Copyright (C) 1997-2018 Free Software Foundation, Inc. 1141944584a44Smrg# 1142048e5ce07Smrg# This file is free software; the Free Software Foundation 1142148e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1142248e5ce07Smrg# with or without modifications, as long as this notice is preserved. 11423dc9477beSmrg 1142448e5ce07Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1142548e5ce07Smrg# ------------------------------------- 1142648e5ce07Smrg# Define a conditional. 1142748e5ce07SmrgAC_DEFUN([AM_CONDITIONAL], 1142848e5ce07Smrg[AC_PREREQ([2.52])dnl 1142948e5ce07Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1143048e5ce07Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1143148e5ce07SmrgAC_SUBST([$1_TRUE])dnl 1143248e5ce07SmrgAC_SUBST([$1_FALSE])dnl 1143348e5ce07Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1143448e5ce07Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1143548e5ce07Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1143648e5ce07Smrgif $2; then 1143748e5ce07Smrg $1_TRUE= 1143848e5ce07Smrg $1_FALSE='#' 1143944584a44Smrgelse 1144048e5ce07Smrg $1_TRUE='#' 1144148e5ce07Smrg $1_FALSE= 1144244584a44Smrgfi 1144348e5ce07SmrgAC_CONFIG_COMMANDS_PRE( 1144448e5ce07Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1144548e5ce07Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1144648e5ce07SmrgUsually this means the macro was only invoked conditionally.]]) 1144748e5ce07Smrgfi])]) 11448dc9477beSmrg 114494940c694Smrg# Copyright (C) 1999-2018 Free Software Foundation, Inc. 1145048e5ce07Smrg# 1145148e5ce07Smrg# This file is free software; the Free Software Foundation 1145248e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1145348e5ce07Smrg# with or without modifications, as long as this notice is preserved. 1145448e5ce07Smrg 1145548e5ce07Smrg 1145648e5ce07Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1145748e5ce07Smrg# written in clear, in which case automake, when reading aclocal.m4, 1145848e5ce07Smrg# will think it sees a *use*, and therefore will trigger all it's 1145948e5ce07Smrg# C support machinery. Also note that it means that autoscan, seeing 1146048e5ce07Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1146148e5ce07Smrg 1146248e5ce07Smrg 1146348e5ce07Smrg# _AM_DEPENDENCIES(NAME) 1146448e5ce07Smrg# ---------------------- 1146548e5ce07Smrg# See how the compiler implements dependency checking. 1146648e5ce07Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1146748e5ce07Smrg# We try a few techniques and use that to set a single cache variable. 1146848e5ce07Smrg# 1146948e5ce07Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1147048e5ce07Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1147148e5ce07Smrg# dependency, and given that the user is not expected to run this macro, 1147248e5ce07Smrg# just rely on AC_PROG_CC. 1147348e5ce07SmrgAC_DEFUN([_AM_DEPENDENCIES], 1147448e5ce07Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1147548e5ce07SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1147648e5ce07SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1147748e5ce07SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1147848e5ce07Smrg 1147948e5ce07Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1148048e5ce07Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1148148e5ce07Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1148248e5ce07Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1148348e5ce07Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1148448e5ce07Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1148548e5ce07Smrg [depcc="$$1" am_compiler_list=]) 1148648e5ce07Smrg 1148748e5ce07SmrgAC_CACHE_CHECK([dependency style of $depcc], 1148848e5ce07Smrg [am_cv_$1_dependencies_compiler_type], 1148948e5ce07Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1149048e5ce07Smrg # We make a subdir and do the tests there. Otherwise we can end up 1149148e5ce07Smrg # making bogus files that we don't know about and never remove. For 1149248e5ce07Smrg # instance it was reported that on HP-UX the gcc test will end up 1149348e5ce07Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 1149448e5ce07Smrg # in D". 1149548e5ce07Smrg rm -rf conftest.dir 1149648e5ce07Smrg mkdir conftest.dir 1149748e5ce07Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1149848e5ce07Smrg # using a relative directory. 1149948e5ce07Smrg cp "$am_depcomp" conftest.dir 1150048e5ce07Smrg cd conftest.dir 1150148e5ce07Smrg # We will build objects and dependencies in a subdirectory because 1150248e5ce07Smrg # it helps to detect inapplicable dependency modes. For instance 1150348e5ce07Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 1150448e5ce07Smrg # side effect of compilation, but ICC will put the dependencies in 1150548e5ce07Smrg # the current directory while Tru64 will put them in the object 1150648e5ce07Smrg # directory. 1150748e5ce07Smrg mkdir sub 1150848e5ce07Smrg 1150948e5ce07Smrg am_cv_$1_dependencies_compiler_type=none 1151048e5ce07Smrg if test "$am_compiler_list" = ""; then 1151148e5ce07Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1151248e5ce07Smrg fi 1151348e5ce07Smrg am__universal=false 1151448e5ce07Smrg m4_case([$1], [CC], 1151548e5ce07Smrg [case " $depcc " in #( 1151648e5ce07Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 1151748e5ce07Smrg esac], 1151848e5ce07Smrg [CXX], 1151948e5ce07Smrg [case " $depcc " in #( 1152048e5ce07Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 1152148e5ce07Smrg esac]) 1152248e5ce07Smrg 1152348e5ce07Smrg for depmode in $am_compiler_list; do 1152448e5ce07Smrg # Setup a source with many dependencies, because some compilers 1152548e5ce07Smrg # like to wrap large dependency lists on column 80 (with \), and 1152648e5ce07Smrg # we should not choose a depcomp mode which is confused by this. 1152748e5ce07Smrg # 1152848e5ce07Smrg # We need to recreate these files for each test, as the compiler may 1152948e5ce07Smrg # overwrite some of them when testing with obscure command lines. 1153048e5ce07Smrg # This happens at least with the AIX C compiler. 1153148e5ce07Smrg : > sub/conftest.c 1153248e5ce07Smrg for i in 1 2 3 4 5 6; do 1153348e5ce07Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 1153448e5ce07Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 1153548e5ce07Smrg # Solaris 10 /bin/sh. 1153648e5ce07Smrg echo '/* dummy */' > sub/conftst$i.h 1153748e5ce07Smrg done 1153848e5ce07Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1153948e5ce07Smrg 1154048e5ce07Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 1154148e5ce07Smrg # mode. It turns out that the SunPro C++ compiler does not properly 1154248e5ce07Smrg # handle '-M -o', and we need to detect this. Also, some Intel 1154348e5ce07Smrg # versions had trouble with output in subdirs. 1154448e5ce07Smrg am__obj=sub/conftest.${OBJEXT-o} 1154548e5ce07Smrg am__minus_obj="-o $am__obj" 1154648e5ce07Smrg case $depmode in 1154748e5ce07Smrg gcc) 1154848e5ce07Smrg # This depmode causes a compiler race in universal mode. 1154948e5ce07Smrg test "$am__universal" = false || continue 1155048e5ce07Smrg ;; 1155148e5ce07Smrg nosideeffect) 1155248e5ce07Smrg # After this tag, mechanisms are not by side-effect, so they'll 1155348e5ce07Smrg # only be used when explicitly requested. 1155448e5ce07Smrg if test "x$enable_dependency_tracking" = xyes; then 1155548e5ce07Smrg continue 1155648e5ce07Smrg else 1155748e5ce07Smrg break 1155848e5ce07Smrg fi 1155948e5ce07Smrg ;; 1156048e5ce07Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1156148e5ce07Smrg # This compiler won't grok '-c -o', but also, the minuso test has 1156248e5ce07Smrg # not run yet. These depmodes are late enough in the game, and 1156348e5ce07Smrg # so weak that their functioning should not be impacted. 1156448e5ce07Smrg am__obj=conftest.${OBJEXT-o} 1156548e5ce07Smrg am__minus_obj= 1156648e5ce07Smrg ;; 1156748e5ce07Smrg none) break ;; 1156848e5ce07Smrg esac 1156948e5ce07Smrg if depmode=$depmode \ 1157048e5ce07Smrg source=sub/conftest.c object=$am__obj \ 1157148e5ce07Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1157248e5ce07Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1157348e5ce07Smrg >/dev/null 2>conftest.err && 1157448e5ce07Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1157548e5ce07Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1157648e5ce07Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1157748e5ce07Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1157848e5ce07Smrg # icc doesn't choke on unknown options, it will just issue warnings 1157948e5ce07Smrg # or remarks (even with -Werror). So we grep stderr for any message 1158048e5ce07Smrg # that says an option was ignored or not supported. 1158148e5ce07Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 1158248e5ce07Smrg # icc: Command line warning: ignoring option '-M'; no argument required 1158348e5ce07Smrg # The diagnosis changed in icc 8.0: 1158448e5ce07Smrg # icc: Command line remark: option '-MP' not supported 1158548e5ce07Smrg if (grep 'ignoring option' conftest.err || 1158648e5ce07Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1158748e5ce07Smrg am_cv_$1_dependencies_compiler_type=$depmode 1158848e5ce07Smrg break 1158948e5ce07Smrg fi 1159044584a44Smrg fi 1159148e5ce07Smrg done 11592dc9477beSmrg 1159348e5ce07Smrg cd .. 1159448e5ce07Smrg rm -rf conftest.dir 11595dc9477beSmrgelse 1159648e5ce07Smrg am_cv_$1_dependencies_compiler_type=none 11597dc9477beSmrgfi 1159848e5ce07Smrg]) 1159948e5ce07SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1160048e5ce07SmrgAM_CONDITIONAL([am__fastdep$1], [ 1160148e5ce07Smrg test "x$enable_dependency_tracking" != xno \ 1160248e5ce07Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1160348e5ce07Smrg]) 11604dc9477beSmrg 11605dc9477beSmrg 1160648e5ce07Smrg# AM_SET_DEPDIR 1160748e5ce07Smrg# ------------- 1160848e5ce07Smrg# Choose a directory name for dependency files. 1160948e5ce07Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 1161048e5ce07SmrgAC_DEFUN([AM_SET_DEPDIR], 1161148e5ce07Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1161248e5ce07SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1161348e5ce07Smrg]) 11614dc9477beSmrg 11615dc9477beSmrg 1161648e5ce07Smrg# AM_DEP_TRACK 1161748e5ce07Smrg# ------------ 1161848e5ce07SmrgAC_DEFUN([AM_DEP_TRACK], 1161948e5ce07Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 1162048e5ce07SmrgAS_HELP_STRING( 1162148e5ce07Smrg [--enable-dependency-tracking], 1162248e5ce07Smrg [do not reject slow dependency extractors]) 1162348e5ce07SmrgAS_HELP_STRING( 1162448e5ce07Smrg [--disable-dependency-tracking], 1162548e5ce07Smrg [speeds up one-time build])]) 1162648e5ce07Smrgif test "x$enable_dependency_tracking" != xno; then 1162748e5ce07Smrg am_depcomp="$ac_aux_dir/depcomp" 1162848e5ce07Smrg AMDEPBACKSLASH='\' 1162948e5ce07Smrg am__nodep='_no' 11630dc9477beSmrgfi 1163148e5ce07SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1163248e5ce07SmrgAC_SUBST([AMDEPBACKSLASH])dnl 1163348e5ce07Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1163448e5ce07SmrgAC_SUBST([am__nodep])dnl 1163548e5ce07Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 1163648e5ce07Smrg]) 11637dc9477beSmrg 1163848e5ce07Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 11639dc9477beSmrg 116404940c694Smrg# Copyright (C) 1999-2018 Free Software Foundation, Inc. 1164144584a44Smrg# 1164248e5ce07Smrg# This file is free software; the Free Software Foundation 1164348e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1164448e5ce07Smrg# with or without modifications, as long as this notice is preserved. 11645dc9477beSmrg 1164648e5ce07Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 1164748e5ce07Smrg# ------------------------------ 1164848e5ce07SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1164948e5ce07Smrg[{ 1165048e5ce07Smrg # Older Autoconf quotes --file arguments for eval, but not when files 1165148e5ce07Smrg # are listed without --file. Let's play safe and only enable the eval 1165248e5ce07Smrg # if we detect the quoting. 116534940c694Smrg # TODO: see whether this extra hack can be removed once we start 116544940c694Smrg # requiring Autoconf 2.70 or later. 116554940c694Smrg AS_CASE([$CONFIG_FILES], 116564940c694Smrg [*\'*], [eval set x "$CONFIG_FILES"], 116574940c694Smrg [*], [set x $CONFIG_FILES]) 1165848e5ce07Smrg shift 116594940c694Smrg # Used to flag and report bootstrapping failures. 116604940c694Smrg am_rc=0 116614940c694Smrg for am_mf 1166248e5ce07Smrg do 1166348e5ce07Smrg # Strip MF so we end up with the name of the file. 116644940c694Smrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 116654940c694Smrg # Check whether this is an Automake generated Makefile which includes 116664940c694Smrg # dependency-tracking related rules and includes. 116674940c694Smrg # Grep'ing the whole file directly is not great: AIX grep has a line 1166848e5ce07Smrg # limit of 2048, but all sed's we know have understand at least 4000. 116694940c694Smrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 116704940c694Smrg || continue 116714940c694Smrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 116724940c694Smrg am_filepart=`AS_BASENAME(["$am_mf"])` 116734940c694Smrg AM_RUN_LOG([cd "$am_dirpart" \ 116744940c694Smrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 116754940c694Smrg | $MAKE -f - am--depfiles]) || am_rc=$? 1167648e5ce07Smrg done 116774940c694Smrg if test $am_rc -ne 0; then 116784940c694Smrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 116794940c694Smrg for automatic dependency tracking. Try re-running configure with the 116804940c694Smrg '--disable-dependency-tracking' option to at least be able to build 116814940c694Smrg the package (albeit without support for automatic dependency tracking).]) 116824940c694Smrg fi 116834940c694Smrg AS_UNSET([am_dirpart]) 116844940c694Smrg AS_UNSET([am_filepart]) 116854940c694Smrg AS_UNSET([am_mf]) 116864940c694Smrg AS_UNSET([am_rc]) 116874940c694Smrg rm -f conftest-deps.mk 1168848e5ce07Smrg} 1168948e5ce07Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11690b789ec8aSmrg 1169148e5ce07Smrg 1169248e5ce07Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 1169348e5ce07Smrg# ----------------------------- 1169448e5ce07Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 1169544584a44Smrg# 116964940c694Smrg# This code is only required when automatic dependency tracking is enabled. 116974940c694Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 116984940c694Smrg# order to bootstrap the dependency handling code. 1169948e5ce07SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1170048e5ce07Smrg[AC_CONFIG_COMMANDS([depfiles], 1170148e5ce07Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 117024940c694Smrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 11703b789ec8aSmrg 1170448e5ce07Smrg# Do all the work for Automake. -*- Autoconf -*- 11705b789ec8aSmrg 117064940c694Smrg# Copyright (C) 1996-2018 Free Software Foundation, Inc. 1170748e5ce07Smrg# 1170848e5ce07Smrg# This file is free software; the Free Software Foundation 1170948e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1171048e5ce07Smrg# with or without modifications, as long as this notice is preserved. 11711b789ec8aSmrg 1171248e5ce07Smrg# This macro actually does too much. Some checks are only needed if 1171348e5ce07Smrg# your package does certain things. But this isn't really a big deal. 1171448e5ce07Smrg 1171548e5ce07Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 1171648e5ce07Smrgm4_define([AC_PROG_CC], 1171748e5ce07Smrgm4_defn([AC_PROG_CC]) 1171848e5ce07Smrg[_AM_PROG_CC_C_O 1171948e5ce07Smrg]) 11720b789ec8aSmrg 1172148e5ce07Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1172248e5ce07Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 1172348e5ce07Smrg# ----------------------------------------------- 1172448e5ce07Smrg# The call with PACKAGE and VERSION arguments is the old style 1172548e5ce07Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 1172648e5ce07Smrg# and VERSION should now be passed to AC_INIT and removed from 1172748e5ce07Smrg# the call to AM_INIT_AUTOMAKE. 1172848e5ce07Smrg# We support both call styles for the transition. After 1172948e5ce07Smrg# the next Automake release, Autoconf can make the AC_INIT 1173048e5ce07Smrg# arguments mandatory, and then we can depend on a new Autoconf 1173148e5ce07Smrg# release and drop the old call support. 1173248e5ce07SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 1173348e5ce07Smrg[AC_PREREQ([2.65])dnl 1173448e5ce07Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 1173548e5ce07Smrgdnl the ones we care about. 1173648e5ce07Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1173748e5ce07SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1173848e5ce07SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 1173948e5ce07Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 1174048e5ce07Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1174148e5ce07Smrg # is not polluted with repeated "-I." 1174248e5ce07Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1174348e5ce07Smrg # test to see if srcdir already configured 1174448e5ce07Smrg if test -f $srcdir/config.status; then 1174548e5ce07Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1174644584a44Smrg fi 1174744584a44Smrgfi 11748b789ec8aSmrg 1174948e5ce07Smrg# test whether we have cygpath 1175048e5ce07Smrgif test -z "$CYGPATH_W"; then 1175148e5ce07Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 1175248e5ce07Smrg CYGPATH_W='cygpath -w' 1175348e5ce07Smrg else 1175448e5ce07Smrg CYGPATH_W=echo 1175544584a44Smrg fi 1175644584a44Smrgfi 1175748e5ce07SmrgAC_SUBST([CYGPATH_W]) 1175844584a44Smrg 1175948e5ce07Smrg# Define the identity of the package. 1176048e5ce07Smrgdnl Distinguish between old-style and new-style calls. 1176148e5ce07Smrgm4_ifval([$2], 1176248e5ce07Smrg[AC_DIAGNOSE([obsolete], 1176348e5ce07Smrg [$0: two- and three-arguments forms are deprecated.]) 1176448e5ce07Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1176548e5ce07Smrg AC_SUBST([PACKAGE], [$1])dnl 1176648e5ce07Smrg AC_SUBST([VERSION], [$2])], 1176748e5ce07Smrg[_AM_SET_OPTIONS([$1])dnl 1176848e5ce07Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1176948e5ce07Smrgm4_if( 1177048e5ce07Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 1177148e5ce07Smrg [ok:ok],, 1177248e5ce07Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1177348e5ce07Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1177448e5ce07Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11775b789ec8aSmrg 1177648e5ce07Smrg_AM_IF_OPTION([no-define],, 1177748e5ce07Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 1177848e5ce07Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11779b789ec8aSmrg 1178048e5ce07Smrg# Some tools Automake needs. 1178148e5ce07SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 1178248e5ce07SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 1178348e5ce07SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 1178448e5ce07SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 1178548e5ce07SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 1178648e5ce07SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 1178748e5ce07SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 1178848e5ce07SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1178948e5ce07SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1179048e5ce07SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1179148e5ce07Smrg# For better backward compatibility. To be removed once Automake 1.9.x 1179248e5ce07Smrg# dies out for good. For more background, see: 117934940c694Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 117944940c694Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 1179548e5ce07SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 1179648e5ce07Smrg# We need awk for the "check" target (and possibly the TAP driver). The 1179748e5ce07Smrg# system "awk" is bad on some platforms. 1179848e5ce07SmrgAC_REQUIRE([AC_PROG_AWK])dnl 1179948e5ce07SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1180048e5ce07SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1180148e5ce07Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1180248e5ce07Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1180348e5ce07Smrg [_AM_PROG_TAR([v7])])]) 1180448e5ce07Smrg_AM_IF_OPTION([no-dependencies],, 1180548e5ce07Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1180648e5ce07Smrg [_AM_DEPENDENCIES([CC])], 1180748e5ce07Smrg [m4_define([AC_PROG_CC], 1180848e5ce07Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 1180948e5ce07SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1181048e5ce07Smrg [_AM_DEPENDENCIES([CXX])], 1181148e5ce07Smrg [m4_define([AC_PROG_CXX], 1181248e5ce07Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 1181348e5ce07SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 1181448e5ce07Smrg [_AM_DEPENDENCIES([OBJC])], 1181548e5ce07Smrg [m4_define([AC_PROG_OBJC], 1181648e5ce07Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 1181748e5ce07SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 1181848e5ce07Smrg [_AM_DEPENDENCIES([OBJCXX])], 1181948e5ce07Smrg [m4_define([AC_PROG_OBJCXX], 1182048e5ce07Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 1182148e5ce07Smrg]) 1182248e5ce07SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 1182348e5ce07Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 1182448e5ce07Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 1182548e5ce07Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 1182648e5ce07SmrgAC_CONFIG_COMMANDS_PRE(dnl 1182748e5ce07Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 1182848e5ce07Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1182989069ce9Smrg 1183048e5ce07Smrg# POSIX will say in a future version that running "rm -f" with no argument 1183148e5ce07Smrg# is OK; and we want to be able to make that assumption in our Makefile 1183248e5ce07Smrg# recipes. So use an aggressive probe to check that the usage we want is 1183348e5ce07Smrg# actually supported "in the wild" to an acceptable degree. 1183448e5ce07Smrg# See automake bug#10828. 1183548e5ce07Smrg# To make any issue more visible, cause the running configure to be aborted 1183648e5ce07Smrg# by default if the 'rm' program in use doesn't match our expectations; the 1183748e5ce07Smrg# user can still override this though. 1183848e5ce07Smrgif rm -f && rm -fr && rm -rf; then : OK; else 1183948e5ce07Smrg cat >&2 <<'END' 1184048e5ce07SmrgOops! 11841b789ec8aSmrg 1184248e5ce07SmrgYour 'rm' program seems unable to run without file operands specified 1184348e5ce07Smrgon the command line, even when the '-f' option is present. This is contrary 1184448e5ce07Smrgto the behaviour of most rm programs out there, and not conforming with 1184548e5ce07Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11846b789ec8aSmrg 1184748e5ce07SmrgPlease tell bug-automake@gnu.org about your system, including the value 1184848e5ce07Smrgof your $PATH and any error possibly output before this message. This 1184948e5ce07Smrgcan help us improve future automake versions. 11850dc9477beSmrg 1185148e5ce07SmrgEND 1185248e5ce07Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 1185348e5ce07Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 1185448e5ce07Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 1185548e5ce07Smrg echo >&2 1185648e5ce07Smrg else 1185748e5ce07Smrg cat >&2 <<'END' 1185848e5ce07SmrgAborting the configuration process, to ensure you take notice of the issue. 11859b789ec8aSmrg 1186048e5ce07SmrgYou can download and install GNU coreutils to get an 'rm' implementation 118614940c694Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 11862dc9477beSmrg 1186348e5ce07SmrgIf you want to complete the configuration process using your problematic 1186448e5ce07Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 1186548e5ce07Smrgto "yes", and re-run configure. 1186648e5ce07Smrg 1186748e5ce07SmrgEND 1186848e5ce07Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 1186948e5ce07Smrg fi 1187089069ce9Smrgfi 1187148e5ce07Smrgdnl The trailing newline in this macro's definition is deliberate, for 1187248e5ce07Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 1187348e5ce07Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 1187448e5ce07Smrg]) 1187537eb1ca1Smrg 1187648e5ce07Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1187748e5ce07Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1187848e5ce07Smrgdnl mangled by Autoconf and run in a shell conditional statement. 1187948e5ce07Smrgm4_define([_AC_COMPILER_EXEEXT], 1188048e5ce07Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1188106c34b88Smrg 1188248e5ce07Smrg# When config.status generates a header, we must update the stamp-h file. 1188348e5ce07Smrg# This file resides in the same directory as the config header 1188448e5ce07Smrg# that is generated. The stamp files are numbered to have different names. 1188506c34b88Smrg 1188648e5ce07Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1188748e5ce07Smrg# loop where config.status creates the headers, so we can generate 1188848e5ce07Smrg# our stamp files there. 1188948e5ce07SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1189048e5ce07Smrg[# Compute $1's index in $config_headers. 1189148e5ce07Smrg_am_arg=$1 1189248e5ce07Smrg_am_stamp_count=1 1189348e5ce07Smrgfor _am_header in $config_headers :; do 1189448e5ce07Smrg case $_am_header in 1189548e5ce07Smrg $_am_arg | $_am_arg:* ) 1189648e5ce07Smrg break ;; 1189748e5ce07Smrg * ) 1189848e5ce07Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1189948e5ce07Smrg esac 1190048e5ce07Smrgdone 1190148e5ce07Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11902b789ec8aSmrg 119034940c694Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1190448e5ce07Smrg# 1190548e5ce07Smrg# This file is free software; the Free Software Foundation 1190648e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1190748e5ce07Smrg# with or without modifications, as long as this notice is preserved. 1190844584a44Smrg 1190948e5ce07Smrg# AM_PROG_INSTALL_SH 1191048e5ce07Smrg# ------------------ 1191148e5ce07Smrg# Define $install_sh. 1191248e5ce07SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 1191348e5ce07Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1191448e5ce07Smrgif test x"${install_sh+set}" != xset; then 1191548e5ce07Smrg case $am_aux_dir in 1191648e5ce07Smrg *\ * | *\ *) 1191748e5ce07Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1191848e5ce07Smrg *) 1191948e5ce07Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 1192048e5ce07Smrg esac 11921dc9477beSmrgfi 1192248e5ce07SmrgAC_SUBST([install_sh])]) 11923dc9477beSmrg 119244940c694Smrg# Copyright (C) 2003-2018 Free Software Foundation, Inc. 1192548e5ce07Smrg# 1192648e5ce07Smrg# This file is free software; the Free Software Foundation 1192748e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1192848e5ce07Smrg# with or without modifications, as long as this notice is preserved. 11929dc9477beSmrg 1193048e5ce07Smrg# Check whether the underlying file-system supports filenames 1193148e5ce07Smrg# with a leading dot. For instance MS-DOS doesn't. 1193248e5ce07SmrgAC_DEFUN([AM_SET_LEADING_DOT], 1193348e5ce07Smrg[rm -rf .tst 2>/dev/null 1193448e5ce07Smrgmkdir .tst 2>/dev/null 1193548e5ce07Smrgif test -d .tst; then 1193648e5ce07Smrg am__leading_dot=. 1193748e5ce07Smrgelse 1193848e5ce07Smrg am__leading_dot=_ 1193948e5ce07Smrgfi 1194048e5ce07Smrgrmdir .tst 2>/dev/null 1194148e5ce07SmrgAC_SUBST([am__leading_dot])]) 11942b789ec8aSmrg 1194348e5ce07Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11944b789ec8aSmrg 119454940c694Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1194644584a44Smrg# 1194748e5ce07Smrg# This file is free software; the Free Software Foundation 1194848e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1194948e5ce07Smrg# with or without modifications, as long as this notice is preserved. 1195006c34b88Smrg 1195148e5ce07Smrg# AM_MAKE_INCLUDE() 1195248e5ce07Smrg# ----------------- 119534940c694Smrg# Check whether make has an 'include' directive that can support all 119544940c694Smrg# the idioms we need for our automatic dependency tracking code. 1195548e5ce07SmrgAC_DEFUN([AM_MAKE_INCLUDE], 119564940c694Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 119574940c694Smrgcat > confinc.mk << 'END' 1195848e5ce07Smrgam__doit: 119594940c694Smrg @echo this is the am__doit target >confinc.out 1196048e5ce07Smrg.PHONY: am__doit 1196148e5ce07SmrgEND 1196248e5ce07Smrgam__include="#" 1196348e5ce07Smrgam__quote= 119644940c694Smrg# BSD make does it like this. 119654940c694Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD 119664940c694Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 119674940c694Smrgecho 'include confinc.mk # ignored' > confmf.GNU 119684940c694Smrg_am_result=no 119694940c694Smrgfor s in GNU BSD; do 119704940c694Smrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 119714940c694Smrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 119724940c694Smrg ['0:this is the am__doit target'], 119734940c694Smrg [AS_CASE([$s], 119744940c694Smrg [BSD], [am__include='.include' am__quote='"'], 119754940c694Smrg [am__include='include' am__quote=''])]) 119764940c694Smrg if test "$am__include" != "#"; then 119774940c694Smrg _am_result="yes ($s style)" 119784940c694Smrg break 119794940c694Smrg fi 119804940c694Smrgdone 119814940c694Smrgrm -f confinc.* confmf.* 119824940c694SmrgAC_MSG_RESULT([${_am_result}]) 119834940c694SmrgAC_SUBST([am__include])]) 119844940c694SmrgAC_SUBST([am__quote])]) 11985b789ec8aSmrg 1198648e5ce07Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11987b789ec8aSmrg 119884940c694Smrg# Copyright (C) 1997-2018 Free Software Foundation, Inc. 1198944584a44Smrg# 1199048e5ce07Smrg# This file is free software; the Free Software Foundation 1199148e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1199248e5ce07Smrg# with or without modifications, as long as this notice is preserved. 1199344584a44Smrg 1199448e5ce07Smrg# AM_MISSING_PROG(NAME, PROGRAM) 1199548e5ce07Smrg# ------------------------------ 1199648e5ce07SmrgAC_DEFUN([AM_MISSING_PROG], 1199748e5ce07Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1199848e5ce07Smrg$1=${$1-"${am_missing_run}$2"} 1199948e5ce07SmrgAC_SUBST($1)]) 1200044584a44Smrg 1200148e5ce07Smrg# AM_MISSING_HAS_RUN 1200248e5ce07Smrg# ------------------ 1200348e5ce07Smrg# Define MISSING if not defined so far and test if it is modern enough. 1200448e5ce07Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 1200548e5ce07SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 1200648e5ce07Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1200748e5ce07SmrgAC_REQUIRE_AUX_FILE([missing])dnl 1200848e5ce07Smrgif test x"${MISSING+set}" != xset; then 1200948e5ce07Smrg case $am_aux_dir in 1201048e5ce07Smrg *\ * | *\ *) 1201148e5ce07Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 1201248e5ce07Smrg *) 1201348e5ce07Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 1201448e5ce07Smrg esac 1201589069ce9Smrgfi 1201648e5ce07Smrg# Use eval to expand $SHELL 1201748e5ce07Smrgif eval "$MISSING --is-lightweight"; then 1201848e5ce07Smrg am_missing_run="$MISSING " 1201948e5ce07Smrgelse 1202048e5ce07Smrg am_missing_run= 1202148e5ce07Smrg AC_MSG_WARN(['missing' script is too old or missing]) 1202244584a44Smrgfi 1202348e5ce07Smrg]) 1202444584a44Smrg 1202548e5ce07Smrg# Helper functions for option handling. -*- Autoconf -*- 1202644584a44Smrg 120274940c694Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1202848e5ce07Smrg# 1202948e5ce07Smrg# This file is free software; the Free Software Foundation 1203048e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1203148e5ce07Smrg# with or without modifications, as long as this notice is preserved. 1203244584a44Smrg 1203348e5ce07Smrg# _AM_MANGLE_OPTION(NAME) 1203448e5ce07Smrg# ----------------------- 1203548e5ce07SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1203648e5ce07Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1203744584a44Smrg 1203848e5ce07Smrg# _AM_SET_OPTION(NAME) 1203948e5ce07Smrg# -------------------- 1204048e5ce07Smrg# Set option NAME. Presently that only means defining a flag for this option. 1204148e5ce07SmrgAC_DEFUN([_AM_SET_OPTION], 1204248e5ce07Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 1204344584a44Smrg 1204448e5ce07Smrg# _AM_SET_OPTIONS(OPTIONS) 1204548e5ce07Smrg# ------------------------ 1204648e5ce07Smrg# OPTIONS is a space-separated list of Automake options. 1204748e5ce07SmrgAC_DEFUN([_AM_SET_OPTIONS], 1204848e5ce07Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1204944584a44Smrg 1205048e5ce07Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1205148e5ce07Smrg# ------------------------------------------- 1205248e5ce07Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1205348e5ce07SmrgAC_DEFUN([_AM_IF_OPTION], 1205448e5ce07Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 120553e256790Smrg 120564940c694Smrg# Copyright (C) 1999-2018 Free Software Foundation, Inc. 1205744584a44Smrg# 1205848e5ce07Smrg# This file is free software; the Free Software Foundation 1205948e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1206048e5ce07Smrg# with or without modifications, as long as this notice is preserved. 1206144584a44Smrg 1206248e5ce07Smrg# _AM_PROG_CC_C_O 1206348e5ce07Smrg# --------------- 1206448e5ce07Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 1206548e5ce07Smrg# to automatically call this. 1206648e5ce07SmrgAC_DEFUN([_AM_PROG_CC_C_O], 1206748e5ce07Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1206848e5ce07SmrgAC_REQUIRE_AUX_FILE([compile])dnl 1206948e5ce07SmrgAC_LANG_PUSH([C])dnl 1207048e5ce07SmrgAC_CACHE_CHECK( 1207148e5ce07Smrg [whether $CC understands -c and -o together], 1207248e5ce07Smrg [am_cv_prog_cc_c_o], 1207348e5ce07Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 1207448e5ce07Smrg # Make sure it works both with $CC and with simple cc. 1207548e5ce07Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 1207648e5ce07Smrg # compilers refuse to overwrite an existing .o file with -o, 1207748e5ce07Smrg # though they will create one. 1207848e5ce07Smrg am_cv_prog_cc_c_o=yes 1207948e5ce07Smrg for am_i in 1 2; do 1208048e5ce07Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 1208148e5ce07Smrg && test -f conftest2.$ac_objext; then 1208248e5ce07Smrg : OK 1208348e5ce07Smrg else 1208448e5ce07Smrg am_cv_prog_cc_c_o=no 1208548e5ce07Smrg break 1208648e5ce07Smrg fi 1208748e5ce07Smrg done 1208848e5ce07Smrg rm -f core conftest* 1208948e5ce07Smrg unset am_i]) 1209048e5ce07Smrgif test "$am_cv_prog_cc_c_o" != yes; then 1209148e5ce07Smrg # Losing compiler, so override with the script. 1209248e5ce07Smrg # FIXME: It is wrong to rewrite CC. 1209348e5ce07Smrg # But if we don't then we get into trouble of one sort or another. 1209448e5ce07Smrg # A longer-term fix would be to have automake use am__CC in this case, 1209548e5ce07Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 1209648e5ce07Smrg CC="$am_aux_dir/compile $CC" 12097f1ee322dSmrgfi 1209848e5ce07SmrgAC_LANG_POP([C])]) 12099c43cc173Smrg 1210048e5ce07Smrg# For backward compatibility. 1210148e5ce07SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 1210248e5ce07Smrg 121034940c694Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1210448e5ce07Smrg# 1210548e5ce07Smrg# This file is free software; the Free Software Foundation 1210648e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1210748e5ce07Smrg# with or without modifications, as long as this notice is preserved. 1210848e5ce07Smrg 1210948e5ce07Smrg# AM_RUN_LOG(COMMAND) 1211048e5ce07Smrg# ------------------- 1211148e5ce07Smrg# Run COMMAND, save the exit status in ac_status, and log it. 1211248e5ce07Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 1211348e5ce07SmrgAC_DEFUN([AM_RUN_LOG], 1211448e5ce07Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 1211548e5ce07Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 1211648e5ce07Smrg ac_status=$? 1211748e5ce07Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1211848e5ce07Smrg (exit $ac_status); }]) 1211906c34b88Smrg 1212048e5ce07Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 12121c43cc173Smrg 121224940c694Smrg# Copyright (C) 1996-2018 Free Software Foundation, Inc. 1212348e5ce07Smrg# 1212448e5ce07Smrg# This file is free software; the Free Software Foundation 1212548e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1212648e5ce07Smrg# with or without modifications, as long as this notice is preserved. 12127dc9477beSmrg 1212848e5ce07Smrg# AM_SANITY_CHECK 1212948e5ce07Smrg# --------------- 1213048e5ce07SmrgAC_DEFUN([AM_SANITY_CHECK], 1213148e5ce07Smrg[AC_MSG_CHECKING([whether build environment is sane]) 1213248e5ce07Smrg# Reject unsafe characters in $srcdir or the absolute working directory 1213348e5ce07Smrg# name. Accept space and tab only in the latter. 1213448e5ce07Smrgam_lf=' 1213548e5ce07Smrg' 1213648e5ce07Smrgcase `pwd` in 1213748e5ce07Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 1213848e5ce07Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 1213948e5ce07Smrgesac 1214048e5ce07Smrgcase $srcdir in 1214148e5ce07Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1214248e5ce07Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 1214348e5ce07Smrgesac 12144dc9477beSmrg 1214548e5ce07Smrg# Do 'set' in a subshell so we don't clobber the current shell's 1214648e5ce07Smrg# arguments. Must try -L first in case configure is actually a 1214748e5ce07Smrg# symlink; some systems play weird games with the mod time of symlinks 1214848e5ce07Smrg# (eg FreeBSD returns the mod time of the symlink's containing 1214948e5ce07Smrg# directory). 1215048e5ce07Smrgif ( 1215148e5ce07Smrg am_has_slept=no 1215248e5ce07Smrg for am_try in 1 2; do 1215348e5ce07Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 1215448e5ce07Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1215548e5ce07Smrg if test "$[*]" = "X"; then 1215648e5ce07Smrg # -L didn't work. 1215748e5ce07Smrg set X `ls -t "$srcdir/configure" conftest.file` 1215848e5ce07Smrg fi 1215948e5ce07Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1216048e5ce07Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1216137eb1ca1Smrg 1216248e5ce07Smrg # If neither matched, then we have a broken ls. This can happen 1216348e5ce07Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1216448e5ce07Smrg # broken ls alias from the environment. This has actually 1216548e5ce07Smrg # happened. Such a system could not be considered "sane". 1216648e5ce07Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1216748e5ce07Smrg alias in your environment]) 1216848e5ce07Smrg fi 1216948e5ce07Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 1217048e5ce07Smrg break 1217148e5ce07Smrg fi 1217248e5ce07Smrg # Just in case. 1217348e5ce07Smrg sleep 1 1217448e5ce07Smrg am_has_slept=yes 1217548e5ce07Smrg done 1217648e5ce07Smrg test "$[2]" = conftest.file 1217748e5ce07Smrg ) 1217848e5ce07Smrgthen 1217948e5ce07Smrg # Ok. 1218048e5ce07Smrg : 1218144584a44Smrgelse 1218248e5ce07Smrg AC_MSG_ERROR([newly created file is older than distributed files! 1218348e5ce07SmrgCheck your system clock]) 1218444584a44Smrgfi 1218548e5ce07SmrgAC_MSG_RESULT([yes]) 1218648e5ce07Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 1218748e5ce07Smrg# generated files are strictly newer. 1218848e5ce07Smrgam_sleep_pid= 1218948e5ce07Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 1219048e5ce07Smrg ( sleep 1 ) & 1219148e5ce07Smrg am_sleep_pid=$! 1219248e5ce07Smrgfi 1219348e5ce07SmrgAC_CONFIG_COMMANDS_PRE( 1219448e5ce07Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 1219548e5ce07Smrg if test -n "$am_sleep_pid"; then 1219648e5ce07Smrg # Hide warnings about reused PIDs. 1219748e5ce07Smrg wait $am_sleep_pid 2>/dev/null 1219848e5ce07Smrg fi 1219948e5ce07Smrg AC_MSG_RESULT([done])]) 1220048e5ce07Smrgrm -f conftest.file 1220148e5ce07Smrg]) 12202dc9477beSmrg 122034940c694Smrg# Copyright (C) 2009-2018 Free Software Foundation, Inc. 12204dc9477beSmrg# 1220548e5ce07Smrg# This file is free software; the Free Software Foundation 1220648e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1220748e5ce07Smrg# with or without modifications, as long as this notice is preserved. 12208c27c18e8Smrg 1220948e5ce07Smrg# AM_SILENT_RULES([DEFAULT]) 1221048e5ce07Smrg# -------------------------- 1221148e5ce07Smrg# Enable less verbose build rules; with the default set to DEFAULT 1221248e5ce07Smrg# ("yes" being less verbose, "no" or empty being verbose). 1221348e5ce07SmrgAC_DEFUN([AM_SILENT_RULES], 1221448e5ce07Smrg[AC_ARG_ENABLE([silent-rules], [dnl 1221548e5ce07SmrgAS_HELP_STRING( 1221648e5ce07Smrg [--enable-silent-rules], 1221748e5ce07Smrg [less verbose build output (undo: "make V=1")]) 1221848e5ce07SmrgAS_HELP_STRING( 1221948e5ce07Smrg [--disable-silent-rules], 1222048e5ce07Smrg [verbose build output (undo: "make V=0")])dnl 1222148e5ce07Smrg]) 1222248e5ce07Smrgcase $enable_silent_rules in @%:@ ((( 1222348e5ce07Smrg yes) AM_DEFAULT_VERBOSITY=0;; 1222448e5ce07Smrg no) AM_DEFAULT_VERBOSITY=1;; 1222548e5ce07Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1222648e5ce07Smrgesac 1222748e5ce07Smrgdnl 1222848e5ce07Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 1222948e5ce07Smrgdnl do not support nested variable expansions. 1223048e5ce07Smrgdnl See automake bug#9928 and bug#10237. 1223148e5ce07Smrgam_make=${MAKE-make} 1223248e5ce07SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 1223348e5ce07Smrg [am_cv_make_support_nested_variables], 1223448e5ce07Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 1223548e5ce07SmrgBAR0=false 1223648e5ce07SmrgBAR1=true 1223748e5ce07SmrgV=1 1223848e5ce07Smrgam__doit: 1223948e5ce07Smrg @$(TRUE) 1224048e5ce07Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1224148e5ce07Smrg am_cv_make_support_nested_variables=yes 1224248e5ce07Smrgelse 1224348e5ce07Smrg am_cv_make_support_nested_variables=no 1224448e5ce07Smrgfi]) 1224548e5ce07Smrgif test $am_cv_make_support_nested_variables = yes; then 1224648e5ce07Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 1224748e5ce07Smrg AM_V='$(V)' 1224848e5ce07Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1224948e5ce07Smrgelse 1225048e5ce07Smrg AM_V=$AM_DEFAULT_VERBOSITY 1225148e5ce07Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1225248e5ce07Smrgfi 1225348e5ce07SmrgAC_SUBST([AM_V])dnl 1225448e5ce07SmrgAM_SUBST_NOTMAKE([AM_V])dnl 1225548e5ce07SmrgAC_SUBST([AM_DEFAULT_V])dnl 1225648e5ce07SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1225748e5ce07SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1225848e5ce07SmrgAM_BACKSLASH='\' 1225948e5ce07SmrgAC_SUBST([AM_BACKSLASH])dnl 1226048e5ce07Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1226148e5ce07Smrg]) 1226248e5ce07Smrg 122634940c694Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1226444584a44Smrg# 1226548e5ce07Smrg# This file is free software; the Free Software Foundation 1226648e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1226748e5ce07Smrg# with or without modifications, as long as this notice is preserved. 1226848e5ce07Smrg 1226948e5ce07Smrg# AM_PROG_INSTALL_STRIP 1227048e5ce07Smrg# --------------------- 1227148e5ce07Smrg# One issue with vendor 'install' (even GNU) is that you can't 1227248e5ce07Smrg# specify the program used to strip binaries. This is especially 1227348e5ce07Smrg# annoying in cross-compiling environments, where the build's strip 1227448e5ce07Smrg# is unlikely to handle the host's binaries. 1227548e5ce07Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1227648e5ce07Smrg# always use install-sh in "make install-strip", and initialize 1227748e5ce07Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 1227848e5ce07SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1227948e5ce07Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1228048e5ce07Smrg# Installed binaries are usually stripped using 'strip' when the user 1228148e5ce07Smrg# run "make install-strip". However 'strip' might not be the right 1228248e5ce07Smrg# tool to use in cross-compilation environments, therefore Automake 1228348e5ce07Smrg# will honor the 'STRIP' environment variable to overrule this program. 1228448e5ce07Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1228548e5ce07Smrgif test "$cross_compiling" != no; then 1228648e5ce07Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1228748e5ce07Smrgfi 1228848e5ce07SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1228948e5ce07SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 12290b789ec8aSmrg 122914940c694Smrg# Copyright (C) 2006-2018 Free Software Foundation, Inc. 1229248e5ce07Smrg# 1229348e5ce07Smrg# This file is free software; the Free Software Foundation 1229448e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1229548e5ce07Smrg# with or without modifications, as long as this notice is preserved. 12296b789ec8aSmrg 1229748e5ce07Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1229848e5ce07Smrg# --------------------------- 1229948e5ce07Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1230048e5ce07Smrg# This macro is traced by Automake. 1230148e5ce07SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 12302c27c18e8Smrg 1230348e5ce07Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1230448e5ce07Smrg# -------------------------- 1230548e5ce07Smrg# Public sister of _AM_SUBST_NOTMAKE. 1230648e5ce07SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1230789069ce9Smrg 1230848e5ce07Smrg# Check how to create a tarball. -*- Autoconf -*- 123093e256790Smrg 123104940c694Smrg# Copyright (C) 2004-2018 Free Software Foundation, Inc. 1231148e5ce07Smrg# 1231248e5ce07Smrg# This file is free software; the Free Software Foundation 1231348e5ce07Smrg# gives unlimited permission to copy and/or distribute it, 1231448e5ce07Smrg# with or without modifications, as long as this notice is preserved. 12315c43cc173Smrg 1231648e5ce07Smrg# _AM_PROG_TAR(FORMAT) 1231744584a44Smrg# -------------------- 1231848e5ce07Smrg# Check how to create a tarball in format FORMAT. 1231948e5ce07Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1232044584a44Smrg# 1232148e5ce07Smrg# Substitute a variable $(am__tar) that is a command 1232248e5ce07Smrg# writing to stdout a FORMAT-tarball containing the directory 1232348e5ce07Smrg# $tardir. 1232448e5ce07Smrg# tardir=directory && $(am__tar) > result.tar 1232544584a44Smrg# 1232648e5ce07Smrg# Substitute a variable $(am__untar) that extract such 1232748e5ce07Smrg# a tarball read from stdin. 1232848e5ce07Smrg# $(am__untar) < result.tar 1232944584a44Smrg# 1233048e5ce07SmrgAC_DEFUN([_AM_PROG_TAR], 1233148e5ce07Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1233248e5ce07Smrg# in the wild :-( We should find a proper way to deprecate it ... 1233348e5ce07SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 12334dc9477beSmrg 1233548e5ce07Smrg# We'll loop over all known methods to create a tar archive until one works. 1233648e5ce07Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12337dc9477beSmrg 1233848e5ce07Smrgm4_if([$1], [v7], 1233948e5ce07Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12340dc9477beSmrg 1234148e5ce07Smrg [m4_case([$1], 1234248e5ce07Smrg [ustar], 1234348e5ce07Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1234448e5ce07Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1234548e5ce07Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1234648e5ce07Smrg # and bug#13588). 1234748e5ce07Smrg am_max_uid=2097151 # 2^21 - 1 1234848e5ce07Smrg am_max_gid=$am_max_uid 1234948e5ce07Smrg # The $UID and $GID variables are not portable, so we need to resort 1235048e5ce07Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1235148e5ce07Smrg # below are definitely unexpected, so allow the users to see them 1235248e5ce07Smrg # (that is, avoid stderr redirection). 1235348e5ce07Smrg am_uid=`id -u || echo unknown` 1235448e5ce07Smrg am_gid=`id -g || echo unknown` 1235548e5ce07Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1235648e5ce07Smrg if test $am_uid -le $am_max_uid; then 1235748e5ce07Smrg AC_MSG_RESULT([yes]) 1235848e5ce07Smrg else 1235948e5ce07Smrg AC_MSG_RESULT([no]) 1236048e5ce07Smrg _am_tools=none 1236148e5ce07Smrg fi 1236248e5ce07Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1236348e5ce07Smrg if test $am_gid -le $am_max_gid; then 1236448e5ce07Smrg AC_MSG_RESULT([yes]) 1236548e5ce07Smrg else 1236648e5ce07Smrg AC_MSG_RESULT([no]) 1236748e5ce07Smrg _am_tools=none 1236848e5ce07Smrg fi], 1236948e5ce07Smrg 1237048e5ce07Smrg [pax], 1237148e5ce07Smrg [], 1237248e5ce07Smrg 1237348e5ce07Smrg [m4_fatal([Unknown tar format])]) 1237448e5ce07Smrg 1237548e5ce07Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1237648e5ce07Smrg 1237748e5ce07Smrg # Go ahead even if we have the value already cached. We do so because we 1237848e5ce07Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1237948e5ce07Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1238048e5ce07Smrg 1238148e5ce07Smrg for _am_tool in $_am_tools; do 1238248e5ce07Smrg case $_am_tool in 1238348e5ce07Smrg gnutar) 1238448e5ce07Smrg for _am_tar in tar gnutar gtar; do 1238548e5ce07Smrg AM_RUN_LOG([$_am_tar --version]) && break 1238648e5ce07Smrg done 1238748e5ce07Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1238848e5ce07Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1238948e5ce07Smrg am__untar="$_am_tar -xf -" 1239048e5ce07Smrg ;; 1239148e5ce07Smrg plaintar) 1239248e5ce07Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1239348e5ce07Smrg # ustar tarball either. 1239448e5ce07Smrg (tar --version) >/dev/null 2>&1 && continue 1239548e5ce07Smrg am__tar='tar chf - "$$tardir"' 1239648e5ce07Smrg am__tar_='tar chf - "$tardir"' 1239748e5ce07Smrg am__untar='tar xf -' 1239848e5ce07Smrg ;; 1239948e5ce07Smrg pax) 1240048e5ce07Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1240148e5ce07Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1240248e5ce07Smrg am__untar='pax -r' 1240348e5ce07Smrg ;; 1240448e5ce07Smrg cpio) 1240548e5ce07Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1240648e5ce07Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1240748e5ce07Smrg am__untar='cpio -i -H $1 -d' 1240848e5ce07Smrg ;; 1240948e5ce07Smrg none) 1241048e5ce07Smrg am__tar=false 1241148e5ce07Smrg am__tar_=false 1241248e5ce07Smrg am__untar=false 1241348e5ce07Smrg ;; 1241448e5ce07Smrg esac 1241548e5ce07Smrg 1241648e5ce07Smrg # If the value was cached, stop now. We just wanted to have am__tar 1241748e5ce07Smrg # and am__untar set. 1241848e5ce07Smrg test -n "${am_cv_prog_tar_$1}" && break 1241948e5ce07Smrg 1242048e5ce07Smrg # tar/untar a dummy directory, and stop if the command works. 1242148e5ce07Smrg rm -rf conftest.dir 1242248e5ce07Smrg mkdir conftest.dir 1242348e5ce07Smrg echo GrepMe > conftest.dir/file 1242448e5ce07Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1242548e5ce07Smrg rm -rf conftest.dir 1242648e5ce07Smrg if test -s conftest.tar; then 1242748e5ce07Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1242848e5ce07Smrg AM_RUN_LOG([cat conftest.dir/file]) 1242948e5ce07Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1243048e5ce07Smrg fi 1243148e5ce07Smrg done 1243248e5ce07Smrg rm -rf conftest.dir 1243348e5ce07Smrg 1243448e5ce07Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1243548e5ce07Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1243648e5ce07Smrg 1243748e5ce07SmrgAC_SUBST([am__tar]) 1243848e5ce07SmrgAC_SUBST([am__untar]) 1243948e5ce07Smrg]) # _AM_PROG_TAR 12440c43cc173Smrg 12441