aclocal.m4 revision a3129944
1a3129944Smrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 2fb5e8d76Smrg 3a3129944Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4266e564dSmrg 5266e564dSmrg# This file is free software; the Free Software Foundation 6266e564dSmrg# gives unlimited permission to copy and/or distribute it, 7266e564dSmrg# with or without modifications, as long as this notice is preserved. 8266e564dSmrg 9266e564dSmrg# This program is distributed in the hope that it will be useful, 10266e564dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11266e564dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12266e564dSmrg# PARTICULAR PURPOSE. 13266e564dSmrg 14fb5e8d76Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15c5629e66Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16c5629e66Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17a3129944Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18a3129944Smrg[m4_warning([this file was generated for autoconf 2.69. 19c5629e66SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20c5629e66SmrgIf you have problems, you may need to regenerate the build system entirely. 21fb5e8d76SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22266e564dSmrg 23a3129944Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24698f425bSmrg# 25a3129944Smrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 26a3129944Smrg# Written by Gordon Matzigkeit, 1996 27a3129944Smrg# 28a3129944Smrg# This file is free software; the Free Software Foundation gives 29a3129944Smrg# unlimited permission to copy and/or distribute it, with or without 30a3129944Smrg# modifications, as long as this notice is preserved. 319ef0b394Smrg 32a3129944Smrgm4_define([_LT_COPYING], [dnl 33a3129944Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 34a3129944Smrg# This is free software; see the source for copying conditions. There is NO 35a3129944Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 369ef0b394Smrg 37a3129944Smrg# GNU Libtool is free software; you can redistribute it and/or modify 38a3129944Smrg# it under the terms of the GNU General Public License as published by 39a3129944Smrg# the Free Software Foundation; either version 2 of of the License, or 40a3129944Smrg# (at your option) any later version. 41a3129944Smrg# 42a3129944Smrg# As a special exception to the GNU General Public License, if you 43a3129944Smrg# distribute this file as part of a program or library that is built 44a3129944Smrg# using GNU Libtool, you may include this file under the same 45a3129944Smrg# distribution terms that you use for the rest of that program. 46a3129944Smrg# 47a3129944Smrg# GNU Libtool is distributed in the hope that it will be useful, but 48a3129944Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 49a3129944Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50a3129944Smrg# GNU General Public License for more details. 51a3129944Smrg# 52a3129944Smrg# You should have received a copy of the GNU General Public License 53a3129944Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 54a3129944Smrg]) 559ef0b394Smrg 56a3129944Smrg# serial 58 LT_INIT 579ef0b394Smrg 589ef0b394Smrg 59a3129944Smrg# LT_PREREQ(VERSION) 60a3129944Smrg# ------------------ 61a3129944Smrg# Complain and exit if this libtool version is less that VERSION. 62a3129944Smrgm4_defun([LT_PREREQ], 63a3129944Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64a3129944Smrg [m4_default([$3], 65a3129944Smrg [m4_fatal([Libtool version $1 or higher is required], 66a3129944Smrg 63)])], 67a3129944Smrg [$2])]) 68698f425bSmrg 69266e564dSmrg 70a3129944Smrg# _LT_CHECK_BUILDDIR 71a3129944Smrg# ------------------ 72a3129944Smrg# Complain if the absolute build directory name contains unusual characters 73a3129944Smrgm4_defun([_LT_CHECK_BUILDDIR], 74a3129944Smrg[case `pwd` in 75a3129944Smrg *\ * | *\ *) 76a3129944Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77a3129944Smrgesac 78698f425bSmrg]) 79698f425bSmrg 80698f425bSmrg 81a3129944Smrg# LT_INIT([OPTIONS]) 82a3129944Smrg# ------------------ 83a3129944SmrgAC_DEFUN([LT_INIT], 84a3129944Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85a3129944SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86a3129944SmrgAC_BEFORE([$0], [LT_LANG])dnl 87a3129944SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 88a3129944SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 89a3129944Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 90266e564dSmrg 91a3129944Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 92a3129944Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93a3129944Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94a3129944Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95a3129944Smrgdnl unless we require an AC_DEFUNed macro: 96a3129944SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 97a3129944SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 98a3129944SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 99a3129944SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 100a3129944Smrgm4_require([_LT_PROG_LTMAIN])dnl 101266e564dSmrg 102a3129944Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 103698f425bSmrg 104a3129944Smrgdnl Parse OPTIONS 105a3129944Smrg_LT_SET_OPTIONS([$0], [$1]) 106698f425bSmrg 107a3129944Smrg# This can be used to rebuild libtool when needed 108a3129944SmrgLIBTOOL_DEPS=$ltmain 109698f425bSmrg 110a3129944Smrg# Always use our own libtool. 111a3129944SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 112a3129944SmrgAC_SUBST(LIBTOOL)dnl 113698f425bSmrg 114a3129944Smrg_LT_SETUP 115698f425bSmrg 116a3129944Smrg# Only expand once: 117a3129944Smrgm4_define([LT_INIT]) 118a3129944Smrg])# LT_INIT 119698f425bSmrg 120a3129944Smrg# Old names: 121a3129944SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122a3129944SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123a3129944Smrgdnl aclocal-1.4 backwards compatibility: 124a3129944Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125a3129944Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 126266e564dSmrg 127266e564dSmrg 128a3129944Smrg# _LT_PREPARE_CC_BASENAME 129a3129944Smrg# ----------------------- 130a3129944Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 131a3129944Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 132a3129944Smrgfunc_cc_basename () 133a3129944Smrg{ 134a3129944Smrg for cc_temp in @S|@*""; do 135a3129944Smrg case $cc_temp in 136a3129944Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137a3129944Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138a3129944Smrg \-*) ;; 139a3129944Smrg *) break;; 140a3129944Smrg esac 1419ef0b394Smrg done 142a3129944Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 143a3129944Smrg} 144a3129944Smrg])# _LT_PREPARE_CC_BASENAME 145266e564dSmrg 146266e564dSmrg 147a3129944Smrg# _LT_CC_BASENAME(CC) 148a3129944Smrg# ------------------- 149a3129944Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 150a3129944Smrg# but that macro is also expanded into generated libtool script, which 151a3129944Smrg# arranges for $SED and $ECHO to be set by different means. 152a3129944Smrgm4_defun([_LT_CC_BASENAME], 153a3129944Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 154a3129944SmrgAC_REQUIRE([_LT_DECL_SED])dnl 155a3129944SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 156a3129944Smrgfunc_cc_basename $1 157a3129944Smrgcc_basename=$func_cc_basename_result 1589ef0b394Smrg]) 159c5629e66Smrg 160266e564dSmrg 161a3129944Smrg# _LT_FILEUTILS_DEFAULTS 162a3129944Smrg# ---------------------- 163a3129944Smrg# It is okay to use these file commands and assume they have been set 164a3129944Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 165a3129944Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 166a3129944Smrg[: ${CP="cp -f"} 167a3129944Smrg: ${MV="mv -f"} 168a3129944Smrg: ${RM="rm -f"} 169a3129944Smrg])# _LT_FILEUTILS_DEFAULTS 170266e564dSmrg 171266e564dSmrg 172a3129944Smrg# _LT_SETUP 173a3129944Smrg# --------- 174a3129944Smrgm4_defun([_LT_SETUP], 175a3129944Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176a3129944SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 177a3129944SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 178a3129944SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 179a3129944Smrg 180a3129944Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181a3129944Smrgdnl 182a3129944Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 183a3129944Smrg_LT_DECL([], [host], [0])dnl 184a3129944Smrg_LT_DECL([], [host_os], [0])dnl 185a3129944Smrgdnl 186a3129944Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 187a3129944Smrg_LT_DECL([], [build], [0])dnl 188a3129944Smrg_LT_DECL([], [build_os], [0])dnl 189a3129944Smrgdnl 190a3129944SmrgAC_REQUIRE([AC_PROG_CC])dnl 191a3129944SmrgAC_REQUIRE([LT_PATH_LD])dnl 192a3129944SmrgAC_REQUIRE([LT_PATH_NM])dnl 193a3129944Smrgdnl 194a3129944SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 195a3129944Smrgtest -z "$LN_S" && LN_S="ln -s" 196a3129944Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197a3129944Smrgdnl 198a3129944SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 199a3129944Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 200a3129944Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 201a3129944Smrgdnl 202a3129944Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 203a3129944Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 204a3129944Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 205a3129944Smrgm4_require([_LT_CMD_RELOAD])dnl 206a3129944Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 207a3129944Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 208a3129944Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 209a3129944Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210a3129944Smrgm4_require([_LT_WITH_SYSROOT])dnl 211a3129944Smrgm4_require([_LT_CMD_TRUNCATE])dnl 212a3129944Smrg 213a3129944Smrg_LT_CONFIG_LIBTOOL_INIT([ 214a3129944Smrg# See if we are running on zsh, and set the options that allow our 215a3129944Smrg# commands through without removal of \ escapes INIT. 216a3129944Smrgif test -n "\${ZSH_VERSION+set}"; then 217a3129944Smrg setopt NO_GLOB_SUBST 2189ef0b394Smrgfi 2199ef0b394Smrg]) 220a3129944Smrgif test -n "${ZSH_VERSION+set}"; then 221a3129944Smrg setopt NO_GLOB_SUBST 222a3129944Smrgfi 223266e564dSmrg 224a3129944Smrg_LT_CHECK_OBJDIR 225698f425bSmrg 226a3129944Smrgm4_require([_LT_TAG_COMPILER])dnl 227698f425bSmrg 228a3129944Smrgcase $host_os in 229a3129944Smrgaix3*) 230a3129944Smrg # AIX sometimes has problems with the GCC collect2 program. For some 231a3129944Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 232a3129944Smrg # vanish in a puff of smoke. 233a3129944Smrg if test set != "${COLLECT_NAMES+set}"; then 234a3129944Smrg COLLECT_NAMES= 235a3129944Smrg export COLLECT_NAMES 236a3129944Smrg fi 237a3129944Smrg ;; 238a3129944Smrgesac 239698f425bSmrg 240a3129944Smrg# Global variables: 241a3129944Smrgofile=libtool 242a3129944Smrgcan_build_shared=yes 243698f425bSmrg 244a3129944Smrg# All known linkers require a '.a' archive for static linking (except MSVC, 245a3129944Smrg# which needs '.lib'). 246a3129944Smrglibext=a 247698f425bSmrg 248a3129944Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 249698f425bSmrg 250a3129944Smrgold_CC=$CC 251a3129944Smrgold_CFLAGS=$CFLAGS 252698f425bSmrg 253a3129944Smrg# Set sane defaults for various variables 254a3129944Smrgtest -z "$CC" && CC=cc 255a3129944Smrgtest -z "$LTCC" && LTCC=$CC 256a3129944Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257a3129944Smrgtest -z "$LD" && LD=ld 258a3129944Smrgtest -z "$ac_objext" && ac_objext=o 259698f425bSmrg 260a3129944Smrg_LT_CC_BASENAME([$compiler]) 261fb5e8d76Smrg 262a3129944Smrg# Only perform the check for file, if the check method requires it 263a3129944Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 264a3129944Smrgcase $deplibs_check_method in 265a3129944Smrgfile_magic*) 266a3129944Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 267a3129944Smrg _LT_PATH_MAGIC 2689ef0b394Smrg fi 269a3129944Smrg ;; 270a3129944Smrgesac 271698f425bSmrg 272a3129944Smrg# Use C for the default configuration in the libtool script 273a3129944SmrgLT_SUPPORTED_TAG([CC]) 274a3129944Smrg_LT_LANG_C_CONFIG 275a3129944Smrg_LT_LANG_DEFAULT_CONFIG 276a3129944Smrg_LT_CONFIG_COMMANDS 277a3129944Smrg])# _LT_SETUP 278698f425bSmrg 279698f425bSmrg 280a3129944Smrg# _LT_PREPARE_SED_QUOTE_VARS 281a3129944Smrg# -------------------------- 282a3129944Smrg# Define a few sed substitution that help us do robust quoting. 283a3129944Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 284a3129944Smrg[# Backslashify metacharacters that are still active within 285a3129944Smrg# double-quoted strings. 286a3129944Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 287698f425bSmrg 288a3129944Smrg# Same as above, but do not quote variable references. 289a3129944Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 290fb5e8d76Smrg 291a3129944Smrg# Sed substitution to delay expansion of an escaped shell variable in a 292a3129944Smrg# double_quote_subst'ed string. 293a3129944Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294fb5e8d76Smrg 295a3129944Smrg# Sed substitution to delay expansion of an escaped single quote. 296a3129944Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297fb5e8d76Smrg 298a3129944Smrg# Sed substitution to avoid accidental globbing in evaled expressions 299a3129944Smrgno_glob_subst='s/\*/\\\*/g' 300a3129944Smrg]) 301fb5e8d76Smrg 302a3129944Smrg# _LT_PROG_LTMAIN 303a3129944Smrg# --------------- 304a3129944Smrg# Note that this code is called both from 'configure', and 'config.status' 305a3129944Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 306a3129944Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 307a3129944Smrg# so we pass a copy along to make sure it has a sensible value anyway. 308a3129944Smrgm4_defun([_LT_PROG_LTMAIN], 309a3129944Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 310a3129944Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 311a3129944Smrgltmain=$ac_aux_dir/ltmain.sh 312a3129944Smrg])# _LT_PROG_LTMAIN 313fb5e8d76Smrg 314fb5e8d76Smrg 315fb5e8d76Smrg 316a3129944Smrg# So that we can recreate a full libtool script including additional 317a3129944Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 318a3129944Smrg# in macros and then make a single call at the end using the 'libtool' 319a3129944Smrg# label. 320698f425bSmrg 321698f425bSmrg 322a3129944Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 323a3129944Smrg# ---------------------------------------- 324a3129944Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325a3129944Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 326a3129944Smrg[m4_ifval([$1], 327a3129944Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 328a3129944Smrg [$1 329a3129944Smrg])])]) 330698f425bSmrg 331a3129944Smrg# Initialize. 332a3129944Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 333698f425bSmrg 334698f425bSmrg 335a3129944Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 336a3129944Smrg# ------------------------------ 337a3129944Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 338a3129944Smrgm4_define([_LT_CONFIG_LIBTOOL], 339a3129944Smrg[m4_ifval([$1], 340a3129944Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 341a3129944Smrg [$1 342a3129944Smrg])])]) 343698f425bSmrg 344a3129944Smrg# Initialize. 345a3129944Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 346698f425bSmrg 3479ef0b394Smrg 348a3129944Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 349a3129944Smrg# ----------------------------------------------------- 350a3129944Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 351a3129944Smrg[_LT_CONFIG_LIBTOOL([$1]) 352a3129944Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3539ef0b394Smrg]) 354698f425bSmrg 355698f425bSmrg 356a3129944Smrg# _LT_FORMAT_COMMENT([COMMENT]) 357a3129944Smrg# ----------------------------- 358a3129944Smrg# Add leading comment marks to the start of each line, and a trailing 359a3129944Smrg# full-stop to the whole comment if one is not present already. 360a3129944Smrgm4_define([_LT_FORMAT_COMMENT], 361a3129944Smrg[m4_ifval([$1], [ 362a3129944Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 363a3129944Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 364a3129944Smrg)]) 365698f425bSmrg 366698f425bSmrg 367a3129944Smrg 368a3129944Smrg 369a3129944Smrg 370a3129944Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 371a3129944Smrg# ------------------------------------------------------------------- 372a3129944Smrg# CONFIGNAME is the name given to the value in the libtool script. 373a3129944Smrg# VARNAME is the (base) name used in the configure script. 374a3129944Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 375a3129944Smrg# VARNAME. Any other value will be used directly. 376a3129944Smrgm4_define([_LT_DECL], 377a3129944Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 378a3129944Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 379a3129944Smrg [m4_ifval([$1], [$1], [$2])]) 380a3129944Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 381a3129944Smrg m4_ifval([$4], 382a3129944Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 383a3129944Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 384a3129944Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3859ef0b394Smrg]) 386698f425bSmrg 387698f425bSmrg 388a3129944Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 389a3129944Smrg# -------------------------------------------------------- 390a3129944Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 391698f425bSmrg 392698f425bSmrg 393a3129944Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 394a3129944Smrg# ------------------------------------------------ 395a3129944Smrgm4_define([lt_decl_tag_varnames], 396a3129944Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 397698f425bSmrg 398698f425bSmrg 399a3129944Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 400a3129944Smrg# --------------------------------------------------------- 401a3129944Smrgm4_define([_lt_decl_filter], 402a3129944Smrg[m4_case([$#], 403a3129944Smrg [0], [m4_fatal([$0: too few arguments: $#])], 404a3129944Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 405a3129944Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 406a3129944Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 407a3129944Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 408a3129944Smrg]) 409698f425bSmrg 410fb5e8d76Smrg 411a3129944Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 412a3129944Smrg# -------------------------------------------------- 413a3129944Smrgm4_define([lt_decl_quote_varnames], 414a3129944Smrg[_lt_decl_filter([value], [1], $@)]) 415fb5e8d76Smrg 416698f425bSmrg 417a3129944Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 418a3129944Smrg# --------------------------------------------------- 419a3129944Smrgm4_define([lt_decl_dquote_varnames], 420a3129944Smrg[_lt_decl_filter([value], [2], $@)]) 421698f425bSmrg 422fb5e8d76Smrg 423a3129944Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 424a3129944Smrg# --------------------------------------------------- 425a3129944Smrgm4_define([lt_decl_varnames_tagged], 426a3129944Smrg[m4_assert([$# <= 2])dnl 427a3129944Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 428a3129944Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 429a3129944Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 430a3129944Smrgm4_define([_lt_decl_varnames_tagged], 431a3129944Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432fb5e8d76Smrg 433698f425bSmrg 434a3129944Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 435a3129944Smrg# ------------------------------------------------ 436a3129944Smrgm4_define([lt_decl_all_varnames], 437a3129944Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 438a3129944Smrg m4_if([$2], [], 439a3129944Smrg m4_quote(lt_decl_varnames), 440a3129944Smrg m4_quote(m4_shift($@))))[]dnl 441a3129944Smrg]) 442a3129944Smrgm4_define([_lt_decl_all_varnames], 443a3129944Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 444a3129944Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 445a3129944Smrg]) 446698f425bSmrg 447fb5e8d76Smrg 448a3129944Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 449a3129944Smrg# ------------------------------------ 450a3129944Smrg# Quote a variable value, and forward it to 'config.status' so that its 451a3129944Smrg# declaration there will have the same value as in 'configure'. VARNAME 452a3129944Smrg# must have a single quote delimited value for this to work. 453a3129944Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 454a3129944Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 455a3129944Smrg 456698f425bSmrg 457a3129944Smrg# _LT_CONFIG_STATUS_DECLARATIONS 458a3129944Smrg# ------------------------------ 459a3129944Smrg# We delimit libtool config variables with single quotes, so when 460a3129944Smrg# we write them to config.status, we have to be sure to quote all 461a3129944Smrg# embedded single quotes properly. In configure, this macro expands 462a3129944Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4639ef0b394Smrg# 464a3129944Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 465a3129944Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 466a3129944Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 467a3129944Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 468698f425bSmrg 469a3129944Smrg 470a3129944Smrg# _LT_LIBTOOL_TAGS 471a3129944Smrg# ---------------- 472a3129944Smrg# Output comment and list of tags supported by the script 473a3129944Smrgm4_defun([_LT_LIBTOOL_TAGS], 474a3129944Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 475a3129944Smrgavailable_tags='_LT_TAGS'dnl 4769ef0b394Smrg]) 477698f425bSmrg 478a3129944Smrg 479a3129944Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 480a3129944Smrg# ----------------------------------- 481a3129944Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 482a3129944Smrg# expand to a commented shell variable setting: 483698f425bSmrg# 484a3129944Smrg# # Some comment about what VAR is for. 485a3129944Smrg# visible_name=$lt_internal_name 486a3129944Smrgm4_define([_LT_LIBTOOL_DECLARE], 487a3129944Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 488a3129944Smrg [description])))[]dnl 489a3129944Smrgm4_pushdef([_libtool_name], 490a3129944Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 491a3129944Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 492a3129944Smrg [0], [_libtool_name=[$]$1], 493a3129944Smrg [1], [_libtool_name=$lt_[]$1], 494a3129944Smrg [2], [_libtool_name=$lt_[]$1], 495a3129944Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 496a3129944Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 497a3129944Smrg]) 498698f425bSmrg 499698f425bSmrg 500a3129944Smrg# _LT_LIBTOOL_CONFIG_VARS 501a3129944Smrg# ----------------------- 502a3129944Smrg# Produce commented declarations of non-tagged libtool config variables 503a3129944Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 504a3129944Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 505a3129944Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 506a3129944Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 507a3129944Smrg[m4_foreach([_lt_var], 508a3129944Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 509a3129944Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 510698f425bSmrg 511698f425bSmrg 512a3129944Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 513a3129944Smrg# ------------------------- 514a3129944Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 515a3129944Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 516a3129944Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 517698f425bSmrg 518698f425bSmrg 519a3129944Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 520a3129944Smrg# ------------------------------ 521a3129944Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 522698f425bSmrg 523698f425bSmrg 524a3129944Smrg# _LT_CONFIG_COMMANDS 525a3129944Smrg# ------------------- 526a3129944Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 527a3129944Smrg# variables for single and double quote escaping we saved from calls 528a3129944Smrg# to _LT_DECL, we can put quote escaped variables declarations 529a3129944Smrg# into 'config.status', and then the shell code to quote escape them in 530a3129944Smrg# for loops in 'config.status'. Finally, any additional code accumulated 531a3129944Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 532a3129944Smrgm4_defun([_LT_CONFIG_COMMANDS], 533a3129944Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 534a3129944Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 535a3129944Smrg dnl instead of duplicating it all over again into config.status, 536a3129944Smrg dnl then we will have config.status run $CONFIG_LT later, so it 537a3129944Smrg dnl needs to know what name is stored there: 538a3129944Smrg [AC_CONFIG_COMMANDS([libtool], 539a3129944Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 540a3129944Smrg dnl If the libtool generation code is destined for config.status, 541a3129944Smrg dnl expand the accumulated commands and init code now: 542a3129944Smrg [AC_CONFIG_COMMANDS([libtool], 543a3129944Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 544a3129944Smrg])#_LT_CONFIG_COMMANDS 545698f425bSmrg 546fb5e8d76Smrg 547a3129944Smrg# Initialize. 548a3129944Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 549a3129944Smrg[ 550698f425bSmrg 551a3129944Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 552a3129944Smrg# if CDPATH is set. 553a3129944Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 554266e564dSmrg 555a3129944Smrgsed_quote_subst='$sed_quote_subst' 556a3129944Smrgdouble_quote_subst='$double_quote_subst' 557a3129944Smrgdelay_variable_subst='$delay_variable_subst' 558a3129944Smrg_LT_CONFIG_STATUS_DECLARATIONS 559a3129944SmrgLTCC='$LTCC' 560a3129944SmrgLTCFLAGS='$LTCFLAGS' 561a3129944Smrgcompiler='$compiler_DEFAULT' 562266e564dSmrg 563a3129944Smrg# A function that is used when there is no print builtin or printf. 564a3129944Smrgfunc_fallback_echo () 565a3129944Smrg{ 566a3129944Smrg eval 'cat <<_LTECHO_EOF 567a3129944Smrg\$[]1 568a3129944Smrg_LTECHO_EOF' 569a3129944Smrg} 570266e564dSmrg 571a3129944Smrg# Quote evaled strings. 572a3129944Smrgfor var in lt_decl_all_varnames([[ \ 573a3129944Smrg]], lt_decl_quote_varnames); do 574a3129944Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575a3129944Smrg *[[\\\\\\\`\\"\\\$]]*) 576a3129944Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 577fb5e8d76Smrg ;; 578a3129944Smrg *) 579a3129944Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580fb5e8d76Smrg ;; 581a3129944Smrg esac 582a3129944Smrgdone 583a3129944Smrg 584a3129944Smrg# Double-quote double-evaled strings. 585a3129944Smrgfor var in lt_decl_all_varnames([[ \ 586a3129944Smrg]], lt_decl_dquote_varnames); do 587a3129944Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 588a3129944Smrg *[[\\\\\\\`\\"\\\$]]*) 589a3129944Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 590fb5e8d76Smrg ;; 591a3129944Smrg *) 592a3129944Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 593fb5e8d76Smrg ;; 594fb5e8d76Smrg esac 595a3129944Smrgdone 596266e564dSmrg 597a3129944Smrg_LT_OUTPUT_LIBTOOL_INIT 598a3129944Smrg]) 599266e564dSmrg 600a3129944Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 601a3129944Smrg# ------------------------------------ 602a3129944Smrg# Generate a child script FILE with all initialization necessary to 603a3129944Smrg# reuse the environment learned by the parent script, and make the 604a3129944Smrg# file executable. If COMMENT is supplied, it is inserted after the 605a3129944Smrg# '#!' sequence but before initialization text begins. After this 606a3129944Smrg# macro, additional text can be appended to FILE to form the body of 607a3129944Smrg# the child script. The macro ends with non-zero status if the 608a3129944Smrg# file could not be fully written (such as if the disk is full). 609a3129944Smrgm4_ifdef([AS_INIT_GENERATED], 610a3129944Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 611a3129944Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 612a3129944Smrg[m4_require([AS_PREPARE])]dnl 613a3129944Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 614a3129944Smrg[lt_write_fail=0 615a3129944Smrgcat >$1 <<_ASEOF || lt_write_fail=1 616a3129944Smrg#! $SHELL 617a3129944Smrg# Generated by $as_me. 618a3129944Smrg$2 619a3129944SmrgSHELL=\${CONFIG_SHELL-$SHELL} 620a3129944Smrgexport SHELL 621a3129944Smrg_ASEOF 622a3129944Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 623a3129944SmrgAS_SHELL_SANITIZE 624a3129944Smrg_AS_PREPARE 625a3129944Smrgexec AS_MESSAGE_FD>&1 626a3129944Smrg_ASEOF 627a3129944Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 628a3129944Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 629266e564dSmrg 630a3129944Smrg# LT_OUTPUT 631a3129944Smrg# --------- 632a3129944Smrg# This macro allows early generation of the libtool script (before 633a3129944Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 634a3129944Smrg# tests. 635a3129944SmrgAC_DEFUN([LT_OUTPUT], 636a3129944Smrg[: ${CONFIG_LT=./config.lt} 637a3129944SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 638a3129944Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 639a3129944Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 640266e564dSmrg 641a3129944Smrgcat >>"$CONFIG_LT" <<\_LTEOF 642a3129944Smrglt_cl_silent=false 643a3129944Smrgexec AS_MESSAGE_LOG_FD>>config.log 644a3129944Smrg{ 645a3129944Smrg echo 646a3129944Smrg AS_BOX([Running $as_me.]) 647a3129944Smrg} >&AS_MESSAGE_LOG_FD 648c5629e66Smrg 649a3129944Smrglt_cl_help="\ 650a3129944Smrg'$as_me' creates a local libtool stub from the current configuration, 651a3129944Smrgfor use in further configure time tests before the real libtool is 652a3129944Smrggenerated. 653698f425bSmrg 654a3129944SmrgUsage: $[0] [[OPTIONS]] 655266e564dSmrg 656a3129944Smrg -h, --help print this help, then exit 657a3129944Smrg -V, --version print version number, then exit 658a3129944Smrg -q, --quiet do not print progress messages 659a3129944Smrg -d, --debug don't remove temporary files 660266e564dSmrg 661a3129944SmrgReport bugs to <bug-libtool@gnu.org>." 662266e564dSmrg 663a3129944Smrglt_cl_version="\ 664a3129944Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 665a3129944Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 666a3129944Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 667266e564dSmrg 668a3129944SmrgCopyright (C) 2011 Free Software Foundation, Inc. 669a3129944SmrgThis config.lt script is free software; the Free Software Foundation 670a3129944Smrggives unlimited permision to copy, distribute and modify it." 671c5629e66Smrg 672a3129944Smrgwhile test 0 != $[#] 673a3129944Smrgdo 674a3129944Smrg case $[1] in 675a3129944Smrg --version | --v* | -V ) 676a3129944Smrg echo "$lt_cl_version"; exit 0 ;; 677a3129944Smrg --help | --h* | -h ) 678a3129944Smrg echo "$lt_cl_help"; exit 0 ;; 679a3129944Smrg --debug | --d* | -d ) 680a3129944Smrg debug=: ;; 681a3129944Smrg --quiet | --q* | --silent | --s* | -q ) 682a3129944Smrg lt_cl_silent=: ;; 683266e564dSmrg 684a3129944Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 685a3129944SmrgTry '$[0] --help' for more information.]) ;; 686266e564dSmrg 687a3129944Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 688a3129944SmrgTry '$[0] --help' for more information.]) ;; 689a3129944Smrg esac 690a3129944Smrg shift 691a3129944Smrgdone 692266e564dSmrg 693a3129944Smrgif $lt_cl_silent; then 694a3129944Smrg exec AS_MESSAGE_FD>/dev/null 695a3129944Smrgfi 696a3129944Smrg_LTEOF 697266e564dSmrg 698a3129944Smrgcat >>"$CONFIG_LT" <<_LTEOF 699a3129944Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 700a3129944Smrg_LTEOF 701266e564dSmrg 702a3129944Smrgcat >>"$CONFIG_LT" <<\_LTEOF 703a3129944SmrgAC_MSG_NOTICE([creating $ofile]) 704a3129944Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 705a3129944SmrgAS_EXIT(0) 706a3129944Smrg_LTEOF 707a3129944Smrgchmod +x "$CONFIG_LT" 708266e564dSmrg 709a3129944Smrg# configure is writing to config.log, but config.lt does its own redirection, 710a3129944Smrg# appending to config.log, which fails on DOS, as config.log is still kept 711a3129944Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 712a3129944Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 713a3129944Smrglt_cl_success=: 714a3129944Smrgtest yes = "$silent" && 715a3129944Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 716a3129944Smrgexec AS_MESSAGE_LOG_FD>/dev/null 717a3129944Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 718a3129944Smrgexec AS_MESSAGE_LOG_FD>>config.log 719a3129944Smrg$lt_cl_success || AS_EXIT(1) 720a3129944Smrg])# LT_OUTPUT 721266e564dSmrg 722266e564dSmrg 723a3129944Smrg# _LT_CONFIG(TAG) 724a3129944Smrg# --------------- 725a3129944Smrg# If TAG is the built-in tag, create an initial libtool script with a 726a3129944Smrg# default configuration from the untagged config vars. Otherwise add code 727a3129944Smrg# to config.status for appending the configuration named by TAG from the 728a3129944Smrg# matching tagged config vars. 729a3129944Smrgm4_defun([_LT_CONFIG], 730a3129944Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 731a3129944Smrg_LT_CONFIG_SAVE_COMMANDS([ 732a3129944Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 733a3129944Smrg m4_if(_LT_TAG, [C], [ 734a3129944Smrg # See if we are running on zsh, and set the options that allow our 735a3129944Smrg # commands through without removal of \ escapes. 736a3129944Smrg if test -n "${ZSH_VERSION+set}"; then 737a3129944Smrg setopt NO_GLOB_SUBST 738a3129944Smrg fi 7399ef0b394Smrg 740a3129944Smrg cfgfile=${ofile}T 741a3129944Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 742a3129944Smrg $RM "$cfgfile" 743266e564dSmrg 744a3129944Smrg cat <<_LT_EOF >> "$cfgfile" 745a3129944Smrg#! $SHELL 746a3129944Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 747a3129944Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 748a3129944Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 749266e564dSmrg 750a3129944Smrg# Provide generalized library-building support services. 751a3129944Smrg# Written by Gordon Matzigkeit, 1996 752266e564dSmrg 753a3129944Smrg_LT_COPYING 754a3129944Smrg_LT_LIBTOOL_TAGS 755266e564dSmrg 756a3129944Smrg# Configured defaults for sys_lib_dlsearch_path munging. 757a3129944Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 758266e564dSmrg 759a3129944Smrg# ### BEGIN LIBTOOL CONFIG 760a3129944Smrg_LT_LIBTOOL_CONFIG_VARS 761a3129944Smrg_LT_LIBTOOL_TAG_VARS 762a3129944Smrg# ### END LIBTOOL CONFIG 763266e564dSmrg 764a3129944Smrg_LT_EOF 765266e564dSmrg 766a3129944Smrg cat <<'_LT_EOF' >> "$cfgfile" 7679ef0b394Smrg 768a3129944Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 7699ef0b394Smrg 770a3129944Smrg_LT_PREPARE_MUNGE_PATH_LIST 771a3129944Smrg_LT_PREPARE_CC_BASENAME 7729ef0b394Smrg 773a3129944Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 7749ef0b394Smrg 775a3129944Smrg_LT_EOF 7769ef0b394Smrg 777a3129944Smrg case $host_os in 778a3129944Smrg aix3*) 779a3129944Smrg cat <<\_LT_EOF >> "$cfgfile" 780a3129944Smrg# AIX sometimes has problems with the GCC collect2 program. For some 781a3129944Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 782a3129944Smrg# vanish in a puff of smoke. 783a3129944Smrgif test set != "${COLLECT_NAMES+set}"; then 784a3129944Smrg COLLECT_NAMES= 785a3129944Smrg export COLLECT_NAMES 786a3129944Smrgfi 787a3129944Smrg_LT_EOF 788a3129944Smrg ;; 789a3129944Smrg esac 7909ef0b394Smrg 791a3129944Smrg _LT_PROG_LTMAIN 7929ef0b394Smrg 793a3129944Smrg # We use sed instead of cat because bash on DJGPP gets confused if 794a3129944Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 795a3129944Smrg # text mode, it properly converts lines to CR/LF. This bash problem 796a3129944Smrg # is reportedly fixed, but why not run on old versions too? 797a3129944Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 798a3129944Smrg || (rm -f "$cfgfile"; exit 1) 7999ef0b394Smrg 800a3129944Smrg mv -f "$cfgfile" "$ofile" || 801a3129944Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 802a3129944Smrg chmod +x "$ofile" 803a3129944Smrg], 804a3129944Smrg[cat <<_LT_EOF >> "$ofile" 8059ef0b394Smrg 806a3129944Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 807a3129944Smrgdnl in a comment (ie after a #). 808a3129944Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 809a3129944Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 810a3129944Smrg# ### END LIBTOOL TAG CONFIG: $1 811a3129944Smrg_LT_EOF 812a3129944Smrg])dnl /m4_if 813a3129944Smrg], 814a3129944Smrg[m4_if([$1], [], [ 815a3129944Smrg PACKAGE='$PACKAGE' 816a3129944Smrg VERSION='$VERSION' 817a3129944Smrg RM='$RM' 818a3129944Smrg ofile='$ofile'], []) 819a3129944Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 820a3129944Smrg])# _LT_CONFIG 8219ef0b394Smrg 8229ef0b394Smrg 823a3129944Smrg# LT_SUPPORTED_TAG(TAG) 824a3129944Smrg# --------------------- 825a3129944Smrg# Trace this macro to discover what tags are supported by the libtool 826a3129944Smrg# --tag option, using: 827a3129944Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 828a3129944SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 829266e564dSmrg 830698f425bSmrg 831a3129944Smrg# C support is built-in for now 832a3129944Smrgm4_define([_LT_LANG_C_enabled], []) 833a3129944Smrgm4_define([_LT_TAGS], []) 834698f425bSmrg 835698f425bSmrg 836a3129944Smrg# LT_LANG(LANG) 837a3129944Smrg# ------------- 838a3129944Smrg# Enable libtool support for the given language if not already enabled. 839a3129944SmrgAC_DEFUN([LT_LANG], 840a3129944Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 841a3129944Smrgm4_case([$1], 842a3129944Smrg [C], [_LT_LANG(C)], 843a3129944Smrg [C++], [_LT_LANG(CXX)], 844a3129944Smrg [Go], [_LT_LANG(GO)], 845a3129944Smrg [Java], [_LT_LANG(GCJ)], 846a3129944Smrg [Fortran 77], [_LT_LANG(F77)], 847a3129944Smrg [Fortran], [_LT_LANG(FC)], 848a3129944Smrg [Windows Resource], [_LT_LANG(RC)], 849a3129944Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 850a3129944Smrg [_LT_LANG($1)], 851a3129944Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 852a3129944Smrg])# LT_LANG 853698f425bSmrg 854698f425bSmrg 855a3129944Smrg# _LT_LANG(LANGNAME) 856a3129944Smrg# ------------------ 857a3129944Smrgm4_defun([_LT_LANG], 858a3129944Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 859a3129944Smrg [LT_SUPPORTED_TAG([$1])dnl 860a3129944Smrg m4_append([_LT_TAGS], [$1 ])dnl 861a3129944Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 862a3129944Smrg _LT_LANG_$1_CONFIG($1)])dnl 863a3129944Smrg])# _LT_LANG 864266e564dSmrg 865266e564dSmrg 866a3129944Smrgm4_ifndef([AC_PROG_GO], [ 867a3129944Smrg# NOTE: This macro has been submitted for inclusion into # 868a3129944Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 869a3129944Smrg# a released version of Autoconf we should remove this # 870a3129944Smrg# macro and use it instead. # 871a3129944Smrgm4_defun([AC_PROG_GO], 872a3129944Smrg[AC_LANG_PUSH(Go)dnl 873a3129944SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 874a3129944SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875a3129944Smrg_AC_ARG_VAR_LDFLAGS()dnl 876a3129944SmrgAC_CHECK_TOOL(GOC, gccgo) 877a3129944Smrgif test -z "$GOC"; then 878a3129944Smrg if test -n "$ac_tool_prefix"; then 879a3129944Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880a3129944Smrg fi 881a3129944Smrgfi 882a3129944Smrgif test -z "$GOC"; then 883a3129944Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884a3129944Smrgfi 885a3129944Smrg])#m4_defun 886a3129944Smrg])#m4_ifndef 887c5629e66Smrg 888c5629e66Smrg 889a3129944Smrg# _LT_LANG_DEFAULT_CONFIG 890a3129944Smrg# ----------------------- 891a3129944Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 892a3129944Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 893a3129944Smrg [LT_LANG(CXX)], 894a3129944Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 895c5629e66Smrg 896a3129944SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 897a3129944Smrg [LT_LANG(F77)], 898a3129944Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 899c5629e66Smrg 900a3129944SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 901a3129944Smrg [LT_LANG(FC)], 902a3129944Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903c5629e66Smrg 904a3129944Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 905a3129944Smrgdnl pulling things in needlessly. 906a3129944SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 907a3129944Smrg [LT_LANG(GCJ)], 908a3129944Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 909a3129944Smrg [LT_LANG(GCJ)], 910a3129944Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 911a3129944Smrg [LT_LANG(GCJ)], 912a3129944Smrg [m4_ifdef([AC_PROG_GCJ], 913a3129944Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 914a3129944Smrg m4_ifdef([A][M_PROG_GCJ], 915a3129944Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 916a3129944Smrg m4_ifdef([LT_PROG_GCJ], 917a3129944Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918266e564dSmrg 919a3129944SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 920a3129944Smrg [LT_LANG(GO)], 921a3129944Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 922266e564dSmrg 923a3129944SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 924a3129944Smrg [LT_LANG(RC)], 925a3129944Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 926a3129944Smrg])# _LT_LANG_DEFAULT_CONFIG 927698f425bSmrg 928a3129944Smrg# Obsolete macros: 929a3129944SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 930a3129944SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 931a3129944SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 932a3129944SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 933a3129944SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 934a3129944Smrgdnl aclocal-1.4 backwards compatibility: 935a3129944Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 936a3129944Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 937a3129944Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 938a3129944Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 939a3129944Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 940266e564dSmrg 941266e564dSmrg 942a3129944Smrg# _LT_TAG_COMPILER 943a3129944Smrg# ---------------- 944a3129944Smrgm4_defun([_LT_TAG_COMPILER], 945a3129944Smrg[AC_REQUIRE([AC_PROG_CC])dnl 946266e564dSmrg 947a3129944Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 948a3129944Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 949a3129944Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 950a3129944Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 951266e564dSmrg 952a3129944Smrg# If no C compiler was specified, use CC. 953a3129944SmrgLTCC=${LTCC-"$CC"} 954266e564dSmrg 955a3129944Smrg# If no C compiler flags were specified, use CFLAGS. 956a3129944SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957266e564dSmrg 958a3129944Smrg# Allow CC to be a program name with arguments. 959a3129944Smrgcompiler=$CC 960a3129944Smrg])# _LT_TAG_COMPILER 961266e564dSmrg 962266e564dSmrg 963a3129944Smrg# _LT_COMPILER_BOILERPLATE 964a3129944Smrg# ------------------------ 965a3129944Smrg# Check for compiler boilerplate output or warnings with 966a3129944Smrg# the simple compiler test code. 967a3129944Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 968a3129944Smrg[m4_require([_LT_DECL_SED])dnl 969a3129944Smrgac_outfile=conftest.$ac_objext 970a3129944Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 971a3129944Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972a3129944Smrg_lt_compiler_boilerplate=`cat conftest.err` 973a3129944Smrg$RM conftest* 974a3129944Smrg])# _LT_COMPILER_BOILERPLATE 975266e564dSmrg 976266e564dSmrg 977a3129944Smrg# _LT_LINKER_BOILERPLATE 978a3129944Smrg# ---------------------- 979a3129944Smrg# Check for linker boilerplate output or warnings with 980a3129944Smrg# the simple link test code. 981a3129944Smrgm4_defun([_LT_LINKER_BOILERPLATE], 982a3129944Smrg[m4_require([_LT_DECL_SED])dnl 983a3129944Smrgac_outfile=conftest.$ac_objext 984a3129944Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 985a3129944Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 986a3129944Smrg_lt_linker_boilerplate=`cat conftest.err` 987a3129944Smrg$RM -r conftest* 988a3129944Smrg])# _LT_LINKER_BOILERPLATE 989266e564dSmrg 990a3129944Smrg# _LT_REQUIRED_DARWIN_CHECKS 991a3129944Smrg# ------------------------- 992a3129944Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 993a3129944Smrg case $host_os in 994a3129944Smrg rhapsody* | darwin*) 995a3129944Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 996a3129944Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 997a3129944Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 998a3129944Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 999a3129944Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1000a3129944Smrg _LT_DECL([], [DSYMUTIL], [1], 1001a3129944Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1002a3129944Smrg _LT_DECL([], [NMEDIT], [1], 1003a3129944Smrg [Tool to change global to local symbols on Mac OS X]) 1004a3129944Smrg _LT_DECL([], [LIPO], [1], 1005a3129944Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 1006a3129944Smrg _LT_DECL([], [OTOOL], [1], 1007a3129944Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1008a3129944Smrg _LT_DECL([], [OTOOL64], [1], 1009a3129944Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1010266e564dSmrg 1011a3129944Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1012a3129944Smrg [lt_cv_apple_cc_single_mod=no 1013a3129944Smrg if test -z "$LT_MULTI_MODULE"; then 1014a3129944Smrg # By default we will add the -single_module flag. You can override 1015a3129944Smrg # by either setting the environment variable LT_MULTI_MODULE 1016a3129944Smrg # non-empty at configure time, or by adding -multi_module to the 1017a3129944Smrg # link flags. 1018a3129944Smrg rm -rf libconftest.dylib* 1019a3129944Smrg echo "int foo(void){return 1;}" > conftest.c 1020a3129944Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1021a3129944Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1022a3129944Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023a3129944Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1024a3129944Smrg _lt_result=$? 1025a3129944Smrg # If there is a non-empty error log, and "single_module" 1026a3129944Smrg # appears in it, assume the flag caused a linker warning 1027a3129944Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1028a3129944Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1029a3129944Smrg # Otherwise, if the output was created with a 0 exit code from 1030a3129944Smrg # the compiler, it worked. 1031a3129944Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1032a3129944Smrg lt_cv_apple_cc_single_mod=yes 1033a3129944Smrg else 1034a3129944Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1035a3129944Smrg fi 1036a3129944Smrg rm -rf libconftest.dylib* 1037a3129944Smrg rm -f conftest.* 1038a3129944Smrg fi]) 1039266e564dSmrg 1040a3129944Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1041a3129944Smrg [lt_cv_ld_exported_symbols_list], 1042a3129944Smrg [lt_cv_ld_exported_symbols_list=no 1043a3129944Smrg save_LDFLAGS=$LDFLAGS 1044a3129944Smrg echo "_main" > conftest.sym 1045a3129944Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1046a3129944Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1047a3129944Smrg [lt_cv_ld_exported_symbols_list=yes], 1048a3129944Smrg [lt_cv_ld_exported_symbols_list=no]) 1049a3129944Smrg LDFLAGS=$save_LDFLAGS 1050a3129944Smrg ]) 1051266e564dSmrg 1052a3129944Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1053a3129944Smrg [lt_cv_ld_force_load=no 1054a3129944Smrg cat > conftest.c << _LT_EOF 1055a3129944Smrgint forced_loaded() { return 2;} 1056a3129944Smrg_LT_EOF 1057a3129944Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1058a3129944Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1059a3129944Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1060a3129944Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1061a3129944Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1062a3129944Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1063a3129944Smrg cat > conftest.c << _LT_EOF 1064a3129944Smrgint main() { return 0;} 1065a3129944Smrg_LT_EOF 1066a3129944Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1067a3129944Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1068a3129944Smrg _lt_result=$? 1069a3129944Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1070a3129944Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1071a3129944Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1072a3129944Smrg lt_cv_ld_force_load=yes 1073a3129944Smrg else 1074a3129944Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1075a3129944Smrg fi 1076a3129944Smrg rm -f conftest.err libconftest.a conftest conftest.c 1077a3129944Smrg rm -rf conftest.dSYM 1078a3129944Smrg ]) 1079a3129944Smrg case $host_os in 1080a3129944Smrg rhapsody* | darwin1.[[012]]) 1081a3129944Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1082a3129944Smrg darwin1.*) 1083a3129944Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1084a3129944Smrg darwin*) # darwin 5.x on 1085a3129944Smrg # if running on 10.5 or later, the deployment target defaults 1086a3129944Smrg # to the OS version, if on x86, and 10.4, the deployment 1087a3129944Smrg # target defaults to 10.4. Don't you love it? 1088a3129944Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1089a3129944Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1090a3129944Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1091a3129944Smrg 10.[[012]][[,.]]*) 1092a3129944Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1093a3129944Smrg 10.*) 1094a3129944Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1095a3129944Smrg esac 1096a3129944Smrg ;; 1097a3129944Smrg esac 1098a3129944Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1099a3129944Smrg _lt_dar_single_mod='$single_module' 1100a3129944Smrg fi 1101a3129944Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1102a3129944Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1103a3129944Smrg else 1104a3129944Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1105a3129944Smrg fi 1106a3129944Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1107a3129944Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1108a3129944Smrg else 1109a3129944Smrg _lt_dsymutil= 1110a3129944Smrg fi 1111a3129944Smrg ;; 1112a3129944Smrg esac 11139ef0b394Smrg]) 1114266e564dSmrg 1115266e564dSmrg 1116a3129944Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117a3129944Smrg# --------------------------------- 1118a3129944Smrg# Checks for linker and compiler features on darwin 1119a3129944Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1120a3129944Smrg[ 1121a3129944Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1122a3129944Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1123a3129944Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1124a3129944Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1125a3129944Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1126a3129944Smrg if test yes = "$lt_cv_ld_force_load"; then 1127a3129944Smrg _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\"`' 1128a3129944Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129a3129944Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130a3129944Smrg else 1131a3129944Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132a3129944Smrg fi 1133a3129944Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1134a3129944Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1135a3129944Smrg case $cc_basename in 1136a3129944Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1137a3129944Smrg *) _lt_dar_can_shared=$GCC ;; 1138a3129944Smrg esac 1139a3129944Smrg if test yes = "$_lt_dar_can_shared"; then 1140a3129944Smrg output_verbose_link_cmd=func_echo_all 1141a3129944Smrg _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" 1142a3129944Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1143a3129944Smrg _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" 1144a3129944Smrg _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" 1145a3129944Smrg m4_if([$1], [CXX], 1146a3129944Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1147a3129944Smrg _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" 1148a3129944Smrg _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" 1149a3129944Smrg fi 1150a3129944Smrg],[]) 1151a3129944Smrg else 1152a3129944Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1153a3129944Smrg fi 1154a3129944Smrg]) 1155266e564dSmrg 1156a3129944Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157a3129944Smrg# ---------------------------------- 1158a3129944Smrg# Links a minimal program and checks the executable 1159a3129944Smrg# for the system default hardcoded library path. In most cases, 1160a3129944Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1161a3129944Smrg# the location of the communication and MPI libs are included too. 1162a3129944Smrg# If we don't find anything, use the default library path according 1163a3129944Smrg# to the aix ld manual. 1164a3129944Smrg# Store the results from the different compilers for each TAGNAME. 1165a3129944Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1166a3129944Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1167a3129944Smrg[m4_require([_LT_DECL_SED])dnl 1168a3129944Smrgif test set = "${lt_cv_aix_libpath+set}"; then 1169a3129944Smrg aix_libpath=$lt_cv_aix_libpath 1170a3129944Smrgelse 1171a3129944Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172a3129944Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173a3129944Smrg lt_aix_libpath_sed='[ 1174a3129944Smrg /Import File Strings/,/^$/ { 1175a3129944Smrg /^0/ { 1176a3129944Smrg s/^0 *\([^ ]*\) *$/\1/ 1177a3129944Smrg p 1178a3129944Smrg } 1179a3129944Smrg }]' 1180a3129944Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181a3129944Smrg # Check for a 64-bit object if we didn't find anything. 1182a3129944Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183a3129944Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184a3129944Smrg fi],[]) 1185a3129944Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1186a3129944Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187a3129944Smrg fi 1188a3129944Smrg ]) 1189a3129944Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190a3129944Smrgfi 1191a3129944Smrg])# _LT_SYS_MODULE_PATH_AIX 1192266e564dSmrg 1193266e564dSmrg 1194a3129944Smrg# _LT_SHELL_INIT(ARG) 1195a3129944Smrg# ------------------- 1196a3129944Smrgm4_define([_LT_SHELL_INIT], 1197a3129944Smrg[m4_divert_text([M4SH-INIT], [$1 1198a3129944Smrg])])# _LT_SHELL_INIT 1199266e564dSmrg 1200266e564dSmrg 1201266e564dSmrg 1202a3129944Smrg# _LT_PROG_ECHO_BACKSLASH 1203a3129944Smrg# ----------------------- 1204a3129944Smrg# Find how we can fake an echo command that does not interpret backslash. 1205a3129944Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1206a3129944Smrg# of the generated configure script that will find a shell with a builtin 1207a3129944Smrg# printf (that we can use as an echo command). 1208a3129944Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1209a3129944Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1210a3129944SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1211a3129944SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212266e564dSmrg 1213a3129944SmrgAC_MSG_CHECKING([how to print strings]) 1214a3129944Smrg# Test print first, because it will be a builtin if present. 1215a3129944Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1216a3129944Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1217a3129944Smrg ECHO='print -r --' 1218a3129944Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1219a3129944Smrg ECHO='printf %s\n' 1220a3129944Smrgelse 1221a3129944Smrg # Use this function as a fallback that always works. 1222a3129944Smrg func_fallback_echo () 1223a3129944Smrg { 1224a3129944Smrg eval 'cat <<_LTECHO_EOF 1225a3129944Smrg$[]1 1226a3129944Smrg_LTECHO_EOF' 1227a3129944Smrg } 1228a3129944Smrg ECHO='func_fallback_echo' 1229a3129944Smrgfi 1230266e564dSmrg 1231a3129944Smrg# func_echo_all arg... 1232a3129944Smrg# Invoke $ECHO with all args, space-separated. 1233a3129944Smrgfunc_echo_all () 1234a3129944Smrg{ 1235a3129944Smrg $ECHO "$*" 1236a3129944Smrg} 1237698f425bSmrg 1238a3129944Smrgcase $ECHO in 1239a3129944Smrg printf*) AC_MSG_RESULT([printf]) ;; 1240a3129944Smrg print*) AC_MSG_RESULT([print -r]) ;; 1241a3129944Smrg *) AC_MSG_RESULT([cat]) ;; 1242a3129944Smrgesac 1243266e564dSmrg 1244a3129944Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1245a3129944Smrg[_AS_DETECT_SUGGESTED([ 1246a3129944Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1247a3129944Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1248a3129944Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1249a3129944Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1250a3129944Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1251a3129944Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1252a3129944Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253266e564dSmrg 1254a3129944Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1255a3129944Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1256a3129944Smrg])# _LT_PROG_ECHO_BACKSLASH 1257266e564dSmrg 1258266e564dSmrg 1259a3129944Smrg# _LT_WITH_SYSROOT 1260a3129944Smrg# ---------------- 1261a3129944SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1262a3129944Smrg[AC_MSG_CHECKING([for sysroot]) 1263a3129944SmrgAC_ARG_WITH([sysroot], 1264a3129944Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1265a3129944Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 1266a3129944Smrg if not specified).])], 1267a3129944Smrg[], [with_sysroot=no]) 1268266e564dSmrg 1269a3129944Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1270a3129944Smrgdnl in case the user passed a directory name. 1271a3129944Smrglt_sysroot= 1272a3129944Smrgcase $with_sysroot in #( 1273a3129944Smrg yes) 1274a3129944Smrg if test yes = "$GCC"; then 1275a3129944Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1276a3129944Smrg fi 1277a3129944Smrg ;; #( 1278a3129944Smrg /*) 1279a3129944Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1280a3129944Smrg ;; #( 1281a3129944Smrg no|'') 1282a3129944Smrg ;; #( 1283a3129944Smrg *) 1284a3129944Smrg AC_MSG_RESULT([$with_sysroot]) 1285a3129944Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1286a3129944Smrg ;; 1287a3129944Smrgesac 1288266e564dSmrg 1289a3129944Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1290a3129944Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1291a3129944Smrg[dependent libraries, and where our libraries should be installed.])]) 1292266e564dSmrg 1293a3129944Smrg# _LT_ENABLE_LOCK 1294a3129944Smrg# --------------- 1295a3129944Smrgm4_defun([_LT_ENABLE_LOCK], 1296a3129944Smrg[AC_ARG_ENABLE([libtool-lock], 1297a3129944Smrg [AS_HELP_STRING([--disable-libtool-lock], 1298a3129944Smrg [avoid locking (might break parallel builds)])]) 1299a3129944Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1300266e564dSmrg 1301a3129944Smrg# Some flags need to be propagated to the compiler or linker for good 1302a3129944Smrg# libtool support. 1303a3129944Smrgcase $host in 1304a3129944Smrgia64-*-hpux*) 1305a3129944Smrg # Find out what ABI is being produced by ac_compile, and set mode 1306a3129944Smrg # options accordingly. 1307a3129944Smrg echo 'int i;' > conftest.$ac_ext 1308a3129944Smrg if AC_TRY_EVAL(ac_compile); then 1309a3129944Smrg case `/usr/bin/file conftest.$ac_objext` in 1310a3129944Smrg *ELF-32*) 1311a3129944Smrg HPUX_IA64_MODE=32 1312a3129944Smrg ;; 1313a3129944Smrg *ELF-64*) 1314a3129944Smrg HPUX_IA64_MODE=64 1315a3129944Smrg ;; 1316a3129944Smrg esac 1317a3129944Smrg fi 1318a3129944Smrg rm -rf conftest* 1319a3129944Smrg ;; 1320a3129944Smrg*-*-irix6*) 1321a3129944Smrg # Find out what ABI is being produced by ac_compile, and set linker 1322a3129944Smrg # options accordingly. 1323a3129944Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1324a3129944Smrg if AC_TRY_EVAL(ac_compile); then 1325a3129944Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 1326a3129944Smrg case `/usr/bin/file conftest.$ac_objext` in 1327a3129944Smrg *32-bit*) 1328a3129944Smrg LD="${LD-ld} -melf32bsmip" 1329a3129944Smrg ;; 1330a3129944Smrg *N32*) 1331a3129944Smrg LD="${LD-ld} -melf32bmipn32" 1332a3129944Smrg ;; 1333a3129944Smrg *64-bit*) 1334a3129944Smrg LD="${LD-ld} -melf64bmip" 1335a3129944Smrg ;; 1336a3129944Smrg esac 1337a3129944Smrg else 1338a3129944Smrg case `/usr/bin/file conftest.$ac_objext` in 1339a3129944Smrg *32-bit*) 1340a3129944Smrg LD="${LD-ld} -32" 1341a3129944Smrg ;; 1342a3129944Smrg *N32*) 1343a3129944Smrg LD="${LD-ld} -n32" 1344a3129944Smrg ;; 1345a3129944Smrg *64-bit*) 1346a3129944Smrg LD="${LD-ld} -64" 1347a3129944Smrg ;; 1348a3129944Smrg esac 1349a3129944Smrg fi 1350a3129944Smrg fi 1351a3129944Smrg rm -rf conftest* 1352a3129944Smrg ;; 1353266e564dSmrg 1354a3129944Smrgmips64*-*linux*) 1355a3129944Smrg # Find out what ABI is being produced by ac_compile, and set linker 1356a3129944Smrg # options accordingly. 1357a3129944Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1358a3129944Smrg if AC_TRY_EVAL(ac_compile); then 1359a3129944Smrg emul=elf 1360a3129944Smrg case `/usr/bin/file conftest.$ac_objext` in 1361a3129944Smrg *32-bit*) 1362a3129944Smrg emul="${emul}32" 1363a3129944Smrg ;; 1364a3129944Smrg *64-bit*) 1365a3129944Smrg emul="${emul}64" 1366a3129944Smrg ;; 1367a3129944Smrg esac 1368a3129944Smrg case `/usr/bin/file conftest.$ac_objext` in 1369a3129944Smrg *MSB*) 1370a3129944Smrg emul="${emul}btsmip" 1371a3129944Smrg ;; 1372a3129944Smrg *LSB*) 1373a3129944Smrg emul="${emul}ltsmip" 1374a3129944Smrg ;; 1375a3129944Smrg esac 1376a3129944Smrg case `/usr/bin/file conftest.$ac_objext` in 1377a3129944Smrg *N32*) 1378a3129944Smrg emul="${emul}n32" 1379a3129944Smrg ;; 1380a3129944Smrg esac 1381a3129944Smrg LD="${LD-ld} -m $emul" 1382a3129944Smrg fi 1383a3129944Smrg rm -rf conftest* 1384a3129944Smrg ;; 1385266e564dSmrg 1386a3129944Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1387a3129944Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1388a3129944Smrg # Find out what ABI is being produced by ac_compile, and set linker 1389a3129944Smrg # options accordingly. Note that the listed cases only cover the 1390a3129944Smrg # situations where additional linker options are needed (such as when 1391a3129944Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1392a3129944Smrg # vice versa); the common cases where no linker options are needed do 1393a3129944Smrg # not appear in the list. 1394a3129944Smrg echo 'int i;' > conftest.$ac_ext 1395a3129944Smrg if AC_TRY_EVAL(ac_compile); then 1396a3129944Smrg case `/usr/bin/file conftest.o` in 1397a3129944Smrg *32-bit*) 1398a3129944Smrg case $host in 1399a3129944Smrg x86_64-*kfreebsd*-gnu) 1400a3129944Smrg LD="${LD-ld} -m elf_i386_fbsd" 1401a3129944Smrg ;; 1402a3129944Smrg x86_64-*linux*) 1403a3129944Smrg case `/usr/bin/file conftest.o` in 1404a3129944Smrg *x86-64*) 1405a3129944Smrg LD="${LD-ld} -m elf32_x86_64" 1406a3129944Smrg ;; 1407a3129944Smrg *) 1408a3129944Smrg LD="${LD-ld} -m elf_i386" 1409a3129944Smrg ;; 1410a3129944Smrg esac 1411a3129944Smrg ;; 1412a3129944Smrg powerpc64le-*linux*) 1413a3129944Smrg LD="${LD-ld} -m elf32lppclinux" 1414a3129944Smrg ;; 1415a3129944Smrg powerpc64-*linux*) 1416a3129944Smrg LD="${LD-ld} -m elf32ppclinux" 1417a3129944Smrg ;; 1418a3129944Smrg s390x-*linux*) 1419a3129944Smrg LD="${LD-ld} -m elf_s390" 1420a3129944Smrg ;; 1421a3129944Smrg sparc64-*linux*) 1422a3129944Smrg LD="${LD-ld} -m elf32_sparc" 1423a3129944Smrg ;; 1424a3129944Smrg esac 1425a3129944Smrg ;; 1426a3129944Smrg *64-bit*) 1427a3129944Smrg case $host in 1428a3129944Smrg x86_64-*kfreebsd*-gnu) 1429a3129944Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1430a3129944Smrg ;; 1431a3129944Smrg x86_64-*linux*) 1432a3129944Smrg LD="${LD-ld} -m elf_x86_64" 1433a3129944Smrg ;; 1434a3129944Smrg powerpcle-*linux*) 1435a3129944Smrg LD="${LD-ld} -m elf64lppc" 1436a3129944Smrg ;; 1437a3129944Smrg powerpc-*linux*) 1438a3129944Smrg LD="${LD-ld} -m elf64ppc" 1439a3129944Smrg ;; 1440a3129944Smrg s390*-*linux*|s390*-*tpf*) 1441a3129944Smrg LD="${LD-ld} -m elf64_s390" 1442a3129944Smrg ;; 1443a3129944Smrg sparc*-*linux*) 1444a3129944Smrg LD="${LD-ld} -m elf64_sparc" 1445a3129944Smrg ;; 1446a3129944Smrg esac 1447a3129944Smrg ;; 14489ef0b394Smrg esac 1449a3129944Smrg fi 1450a3129944Smrg rm -rf conftest* 1451a3129944Smrg ;; 1452266e564dSmrg 1453a3129944Smrg*-*-sco3.2v5*) 1454a3129944Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1455a3129944Smrg SAVE_CFLAGS=$CFLAGS 1456a3129944Smrg CFLAGS="$CFLAGS -belf" 1457a3129944Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1458a3129944Smrg [AC_LANG_PUSH(C) 1459a3129944Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1460a3129944Smrg AC_LANG_POP]) 1461a3129944Smrg if test yes != "$lt_cv_cc_needs_belf"; then 1462a3129944Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1463a3129944Smrg CFLAGS=$SAVE_CFLAGS 1464a3129944Smrg fi 1465a3129944Smrg ;; 1466a3129944Smrg*-*solaris*) 1467a3129944Smrg # Find out what ABI is being produced by ac_compile, and set linker 1468a3129944Smrg # options accordingly. 1469a3129944Smrg echo 'int i;' > conftest.$ac_ext 1470a3129944Smrg if AC_TRY_EVAL(ac_compile); then 1471a3129944Smrg case `/usr/bin/file conftest.o` in 1472a3129944Smrg *64-bit*) 1473a3129944Smrg case $lt_cv_prog_gnu_ld in 1474a3129944Smrg yes*) 1475a3129944Smrg case $host in 1476a3129944Smrg i?86-*-solaris*|x86_64-*-solaris*) 1477a3129944Smrg LD="${LD-ld} -m elf_x86_64" 1478a3129944Smrg ;; 1479a3129944Smrg sparc*-*-solaris*) 1480a3129944Smrg LD="${LD-ld} -m elf64_sparc" 1481a3129944Smrg ;; 1482a3129944Smrg esac 1483a3129944Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1484a3129944Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1485a3129944Smrg LD=${LD-ld}_sol2 1486a3129944Smrg fi 1487a3129944Smrg ;; 1488a3129944Smrg *) 1489a3129944Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1490a3129944Smrg LD="${LD-ld} -64" 1491a3129944Smrg fi 1492a3129944Smrg ;; 1493a3129944Smrg esac 14949ef0b394Smrg ;; 14959ef0b394Smrg esac 1496a3129944Smrg fi 1497a3129944Smrg rm -rf conftest* 1498a3129944Smrg ;; 1499a3129944Smrgesac 1500266e564dSmrg 1501a3129944Smrgneed_locks=$enable_libtool_lock 1502a3129944Smrg])# _LT_ENABLE_LOCK 1503266e564dSmrg 1504266e564dSmrg 1505a3129944Smrg# _LT_PROG_AR 1506a3129944Smrg# ----------- 1507a3129944Smrgm4_defun([_LT_PROG_AR], 1508a3129944Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1509a3129944Smrg: ${AR=ar} 1510a3129944Smrg: ${AR_FLAGS=cru} 1511a3129944Smrg_LT_DECL([], [AR], [1], [The archiver]) 1512a3129944Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1513266e564dSmrg 1514a3129944SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1515a3129944Smrg [lt_cv_ar_at_file=no 1516a3129944Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1517a3129944Smrg [echo conftest.$ac_objext > conftest.lst 1518a3129944Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1519a3129944Smrg AC_TRY_EVAL([lt_ar_try]) 1520a3129944Smrg if test 0 -eq "$ac_status"; then 1521a3129944Smrg # Ensure the archiver fails upon bogus file names. 1522a3129944Smrg rm -f conftest.$ac_objext libconftest.a 1523a3129944Smrg AC_TRY_EVAL([lt_ar_try]) 1524a3129944Smrg if test 0 -ne "$ac_status"; then 1525a3129944Smrg lt_cv_ar_at_file=@ 1526a3129944Smrg fi 1527a3129944Smrg fi 1528a3129944Smrg rm -f conftest.* libconftest.a 1529a3129944Smrg ]) 1530a3129944Smrg ]) 1531266e564dSmrg 1532a3129944Smrgif test no = "$lt_cv_ar_at_file"; then 1533a3129944Smrg archiver_list_spec= 1534a3129944Smrgelse 1535a3129944Smrg archiver_list_spec=$lt_cv_ar_at_file 1536a3129944Smrgfi 1537a3129944Smrg_LT_DECL([], [archiver_list_spec], [1], 1538a3129944Smrg [How to feed a file listing to the archiver]) 1539a3129944Smrg])# _LT_PROG_AR 1540266e564dSmrg 1541266e564dSmrg 1542a3129944Smrg# _LT_CMD_OLD_ARCHIVE 1543a3129944Smrg# ------------------- 1544a3129944Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1545a3129944Smrg[_LT_PROG_AR 1546266e564dSmrg 1547a3129944SmrgAC_CHECK_TOOL(STRIP, strip, :) 1548a3129944Smrgtest -z "$STRIP" && STRIP=: 1549a3129944Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1550266e564dSmrg 1551a3129944SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1552a3129944Smrgtest -z "$RANLIB" && RANLIB=: 1553a3129944Smrg_LT_DECL([], [RANLIB], [1], 1554a3129944Smrg [Commands used to install an old-style archive]) 1555266e564dSmrg 1556a3129944Smrg# Determine commands to create old-style static archives. 1557a3129944Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1558a3129944Smrgold_postinstall_cmds='chmod 644 $oldlib' 1559a3129944Smrgold_postuninstall_cmds= 1560266e564dSmrg 1561a3129944Smrgif test -n "$RANLIB"; then 1562a3129944Smrg case $host_os in 1563a3129944Smrg bitrig* | openbsd*) 1564a3129944Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1565a3129944Smrg ;; 1566a3129944Smrg *) 1567a3129944Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1568a3129944Smrg ;; 1569c5629e66Smrg esac 1570a3129944Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15719ef0b394Smrgfi 1572266e564dSmrg 1573a3129944Smrgcase $host_os in 1574a3129944Smrg darwin*) 1575a3129944Smrg lock_old_archive_extraction=yes ;; 1576a3129944Smrg *) 1577a3129944Smrg lock_old_archive_extraction=no ;; 1578a3129944Smrgesac 1579a3129944Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1580a3129944Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1581a3129944Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1582a3129944Smrg [Commands used to build an old-style archive]) 1583a3129944Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1584a3129944Smrg [Whether to use a lock for old archive extraction]) 1585a3129944Smrg])# _LT_CMD_OLD_ARCHIVE 1586266e564dSmrg 1587266e564dSmrg 1588a3129944Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1589a3129944Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1590a3129944Smrg# ---------------------------------------------------------------- 1591a3129944Smrg# Check whether the given compiler option works 1592a3129944SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15939ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1594a3129944Smrgm4_require([_LT_DECL_SED])dnl 1595a3129944SmrgAC_CACHE_CHECK([$1], [$2], 1596a3129944Smrg [$2=no 1597a3129944Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1598a3129944Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1599a3129944Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1600a3129944Smrg # Insert the option either (1) after the last *FLAGS variable, or 1601a3129944Smrg # (2) before a word containing "conftest.", or (3) at the end. 1602a3129944Smrg # Note that $ac_compile itself does not contain backslashes and begins 1603a3129944Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1604a3129944Smrg # The option is referenced via a variable to avoid confusing sed. 1605a3129944Smrg lt_compile=`echo "$ac_compile" | $SED \ 1606a3129944Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1607a3129944Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1608a3129944Smrg -e 's:$: $lt_compiler_flag:'` 1609a3129944Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1610a3129944Smrg (eval "$lt_compile" 2>conftest.err) 1611a3129944Smrg ac_status=$? 1612a3129944Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1613a3129944Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1614a3129944Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1615a3129944Smrg # The compiler can only warn and ignore the option if not recognized 1616a3129944Smrg # So say no if there are warnings other than the usual output. 1617a3129944Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1618a3129944Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1619a3129944Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1620a3129944Smrg $2=yes 1621a3129944Smrg fi 1622a3129944Smrg fi 1623a3129944Smrg $RM conftest* 1624a3129944Smrg]) 16259ef0b394Smrg 1626a3129944Smrgif test yes = "[$]$2"; then 1627a3129944Smrg m4_if([$5], , :, [$5]) 1628a3129944Smrgelse 1629a3129944Smrg m4_if([$6], , :, [$6]) 1630a3129944Smrgfi 1631a3129944Smrg])# _LT_COMPILER_OPTION 16329ef0b394Smrg 1633a3129944Smrg# Old name: 1634a3129944SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1635a3129944Smrgdnl aclocal-1.4 backwards compatibility: 1636a3129944Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 16379ef0b394Smrg 16389ef0b394Smrg 1639a3129944Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1640a3129944Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1641a3129944Smrg# ---------------------------------------------------- 1642a3129944Smrg# Check whether the given linker option works 1643a3129944SmrgAC_DEFUN([_LT_LINKER_OPTION], 1644a3129944Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1645a3129944Smrgm4_require([_LT_DECL_SED])dnl 1646a3129944SmrgAC_CACHE_CHECK([$1], [$2], 1647a3129944Smrg [$2=no 1648a3129944Smrg save_LDFLAGS=$LDFLAGS 1649a3129944Smrg LDFLAGS="$LDFLAGS $3" 1650a3129944Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1651a3129944Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1652a3129944Smrg # The linker can only warn and ignore the option if not recognized 1653a3129944Smrg # So say no if there are warnings 1654a3129944Smrg if test -s conftest.err; then 1655a3129944Smrg # Append any errors to the config.log. 1656a3129944Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1657a3129944Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1658a3129944Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1659a3129944Smrg if diff conftest.exp conftest.er2 >/dev/null; then 1660a3129944Smrg $2=yes 1661a3129944Smrg fi 1662a3129944Smrg else 1663a3129944Smrg $2=yes 1664a3129944Smrg fi 1665a3129944Smrg fi 1666a3129944Smrg $RM -r conftest* 1667a3129944Smrg LDFLAGS=$save_LDFLAGS 1668a3129944Smrg]) 1669266e564dSmrg 1670a3129944Smrgif test yes = "[$]$2"; then 1671a3129944Smrg m4_if([$4], , :, [$4]) 1672a3129944Smrgelse 1673a3129944Smrg m4_if([$5], , :, [$5]) 16749ef0b394Smrgfi 1675a3129944Smrg])# _LT_LINKER_OPTION 1676266e564dSmrg 1677a3129944Smrg# Old name: 1678a3129944SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1679a3129944Smrgdnl aclocal-1.4 backwards compatibility: 1680a3129944Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1681266e564dSmrg 1682266e564dSmrg 1683a3129944Smrg# LT_CMD_MAX_LEN 1684a3129944Smrg#--------------- 1685a3129944SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1686a3129944Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1687a3129944Smrg# find the maximum length of command line arguments 1688a3129944SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1689a3129944SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1690a3129944Smrg i=0 1691a3129944Smrg teststring=ABCD 1692266e564dSmrg 1693a3129944Smrg case $build_os in 1694a3129944Smrg msdosdjgpp*) 1695a3129944Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1696a3129944Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1697a3129944Smrg # during glob expansion). Even if it were fixed, the result of this 1698a3129944Smrg # check would be larger than it should be. 1699a3129944Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1700a3129944Smrg ;; 1701266e564dSmrg 1702a3129944Smrg gnu*) 1703a3129944Smrg # Under GNU Hurd, this test is not required because there is 1704a3129944Smrg # no limit to the length of command line arguments. 1705a3129944Smrg # Libtool will interpret -1 as no limit whatsoever 1706a3129944Smrg lt_cv_sys_max_cmd_len=-1; 1707a3129944Smrg ;; 1708266e564dSmrg 1709a3129944Smrg cygwin* | mingw* | cegcc*) 1710a3129944Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1711a3129944Smrg # about 5 minutes as the teststring grows exponentially. 1712a3129944Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 1713a3129944Smrg # you end up with a "frozen" computer, even though with patience 1714a3129944Smrg # the test eventually succeeds (with a max line length of 256k). 1715a3129944Smrg # Instead, let's just punt: use the minimum linelength reported by 1716a3129944Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 1717a3129944Smrg lt_cv_sys_max_cmd_len=8192; 1718a3129944Smrg ;; 1719266e564dSmrg 1720a3129944Smrg mint*) 1721a3129944Smrg # On MiNT this can take a long time and run out of memory. 1722a3129944Smrg lt_cv_sys_max_cmd_len=8192; 1723a3129944Smrg ;; 1724266e564dSmrg 1725a3129944Smrg amigaos*) 1726a3129944Smrg # On AmigaOS with pdksh, this test takes hours, literally. 1727a3129944Smrg # So we just punt and use a minimum line length of 8192. 1728a3129944Smrg lt_cv_sys_max_cmd_len=8192; 1729a3129944Smrg ;; 1730266e564dSmrg 1731a3129944Smrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1732a3129944Smrg # This has been around since 386BSD, at least. Likely further. 1733a3129944Smrg if test -x /sbin/sysctl; then 1734a3129944Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1735a3129944Smrg elif test -x /usr/sbin/sysctl; then 1736a3129944Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1737a3129944Smrg else 1738a3129944Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1739a3129944Smrg fi 1740a3129944Smrg # And add a safety zone 1741a3129944Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1742a3129944Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1743a3129944Smrg ;; 1744266e564dSmrg 1745a3129944Smrg interix*) 1746a3129944Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1747a3129944Smrg lt_cv_sys_max_cmd_len=196608 1748a3129944Smrg ;; 1749266e564dSmrg 1750a3129944Smrg os2*) 1751a3129944Smrg # The test takes a long time on OS/2. 1752a3129944Smrg lt_cv_sys_max_cmd_len=8192 1753a3129944Smrg ;; 1754266e564dSmrg 1755a3129944Smrg osf*) 1756a3129944Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1757a3129944Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1758a3129944Smrg # nice to cause kernel panics so lets avoid the loop below. 1759a3129944Smrg # First set a reasonable default. 1760a3129944Smrg lt_cv_sys_max_cmd_len=16384 1761a3129944Smrg # 1762a3129944Smrg if test -x /sbin/sysconfig; then 1763a3129944Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1764a3129944Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1765a3129944Smrg esac 1766a3129944Smrg fi 1767a3129944Smrg ;; 1768a3129944Smrg sco3.2v5*) 1769a3129944Smrg lt_cv_sys_max_cmd_len=102400 1770a3129944Smrg ;; 1771a3129944Smrg sysv5* | sco5v6* | sysv4.2uw2*) 1772a3129944Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1773a3129944Smrg if test -n "$kargmax"; then 1774a3129944Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1775a3129944Smrg else 1776a3129944Smrg lt_cv_sys_max_cmd_len=32768 1777a3129944Smrg fi 1778a3129944Smrg ;; 1779a3129944Smrg *) 1780a3129944Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1781a3129944Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1782a3129944Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1783a3129944Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1784a3129944Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1785a3129944Smrg else 1786a3129944Smrg # Make teststring a little bigger before we do anything with it. 1787a3129944Smrg # a 1K string should be a reasonable start. 1788a3129944Smrg for i in 1 2 3 4 5 6 7 8; do 1789a3129944Smrg teststring=$teststring$teststring 1790a3129944Smrg done 1791a3129944Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1792a3129944Smrg # If test is not a shell built-in, we'll probably end up computing a 1793a3129944Smrg # maximum length that is only half of the actual maximum length, but 1794a3129944Smrg # we can't tell. 1795a3129944Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1796a3129944Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1797a3129944Smrg test 17 != "$i" # 1/2 MB should be enough 1798a3129944Smrg do 1799a3129944Smrg i=`expr $i + 1` 1800a3129944Smrg teststring=$teststring$teststring 1801a3129944Smrg done 1802a3129944Smrg # Only check the string length outside the loop. 1803a3129944Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1804a3129944Smrg teststring= 1805a3129944Smrg # Add a significant safety factor because C++ compilers can tack on 1806a3129944Smrg # massive amounts of additional arguments before passing them to the 1807a3129944Smrg # linker. It appears as though 1/2 is a usable value. 1808a3129944Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1809a3129944Smrg fi 1810a3129944Smrg ;; 1811a3129944Smrg esac 1812a3129944Smrg]) 1813a3129944Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 1814a3129944Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1815a3129944Smrgelse 1816a3129944Smrg AC_MSG_RESULT(none) 1817a3129944Smrgfi 1818a3129944Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1819a3129944Smrg_LT_DECL([], [max_cmd_len], [0], 1820a3129944Smrg [What is the maximum length of a command?]) 1821a3129944Smrg])# LT_CMD_MAX_LEN 1822266e564dSmrg 1823a3129944Smrg# Old name: 1824a3129944SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1825a3129944Smrgdnl aclocal-1.4 backwards compatibility: 1826a3129944Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827266e564dSmrg 1828fb5e8d76Smrg 1829a3129944Smrg# _LT_HEADER_DLFCN 1830a3129944Smrg# ---------------- 1831a3129944Smrgm4_defun([_LT_HEADER_DLFCN], 1832a3129944Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1833a3129944Smrg])# _LT_HEADER_DLFCN 1834fb5e8d76Smrg 1835266e564dSmrg 1836a3129944Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1837a3129944Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1838a3129944Smrg# ---------------------------------------------------------------- 1839a3129944Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1840a3129944Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1841a3129944Smrgif test yes = "$cross_compiling"; then : 1842a3129944Smrg [$4] 1843a3129944Smrgelse 1844a3129944Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1845a3129944Smrg lt_status=$lt_dlunknown 1846a3129944Smrg cat > conftest.$ac_ext <<_LT_EOF 1847a3129944Smrg[#line $LINENO "configure" 1848a3129944Smrg#include "confdefs.h" 1849266e564dSmrg 1850a3129944Smrg#if HAVE_DLFCN_H 1851a3129944Smrg#include <dlfcn.h> 1852a3129944Smrg#endif 1853266e564dSmrg 1854a3129944Smrg#include <stdio.h> 1855266e564dSmrg 1856a3129944Smrg#ifdef RTLD_GLOBAL 1857a3129944Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1858a3129944Smrg#else 1859a3129944Smrg# ifdef DL_GLOBAL 1860a3129944Smrg# define LT_DLGLOBAL DL_GLOBAL 1861a3129944Smrg# else 1862a3129944Smrg# define LT_DLGLOBAL 0 1863a3129944Smrg# endif 1864a3129944Smrg#endif 1865fb5e8d76Smrg 1866a3129944Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1867a3129944Smrg find out it does not work in some platform. */ 1868a3129944Smrg#ifndef LT_DLLAZY_OR_NOW 1869a3129944Smrg# ifdef RTLD_LAZY 1870a3129944Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1871a3129944Smrg# else 1872a3129944Smrg# ifdef DL_LAZY 1873a3129944Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1874a3129944Smrg# else 1875a3129944Smrg# ifdef RTLD_NOW 1876a3129944Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1877a3129944Smrg# else 1878a3129944Smrg# ifdef DL_NOW 1879a3129944Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1880a3129944Smrg# else 1881a3129944Smrg# define LT_DLLAZY_OR_NOW 0 1882a3129944Smrg# endif 1883a3129944Smrg# endif 1884a3129944Smrg# endif 1885a3129944Smrg# endif 1886a3129944Smrg#endif 1887266e564dSmrg 1888a3129944Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 1889a3129944Smrg correspondingly for the symbols needed. */ 1890a3129944Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1891a3129944Smrgint fnord () __attribute__((visibility("default"))); 1892a3129944Smrg#endif 1893266e564dSmrg 1894a3129944Smrgint fnord () { return 42; } 1895a3129944Smrgint main () 1896a3129944Smrg{ 1897a3129944Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1898a3129944Smrg int status = $lt_dlunknown; 1899698f425bSmrg 1900a3129944Smrg if (self) 1901a3129944Smrg { 1902a3129944Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1903a3129944Smrg else 1904a3129944Smrg { 1905a3129944Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1906a3129944Smrg else puts (dlerror ()); 1907a3129944Smrg } 1908a3129944Smrg /* dlclose (self); */ 1909a3129944Smrg } 1910a3129944Smrg else 1911a3129944Smrg puts (dlerror ()); 1912698f425bSmrg 1913a3129944Smrg return status; 1914a3129944Smrg}] 1915a3129944Smrg_LT_EOF 1916a3129944Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1917a3129944Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1918a3129944Smrg lt_status=$? 1919a3129944Smrg case x$lt_status in 1920a3129944Smrg x$lt_dlno_uscore) $1 ;; 1921a3129944Smrg x$lt_dlneed_uscore) $2 ;; 1922a3129944Smrg x$lt_dlunknown|x*) $3 ;; 1923a3129944Smrg esac 1924a3129944Smrg else : 1925a3129944Smrg # compilation failed 1926a3129944Smrg $3 1927a3129944Smrg fi 1928a3129944Smrgfi 1929a3129944Smrgrm -fr conftest* 1930a3129944Smrg])# _LT_TRY_DLOPEN_SELF 1931266e564dSmrg 1932266e564dSmrg 1933a3129944Smrg# LT_SYS_DLOPEN_SELF 1934a3129944Smrg# ------------------ 1935a3129944SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1936a3129944Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1937a3129944Smrgif test yes != "$enable_dlopen"; then 1938a3129944Smrg enable_dlopen=unknown 1939a3129944Smrg enable_dlopen_self=unknown 1940a3129944Smrg enable_dlopen_self_static=unknown 1941a3129944Smrgelse 1942a3129944Smrg lt_cv_dlopen=no 1943a3129944Smrg lt_cv_dlopen_libs= 1944266e564dSmrg 1945a3129944Smrg case $host_os in 1946a3129944Smrg beos*) 1947a3129944Smrg lt_cv_dlopen=load_add_on 1948a3129944Smrg lt_cv_dlopen_libs= 1949a3129944Smrg lt_cv_dlopen_self=yes 1950a3129944Smrg ;; 1951266e564dSmrg 1952a3129944Smrg mingw* | pw32* | cegcc*) 1953a3129944Smrg lt_cv_dlopen=LoadLibrary 1954a3129944Smrg lt_cv_dlopen_libs= 1955a3129944Smrg ;; 1956698f425bSmrg 1957a3129944Smrg cygwin*) 1958a3129944Smrg lt_cv_dlopen=dlopen 1959a3129944Smrg lt_cv_dlopen_libs= 1960a3129944Smrg ;; 1961266e564dSmrg 1962a3129944Smrg darwin*) 1963a3129944Smrg # if libdl is installed we need to link against it 1964a3129944Smrg AC_CHECK_LIB([dl], [dlopen], 1965a3129944Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1966a3129944Smrg lt_cv_dlopen=dyld 1967a3129944Smrg lt_cv_dlopen_libs= 1968a3129944Smrg lt_cv_dlopen_self=yes 1969a3129944Smrg ]) 1970a3129944Smrg ;; 1971266e564dSmrg 1972a3129944Smrg tpf*) 1973a3129944Smrg # Don't try to run any link tests for TPF. We know it's impossible 1974a3129944Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 1975a3129944Smrg lt_cv_dlopen=dlopen 1976a3129944Smrg lt_cv_dlopen_libs= 1977a3129944Smrg lt_cv_dlopen_self=no 1978a3129944Smrg ;; 1979698f425bSmrg 1980a3129944Smrg *) 1981a3129944Smrg AC_CHECK_FUNC([shl_load], 1982a3129944Smrg [lt_cv_dlopen=shl_load], 1983a3129944Smrg [AC_CHECK_LIB([dld], [shl_load], 1984a3129944Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1985a3129944Smrg [AC_CHECK_FUNC([dlopen], 1986a3129944Smrg [lt_cv_dlopen=dlopen], 1987a3129944Smrg [AC_CHECK_LIB([dl], [dlopen], 1988a3129944Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1989a3129944Smrg [AC_CHECK_LIB([svld], [dlopen], 1990a3129944Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1991a3129944Smrg [AC_CHECK_LIB([dld], [dld_link], 1992a3129944Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1993a3129944Smrg ]) 1994a3129944Smrg ]) 1995a3129944Smrg ]) 1996a3129944Smrg ]) 1997a3129944Smrg ]) 1998a3129944Smrg ;; 1999a3129944Smrg esac 2000698f425bSmrg 2001a3129944Smrg if test no = "$lt_cv_dlopen"; then 2002a3129944Smrg enable_dlopen=no 2003a3129944Smrg else 2004a3129944Smrg enable_dlopen=yes 2005a3129944Smrg fi 2006fb5e8d76Smrg 2007a3129944Smrg case $lt_cv_dlopen in 2008a3129944Smrg dlopen) 2009a3129944Smrg save_CPPFLAGS=$CPPFLAGS 2010a3129944Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011a3129944Smrg 2012a3129944Smrg save_LDFLAGS=$LDFLAGS 2013a3129944Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014a3129944Smrg 2015a3129944Smrg save_LIBS=$LIBS 2016a3129944Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 2017a3129944Smrg 2018a3129944Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 2019a3129944Smrg lt_cv_dlopen_self, [dnl 2020a3129944Smrg _LT_TRY_DLOPEN_SELF( 2021a3129944Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2022a3129944Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20239ef0b394Smrg ]) 2024fb5e8d76Smrg 2025a3129944Smrg if test yes = "$lt_cv_dlopen_self"; then 2026a3129944Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2027a3129944Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2028a3129944Smrg lt_cv_dlopen_self_static, [dnl 2029a3129944Smrg _LT_TRY_DLOPEN_SELF( 2030a3129944Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2031a3129944Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2032a3129944Smrg ]) 20339ef0b394Smrg fi 2034a3129944Smrg 2035a3129944Smrg CPPFLAGS=$save_CPPFLAGS 2036a3129944Smrg LDFLAGS=$save_LDFLAGS 2037a3129944Smrg LIBS=$save_LIBS 2038266e564dSmrg ;; 2039c5629e66Smrg esac 20409ef0b394Smrg 2041a3129944Smrg case $lt_cv_dlopen_self in 2042a3129944Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2043a3129944Smrg *) enable_dlopen_self=unknown ;; 20449ef0b394Smrg esac 20459ef0b394Smrg 2046a3129944Smrg case $lt_cv_dlopen_self_static in 2047a3129944Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2048a3129944Smrg *) enable_dlopen_self_static=unknown ;; 2049a3129944Smrg esac 2050266e564dSmrgfi 2051a3129944Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2052a3129944Smrg [Whether dlopen is supported]) 2053a3129944Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2054a3129944Smrg [Whether dlopen of programs is supported]) 2055a3129944Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2056a3129944Smrg [Whether dlopen of statically linked programs is supported]) 2057a3129944Smrg])# LT_SYS_DLOPEN_SELF 2058266e564dSmrg 2059a3129944Smrg# Old name: 2060a3129944SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2061a3129944Smrgdnl aclocal-1.4 backwards compatibility: 2062a3129944Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063266e564dSmrg 2064698f425bSmrg 2065a3129944Smrg# _LT_COMPILER_C_O([TAGNAME]) 2066a3129944Smrg# --------------------------- 2067a3129944Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 2068a3129944Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2069a3129944Smrgm4_defun([_LT_COMPILER_C_O], 2070a3129944Smrg[m4_require([_LT_DECL_SED])dnl 2071a3129944Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2072a3129944Smrgm4_require([_LT_TAG_COMPILER])dnl 2073a3129944SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2074a3129944Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2075a3129944Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2076a3129944Smrg $RM -r conftest 2>/dev/null 2077a3129944Smrg mkdir conftest 2078a3129944Smrg cd conftest 2079a3129944Smrg mkdir out 2080a3129944Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2081a3129944Smrg 2082a3129944Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2083a3129944Smrg # Insert the option either (1) after the last *FLAGS variable, or 2084a3129944Smrg # (2) before a word containing "conftest.", or (3) at the end. 2085a3129944Smrg # Note that $ac_compile itself does not contain backslashes and begins 2086a3129944Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2087a3129944Smrg lt_compile=`echo "$ac_compile" | $SED \ 2088a3129944Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2089a3129944Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2090a3129944Smrg -e 's:$: $lt_compiler_flag:'` 2091a3129944Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2092a3129944Smrg (eval "$lt_compile" 2>out/conftest.err) 2093a3129944Smrg ac_status=$? 2094a3129944Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2095a3129944Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2096a3129944Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2097a3129944Smrg then 2098a3129944Smrg # The compiler can only warn and ignore the option if not recognized 2099a3129944Smrg # So say no if there are warnings 2100a3129944Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2101a3129944Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2102a3129944Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2103a3129944Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2104a3129944Smrg fi 2105a3129944Smrg fi 2106a3129944Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2107a3129944Smrg $RM conftest* 2108a3129944Smrg # SGI C++ compiler will create directory out/ii_files/ for 2109a3129944Smrg # template instantiation 2110a3129944Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2111a3129944Smrg $RM out/* && rmdir out 2112a3129944Smrg cd .. 2113a3129944Smrg $RM -r conftest 2114a3129944Smrg $RM conftest* 2115a3129944Smrg]) 2116a3129944Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2117a3129944Smrg [Does compiler simultaneously support -c and -o options?]) 2118a3129944Smrg])# _LT_COMPILER_C_O 2119698f425bSmrg 2120266e564dSmrg 2121a3129944Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2122a3129944Smrg# ---------------------------------- 2123a3129944Smrg# Check to see if we can do hard links to lock some files if needed 2124a3129944Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2125a3129944Smrg[m4_require([_LT_ENABLE_LOCK])dnl 2126a3129944Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2127a3129944Smrg_LT_COMPILER_C_O([$1]) 21289ef0b394Smrg 2129a3129944Smrghard_links=nottested 2130a3129944Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2131a3129944Smrg # do not overwrite the value of need_locks provided by the user 2132a3129944Smrg AC_MSG_CHECKING([if we can lock with hard links]) 2133a3129944Smrg hard_links=yes 2134a3129944Smrg $RM conftest* 2135a3129944Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2136a3129944Smrg touch conftest.a 2137a3129944Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 2138a3129944Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2139a3129944Smrg AC_MSG_RESULT([$hard_links]) 2140a3129944Smrg if test no = "$hard_links"; then 2141a3129944Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2142a3129944Smrg need_locks=warn 2143a3129944Smrg fi 21449ef0b394Smrgelse 2145a3129944Smrg need_locks=no 21469ef0b394Smrgfi 2147a3129944Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2148a3129944Smrg])# _LT_COMPILER_FILE_LOCKS 2149266e564dSmrg 21509ef0b394Smrg 2151a3129944Smrg# _LT_CHECK_OBJDIR 2152a3129944Smrg# ---------------- 2153a3129944Smrgm4_defun([_LT_CHECK_OBJDIR], 2154a3129944Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2155a3129944Smrg[rm -f .libs 2>/dev/null 2156a3129944Smrgmkdir .libs 2>/dev/null 2157a3129944Smrgif test -d .libs; then 2158a3129944Smrg lt_cv_objdir=.libs 2159a3129944Smrgelse 2160a3129944Smrg # MS-DOS does not allow filenames that begin with a dot. 2161a3129944Smrg lt_cv_objdir=_libs 2162a3129944Smrgfi 2163a3129944Smrgrmdir .libs 2>/dev/null]) 2164a3129944Smrgobjdir=$lt_cv_objdir 2165a3129944Smrg_LT_DECL([], [objdir], [0], 2166a3129944Smrg [The name of the directory that contains temporary libtool files])dnl 2167a3129944Smrgm4_pattern_allow([LT_OBJDIR])dnl 2168a3129944SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2169a3129944Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2170a3129944Smrg])# _LT_CHECK_OBJDIR 2171266e564dSmrg 2172266e564dSmrg 2173a3129944Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2174a3129944Smrg# -------------------------------------- 2175a3129944Smrg# Check hardcoding attributes. 2176a3129944Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2177a3129944Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2178a3129944Smrg_LT_TAGVAR(hardcode_action, $1)= 2179a3129944Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2180a3129944Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2181a3129944Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 21829ef0b394Smrg 2183a3129944Smrg # We can hardcode non-existent directories. 2184a3129944Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2185a3129944Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2186a3129944Smrg # have to relink, otherwise we might link with an installed library 2187a3129944Smrg # when we should be linking with a yet-to-be-installed one 2188a3129944Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2189a3129944Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2190a3129944Smrg # Linking always hardcodes the temporary library directory. 2191a3129944Smrg _LT_TAGVAR(hardcode_action, $1)=relink 2192a3129944Smrg else 2193a3129944Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2194a3129944Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 2195a3129944Smrg fi 2196a3129944Smrgelse 2197a3129944Smrg # We cannot hardcode anything, or else we can only hardcode existing 2198a3129944Smrg # directories. 2199a3129944Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2200a3129944Smrgfi 2201a3129944SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202266e564dSmrg 2203a3129944Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2204a3129944Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2205a3129944Smrg # Fast installation is not supported 2206a3129944Smrg enable_fast_install=no 2207a3129944Smrgelif test yes = "$shlibpath_overrides_runpath" || 2208a3129944Smrg test no = "$enable_shared"; then 2209a3129944Smrg # Fast installation is not necessary 2210a3129944Smrg enable_fast_install=needless 2211a3129944Smrgfi 2212a3129944Smrg_LT_TAGDECL([], [hardcode_action], [0], 2213a3129944Smrg [How to hardcode a shared library path into an executable]) 2214a3129944Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2215266e564dSmrg 2216266e564dSmrg 2217a3129944Smrg# _LT_CMD_STRIPLIB 2218a3129944Smrg# ---------------- 2219a3129944Smrgm4_defun([_LT_CMD_STRIPLIB], 2220a3129944Smrg[m4_require([_LT_DECL_EGREP]) 2221a3129944Smrgstriplib= 2222a3129944Smrgold_striplib= 2223a3129944SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2224a3129944Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225a3129944Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2226a3129944Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2227a3129944Smrg AC_MSG_RESULT([yes]) 2228a3129944Smrgelse 2229a3129944Smrg# FIXME - insert some real tests, host_os isn't really good enough 2230a3129944Smrg case $host_os in 2231a3129944Smrg darwin*) 2232a3129944Smrg if test -n "$STRIP"; then 2233a3129944Smrg striplib="$STRIP -x" 2234a3129944Smrg old_striplib="$STRIP -S" 2235a3129944Smrg AC_MSG_RESULT([yes]) 22369ef0b394Smrg else 2237a3129944Smrg AC_MSG_RESULT([no]) 22389ef0b394Smrg fi 2239a3129944Smrg ;; 2240a3129944Smrg *) 2241a3129944Smrg AC_MSG_RESULT([no]) 2242a3129944Smrg ;; 2243a3129944Smrg esac 2244a3129944Smrgfi 2245a3129944Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2246a3129944Smrg_LT_DECL([], [striplib], [1]) 2247a3129944Smrg])# _LT_CMD_STRIPLIB 2248698f425bSmrg 2249c5629e66Smrg 2250a3129944Smrg# _LT_PREPARE_MUNGE_PATH_LIST 2251a3129944Smrg# --------------------------- 2252a3129944Smrg# Make sure func_munge_path_list() is defined correctly. 2253a3129944Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2254a3129944Smrg[[# func_munge_path_list VARIABLE PATH 2255a3129944Smrg# ----------------------------------- 2256a3129944Smrg# VARIABLE is name of variable containing _space_ separated list of 2257a3129944Smrg# directories to be munged by the contents of PATH, which is string 2258a3129944Smrg# having a format: 2259a3129944Smrg# "DIR[:DIR]:" 2260a3129944Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 2261a3129944Smrg# ":DIR[:DIR]" 2262a3129944Smrg# string "DIR[ DIR]" will be appended to VARIABLE 2263a3129944Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2264a3129944Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2265a3129944Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 2266a3129944Smrg# "DIR[:DIR]" 2267a3129944Smrg# VARIABLE will be replaced by "DIR[ DIR]" 2268a3129944Smrgfunc_munge_path_list () 2269a3129944Smrg{ 2270a3129944Smrg case x@S|@2 in 2271a3129944Smrg x) 2272a3129944Smrg ;; 2273a3129944Smrg *:) 2274a3129944Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2275a3129944Smrg ;; 2276a3129944Smrg x:*) 2277a3129944Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2278a3129944Smrg ;; 2279a3129944Smrg *::*) 2280a3129944Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2281a3129944Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2282a3129944Smrg ;; 2283a3129944Smrg *) 2284a3129944Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2285fb5e8d76Smrg ;; 2286266e564dSmrg esac 2287a3129944Smrg} 2288a3129944Smrg]])# _LT_PREPARE_PATH_LIST 22899ef0b394Smrg 2290c5629e66Smrg 2291a3129944Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2292a3129944Smrg# ----------------------------- 2293a3129944Smrg# PORTME Fill in your ld.so characteristics 2294a3129944Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2295a3129944Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2296a3129944Smrgm4_require([_LT_DECL_EGREP])dnl 2297a3129944Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2298a3129944Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2299a3129944Smrgm4_require([_LT_DECL_SED])dnl 2300a3129944Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2301a3129944Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2302a3129944SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2303a3129944Smrgm4_if([$1], 2304a3129944Smrg [], [ 2305a3129944Smrgif test yes = "$GCC"; then 2306a3129944Smrg case $host_os in 2307a3129944Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2308a3129944Smrg *) lt_awk_arg='/^libraries:/' ;; 2309a3129944Smrg esac 2310a3129944Smrg case $host_os in 2311a3129944Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2312a3129944Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2313a3129944Smrg esac 2314a3129944Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2315a3129944Smrg case $lt_search_path_spec in 2316a3129944Smrg *\;*) 2317a3129944Smrg # if the path contains ";" then we assume it to be the separator 2318a3129944Smrg # otherwise default to the standard path separator (i.e. ":") - it is 2319a3129944Smrg # assumed that no part of a normal pathname contains ";" but that should 2320a3129944Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2321a3129944Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2322a3129944Smrg ;; 2323a3129944Smrg *) 2324a3129944Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2325a3129944Smrg ;; 2326a3129944Smrg esac 2327a3129944Smrg # Ok, now we have the path, separated by spaces, we can step through it 2328a3129944Smrg # and add multilib dir if necessary... 2329a3129944Smrg lt_tmp_lt_search_path_spec= 2330a3129944Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2331a3129944Smrg # ...but if some path component already ends with the multilib dir we assume 2332a3129944Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2333a3129944Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2334a3129944Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2335a3129944Smrg lt_multi_os_dir= 2336a3129944Smrg ;; 2337a3129944Smrg esac 2338a3129944Smrg for lt_sys_path in $lt_search_path_spec; do 2339a3129944Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2340a3129944Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2341a3129944Smrg elif test -n "$lt_multi_os_dir"; then 2342a3129944Smrg test -d "$lt_sys_path" && \ 2343a3129944Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2344a3129944Smrg fi 2345a3129944Smrg done 2346a3129944Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2347a3129944SmrgBEGIN {RS = " "; FS = "/|\n";} { 2348a3129944Smrg lt_foo = ""; 2349a3129944Smrg lt_count = 0; 2350a3129944Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 2351a3129944Smrg if ($lt_i != "" && $lt_i != ".") { 2352a3129944Smrg if ($lt_i == "..") { 2353a3129944Smrg lt_count++; 2354a3129944Smrg } else { 2355a3129944Smrg if (lt_count == 0) { 2356a3129944Smrg lt_foo = "/" $lt_i lt_foo; 2357a3129944Smrg } else { 2358a3129944Smrg lt_count--; 2359a3129944Smrg } 2360a3129944Smrg } 2361a3129944Smrg } 2362a3129944Smrg } 2363a3129944Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2364a3129944Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2365a3129944Smrg}'` 2366a3129944Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2367a3129944Smrg # for these hosts. 2368a3129944Smrg case $host_os in 2369a3129944Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2370a3129944Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2371a3129944Smrg esac 2372a3129944Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23739ef0b394Smrgelse 2374a3129944Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2375a3129944Smrgfi]) 2376a3129944Smrglibrary_names_spec= 2377a3129944Smrglibname_spec='lib$name' 2378a3129944Smrgsoname_spec= 2379a3129944Smrgshrext_cmds=.so 2380a3129944Smrgpostinstall_cmds= 2381a3129944Smrgpostuninstall_cmds= 2382a3129944Smrgfinish_cmds= 2383a3129944Smrgfinish_eval= 2384a3129944Smrgshlibpath_var= 2385a3129944Smrgshlibpath_overrides_runpath=unknown 2386a3129944Smrgversion_type=none 2387a3129944Smrgdynamic_linker="$host_os ld.so" 2388a3129944Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2389a3129944Smrgneed_lib_prefix=unknown 2390a3129944Smrghardcode_into_libs=no 2391c5629e66Smrg 2392a3129944Smrg# when you set need_version to no, make sure it does not cause -set_version 2393a3129944Smrg# flags to be left without arguments 2394a3129944Smrgneed_version=unknown 2395266e564dSmrg 2396a3129944SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2397a3129944Smrg[User-defined run-time library search path.]) 2398266e564dSmrg 2399a3129944Smrgcase $host_os in 2400a3129944Smrgaix3*) 2401a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 2402a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2403a3129944Smrg shlibpath_var=LIBPATH 2404266e564dSmrg 2405a3129944Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2406a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2407a3129944Smrg ;; 2408266e564dSmrg 2409a3129944Smrgaix[[4-9]]*) 2410a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 2411a3129944Smrg need_lib_prefix=no 2412a3129944Smrg need_version=no 2413a3129944Smrg hardcode_into_libs=yes 2414a3129944Smrg if test ia64 = "$host_cpu"; then 2415a3129944Smrg # AIX 5 supports IA64 2416a3129944Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2417a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2418a3129944Smrg else 2419a3129944Smrg # With GCC up to 2.95.x, collect2 would create an import file 2420a3129944Smrg # for dependence libraries. The import file would start with 2421a3129944Smrg # the line '#! .'. This would cause the generated library to 2422a3129944Smrg # depend on '.', always an invalid library. This was fixed in 2423a3129944Smrg # development snapshots of GCC prior to 3.0. 2424a3129944Smrg case $host_os in 2425a3129944Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2426a3129944Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2427a3129944Smrg echo ' yes ' 2428a3129944Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2429a3129944Smrg : 2430a3129944Smrg else 2431a3129944Smrg can_build_shared=no 2432a3129944Smrg fi 2433a3129944Smrg ;; 2434a3129944Smrg esac 2435a3129944Smrg # Using Import Files as archive members, it is possible to support 2436a3129944Smrg # filename-based versioning of shared library archives on AIX. While 2437a3129944Smrg # this would work for both with and without runtime linking, it will 2438a3129944Smrg # prevent static linking of such archives. So we do filename-based 2439a3129944Smrg # shared library versioning with .so extension only, which is used 2440a3129944Smrg # when both runtime linking and shared linking is enabled. 2441a3129944Smrg # Unfortunately, runtime linking may impact performance, so we do 2442a3129944Smrg # not want this to be the default eventually. Also, we use the 2443a3129944Smrg # versioned .so libs for executables only if there is the -brtl 2444a3129944Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2445a3129944Smrg # To allow for filename-based versioning support, we need to create 2446a3129944Smrg # libNAME.so.V as an archive file, containing: 2447a3129944Smrg # *) an Import File, referring to the versioned filename of the 2448a3129944Smrg # archive as well as the shared archive member, telling the 2449a3129944Smrg # bitwidth (32 or 64) of that shared object, and providing the 2450a3129944Smrg # list of exported symbols of that shared object, eventually 2451a3129944Smrg # decorated with the 'weak' keyword 2452a3129944Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2453a3129944Smrg # it being seen by the linker. 2454a3129944Smrg # At run time we better use the real file rather than another symlink, 2455a3129944Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2456a3129944Smrg 2457a3129944Smrg case $with_aix_soname,$aix_use_runtimelinking in 2458a3129944Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2459a3129944Smrg # soname into executable. Probably we can add versioning support to 2460a3129944Smrg # collect2, so additional links can be useful in future. 2461a3129944Smrg aix,yes) # traditional libtool 2462a3129944Smrg dynamic_linker='AIX unversionable lib.so' 2463a3129944Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2464a3129944Smrg # instead of lib<name>.a to let people know that these are not 2465a3129944Smrg # typical AIX shared libraries. 2466a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2467a3129944Smrg ;; 2468a3129944Smrg aix,no) # traditional AIX only 2469a3129944Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2470a3129944Smrg # We preserve .a as extension for shared libraries through AIX4.2 2471a3129944Smrg # and later when we are not doing run time linking. 2472a3129944Smrg library_names_spec='$libname$release.a $libname.a' 2473a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2474a3129944Smrg ;; 2475a3129944Smrg svr4,*) # full svr4 only 2476a3129944Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2477a3129944Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2478a3129944Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2479a3129944Smrg shlibpath_overrides_runpath=yes 2480a3129944Smrg ;; 2481a3129944Smrg *,yes) # both, prefer svr4 2482a3129944Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2483a3129944Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484a3129944Smrg # unpreferred sharedlib libNAME.a needs extra handling 2485a3129944Smrg 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"' 2486a3129944Smrg 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"' 2487a3129944Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2488a3129944Smrg shlibpath_overrides_runpath=yes 2489a3129944Smrg ;; 2490a3129944Smrg *,no) # both, prefer aix 2491a3129944Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2492a3129944Smrg library_names_spec='$libname$release.a $libname.a' 2493a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2494a3129944Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2495a3129944Smrg 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)' 2496a3129944Smrg 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"' 2497a3129944Smrg ;; 2498a3129944Smrg esac 2499a3129944Smrg shlibpath_var=LIBPATH 2500a3129944Smrg fi 2501a3129944Smrg ;; 2502266e564dSmrg 2503a3129944Smrgamigaos*) 2504a3129944Smrg case $host_cpu in 2505a3129944Smrg powerpc) 2506a3129944Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2507a3129944Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2508a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25099ef0b394Smrg ;; 2510a3129944Smrg m68k) 2511a3129944Smrg library_names_spec='$libname.ixlibrary $libname.a' 2512a3129944Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2513a3129944Smrg 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' 25149ef0b394Smrg ;; 25159ef0b394Smrg esac 2516a3129944Smrg ;; 2517266e564dSmrg 2518a3129944Smrgbeos*) 2519a3129944Smrg library_names_spec='$libname$shared_ext' 2520a3129944Smrg dynamic_linker="$host_os ld.so" 2521a3129944Smrg shlibpath_var=LIBRARY_PATH 2522a3129944Smrg ;; 2523698f425bSmrg 2524a3129944Smrgbsdi[[45]]*) 2525a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 2526a3129944Smrg need_version=no 2527a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2528a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2529a3129944Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2530a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2531a3129944Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2532a3129944Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2533a3129944Smrg # the default ld.so.conf also contains /usr/contrib/lib and 2534a3129944Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2535a3129944Smrg # libtool to hard-code these into programs 2536a3129944Smrg ;; 2537266e564dSmrg 2538a3129944Smrgcygwin* | mingw* | pw32* | cegcc*) 2539a3129944Smrg version_type=windows 2540a3129944Smrg shrext_cmds=.dll 2541a3129944Smrg need_version=no 2542a3129944Smrg need_lib_prefix=no 2543266e564dSmrg 2544a3129944Smrg case $GCC,$cc_basename in 2545a3129944Smrg yes,*) 2546a3129944Smrg # gcc 2547a3129944Smrg library_names_spec='$libname.dll.a' 2548a3129944Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2549a3129944Smrg postinstall_cmds='base_file=`basename \$file`~ 2550a3129944Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2551a3129944Smrg dldir=$destdir/`dirname \$dlpath`~ 2552a3129944Smrg test -d \$dldir || mkdir -p \$dldir~ 2553a3129944Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2554a3129944Smrg chmod a+x \$dldir/$dlname~ 2555a3129944Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2556a3129944Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2557a3129944Smrg fi' 2558a3129944Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2559a3129944Smrg dlpath=$dir/\$dldll~ 2560a3129944Smrg $RM \$dlpath' 2561a3129944Smrg shlibpath_overrides_runpath=yes 2562698f425bSmrg 2563a3129944Smrg case $host_os in 2564a3129944Smrg cygwin*) 2565a3129944Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2566a3129944Smrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2567a3129944Smrgm4_if([$1], [],[ 2568a3129944Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2569a3129944Smrg ;; 2570a3129944Smrg mingw* | cegcc*) 2571a3129944Smrg # MinGW DLLs use traditional 'lib' prefix 2572a3129944Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2573a3129944Smrg ;; 2574a3129944Smrg pw32*) 2575a3129944Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2576a3129944Smrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2577a3129944Smrg ;; 2578a3129944Smrg esac 2579a3129944Smrg dynamic_linker='Win32 ld.exe' 2580a3129944Smrg ;; 2581266e564dSmrg 2582a3129944Smrg *,cl*) 2583a3129944Smrg # Native MSVC 2584a3129944Smrg libname_spec='$name' 2585a3129944Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2586a3129944Smrg library_names_spec='$libname.dll.lib' 2587c5629e66Smrg 2588a3129944Smrg case $build_os in 2589a3129944Smrg mingw*) 2590a3129944Smrg sys_lib_search_path_spec= 2591a3129944Smrg lt_save_ifs=$IFS 2592a3129944Smrg IFS=';' 2593a3129944Smrg for lt_path in $LIB 2594a3129944Smrg do 2595a3129944Smrg IFS=$lt_save_ifs 2596a3129944Smrg # Let DOS variable expansion print the short 8.3 style file name. 2597a3129944Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2598a3129944Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2599a3129944Smrg done 2600a3129944Smrg IFS=$lt_save_ifs 2601a3129944Smrg # Convert to MSYS style. 2602a3129944Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2603a3129944Smrg ;; 2604a3129944Smrg cygwin*) 2605a3129944Smrg # Convert to unix form, then to dos form, then back to unix form 2606a3129944Smrg # but this time dos style (no spaces!) so that the unix form looks 2607a3129944Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2608a3129944Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2609a3129944Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2610a3129944Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2611a3129944Smrg ;; 2612a3129944Smrg *) 2613a3129944Smrg sys_lib_search_path_spec=$LIB 2614a3129944Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2615a3129944Smrg # It is most probably a Windows format PATH. 2616a3129944Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2617a3129944Smrg else 2618a3129944Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2619a3129944Smrg fi 2620a3129944Smrg # FIXME: find the short name or the path components, as spaces are 2621a3129944Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2622a3129944Smrg ;; 2623a3129944Smrg esac 2624266e564dSmrg 2625a3129944Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2626a3129944Smrg postinstall_cmds='base_file=`basename \$file`~ 2627a3129944Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2628a3129944Smrg dldir=$destdir/`dirname \$dlpath`~ 2629a3129944Smrg test -d \$dldir || mkdir -p \$dldir~ 2630a3129944Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2631a3129944Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2632a3129944Smrg dlpath=$dir/\$dldll~ 2633a3129944Smrg $RM \$dlpath' 2634a3129944Smrg shlibpath_overrides_runpath=yes 2635a3129944Smrg dynamic_linker='Win32 link.exe' 26369ef0b394Smrg ;; 2637266e564dSmrg 2638a3129944Smrg *) 2639a3129944Smrg # Assume MSVC wrapper 2640a3129944Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2641a3129944Smrg dynamic_linker='Win32 ld.exe' 26429ef0b394Smrg ;; 2643a3129944Smrg esac 2644a3129944Smrg # FIXME: first we should search . and the directory the executable is in 2645a3129944Smrg shlibpath_var=PATH 2646a3129944Smrg ;; 2647266e564dSmrg 2648a3129944Smrgdarwin* | rhapsody*) 2649a3129944Smrg dynamic_linker="$host_os dyld" 2650a3129944Smrg version_type=darwin 2651a3129944Smrg need_lib_prefix=no 2652a3129944Smrg need_version=no 2653a3129944Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2654a3129944Smrg soname_spec='$libname$release$major$shared_ext' 2655a3129944Smrg shlibpath_overrides_runpath=yes 2656a3129944Smrg shlibpath_var=DYLD_LIBRARY_PATH 2657a3129944Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2658a3129944Smrgm4_if([$1], [],[ 2659a3129944Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2660a3129944Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2661a3129944Smrg ;; 2662266e564dSmrg 2663a3129944Smrgdgux*) 2664a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 2665a3129944Smrg need_lib_prefix=no 2666a3129944Smrg need_version=no 2667a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2668a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2669a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2670a3129944Smrg ;; 2671266e564dSmrg 2672a3129944Smrgfreebsd* | dragonfly*) 2673a3129944Smrg # DragonFly does not have aout. When/if they implement a new 2674a3129944Smrg # versioning mechanism, adjust this. 2675a3129944Smrg if test -x /usr/bin/objformat; then 2676a3129944Smrg objformat=`/usr/bin/objformat` 2677a3129944Smrg else 2678a3129944Smrg case $host_os in 2679a3129944Smrg freebsd[[23]].*) objformat=aout ;; 2680a3129944Smrg *) objformat=elf ;; 2681a3129944Smrg esac 2682a3129944Smrg fi 2683a3129944Smrg version_type=freebsd-$objformat 2684a3129944Smrg case $version_type in 2685a3129944Smrg freebsd-elf*) 2686a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2687a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2688a3129944Smrg need_version=no 2689a3129944Smrg need_lib_prefix=no 2690a3129944Smrg ;; 2691a3129944Smrg freebsd-*) 2692a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2693a3129944Smrg need_version=yes 2694a3129944Smrg ;; 2695a3129944Smrg esac 2696a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2697a3129944Smrg case $host_os in 2698a3129944Smrg freebsd2.*) 2699a3129944Smrg shlibpath_overrides_runpath=yes 2700a3129944Smrg ;; 2701a3129944Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2702a3129944Smrg shlibpath_overrides_runpath=yes 2703a3129944Smrg hardcode_into_libs=yes 2704a3129944Smrg ;; 2705a3129944Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2706a3129944Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2707a3129944Smrg shlibpath_overrides_runpath=no 2708a3129944Smrg hardcode_into_libs=yes 2709a3129944Smrg ;; 2710a3129944Smrg *) # from 4.6 on, and DragonFly 2711a3129944Smrg shlibpath_overrides_runpath=yes 2712a3129944Smrg hardcode_into_libs=yes 27139ef0b394Smrg ;; 2714a3129944Smrg esac 2715a3129944Smrg ;; 2716266e564dSmrg 2717a3129944Smrghaiku*) 2718a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 2719a3129944Smrg need_lib_prefix=no 2720a3129944Smrg need_version=no 2721a3129944Smrg dynamic_linker="$host_os runtime_loader" 2722a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2723a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2724a3129944Smrg shlibpath_var=LIBRARY_PATH 2725a3129944Smrg shlibpath_overrides_runpath=no 2726a3129944Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2727a3129944Smrg hardcode_into_libs=yes 2728a3129944Smrg ;; 2729a3129944Smrg 2730a3129944Smrghpux9* | hpux10* | hpux11*) 2731a3129944Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 2732a3129944Smrg # link against other versions. 2733a3129944Smrg version_type=sunos 2734a3129944Smrg need_lib_prefix=no 2735a3129944Smrg need_version=no 2736a3129944Smrg case $host_cpu in 2737a3129944Smrg ia64*) 2738a3129944Smrg shrext_cmds='.so' 2739a3129944Smrg hardcode_into_libs=yes 2740a3129944Smrg dynamic_linker="$host_os dld.so" 2741a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2742a3129944Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2743a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2744a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2745a3129944Smrg if test 32 = "$HPUX_IA64_MODE"; then 2746a3129944Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2747a3129944Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27489ef0b394Smrg else 2749a3129944Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2750a3129944Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27519ef0b394Smrg fi 27529ef0b394Smrg ;; 2753a3129944Smrg hppa*64*) 2754a3129944Smrg shrext_cmds='.sl' 2755a3129944Smrg hardcode_into_libs=yes 2756a3129944Smrg dynamic_linker="$host_os dld.sl" 2757a3129944Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2758a3129944Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2759a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2760a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2761a3129944Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2762a3129944Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27639ef0b394Smrg ;; 27649ef0b394Smrg *) 2765a3129944Smrg shrext_cmds='.sl' 2766a3129944Smrg dynamic_linker="$host_os dld.sl" 2767a3129944Smrg shlibpath_var=SHLIB_PATH 2768a3129944Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2769a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2770a3129944Smrg soname_spec='$libname$release$shared_ext$major' 27719ef0b394Smrg ;; 27729ef0b394Smrg esac 2773a3129944Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2774a3129944Smrg postinstall_cmds='chmod 555 $lib' 2775a3129944Smrg # or fails outright, so override atomically: 2776a3129944Smrg install_override_mode=555 2777a3129944Smrg ;; 2778266e564dSmrg 2779a3129944Smrginterix[[3-9]]*) 2780a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 2781a3129944Smrg need_lib_prefix=no 2782a3129944Smrg need_version=no 2783a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2784a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2785a3129944Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2786a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2787a3129944Smrg shlibpath_overrides_runpath=no 2788a3129944Smrg hardcode_into_libs=yes 2789a3129944Smrg ;; 2790266e564dSmrg 2791a3129944Smrgirix5* | irix6* | nonstopux*) 2792a3129944Smrg case $host_os in 2793a3129944Smrg nonstopux*) version_type=nonstopux ;; 2794a3129944Smrg *) 2795a3129944Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 2796a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 2797a3129944Smrg else 2798a3129944Smrg version_type=irix 2799a3129944Smrg fi ;; 2800a3129944Smrg esac 2801a3129944Smrg need_lib_prefix=no 2802a3129944Smrg need_version=no 2803a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2804a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2805a3129944Smrg case $host_os in 2806a3129944Smrg irix5* | nonstopux*) 2807a3129944Smrg libsuff= shlibsuff= 2808a3129944Smrg ;; 2809a3129944Smrg *) 2810a3129944Smrg case $LD in # libtool.m4 will add one of these switches to LD 2811a3129944Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2812a3129944Smrg libsuff= shlibsuff= libmagic=32-bit;; 2813a3129944Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2814a3129944Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2815a3129944Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2816a3129944Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2817a3129944Smrg *) libsuff= shlibsuff= libmagic=never-match;; 2818a3129944Smrg esac 2819a3129944Smrg ;; 2820a3129944Smrg esac 2821a3129944Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2822a3129944Smrg shlibpath_overrides_runpath=no 2823a3129944Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2824a3129944Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2825a3129944Smrg hardcode_into_libs=yes 2826a3129944Smrg ;; 2827266e564dSmrg 2828a3129944Smrg# No shared lib support for Linux oldld, aout, or coff. 2829a3129944Smrglinux*oldld* | linux*aout* | linux*coff*) 2830a3129944Smrg dynamic_linker=no 2831a3129944Smrg ;; 2832266e564dSmrg 2833a3129944Smrglinux*android*) 2834a3129944Smrg version_type=none # Android doesn't support versioned libraries. 2835a3129944Smrg need_lib_prefix=no 2836a3129944Smrg need_version=no 2837a3129944Smrg library_names_spec='$libname$release$shared_ext' 2838a3129944Smrg soname_spec='$libname$release$shared_ext' 2839a3129944Smrg finish_cmds= 2840a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2841a3129944Smrg shlibpath_overrides_runpath=yes 2842266e564dSmrg 2843a3129944Smrg # This implies no fast_install, which is unacceptable. 2844a3129944Smrg # Some rework will be needed to allow for fast_install 2845a3129944Smrg # before this can be enabled. 2846a3129944Smrg hardcode_into_libs=yes 2847266e564dSmrg 2848a3129944Smrg dynamic_linker='Android linker' 2849a3129944Smrg # Don't embed -rpath directories since the linker doesn't support them. 2850a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2851a3129944Smrg ;; 2852266e564dSmrg 2853a3129944Smrg# This must be glibc/ELF. 2854a3129944Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2855a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 2856a3129944Smrg need_lib_prefix=no 2857a3129944Smrg need_version=no 2858a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2859a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2860a3129944Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2861a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2862a3129944Smrg shlibpath_overrides_runpath=no 2863266e564dSmrg 2864a3129944Smrg # Some binutils ld are patched to set DT_RUNPATH 2865a3129944Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2866a3129944Smrg [lt_cv_shlibpath_overrides_runpath=no 2867a3129944Smrg save_LDFLAGS=$LDFLAGS 2868a3129944Smrg save_libdir=$libdir 2869a3129944Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2870a3129944Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2871a3129944Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2872a3129944Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2873a3129944Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2874a3129944Smrg LDFLAGS=$save_LDFLAGS 2875a3129944Smrg libdir=$save_libdir 2876a3129944Smrg ]) 2877a3129944Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2878266e564dSmrg 2879a3129944Smrg # This implies no fast_install, which is unacceptable. 2880a3129944Smrg # Some rework will be needed to allow for fast_install 2881a3129944Smrg # before this can be enabled. 2882a3129944Smrg hardcode_into_libs=yes 2883266e564dSmrg 2884a3129944Smrg # Ideally, we could use ldconfig to report *all* directores which are 2885a3129944Smrg # searched for libraries, however this is still not possible. Aside from not 2886a3129944Smrg # being certain /sbin/ldconfig is available, command 2887a3129944Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2888a3129944Smrg # even though it is searched at run-time. Try to do the best guess by 2889a3129944Smrg # appending ld.so.conf contents (and includes) to the search path. 2890a3129944Smrg if test -f /etc/ld.so.conf; then 2891a3129944Smrg 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' ' '` 2892a3129944Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2893a3129944Smrg fi 2894266e564dSmrg 2895a3129944Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2896a3129944Smrg # powerpc, because MkLinux only supported shared libraries with the 2897a3129944Smrg # GNU dynamic linker. Since this was broken with cross compilers, 2898a3129944Smrg # most powerpc-linux boxes support dynamic linking these days and 2899a3129944Smrg # people can always --disable-shared, the test was removed, and we 2900a3129944Smrg # assume the GNU/Linux dynamic linker is in use. 2901a3129944Smrg dynamic_linker='GNU/Linux ld.so' 2902a3129944Smrg ;; 2903c5629e66Smrg 2904a3129944Smrgnetbsd*) 2905a3129944Smrg version_type=sunos 2906a3129944Smrg need_lib_prefix=no 2907a3129944Smrg need_version=no 2908a3129944Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2909a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2910a3129944Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2911a3129944Smrg dynamic_linker='NetBSD (a.out) ld.so' 2912c5629e66Smrg else 2913a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2914a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2915a3129944Smrg dynamic_linker='NetBSD ld.elf_so' 2916698f425bSmrg fi 2917a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2918a3129944Smrg shlibpath_overrides_runpath=yes 2919a3129944Smrg hardcode_into_libs=yes 2920a3129944Smrg ;; 29219ef0b394Smrg 2922a3129944Smrgnewsos6) 2923a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 2924a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2925a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2926a3129944Smrg shlibpath_overrides_runpath=yes 2927a3129944Smrg ;; 2928c5629e66Smrg 2929a3129944Smrg*nto* | *qnx*) 2930a3129944Smrg version_type=qnx 2931a3129944Smrg need_lib_prefix=no 2932a3129944Smrg need_version=no 2933a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2934a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2935a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2936a3129944Smrg shlibpath_overrides_runpath=no 2937a3129944Smrg hardcode_into_libs=yes 2938a3129944Smrg dynamic_linker='ldqnx.so' 2939a3129944Smrg ;; 2940266e564dSmrg 2941a3129944Smrgopenbsd* | bitrig*) 2942a3129944Smrg version_type=sunos 2943a3129944Smrg sys_lib_dlsearch_path_spec=/usr/lib 2944a3129944Smrg need_lib_prefix=no 2945a3129944Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2946a3129944Smrg need_version=no 2947a3129944Smrg else 2948a3129944Smrg need_version=yes 2949a3129944Smrg fi 2950a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2951a3129944Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2952a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2953a3129944Smrg shlibpath_overrides_runpath=yes 2954a3129944Smrg ;; 2955266e564dSmrg 2956a3129944Smrgos2*) 2957a3129944Smrg libname_spec='$name' 2958a3129944Smrg version_type=windows 2959a3129944Smrg shrext_cmds=.dll 2960a3129944Smrg need_version=no 2961a3129944Smrg need_lib_prefix=no 2962a3129944Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2963a3129944Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2964a3129944Smrg v=$($ECHO $release$versuffix | tr -d .-); 2965a3129944Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2966a3129944Smrg $ECHO $n$v`$shared_ext' 2967a3129944Smrg library_names_spec='${libname}_dll.$libext' 2968a3129944Smrg dynamic_linker='OS/2 ld.exe' 2969a3129944Smrg shlibpath_var=BEGINLIBPATH 2970a3129944Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2971a3129944Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2972a3129944Smrg postinstall_cmds='base_file=`basename \$file`~ 2973a3129944Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2974a3129944Smrg dldir=$destdir/`dirname \$dlpath`~ 2975a3129944Smrg test -d \$dldir || mkdir -p \$dldir~ 2976a3129944Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2977a3129944Smrg chmod a+x \$dldir/$dlname~ 2978a3129944Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2979a3129944Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2980a3129944Smrg fi' 2981a3129944Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2982a3129944Smrg dlpath=$dir/\$dldll~ 2983a3129944Smrg $RM \$dlpath' 2984a3129944Smrg ;; 2985266e564dSmrg 2986a3129944Smrgosf3* | osf4* | osf5*) 2987a3129944Smrg version_type=osf 2988a3129944Smrg need_lib_prefix=no 2989a3129944Smrg need_version=no 2990a3129944Smrg soname_spec='$libname$release$shared_ext$major' 2991a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2992a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 2993a3129944Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2994a3129944Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2995a3129944Smrg ;; 2996266e564dSmrg 2997a3129944Smrgrdos*) 2998a3129944Smrg dynamic_linker=no 2999a3129944Smrg ;; 3000266e564dSmrg 3001a3129944Smrgsolaris*) 3002a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 3003a3129944Smrg need_lib_prefix=no 3004a3129944Smrg need_version=no 3005a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3006a3129944Smrg soname_spec='$libname$release$shared_ext$major' 3007a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 3008a3129944Smrg shlibpath_overrides_runpath=yes 3009a3129944Smrg hardcode_into_libs=yes 3010a3129944Smrg # ldd complains unless libraries are executable 3011a3129944Smrg postinstall_cmds='chmod +x $lib' 3012a3129944Smrg ;; 3013a3129944Smrg 3014a3129944Smrgsunos4*) 3015a3129944Smrg version_type=sunos 3016a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3017a3129944Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3018a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 3019a3129944Smrg shlibpath_overrides_runpath=yes 3020a3129944Smrg if test yes = "$with_gnu_ld"; then 3021a3129944Smrg need_lib_prefix=no 30229ef0b394Smrg fi 3023a3129944Smrg need_version=yes 3024a3129944Smrg ;; 3025266e564dSmrg 3026a3129944Smrgsysv4 | sysv4.3*) 3027a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 3028a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3029a3129944Smrg soname_spec='$libname$release$shared_ext$major' 3030a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 3031a3129944Smrg case $host_vendor in 3032a3129944Smrg sni) 3033a3129944Smrg shlibpath_overrides_runpath=no 3034a3129944Smrg need_lib_prefix=no 3035a3129944Smrg runpath_var=LD_RUN_PATH 3036a3129944Smrg ;; 3037a3129944Smrg siemens) 3038a3129944Smrg need_lib_prefix=no 3039a3129944Smrg ;; 3040a3129944Smrg motorola) 3041a3129944Smrg need_lib_prefix=no 3042a3129944Smrg need_version=no 3043a3129944Smrg shlibpath_overrides_runpath=no 3044a3129944Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3045a3129944Smrg ;; 3046a3129944Smrg esac 3047a3129944Smrg ;; 30489ef0b394Smrg 3049a3129944Smrgsysv4*MP*) 3050a3129944Smrg if test -d /usr/nec; then 3051a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 3052a3129944Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3053a3129944Smrg soname_spec='$libname$shared_ext.$major' 3054a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 3055a3129944Smrg fi 3056a3129944Smrg ;; 30579ef0b394Smrg 3058a3129944Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3059a3129944Smrg version_type=sco 3060a3129944Smrg need_lib_prefix=no 3061a3129944Smrg need_version=no 3062a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3063a3129944Smrg soname_spec='$libname$release$shared_ext$major' 3064a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 3065a3129944Smrg shlibpath_overrides_runpath=yes 3066a3129944Smrg hardcode_into_libs=yes 3067a3129944Smrg if test yes = "$with_gnu_ld"; then 3068a3129944Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3069a3129944Smrg else 3070a3129944Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3071a3129944Smrg case $host_os in 3072a3129944Smrg sco3.2v5*) 3073a3129944Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3074a3129944Smrg ;; 3075a3129944Smrg esac 3076a3129944Smrg fi 3077a3129944Smrg sys_lib_dlsearch_path_spec='/usr/lib' 3078a3129944Smrg ;; 30799ef0b394Smrg 3080a3129944Smrgtpf*) 3081a3129944Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3082a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 3083a3129944Smrg need_lib_prefix=no 3084a3129944Smrg need_version=no 3085a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3086a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 3087a3129944Smrg shlibpath_overrides_runpath=no 3088a3129944Smrg hardcode_into_libs=yes 3089a3129944Smrg ;; 30909ef0b394Smrg 3091a3129944Smrguts4*) 3092a3129944Smrg version_type=linux # correct to gnu/linux during the next big refactor 3093a3129944Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3094a3129944Smrg soname_spec='$libname$release$shared_ext$major' 3095a3129944Smrg shlibpath_var=LD_LIBRARY_PATH 3096a3129944Smrg ;; 30979ef0b394Smrg 3098a3129944Smrg*) 3099a3129944Smrg dynamic_linker=no 3100a3129944Smrg ;; 3101a3129944Smrgesac 3102a3129944SmrgAC_MSG_RESULT([$dynamic_linker]) 3103a3129944Smrgtest no = "$dynamic_linker" && can_build_shared=no 31049ef0b394Smrg 3105a3129944Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3106a3129944Smrgif test yes = "$GCC"; then 3107a3129944Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3108a3129944Smrgfi 31099ef0b394Smrg 3110a3129944Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3111a3129944Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31129ef0b394Smrgfi 31139ef0b394Smrg 3114a3129944Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3115a3129944Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3116a3129944Smrgfi 31179ef0b394Smrg 3118a3129944Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3119a3129944Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 31209ef0b394Smrg 3121a3129944Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3122a3129944Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 31239ef0b394Smrg 3124a3129944Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3125a3129944Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 31269ef0b394Smrg 3127a3129944Smrg_LT_DECL([], [variables_saved_for_relink], [1], 3128a3129944Smrg [Variables whose values should be saved in libtool wrapper scripts and 3129a3129944Smrg restored at link time]) 3130a3129944Smrg_LT_DECL([], [need_lib_prefix], [0], 3131a3129944Smrg [Do we need the "lib" prefix for modules?]) 3132a3129944Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3133a3129944Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3134a3129944Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3135a3129944Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3136a3129944Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3137a3129944Smrg [Is shlibpath searched before the hard-coded library search path?]) 3138a3129944Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3139a3129944Smrg_LT_DECL([], [library_names_spec], [1], 3140a3129944Smrg [[List of archive names. First name is the real one, the rest are links. 3141a3129944Smrg The last name is the one that the linker finds with -lNAME]]) 3142a3129944Smrg_LT_DECL([], [soname_spec], [1], 3143a3129944Smrg [[The coded name of the library, if different from the real name]]) 3144a3129944Smrg_LT_DECL([], [install_override_mode], [1], 3145a3129944Smrg [Permission mode override for installation of shared libraries]) 3146a3129944Smrg_LT_DECL([], [postinstall_cmds], [2], 3147a3129944Smrg [Command to use after installation of a shared archive]) 3148a3129944Smrg_LT_DECL([], [postuninstall_cmds], [2], 3149a3129944Smrg [Command to use after uninstallation of a shared archive]) 3150a3129944Smrg_LT_DECL([], [finish_cmds], [2], 3151a3129944Smrg [Commands used to finish a libtool library installation in a directory]) 3152a3129944Smrg_LT_DECL([], [finish_eval], [1], 3153a3129944Smrg [[As "finish_cmds", except a single script fragment to be evaled but 3154a3129944Smrg not shown]]) 3155a3129944Smrg_LT_DECL([], [hardcode_into_libs], [0], 3156a3129944Smrg [Whether we should hardcode library paths into libraries]) 3157a3129944Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3158a3129944Smrg [Compile-time system search path for libraries]) 3159a3129944Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3160a3129944Smrg [Detected run-time system search path for libraries]) 3161a3129944Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3162a3129944Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3163a3129944Smrg])# _LT_SYS_DYNAMIC_LINKER 31649ef0b394Smrg 31659ef0b394Smrg 3166a3129944Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 3167a3129944Smrg# -------------------------- 3168a3129944Smrg# find a file program that can recognize shared library 3169a3129944SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3170a3129944Smrg[m4_require([_LT_DECL_EGREP])dnl 3171a3129944SmrgAC_MSG_CHECKING([for $1]) 3172a3129944SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3173a3129944Smrg[case $MAGIC_CMD in 3174a3129944Smrg[[\\/*] | ?:[\\/]*]) 3175a3129944Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3176a3129944Smrg ;; 3177a3129944Smrg*) 3178a3129944Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 3179a3129944Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3180a3129944Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3181a3129944Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3182a3129944Smrgdnl not every word. This closes a longstanding sh security hole. 3183a3129944Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3184a3129944Smrg for ac_dir in $ac_dummy; do 3185a3129944Smrg IFS=$lt_save_ifs 3186a3129944Smrg test -z "$ac_dir" && ac_dir=. 3187a3129944Smrg if test -f "$ac_dir/$1"; then 3188a3129944Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3189a3129944Smrg if test -n "$file_magic_test_file"; then 3190a3129944Smrg case $deplibs_check_method in 3191a3129944Smrg "file_magic "*) 3192a3129944Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3193a3129944Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3194a3129944Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3195a3129944Smrg $EGREP "$file_magic_regex" > /dev/null; then 3196a3129944Smrg : 3197a3129944Smrg else 3198a3129944Smrg cat <<_LT_EOF 1>&2 31999ef0b394Smrg 3200a3129944Smrg*** Warning: the command libtool uses to detect shared libraries, 3201a3129944Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3202a3129944Smrg*** The result is that libtool may fail to recognize shared libraries 3203a3129944Smrg*** as such. This will affect the creation of libtool libraries that 3204a3129944Smrg*** depend on shared libraries, but programs linked with such libtool 3205a3129944Smrg*** libraries will work regardless of this problem. Nevertheless, you 3206a3129944Smrg*** may want to report the problem to your system manager and/or to 3207a3129944Smrg*** bug-libtool@gnu.org 32089ef0b394Smrg 3209a3129944Smrg_LT_EOF 3210a3129944Smrg fi ;; 3211a3129944Smrg esac 3212a3129944Smrg fi 3213a3129944Smrg break 3214a3129944Smrg fi 3215a3129944Smrg done 3216a3129944Smrg IFS=$lt_save_ifs 3217a3129944Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 3218a3129944Smrg ;; 3219a3129944Smrgesac]) 3220a3129944SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3221a3129944Smrgif test -n "$MAGIC_CMD"; then 3222a3129944Smrg AC_MSG_RESULT($MAGIC_CMD) 32239ef0b394Smrgelse 3224a3129944Smrg AC_MSG_RESULT(no) 32259ef0b394Smrgfi 3226a3129944Smrg_LT_DECL([], [MAGIC_CMD], [0], 3227a3129944Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3228a3129944Smrg])# _LT_PATH_TOOL_PREFIX 32299ef0b394Smrg 3230a3129944Smrg# Old name: 3231a3129944SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3232a3129944Smrgdnl aclocal-1.4 backwards compatibility: 3233a3129944Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 32349ef0b394Smrg 32359ef0b394Smrg 3236a3129944Smrg# _LT_PATH_MAGIC 3237a3129944Smrg# -------------- 3238a3129944Smrg# find a file program that can recognize a shared library 3239a3129944Smrgm4_defun([_LT_PATH_MAGIC], 3240a3129944Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3241a3129944Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3242a3129944Smrg if test -n "$ac_tool_prefix"; then 3243a3129944Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32449ef0b394Smrg else 3245a3129944Smrg MAGIC_CMD=: 32469ef0b394Smrg fi 32479ef0b394Smrgfi 3248a3129944Smrg])# _LT_PATH_MAGIC 32499ef0b394Smrg 32509ef0b394Smrg 3251a3129944Smrg# LT_PATH_LD 3252a3129944Smrg# ---------- 3253a3129944Smrg# find the pathname to the GNU or non-GNU linker 3254a3129944SmrgAC_DEFUN([LT_PATH_LD], 3255a3129944Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3256a3129944SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3257a3129944SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3258a3129944Smrgm4_require([_LT_DECL_SED])dnl 3259a3129944Smrgm4_require([_LT_DECL_EGREP])dnl 3260a3129944Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32619ef0b394Smrg 3262a3129944SmrgAC_ARG_WITH([gnu-ld], 3263a3129944Smrg [AS_HELP_STRING([--with-gnu-ld], 3264a3129944Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3265a3129944Smrg [test no = "$withval" || with_gnu_ld=yes], 3266a3129944Smrg [with_gnu_ld=no])dnl 3267a3129944Smrg 3268a3129944Smrgac_prog=ld 3269a3129944Smrgif test yes = "$GCC"; then 3270a3129944Smrg # Check if gcc -print-prog-name=ld gives a path. 3271a3129944Smrg AC_MSG_CHECKING([for ld used by $CC]) 3272a3129944Smrg case $host in 3273a3129944Smrg *-*-mingw*) 3274a3129944Smrg # gcc leaves a trailing carriage return, which upsets mingw 3275a3129944Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3276a3129944Smrg *) 3277a3129944Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3278a3129944Smrg esac 3279a3129944Smrg case $ac_prog in 3280a3129944Smrg # Accept absolute paths. 3281a3129944Smrg [[\\/]]* | ?:[[\\/]]*) 3282a3129944Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 3283a3129944Smrg # Canonicalize the pathname of ld 3284a3129944Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3285a3129944Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3286a3129944Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3287a3129944Smrg done 3288a3129944Smrg test -z "$LD" && LD=$ac_prog 3289a3129944Smrg ;; 3290a3129944Smrg "") 3291a3129944Smrg # If it fails, then pretend we aren't using GCC. 3292a3129944Smrg ac_prog=ld 32939ef0b394Smrg ;; 32949ef0b394Smrg *) 3295a3129944Smrg # If it is relative, then search for the first ld in PATH. 3296a3129944Smrg with_gnu_ld=unknown 32979ef0b394Smrg ;; 32989ef0b394Smrg esac 3299a3129944Smrgelif test yes = "$with_gnu_ld"; then 3300a3129944Smrg AC_MSG_CHECKING([for GNU ld]) 3301a3129944Smrgelse 3302a3129944Smrg AC_MSG_CHECKING([for non-GNU ld]) 33039ef0b394Smrgfi 3304a3129944SmrgAC_CACHE_VAL(lt_cv_path_LD, 3305a3129944Smrg[if test -z "$LD"; then 3306a3129944Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3307a3129944Smrg for ac_dir in $PATH; do 3308a3129944Smrg IFS=$lt_save_ifs 3309a3129944Smrg test -z "$ac_dir" && ac_dir=. 3310a3129944Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3311a3129944Smrg lt_cv_path_LD=$ac_dir/$ac_prog 3312a3129944Smrg # Check to see if the program is GNU ld. I'd rather use --version, 3313a3129944Smrg # but apparently some variants of GNU ld only accept -v. 3314a3129944Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 3315a3129944Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3316a3129944Smrg *GNU* | *'with BFD'*) 3317a3129944Smrg test no != "$with_gnu_ld" && break 3318a3129944Smrg ;; 3319a3129944Smrg *) 3320a3129944Smrg test yes != "$with_gnu_ld" && break 3321a3129944Smrg ;; 3322a3129944Smrg esac 33239ef0b394Smrg fi 33249ef0b394Smrg done 3325a3129944Smrg IFS=$lt_save_ifs 33269ef0b394Smrgelse 3327a3129944Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 33289ef0b394Smrgfi]) 3329a3129944SmrgLD=$lt_cv_path_LD 3330a3129944Smrgif test -n "$LD"; then 3331a3129944Smrg AC_MSG_RESULT($LD) 3332a3129944Smrgelse 3333a3129944Smrg AC_MSG_RESULT(no) 3334a3129944Smrgfi 3335a3129944Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3336a3129944Smrg_LT_PATH_LD_GNU 3337a3129944SmrgAC_SUBST([LD]) 33389ef0b394Smrg 3339a3129944Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3340a3129944Smrg])# LT_PATH_LD 33419ef0b394Smrg 3342a3129944Smrg# Old names: 3343a3129944SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3344a3129944SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3345a3129944Smrgdnl aclocal-1.4 backwards compatibility: 3346a3129944Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3347a3129944Smrgdnl AC_DEFUN([AC_PROG_LD], []) 33489ef0b394Smrg 33499ef0b394Smrg 3350a3129944Smrg# _LT_PATH_LD_GNU 3351a3129944Smrg#- -------------- 3352a3129944Smrgm4_defun([_LT_PATH_LD_GNU], 3353a3129944Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3354a3129944Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3355a3129944Smrgcase `$LD -v 2>&1 </dev/null` in 3356a3129944Smrg*GNU* | *'with BFD'*) 3357a3129944Smrg lt_cv_prog_gnu_ld=yes 3358a3129944Smrg ;; 3359a3129944Smrg*) 3360a3129944Smrg lt_cv_prog_gnu_ld=no 33619ef0b394Smrg ;; 3362a3129944Smrgesac]) 3363a3129944Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3364a3129944Smrg])# _LT_PATH_LD_GNU 33659ef0b394Smrg 3366a3129944Smrg 3367a3129944Smrg# _LT_CMD_RELOAD 3368a3129944Smrg# -------------- 3369a3129944Smrg# find reload flag for linker 3370a3129944Smrg# -- PORTME Some linkers may need a different reload flag. 3371a3129944Smrgm4_defun([_LT_CMD_RELOAD], 3372a3129944Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 3373a3129944Smrg lt_cv_ld_reload_flag, 3374a3129944Smrg [lt_cv_ld_reload_flag='-r']) 3375a3129944Smrgreload_flag=$lt_cv_ld_reload_flag 3376a3129944Smrgcase $reload_flag in 3377a3129944Smrg"" | " "*) ;; 3378a3129944Smrg*) reload_flag=" $reload_flag" ;; 3379a3129944Smrgesac 3380a3129944Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3381a3129944Smrgcase $host_os in 3382a3129944Smrg cygwin* | mingw* | pw32* | cegcc*) 3383a3129944Smrg if test yes != "$GCC"; then 3384a3129944Smrg reload_cmds=false 3385a3129944Smrg fi 33869ef0b394Smrg ;; 3387a3129944Smrg darwin*) 3388a3129944Smrg if test yes = "$GCC"; then 3389a3129944Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3390a3129944Smrg else 3391a3129944Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3392a3129944Smrg fi 33939ef0b394Smrg ;; 3394a3129944Smrgesac 3395a3129944Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3396a3129944Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3397a3129944Smrg])# _LT_CMD_RELOAD 3398a3129944Smrg 3399a3129944Smrg 3400a3129944Smrg# _LT_PATH_DD 3401a3129944Smrg# ----------- 3402a3129944Smrg# find a working dd 3403a3129944Smrgm4_defun([_LT_PATH_DD], 3404a3129944Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3405a3129944Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3406a3129944Smrgcat conftest.i conftest.i >conftest2.i 3407a3129944Smrg: ${lt_DD:=$DD} 3408a3129944SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3409a3129944Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3410a3129944Smrg cmp -s conftest.i conftest.out \ 3411a3129944Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3412a3129944Smrgfi]) 3413a3129944Smrgrm -f conftest.i conftest2.i conftest.out]) 3414a3129944Smrg])# _LT_PATH_DD 3415a3129944Smrg 3416a3129944Smrg 3417a3129944Smrg# _LT_CMD_TRUNCATE 3418a3129944Smrg# ---------------- 3419a3129944Smrg# find command to truncate a binary pipe 3420a3129944Smrgm4_defun([_LT_CMD_TRUNCATE], 3421a3129944Smrg[m4_require([_LT_PATH_DD]) 3422a3129944SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3423a3129944Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3424a3129944Smrgcat conftest.i conftest.i >conftest2.i 3425a3129944Smrglt_cv_truncate_bin= 3426a3129944Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3427a3129944Smrg cmp -s conftest.i conftest.out \ 3428a3129944Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3429a3129944Smrgfi 3430a3129944Smrgrm -f conftest.i conftest2.i conftest.out 3431a3129944Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3432a3129944Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3433a3129944Smrg [Command to truncate a binary pipe]) 3434a3129944Smrg])# _LT_CMD_TRUNCATE 3435a3129944Smrg 3436a3129944Smrg 3437a3129944Smrg# _LT_CHECK_MAGIC_METHOD 3438a3129944Smrg# ---------------------- 3439a3129944Smrg# how to check for library dependencies 3440a3129944Smrg# -- PORTME fill in with the dynamic library characteristics 3441a3129944Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3442a3129944Smrg[m4_require([_LT_DECL_EGREP]) 3443a3129944Smrgm4_require([_LT_DECL_OBJDUMP]) 3444a3129944SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3445a3129944Smrglt_cv_deplibs_check_method, 3446a3129944Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3447a3129944Smrglt_cv_file_magic_test_file= 3448a3129944Smrglt_cv_deplibs_check_method='unknown' 3449a3129944Smrg# Need to set the preceding variable on all platforms that support 3450a3129944Smrg# interlibrary dependencies. 3451a3129944Smrg# 'none' -- dependencies not supported. 3452a3129944Smrg# 'unknown' -- same as none, but documents that we really don't know. 3453a3129944Smrg# 'pass_all' -- all dependencies passed with no checks. 3454a3129944Smrg# 'test_compile' -- check by making test program. 3455a3129944Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 3456a3129944Smrg# that responds to the $file_magic_cmd with a given extended regex. 3457a3129944Smrg# If you have 'file' or equivalent on your system and you're not sure 3458a3129944Smrg# whether 'pass_all' will *always* work, you probably want this one. 3459a3129944Smrg 3460a3129944Smrgcase $host_os in 3461a3129944Smrgaix[[4-9]]*) 3462a3129944Smrg lt_cv_deplibs_check_method=pass_all 34639ef0b394Smrg ;; 34649ef0b394Smrg 34659ef0b394Smrgbeos*) 3466a3129944Smrg lt_cv_deplibs_check_method=pass_all 34679ef0b394Smrg ;; 34689ef0b394Smrg 34699ef0b394Smrgbsdi[[45]]*) 3470a3129944Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3471a3129944Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3472a3129944Smrg lt_cv_file_magic_test_file=/shlib/libc.so 34739ef0b394Smrg ;; 34749ef0b394Smrg 3475a3129944Smrgcygwin*) 3476a3129944Smrg # func_win32_libid is a shell function defined in ltmain.sh 3477a3129944Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3478a3129944Smrg lt_cv_file_magic_cmd='func_win32_libid' 3479a3129944Smrg ;; 34809ef0b394Smrg 3481a3129944Smrgmingw* | pw32*) 3482a3129944Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 3483a3129944Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3484a3129944Smrg # unless we find 'file', for example because we are cross-compiling. 3485a3129944Smrg if ( file / ) >/dev/null 2>&1; then 3486a3129944Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3487a3129944Smrg lt_cv_file_magic_cmd='func_win32_libid' 3488a3129944Smrg else 3489a3129944Smrg # Keep this pattern in sync with the one in func_win32_libid. 3490a3129944Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3491a3129944Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3492a3129944Smrg fi 34939ef0b394Smrg ;; 34949ef0b394Smrg 3495a3129944Smrgcegcc*) 3496a3129944Smrg # use the weaker test based on 'objdump'. See mingw*. 3497a3129944Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3498a3129944Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 34999ef0b394Smrg ;; 35009ef0b394Smrg 3501a3129944Smrgdarwin* | rhapsody*) 3502a3129944Smrg lt_cv_deplibs_check_method=pass_all 35039ef0b394Smrg ;; 35049ef0b394Smrg 35059ef0b394Smrgfreebsd* | dragonfly*) 3506a3129944Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3507a3129944Smrg case $host_cpu in 3508a3129944Smrg i*86 ) 3509a3129944Smrg # Not sure whether the presence of OpenBSD here was a mistake. 3510a3129944Smrg # Let's accept both of them until this is cleared up. 3511a3129944Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3512a3129944Smrg lt_cv_file_magic_cmd=/usr/bin/file 3513a3129944Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3514a3129944Smrg ;; 35159ef0b394Smrg esac 3516a3129944Smrg else 3517a3129944Smrg lt_cv_deplibs_check_method=pass_all 35189ef0b394Smrg fi 35199ef0b394Smrg ;; 35209ef0b394Smrg 35219ef0b394Smrghaiku*) 3522a3129944Smrg lt_cv_deplibs_check_method=pass_all 35239ef0b394Smrg ;; 35249ef0b394Smrg 3525a3129944Smrghpux10.20* | hpux11*) 3526a3129944Smrg lt_cv_file_magic_cmd=/usr/bin/file 35279ef0b394Smrg case $host_cpu in 35289ef0b394Smrg ia64*) 3529a3129944Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3530a3129944Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35319ef0b394Smrg ;; 35329ef0b394Smrg hppa*64*) 3533a3129944Smrg [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]'] 3534a3129944Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35359ef0b394Smrg ;; 35369ef0b394Smrg *) 3537a3129944Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3538a3129944Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 35399ef0b394Smrg ;; 35409ef0b394Smrg esac 35419ef0b394Smrg ;; 35429ef0b394Smrg 35439ef0b394Smrginterix[[3-9]]*) 3544a3129944Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3545a3129944Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35469ef0b394Smrg ;; 35479ef0b394Smrg 35489ef0b394Smrgirix5* | irix6* | nonstopux*) 3549a3129944Smrg case $LD in 3550a3129944Smrg *-32|*"-32 ") libmagic=32-bit;; 3551a3129944Smrg *-n32|*"-n32 ") libmagic=N32;; 3552a3129944Smrg *-64|*"-64 ") libmagic=64-bit;; 3553a3129944Smrg *) libmagic=never-match;; 35549ef0b394Smrg esac 3555a3129944Smrg lt_cv_deplibs_check_method=pass_all 35569ef0b394Smrg ;; 35579ef0b394Smrg 3558a3129944Smrg# This must be glibc/ELF. 3559a3129944Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3560a3129944Smrg lt_cv_deplibs_check_method=pass_all 35619ef0b394Smrg ;; 35629ef0b394Smrg 35639ef0b394Smrgnetbsd*) 3564a3129944Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3565a3129944Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35669ef0b394Smrg else 3567a3129944Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 35689ef0b394Smrg fi 35699ef0b394Smrg ;; 35709ef0b394Smrg 3571a3129944Smrgnewos6*) 3572a3129944Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3573a3129944Smrg lt_cv_file_magic_cmd=/usr/bin/file 3574a3129944Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 35759ef0b394Smrg ;; 35769ef0b394Smrg 35779ef0b394Smrg*nto* | *qnx*) 3578a3129944Smrg lt_cv_deplibs_check_method=pass_all 35799ef0b394Smrg ;; 35809ef0b394Smrg 3581a3129944Smrgopenbsd* | bitrig*) 3582a3129944Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3583a3129944Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 35849ef0b394Smrg else 3585a3129944Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3586698f425bSmrg fi 35879ef0b394Smrg ;; 3588266e564dSmrg 35899ef0b394Smrgosf3* | osf4* | osf5*) 3590a3129944Smrg lt_cv_deplibs_check_method=pass_all 35919ef0b394Smrg ;; 35929ef0b394Smrg 35939ef0b394Smrgrdos*) 3594a3129944Smrg lt_cv_deplibs_check_method=pass_all 35959ef0b394Smrg ;; 35969ef0b394Smrg 35979ef0b394Smrgsolaris*) 3598a3129944Smrg lt_cv_deplibs_check_method=pass_all 35999ef0b394Smrg ;; 36009ef0b394Smrg 3601a3129944Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3602a3129944Smrg lt_cv_deplibs_check_method=pass_all 36039ef0b394Smrg ;; 36049ef0b394Smrg 36059ef0b394Smrgsysv4 | sysv4.3*) 36069ef0b394Smrg case $host_vendor in 3607a3129944Smrg motorola) 3608a3129944Smrg 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]]' 3609a3129944Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3610a3129944Smrg ;; 3611a3129944Smrg ncr) 3612a3129944Smrg lt_cv_deplibs_check_method=pass_all 3613a3129944Smrg ;; 3614a3129944Smrg sequent) 3615a3129944Smrg lt_cv_file_magic_cmd='/bin/file' 3616a3129944Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3617a3129944Smrg ;; 3618a3129944Smrg sni) 3619a3129944Smrg lt_cv_file_magic_cmd='/bin/file' 3620a3129944Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3621a3129944Smrg lt_cv_file_magic_test_file=/lib/libc.so 3622a3129944Smrg ;; 3623a3129944Smrg siemens) 3624a3129944Smrg lt_cv_deplibs_check_method=pass_all 3625a3129944Smrg ;; 3626a3129944Smrg pc) 3627a3129944Smrg lt_cv_deplibs_check_method=pass_all 3628a3129944Smrg ;; 36299ef0b394Smrg esac 36309ef0b394Smrg ;; 36319ef0b394Smrg 36329ef0b394Smrgtpf*) 3633a3129944Smrg lt_cv_deplibs_check_method=pass_all 36349ef0b394Smrg ;; 3635a3129944Smrgos2*) 3636a3129944Smrg lt_cv_deplibs_check_method=pass_all 36379ef0b394Smrg ;; 36389ef0b394Smrgesac 3639a3129944Smrg]) 3640698f425bSmrg 3641a3129944Smrgfile_magic_glob= 3642a3129944Smrgwant_nocaseglob=no 3643a3129944Smrgif test "$build" = "$host"; then 3644a3129944Smrg case $host_os in 3645a3129944Smrg mingw* | pw32*) 3646a3129944Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3647a3129944Smrg want_nocaseglob=yes 3648a3129944Smrg else 3649a3129944Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3650a3129944Smrg fi 3651a3129944Smrg ;; 3652a3129944Smrg esac 36539ef0b394Smrgfi 3654698f425bSmrg 3655a3129944Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 3656a3129944Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 3657a3129944Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3658698f425bSmrg 3659a3129944Smrg_LT_DECL([], [deplibs_check_method], [1], 3660a3129944Smrg [Method to check whether dependent libraries are shared objects]) 3661a3129944Smrg_LT_DECL([], [file_magic_cmd], [1], 3662a3129944Smrg [Command to use when deplibs_check_method = "file_magic"]) 3663a3129944Smrg_LT_DECL([], [file_magic_glob], [1], 3664a3129944Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3665a3129944Smrg_LT_DECL([], [want_nocaseglob], [1], 3666a3129944Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3667a3129944Smrg])# _LT_CHECK_MAGIC_METHOD 3668698f425bSmrg 36699ef0b394Smrg 3670a3129944Smrg# LT_PATH_NM 3671a3129944Smrg# ---------- 3672a3129944Smrg# find the pathname to a BSD- or MS-compatible name lister 3673a3129944SmrgAC_DEFUN([LT_PATH_NM], 3674a3129944Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3675a3129944SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3676a3129944Smrg[if test -n "$NM"; then 3677a3129944Smrg # Let the user override the test. 3678a3129944Smrg lt_cv_path_NM=$NM 3679a3129944Smrgelse 3680a3129944Smrg lt_nm_to_check=${ac_tool_prefix}nm 3681a3129944Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3682a3129944Smrg lt_nm_to_check="$lt_nm_to_check nm" 3683a3129944Smrg fi 3684a3129944Smrg for lt_tmp_nm in $lt_nm_to_check; do 3685a3129944Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3686a3129944Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3687a3129944Smrg IFS=$lt_save_ifs 3688a3129944Smrg test -z "$ac_dir" && ac_dir=. 3689a3129944Smrg tmp_nm=$ac_dir/$lt_tmp_nm 3690a3129944Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3691a3129944Smrg # Check to see if the nm accepts a BSD-compat flag. 3692a3129944Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3693a3129944Smrg # nm: unknown option "B" ignored 3694a3129944Smrg # Tru64's nm complains that /dev/null is an invalid object file 3695a3129944Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3696a3129944Smrg case $build_os in 3697a3129944Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3698a3129944Smrg *) lt_bad_file=/dev/null ;; 3699a3129944Smrg esac 3700a3129944Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3701a3129944Smrg *$lt_bad_file* | *'Invalid file or object type'*) 3702a3129944Smrg lt_cv_path_NM="$tmp_nm -B" 3703a3129944Smrg break 2 3704a3129944Smrg ;; 3705a3129944Smrg *) 3706a3129944Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3707a3129944Smrg */dev/null*) 3708a3129944Smrg lt_cv_path_NM="$tmp_nm -p" 3709a3129944Smrg break 2 3710a3129944Smrg ;; 3711a3129944Smrg *) 3712a3129944Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3713a3129944Smrg continue # so that we can try to find one that supports BSD flags 3714a3129944Smrg ;; 3715a3129944Smrg esac 3716a3129944Smrg ;; 37179ef0b394Smrg esac 3718698f425bSmrg fi 3719a3129944Smrg done 3720a3129944Smrg IFS=$lt_save_ifs 37219ef0b394Smrg done 3722a3129944Smrg : ${lt_cv_path_NM=no} 3723a3129944Smrgfi]) 3724a3129944Smrgif test no != "$lt_cv_path_NM"; then 3725a3129944Smrg NM=$lt_cv_path_NM 37269ef0b394Smrgelse 3727a3129944Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3728a3129944Smrg if test -n "$DUMPBIN"; then : 3729a3129944Smrg # Let the user override the test. 3730698f425bSmrg else 3731a3129944Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3732a3129944Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3733a3129944Smrg *COFF*) 3734a3129944Smrg DUMPBIN="$DUMPBIN -symbols -headers" 3735a3129944Smrg ;; 3736a3129944Smrg *) 3737a3129944Smrg DUMPBIN=: 3738a3129944Smrg ;; 3739a3129944Smrg esac 3740a3129944Smrg fi 3741a3129944Smrg AC_SUBST([DUMPBIN]) 3742a3129944Smrg if test : != "$DUMPBIN"; then 3743a3129944Smrg NM=$DUMPBIN 37449ef0b394Smrg fi 37459ef0b394Smrgfi 3746a3129944Smrgtest -z "$NM" && NM=nm 3747a3129944SmrgAC_SUBST([NM]) 3748a3129944Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3749698f425bSmrg 3750a3129944SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3751a3129944Smrg [lt_cv_nm_interface="BSD nm" 3752a3129944Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3753a3129944Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3754a3129944Smrg (eval "$ac_compile" 2>conftest.err) 3755a3129944Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3756a3129944Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3757a3129944Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3758a3129944Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3759a3129944Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3760a3129944Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3761a3129944Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3762a3129944Smrg lt_cv_nm_interface="MS dumpbin" 3763a3129944Smrg fi 3764a3129944Smrg rm -f conftest*]) 3765a3129944Smrg])# LT_PATH_NM 3766698f425bSmrg 3767a3129944Smrg# Old names: 3768a3129944SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3769a3129944SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3770a3129944Smrgdnl aclocal-1.4 backwards compatibility: 3771a3129944Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3772a3129944Smrgdnl AC_DEFUN([AC_PROG_NM], []) 37739ef0b394Smrg 3774a3129944Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3775a3129944Smrg# -------------------------------- 3776a3129944Smrg# how to determine the name of the shared library 3777a3129944Smrg# associated with a specific link library. 3778a3129944Smrg# -- PORTME fill in with the dynamic library characteristics 3779a3129944Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3780a3129944Smrg[m4_require([_LT_DECL_EGREP]) 3781a3129944Smrgm4_require([_LT_DECL_OBJDUMP]) 3782a3129944Smrgm4_require([_LT_DECL_DLLTOOL]) 3783a3129944SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3784a3129944Smrglt_cv_sharedlib_from_linklib_cmd, 3785a3129944Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 37869ef0b394Smrg 3787a3129944Smrgcase $host_os in 3788a3129944Smrgcygwin* | mingw* | pw32* | cegcc*) 3789a3129944Smrg # two different shell functions defined in ltmain.sh; 3790a3129944Smrg # decide which one to use based on capabilities of $DLLTOOL 3791a3129944Smrg case `$DLLTOOL --help 2>&1` in 3792a3129944Smrg *--identify-strict*) 3793a3129944Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 37949ef0b394Smrg ;; 37959ef0b394Smrg *) 3796a3129944Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 37979ef0b394Smrg ;; 37989ef0b394Smrg esac 37999ef0b394Smrg ;; 38009ef0b394Smrg*) 3801a3129944Smrg # fallback: assume linklib IS sharedlib 3802a3129944Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 38039ef0b394Smrg ;; 3804a3129944Smrgesac 3805a3129944Smrg]) 3806a3129944Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3807a3129944Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3808c5629e66Smrg 3809a3129944Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3810a3129944Smrg [Command to associate shared and link libraries]) 3811a3129944Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3812c5629e66Smrg 3813c5629e66Smrg 3814a3129944Smrg# _LT_PATH_MANIFEST_TOOL 38159ef0b394Smrg# ---------------------- 3816a3129944Smrg# locate the manifest tool 3817a3129944Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3818a3129944Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3819a3129944Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3820a3129944SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3821a3129944Smrg [lt_cv_path_mainfest_tool=no 3822a3129944Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3823a3129944Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3824a3129944Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3825a3129944Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3826a3129944Smrg lt_cv_path_mainfest_tool=yes 3827a3129944Smrg fi 3828a3129944Smrg rm -f conftest*]) 3829a3129944Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 3830a3129944Smrg MANIFEST_TOOL=: 3831a3129944Smrgfi 3832a3129944Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3833a3129944Smrg])# _LT_PATH_MANIFEST_TOOL 3834c5629e66Smrg 3835c5629e66Smrg 3836a3129944Smrg# _LT_DLL_DEF_P([FILE]) 3837a3129944Smrg# --------------------- 3838a3129944Smrg# True iff FILE is a Windows DLL '.def' file. 3839a3129944Smrg# Keep in sync with func_dll_def_p in the libtool script 3840a3129944SmrgAC_DEFUN([_LT_DLL_DEF_P], 3841a3129944Smrg[dnl 3842a3129944Smrg test DEF = "`$SED -n dnl 3843a3129944Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3844a3129944Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3845a3129944Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3846a3129944Smrg -e q dnl Only consider the first "real" line 3847a3129944Smrg $1`" dnl 3848a3129944Smrg])# _LT_DLL_DEF_P 3849c5629e66Smrg 3850c5629e66Smrg 3851a3129944Smrg# LT_LIB_M 3852a3129944Smrg# -------- 3853a3129944Smrg# check for math library 3854a3129944SmrgAC_DEFUN([LT_LIB_M], 3855a3129944Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3856a3129944SmrgLIBM= 3857a3129944Smrgcase $host in 3858a3129944Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3859a3129944Smrg # These system don't have libm, or don't need it 38609ef0b394Smrg ;; 3861a3129944Smrg*-ncr-sysv4.3*) 3862a3129944Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3863a3129944Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 38649ef0b394Smrg ;; 3865a3129944Smrg*) 3866a3129944Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 38679ef0b394Smrg ;; 3868a3129944Smrgesac 3869a3129944SmrgAC_SUBST([LIBM]) 3870a3129944Smrg])# LT_LIB_M 3871c5629e66Smrg 3872a3129944Smrg# Old name: 3873a3129944SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3874a3129944Smrgdnl aclocal-1.4 backwards compatibility: 3875a3129944Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 38769ef0b394Smrg 38779ef0b394Smrg 3878a3129944Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3879a3129944Smrg# ------------------------------- 3880a3129944Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3881a3129944Smrg[m4_require([_LT_TAG_COMPILER])dnl 38829ef0b394Smrg 3883a3129944Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 38849ef0b394Smrg 3885a3129944Smrgif test yes = "$GCC"; then 3886a3129944Smrg case $cc_basename in 3887a3129944Smrg nvcc*) 3888a3129944Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3889698f425bSmrg *) 3890a3129944Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 38919ef0b394Smrg esac 3892c5629e66Smrg 3893a3129944Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3894a3129944Smrg lt_cv_prog_compiler_rtti_exceptions, 3895a3129944Smrg [-fno-rtti -fno-exceptions], [], 3896a3129944Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3897a3129944Smrgfi 3898a3129944Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3899a3129944Smrg [Compiler flag to turn off builtin functions]) 3900a3129944Smrg])# _LT_COMPILER_NO_RTTI 3901c5629e66Smrg 39029ef0b394Smrg 3903a3129944Smrg# _LT_CMD_GLOBAL_SYMBOLS 3904a3129944Smrg# ---------------------- 3905a3129944Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3906a3129944Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3907a3129944SmrgAC_REQUIRE([AC_PROG_CC])dnl 3908a3129944SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3909a3129944SmrgAC_REQUIRE([LT_PATH_NM])dnl 3910a3129944SmrgAC_REQUIRE([LT_PATH_LD])dnl 3911a3129944Smrgm4_require([_LT_DECL_SED])dnl 3912a3129944Smrgm4_require([_LT_DECL_EGREP])dnl 3913a3129944Smrgm4_require([_LT_TAG_COMPILER])dnl 39149ef0b394Smrg 3915a3129944Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3916a3129944SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3917a3129944SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3918a3129944Smrg[ 3919a3129944Smrg# These are sane defaults that work on at least a few old systems. 3920a3129944Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3921c5629e66Smrg 3922a3129944Smrg# Character class describing NM global symbol codes. 3923a3129944Smrgsymcode='[[BCDEGRST]]' 3924c5629e66Smrg 3925a3129944Smrg# Regexp to match symbols that can be accessed directly from C. 3926a3129944Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3927266e564dSmrg 3928a3129944Smrg# Define system-specific variables. 3929a3129944Smrgcase $host_os in 3930a3129944Smrgaix*) 3931a3129944Smrg symcode='[[BCDT]]' 3932a3129944Smrg ;; 3933a3129944Smrgcygwin* | mingw* | pw32* | cegcc*) 3934a3129944Smrg symcode='[[ABCDGISTW]]' 3935a3129944Smrg ;; 3936a3129944Smrghpux*) 3937a3129944Smrg if test ia64 = "$host_cpu"; then 3938a3129944Smrg symcode='[[ABCDEGRST]]' 39399ef0b394Smrg fi 39409ef0b394Smrg ;; 3941a3129944Smrgirix* | nonstopux*) 3942a3129944Smrg symcode='[[BCDEGRST]]' 39439ef0b394Smrg ;; 3944a3129944Smrgosf*) 3945a3129944Smrg symcode='[[BCDEGQRST]]' 39469ef0b394Smrg ;; 39479ef0b394Smrgsolaris*) 3948a3129944Smrg symcode='[[BDRT]]' 39499ef0b394Smrg ;; 3950a3129944Smrgsco3.2v5*) 3951a3129944Smrg symcode='[[DT]]' 39529ef0b394Smrg ;; 3953a3129944Smrgsysv4.2uw2*) 3954a3129944Smrg symcode='[[DT]]' 39559ef0b394Smrg ;; 3956a3129944Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3957a3129944Smrg symcode='[[ABDT]]' 3958a3129944Smrg ;; 3959a3129944Smrgsysv4) 3960a3129944Smrg symcode='[[DFNSTU]]' 39619ef0b394Smrg ;; 39629ef0b394Smrgesac 3963266e564dSmrg 3964a3129944Smrg# If we're using GNU nm, then use its standard symbol codes. 3965a3129944Smrgcase `$NM -V 2>&1` in 3966a3129944Smrg*GNU* | *'with BFD'*) 3967a3129944Smrg symcode='[[ABCDGIRSTW]]' ;; 3968a3129944Smrgesac 3969266e564dSmrg 3970a3129944Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3971a3129944Smrg # Gets list of data symbols to import. 3972a3129944Smrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3973a3129944Smrg # Adjust the below global symbol transforms to fixup imported variables. 3974a3129944Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3975a3129944Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3976a3129944Smrg lt_c_name_lib_hook="\ 3977a3129944Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3978a3129944Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 39799ef0b394Smrgelse 3980a3129944Smrg # Disable hooks by default. 3981a3129944Smrg lt_cv_sys_global_symbol_to_import= 3982a3129944Smrg lt_cdecl_hook= 3983a3129944Smrg lt_c_name_hook= 3984a3129944Smrg lt_c_name_lib_hook= 39859ef0b394Smrgfi 3986266e564dSmrg 3987a3129944Smrg# Transform an extracted symbol line into a proper C declaration. 3988a3129944Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3989a3129944Smrg# so use this general approach. 3990a3129944Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 3991a3129944Smrg$lt_cdecl_hook\ 3992a3129944Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3993a3129944Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 3994266e564dSmrg 3995a3129944Smrg# Transform an extracted symbol line into symbol name and symbol address 3996a3129944Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 3997a3129944Smrg$lt_c_name_hook\ 3998a3129944Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 3999a3129944Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4000a3129944Smrg 4001a3129944Smrg# Transform an extracted symbol line into symbol name with lib prefix and 4002a3129944Smrg# symbol address. 4003a3129944Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4004a3129944Smrg$lt_c_name_lib_hook\ 4005a3129944Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4006a3129944Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4007a3129944Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4008266e564dSmrg 4009a3129944Smrg# Handle CRLF in mingw tool chain 4010a3129944Smrgopt_cr= 4011a3129944Smrgcase $build_os in 4012a3129944Smrgmingw*) 4013a3129944Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40149ef0b394Smrg ;; 40159ef0b394Smrgesac 4016266e564dSmrg 4017a3129944Smrg# Try without a prefix underscore, then with it. 4018a3129944Smrgfor ac_symprfx in "" "_"; do 4019266e564dSmrg 4020a3129944Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4021a3129944Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4022266e564dSmrg 4023a3129944Smrg # Write the raw and C identifiers. 4024a3129944Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4025a3129944Smrg # Fake it for dumpbin and say T for any non-static function, 4026a3129944Smrg # D for any global variable and I for any imported variable. 4027a3129944Smrg # Also find C++ and __fastcall symbols from MSVC++, 4028a3129944Smrg # which start with @ or ?. 4029a3129944Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4030a3129944Smrg" {last_section=section; section=\$ 3};"\ 4031a3129944Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4032a3129944Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4033a3129944Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4034a3129944Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4035a3129944Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4036a3129944Smrg" \$ 0!~/External *\|/{next};"\ 4037a3129944Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4038a3129944Smrg" {if(hide[section]) next};"\ 4039a3129944Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4040a3129944Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4041a3129944Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4042a3129944Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4043a3129944Smrg" ' prfx=^$ac_symprfx]" 4044a3129944Smrg else 4045a3129944Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40469ef0b394Smrg fi 4047a3129944Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4048698f425bSmrg 4049a3129944Smrg # Check to see that the pipe works correctly. 4050a3129944Smrg pipe_works=no 4051698f425bSmrg 40529ef0b394Smrg rm -f conftest* 40539ef0b394Smrg cat > conftest.$ac_ext <<_LT_EOF 40549ef0b394Smrg#ifdef __cplusplus 40559ef0b394Smrgextern "C" { 40569ef0b394Smrg#endif 40579ef0b394Smrgchar nm_test_var; 40589ef0b394Smrgvoid nm_test_func(void); 40599ef0b394Smrgvoid nm_test_func(void){} 40609ef0b394Smrg#ifdef __cplusplus 40619ef0b394Smrg} 40629ef0b394Smrg#endif 40639ef0b394Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 40649ef0b394Smrg_LT_EOF 40659ef0b394Smrg 40669ef0b394Smrg if AC_TRY_EVAL(ac_compile); then 40679ef0b394Smrg # Now try to grab the symbols. 40689ef0b394Smrg nlist=conftest.nm 40699ef0b394Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 40709ef0b394Smrg # Try sorting and uniquifying the output. 40719ef0b394Smrg if sort "$nlist" | uniq > "$nlist"T; then 40729ef0b394Smrg mv -f "$nlist"T "$nlist" 4073698f425bSmrg else 40749ef0b394Smrg rm -f "$nlist"T 4075698f425bSmrg fi 4076c5629e66Smrg 40779ef0b394Smrg # Make sure that we snagged all the symbols we need. 40789ef0b394Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 40799ef0b394Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 40809ef0b394Smrg cat <<_LT_EOF > conftest.$ac_ext 40819ef0b394Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4082a3129944Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4083a3129944Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 40849ef0b394Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 40859ef0b394Smrg# define LT@&t@_DLSYM_CONST 4086a3129944Smrg#elif defined __osf__ 40879ef0b394Smrg/* This system does not cope well with relocations in const data. */ 40889ef0b394Smrg# define LT@&t@_DLSYM_CONST 40899ef0b394Smrg#else 40909ef0b394Smrg# define LT@&t@_DLSYM_CONST const 40919ef0b394Smrg#endif 40929ef0b394Smrg 40939ef0b394Smrg#ifdef __cplusplus 40949ef0b394Smrgextern "C" { 40959ef0b394Smrg#endif 40969ef0b394Smrg 40979ef0b394Smrg_LT_EOF 40989ef0b394Smrg # Now generate the symbol file. 40999ef0b394Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4100266e564dSmrg 41019ef0b394Smrg cat <<_LT_EOF >> conftest.$ac_ext 4102266e564dSmrg 41039ef0b394Smrg/* The mapping between symbol names and symbols. */ 41049ef0b394SmrgLT@&t@_DLSYM_CONST struct { 41059ef0b394Smrg const char *name; 41069ef0b394Smrg void *address; 41079ef0b394Smrg} 41089ef0b394Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41099ef0b394Smrg{ 41109ef0b394Smrg { "@PROGRAM@", (void *) 0 }, 41119ef0b394Smrg_LT_EOF 4112a3129944Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41139ef0b394Smrg cat <<\_LT_EOF >> conftest.$ac_ext 41149ef0b394Smrg {0, (void *) 0} 41159ef0b394Smrg}; 4116266e564dSmrg 41179ef0b394Smrg/* This works around a problem in FreeBSD linker */ 41189ef0b394Smrg#ifdef FREEBSD_WORKAROUND 41199ef0b394Smrgstatic const void *lt_preloaded_setup() { 41209ef0b394Smrg return lt__PROGRAM__LTX_preloaded_symbols; 41219ef0b394Smrg} 41229ef0b394Smrg#endif 41239ef0b394Smrg 41249ef0b394Smrg#ifdef __cplusplus 41259ef0b394Smrg} 41269ef0b394Smrg#endif 41279ef0b394Smrg_LT_EOF 41289ef0b394Smrg # Now try linking the two files. 41299ef0b394Smrg mv conftest.$ac_objext conftstm.$ac_objext 41309ef0b394Smrg lt_globsym_save_LIBS=$LIBS 41319ef0b394Smrg lt_globsym_save_CFLAGS=$CFLAGS 4132a3129944Smrg LIBS=conftstm.$ac_objext 41339ef0b394Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4134a3129944Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41359ef0b394Smrg pipe_works=yes 41369ef0b394Smrg fi 41379ef0b394Smrg LIBS=$lt_globsym_save_LIBS 41389ef0b394Smrg CFLAGS=$lt_globsym_save_CFLAGS 4139698f425bSmrg else 41409ef0b394Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4141698f425bSmrg fi 4142698f425bSmrg else 41439ef0b394Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4144698f425bSmrg fi 41459ef0b394Smrg else 41469ef0b394Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 41479ef0b394Smrg fi 41489ef0b394Smrg else 41499ef0b394Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41509ef0b394Smrg cat conftest.$ac_ext >&5 41519ef0b394Smrg fi 41529ef0b394Smrg rm -rf conftest* conftst* 4153266e564dSmrg 41549ef0b394Smrg # Do not use the global_symbol_pipe unless it works. 4155a3129944Smrg if test yes = "$pipe_works"; then 41569ef0b394Smrg break 41579ef0b394Smrg else 41589ef0b394Smrg lt_cv_sys_global_symbol_pipe= 41599ef0b394Smrg fi 41609ef0b394Smrgdone 41619ef0b394Smrg]) 41629ef0b394Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 41639ef0b394Smrg lt_cv_sys_global_symbol_to_cdecl= 41649ef0b394Smrgfi 41659ef0b394Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41669ef0b394Smrg AC_MSG_RESULT(failed) 41679ef0b394Smrgelse 41689ef0b394Smrg AC_MSG_RESULT(ok) 41699ef0b394Smrgfi 4170266e564dSmrg 41719ef0b394Smrg# Response file support. 41729ef0b394Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 41739ef0b394Smrg nm_file_list_spec='@' 41749ef0b394Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 41759ef0b394Smrg nm_file_list_spec='@' 41769ef0b394Smrgfi 4177266e564dSmrg 41789ef0b394Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 41799ef0b394Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 41809ef0b394Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 41819ef0b394Smrg [Transform the output of nm in a proper C declaration]) 4182a3129944Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4183a3129944Smrg [Transform the output of nm into a list of symbols to manually relocate]) 41849ef0b394Smrg_LT_DECL([global_symbol_to_c_name_address], 41859ef0b394Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 41869ef0b394Smrg [Transform the output of nm in a C name address pair]) 41879ef0b394Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 41889ef0b394Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 41899ef0b394Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4190a3129944Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4191a3129944Smrg [The name lister interface]) 41929ef0b394Smrg_LT_DECL([], [nm_file_list_spec], [1], 41939ef0b394Smrg [Specify filename containing input files for $NM]) 41949ef0b394Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4195266e564dSmrg 4196266e564dSmrg 41979ef0b394Smrg# _LT_COMPILER_PIC([TAGNAME]) 41989ef0b394Smrg# --------------------------- 41999ef0b394Smrgm4_defun([_LT_COMPILER_PIC], 42009ef0b394Smrg[m4_require([_LT_TAG_COMPILER])dnl 42019ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42029ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42039ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4204266e564dSmrg 42059ef0b394Smrgm4_if([$1], [CXX], [ 42069ef0b394Smrg # C++ specific cases for pic, static, wl, etc. 4207a3129944Smrg if test yes = "$GXX"; then 42089ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42099ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42109ef0b394Smrg 42119ef0b394Smrg case $host_os in 42129ef0b394Smrg aix*) 42139ef0b394Smrg # All AIX code is PIC. 4214a3129944Smrg if test ia64 = "$host_cpu"; then 42159ef0b394Smrg # AIX 5 now supports IA64 processor 42169ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4217698f425bSmrg fi 4218a3129944Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4219698f425bSmrg ;; 4220266e564dSmrg 42219ef0b394Smrg amigaos*) 42229ef0b394Smrg case $host_cpu in 42239ef0b394Smrg powerpc) 42249ef0b394Smrg # see comment about AmigaOS4 .so support 42259ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42269ef0b394Smrg ;; 42279ef0b394Smrg m68k) 42289ef0b394Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4229a3129944Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4230a3129944Smrg # like '-m68040'. 42319ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4232698f425bSmrg ;; 4233698f425bSmrg esac 4234698f425bSmrg ;; 42359ef0b394Smrg 42369ef0b394Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42379ef0b394Smrg # PIC is the default for these OSes. 42389ef0b394Smrg ;; 42399ef0b394Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42409ef0b394Smrg # This hack is so that the source file can tell whether it is being 42419ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 42429ef0b394Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42439ef0b394Smrg # (--disable-auto-import) libraries 42449ef0b394Smrg m4_if([$1], [GCJ], [], 42459ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4246a3129944Smrg case $host_os in 4247a3129944Smrg os2*) 4248a3129944Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4249a3129944Smrg ;; 4250a3129944Smrg esac 42519ef0b394Smrg ;; 42529ef0b394Smrg darwin* | rhapsody*) 42539ef0b394Smrg # PIC is the default on this platform 42549ef0b394Smrg # Common symbols not allowed in MH_DYLIB files 42559ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42569ef0b394Smrg ;; 42579ef0b394Smrg *djgpp*) 42589ef0b394Smrg # DJGPP does not support shared libraries at all 42599ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42609ef0b394Smrg ;; 42619ef0b394Smrg haiku*) 42629ef0b394Smrg # PIC is the default for Haiku. 42639ef0b394Smrg # The "-static" flag exists, but is broken. 42649ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42659ef0b394Smrg ;; 42669ef0b394Smrg interix[[3-9]]*) 42679ef0b394Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42689ef0b394Smrg # Instead, we relocate shared libraries at runtime. 4269698f425bSmrg ;; 4270698f425bSmrg sysv4*MP*) 4271698f425bSmrg if test -d /usr/nec; then 42729ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4273698f425bSmrg fi 4274698f425bSmrg ;; 42759ef0b394Smrg hpux*) 42769ef0b394Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42779ef0b394Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42789ef0b394Smrg # sets the default TLS model and affects inlining. 42799ef0b394Smrg case $host_cpu in 42809ef0b394Smrg hppa*64*) 42819ef0b394Smrg ;; 42829ef0b394Smrg *) 42839ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42849ef0b394Smrg ;; 42859ef0b394Smrg esac 4286698f425bSmrg ;; 42879ef0b394Smrg *qnx* | *nto*) 42889ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42899ef0b394Smrg # it will coredump. 42909ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4291698f425bSmrg ;; 4292698f425bSmrg *) 42939ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4294698f425bSmrg ;; 4295698f425bSmrg esac 42969ef0b394Smrg else 42979ef0b394Smrg case $host_os in 42989ef0b394Smrg aix[[4-9]]*) 42999ef0b394Smrg # All AIX code is PIC. 4300a3129944Smrg if test ia64 = "$host_cpu"; then 43019ef0b394Smrg # AIX 5 now supports IA64 processor 43029ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43039ef0b394Smrg else 43049ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43059ef0b394Smrg fi 43069ef0b394Smrg ;; 43079ef0b394Smrg chorus*) 43089ef0b394Smrg case $cc_basename in 43099ef0b394Smrg cxch68*) 43109ef0b394Smrg # Green Hills C++ Compiler 43119ef0b394Smrg # _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" 43129ef0b394Smrg ;; 43139ef0b394Smrg esac 43149ef0b394Smrg ;; 43159ef0b394Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 43169ef0b394Smrg # This hack is so that the source file can tell whether it is being 43179ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 43189ef0b394Smrg m4_if([$1], [GCJ], [], 43199ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43209ef0b394Smrg ;; 43219ef0b394Smrg dgux*) 43229ef0b394Smrg case $cc_basename in 43239ef0b394Smrg ec++*) 43249ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43259ef0b394Smrg ;; 43269ef0b394Smrg ghcx*) 43279ef0b394Smrg # Green Hills C++ Compiler 43289ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43299ef0b394Smrg ;; 43309ef0b394Smrg *) 43319ef0b394Smrg ;; 43329ef0b394Smrg esac 43339ef0b394Smrg ;; 43349ef0b394Smrg freebsd* | dragonfly*) 43359ef0b394Smrg # FreeBSD uses GNU C++ 43369ef0b394Smrg ;; 43379ef0b394Smrg hpux9* | hpux10* | hpux11*) 43389ef0b394Smrg case $cc_basename in 43399ef0b394Smrg CC*) 43409ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4341a3129944Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4342a3129944Smrg if test ia64 != "$host_cpu"; then 43439ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43449ef0b394Smrg fi 43459ef0b394Smrg ;; 43469ef0b394Smrg aCC*) 43479ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4348a3129944Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43499ef0b394Smrg case $host_cpu in 43509ef0b394Smrg hppa*64*|ia64*) 43519ef0b394Smrg # +Z the default 43529ef0b394Smrg ;; 43539ef0b394Smrg *) 43549ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43559ef0b394Smrg ;; 43569ef0b394Smrg esac 43579ef0b394Smrg ;; 43589ef0b394Smrg *) 43599ef0b394Smrg ;; 43609ef0b394Smrg esac 43619ef0b394Smrg ;; 43629ef0b394Smrg interix*) 43639ef0b394Smrg # This is c89, which is MS Visual C++ (no shared libs) 43649ef0b394Smrg # Anyone wants to do a port? 43659ef0b394Smrg ;; 43669ef0b394Smrg irix5* | irix6* | nonstopux*) 43679ef0b394Smrg case $cc_basename in 43689ef0b394Smrg CC*) 43699ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43709ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43719ef0b394Smrg # CC pic flag -KPIC is the default. 43729ef0b394Smrg ;; 43739ef0b394Smrg *) 43749ef0b394Smrg ;; 43759ef0b394Smrg esac 43769ef0b394Smrg ;; 4377a3129944Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43789ef0b394Smrg case $cc_basename in 43799ef0b394Smrg KCC*) 43809ef0b394Smrg # KAI C++ Compiler 43819ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 43829ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43839ef0b394Smrg ;; 43849ef0b394Smrg ecpc* ) 4385a3129944Smrg # old Intel C++ for x86_64, which still supported -KPIC. 43869ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43879ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43889ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43899ef0b394Smrg ;; 43909ef0b394Smrg icpc* ) 43919ef0b394Smrg # Intel C++, used to be incompatible with GCC. 43929ef0b394Smrg # ICC 10 doesn't accept -KPIC any more. 43939ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43949ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43959ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43969ef0b394Smrg ;; 43979ef0b394Smrg pgCC* | pgcpp*) 43989ef0b394Smrg # Portland Group C++ compiler 43999ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44009ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44019ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44029ef0b394Smrg ;; 44039ef0b394Smrg cxx*) 44049ef0b394Smrg # Compaq C++ 44059ef0b394Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44069ef0b394Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44079ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44089ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44099ef0b394Smrg ;; 44109ef0b394Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44119ef0b394Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44129ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44139ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44149ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44159ef0b394Smrg ;; 44169ef0b394Smrg *) 44179ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 44189ef0b394Smrg *Sun\ C*) 44199ef0b394Smrg # Sun C++ 5.9 44209ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44219ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44229ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44239ef0b394Smrg ;; 44249ef0b394Smrg esac 44259ef0b394Smrg ;; 44269ef0b394Smrg esac 44279ef0b394Smrg ;; 44289ef0b394Smrg lynxos*) 44299ef0b394Smrg ;; 44309ef0b394Smrg m88k*) 44319ef0b394Smrg ;; 44329ef0b394Smrg mvs*) 44339ef0b394Smrg case $cc_basename in 44349ef0b394Smrg cxx*) 44359ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44369ef0b394Smrg ;; 44379ef0b394Smrg *) 44389ef0b394Smrg ;; 44399ef0b394Smrg esac 44409ef0b394Smrg ;; 44419ef0b394Smrg netbsd*) 44429ef0b394Smrg ;; 44439ef0b394Smrg *qnx* | *nto*) 44449ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44459ef0b394Smrg # it will coredump. 44469ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44479ef0b394Smrg ;; 44489ef0b394Smrg osf3* | osf4* | osf5*) 44499ef0b394Smrg case $cc_basename in 44509ef0b394Smrg KCC*) 44519ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44529ef0b394Smrg ;; 44539ef0b394Smrg RCC*) 44549ef0b394Smrg # Rational C++ 2.4.1 44559ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44569ef0b394Smrg ;; 44579ef0b394Smrg cxx*) 44589ef0b394Smrg # Digital/Compaq C++ 44599ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44609ef0b394Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44619ef0b394Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44629ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44639ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44649ef0b394Smrg ;; 44659ef0b394Smrg *) 44669ef0b394Smrg ;; 44679ef0b394Smrg esac 4468698f425bSmrg ;; 44699ef0b394Smrg psos*) 44709ef0b394Smrg ;; 44719ef0b394Smrg solaris*) 44729ef0b394Smrg case $cc_basename in 44739ef0b394Smrg CC* | sunCC*) 44749ef0b394Smrg # Sun C++ 4.2, 5.x and Centerline C++ 44759ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44769ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44779ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44789ef0b394Smrg ;; 44799ef0b394Smrg gcx*) 44809ef0b394Smrg # Green Hills C++ Compiler 44819ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44829ef0b394Smrg ;; 44839ef0b394Smrg *) 44849ef0b394Smrg ;; 44859ef0b394Smrg esac 44869ef0b394Smrg ;; 44879ef0b394Smrg sunos4*) 44889ef0b394Smrg case $cc_basename in 44899ef0b394Smrg CC*) 44909ef0b394Smrg # Sun C++ 4.x 44919ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44929ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44939ef0b394Smrg ;; 44949ef0b394Smrg lcc*) 44959ef0b394Smrg # Lucid 44969ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44979ef0b394Smrg ;; 44989ef0b394Smrg *) 44999ef0b394Smrg ;; 45009ef0b394Smrg esac 45019ef0b394Smrg ;; 45029ef0b394Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45039ef0b394Smrg case $cc_basename in 45049ef0b394Smrg CC*) 45059ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45069ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45079ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45089ef0b394Smrg ;; 45099ef0b394Smrg esac 45109ef0b394Smrg ;; 45119ef0b394Smrg tandem*) 45129ef0b394Smrg case $cc_basename in 45139ef0b394Smrg NCC*) 45149ef0b394Smrg # NonStop-UX NCC 3.20 45159ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45169ef0b394Smrg ;; 45179ef0b394Smrg *) 45189ef0b394Smrg ;; 45199ef0b394Smrg esac 45209ef0b394Smrg ;; 45219ef0b394Smrg vxworks*) 45229ef0b394Smrg ;; 45239ef0b394Smrg *) 45249ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45259ef0b394Smrg ;; 45269ef0b394Smrg esac 45279ef0b394Smrg fi 45289ef0b394Smrg], 4529698f425bSmrg[ 4530a3129944Smrg if test yes = "$GCC"; then 45319ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45329ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4533266e564dSmrg 45349ef0b394Smrg case $host_os in 45359ef0b394Smrg aix*) 45369ef0b394Smrg # All AIX code is PIC. 4537a3129944Smrg if test ia64 = "$host_cpu"; then 45389ef0b394Smrg # AIX 5 now supports IA64 processor 45399ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45409ef0b394Smrg fi 4541a3129944Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45429ef0b394Smrg ;; 4543698f425bSmrg 45449ef0b394Smrg amigaos*) 45459ef0b394Smrg case $host_cpu in 45469ef0b394Smrg powerpc) 45479ef0b394Smrg # see comment about AmigaOS4 .so support 45489ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45499ef0b394Smrg ;; 45509ef0b394Smrg m68k) 45519ef0b394Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4552a3129944Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4553a3129944Smrg # like '-m68040'. 45549ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45559ef0b394Smrg ;; 45569ef0b394Smrg esac 45579ef0b394Smrg ;; 4558698f425bSmrg 45599ef0b394Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45609ef0b394Smrg # PIC is the default for these OSes. 45619ef0b394Smrg ;; 4562698f425bSmrg 45639ef0b394Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 45649ef0b394Smrg # This hack is so that the source file can tell whether it is being 45659ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 45669ef0b394Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 45679ef0b394Smrg # (--disable-auto-import) libraries 45689ef0b394Smrg m4_if([$1], [GCJ], [], 45699ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4570a3129944Smrg case $host_os in 4571a3129944Smrg os2*) 4572a3129944Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4573a3129944Smrg ;; 4574a3129944Smrg esac 45759ef0b394Smrg ;; 4576698f425bSmrg 45779ef0b394Smrg darwin* | rhapsody*) 45789ef0b394Smrg # PIC is the default on this platform 45799ef0b394Smrg # Common symbols not allowed in MH_DYLIB files 45809ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 45819ef0b394Smrg ;; 4582698f425bSmrg 45839ef0b394Smrg haiku*) 45849ef0b394Smrg # PIC is the default for Haiku. 45859ef0b394Smrg # The "-static" flag exists, but is broken. 45869ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 45879ef0b394Smrg ;; 4588266e564dSmrg 45899ef0b394Smrg hpux*) 45909ef0b394Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 45919ef0b394Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 45929ef0b394Smrg # sets the default TLS model and affects inlining. 45939ef0b394Smrg case $host_cpu in 45949ef0b394Smrg hppa*64*) 45959ef0b394Smrg # +Z the default 45969ef0b394Smrg ;; 45979ef0b394Smrg *) 45989ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45999ef0b394Smrg ;; 46009ef0b394Smrg esac 46019ef0b394Smrg ;; 4602266e564dSmrg 46039ef0b394Smrg interix[[3-9]]*) 46049ef0b394Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46059ef0b394Smrg # Instead, we relocate shared libraries at runtime. 46069ef0b394Smrg ;; 4607266e564dSmrg 46089ef0b394Smrg msdosdjgpp*) 46099ef0b394Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46109ef0b394Smrg # on systems that don't support them. 46119ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46129ef0b394Smrg enable_shared=no 46139ef0b394Smrg ;; 4614266e564dSmrg 46159ef0b394Smrg *nto* | *qnx*) 46169ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46179ef0b394Smrg # it will coredump. 46189ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46199ef0b394Smrg ;; 4620266e564dSmrg 46219ef0b394Smrg sysv4*MP*) 46229ef0b394Smrg if test -d /usr/nec; then 46239ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46249ef0b394Smrg fi 46259ef0b394Smrg ;; 4626266e564dSmrg 46279ef0b394Smrg *) 46289ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46299ef0b394Smrg ;; 46309ef0b394Smrg esac 4631266e564dSmrg 46329ef0b394Smrg case $cc_basename in 46339ef0b394Smrg nvcc*) # Cuda Compiler Driver 2.2 46349ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4635fb5e8d76Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4636fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4637fb5e8d76Smrg fi 46389ef0b394Smrg ;; 46399ef0b394Smrg esac 46409ef0b394Smrg else 46419ef0b394Smrg # PORTME Check for flag to pass linker flags through the system compiler. 46429ef0b394Smrg case $host_os in 46439ef0b394Smrg aix*) 46449ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4645a3129944Smrg if test ia64 = "$host_cpu"; then 46469ef0b394Smrg # AIX 5 now supports IA64 processor 46479ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4648698f425bSmrg else 46499ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4650698f425bSmrg fi 46519ef0b394Smrg ;; 4652266e564dSmrg 4653a3129944Smrg darwin* | rhapsody*) 4654a3129944Smrg # PIC is the default on this platform 4655a3129944Smrg # Common symbols not allowed in MH_DYLIB files 4656a3129944Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4657a3129944Smrg case $cc_basename in 4658a3129944Smrg nagfor*) 4659a3129944Smrg # NAG Fortran compiler 4660a3129944Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4661a3129944Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4662a3129944Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4663a3129944Smrg ;; 4664a3129944Smrg esac 4665a3129944Smrg ;; 4666a3129944Smrg 46679ef0b394Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46689ef0b394Smrg # This hack is so that the source file can tell whether it is being 46699ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 46709ef0b394Smrg m4_if([$1], [GCJ], [], 46719ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4672a3129944Smrg case $host_os in 4673a3129944Smrg os2*) 4674a3129944Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4675a3129944Smrg ;; 4676a3129944Smrg esac 46779ef0b394Smrg ;; 4678266e564dSmrg 46799ef0b394Smrg hpux9* | hpux10* | hpux11*) 46809ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46819ef0b394Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 46829ef0b394Smrg # not for PA HP-UX. 46839ef0b394Smrg case $host_cpu in 46849ef0b394Smrg hppa*64*|ia64*) 46859ef0b394Smrg # +Z the default 46869ef0b394Smrg ;; 46879ef0b394Smrg *) 46889ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 46899ef0b394Smrg ;; 46909ef0b394Smrg esac 46919ef0b394Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4692a3129944Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 46939ef0b394Smrg ;; 4694698f425bSmrg 46959ef0b394Smrg irix5* | irix6* | nonstopux*) 46969ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46979ef0b394Smrg # PIC (with -KPIC) is the default. 46989ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 46999ef0b394Smrg ;; 4700266e564dSmrg 4701a3129944Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47029ef0b394Smrg case $cc_basename in 4703a3129944Smrg # old Intel for x86_64, which still supported -KPIC. 47049ef0b394Smrg ecc*) 47059ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47069ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47079ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47089ef0b394Smrg ;; 47099ef0b394Smrg # icc used to be incompatible with GCC. 47109ef0b394Smrg # ICC 10 doesn't accept -KPIC any more. 47119ef0b394Smrg icc* | ifort*) 47129ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47139ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47149ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47159ef0b394Smrg ;; 47169ef0b394Smrg # Lahey Fortran 8.1. 47179ef0b394Smrg lf95*) 47189ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47199ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47209ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47219ef0b394Smrg ;; 47229ef0b394Smrg nagfor*) 47239ef0b394Smrg # NAG Fortran compiler 47249ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47259ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47269ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47279ef0b394Smrg ;; 4728a3129944Smrg tcc*) 4729a3129944Smrg # Fabrice Bellard et al's Tiny C Compiler 4730a3129944Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4731a3129944Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4732a3129944Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4733a3129944Smrg ;; 47349ef0b394Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47359ef0b394Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 47369ef0b394Smrg # which looks to be a dead project) 47379ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47389ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47399ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47409ef0b394Smrg ;; 47419ef0b394Smrg ccc*) 47429ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47439ef0b394Smrg # All Alpha code is PIC. 47449ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47459ef0b394Smrg ;; 47469ef0b394Smrg xl* | bgxl* | bgf* | mpixl*) 47479ef0b394Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47489ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47499ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47509ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47519ef0b394Smrg ;; 47529ef0b394Smrg *) 47539ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 4754fb5e8d76Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47559ef0b394Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47569ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47579ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47589ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47599ef0b394Smrg ;; 4760fb5e8d76Smrg *Sun\ F* | *Sun*Fortran*) 4761fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4762fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4763fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4764fb5e8d76Smrg ;; 47659ef0b394Smrg *Sun\ C*) 47669ef0b394Smrg # Sun C 5.9 47679ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47689ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47699ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47709ef0b394Smrg ;; 4771fb5e8d76Smrg *Intel*\ [[CF]]*Compiler*) 4772fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4773fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4774fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4775fb5e8d76Smrg ;; 4776fb5e8d76Smrg *Portland\ Group*) 4777fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4778fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4779fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4780fb5e8d76Smrg ;; 47819ef0b394Smrg esac 47829ef0b394Smrg ;; 47839ef0b394Smrg esac 47849ef0b394Smrg ;; 4785266e564dSmrg 47869ef0b394Smrg newsos6) 47879ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47889ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47899ef0b394Smrg ;; 4790698f425bSmrg 47919ef0b394Smrg *nto* | *qnx*) 47929ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 47939ef0b394Smrg # it will coredump. 47949ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 47959ef0b394Smrg ;; 4796698f425bSmrg 47979ef0b394Smrg osf3* | osf4* | osf5*) 47989ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47999ef0b394Smrg # All OSF/1 code is PIC. 48009ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48019ef0b394Smrg ;; 4802266e564dSmrg 48039ef0b394Smrg rdos*) 48049ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48059ef0b394Smrg ;; 4806698f425bSmrg 48079ef0b394Smrg solaris*) 48089ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48099ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48109ef0b394Smrg case $cc_basename in 48119ef0b394Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48129ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48139ef0b394Smrg *) 48149ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48159ef0b394Smrg esac 48169ef0b394Smrg ;; 4817266e564dSmrg 48189ef0b394Smrg sunos4*) 48199ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48209ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48219ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48229ef0b394Smrg ;; 4823266e564dSmrg 48249ef0b394Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 48259ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48269ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48279ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48289ef0b394Smrg ;; 4829266e564dSmrg 48309ef0b394Smrg sysv4*MP*) 4831a3129944Smrg if test -d /usr/nec; then 48329ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48339ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48349ef0b394Smrg fi 48359ef0b394Smrg ;; 4836266e564dSmrg 48379ef0b394Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48389ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48399ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48409ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48419ef0b394Smrg ;; 4842698f425bSmrg 48439ef0b394Smrg unicos*) 48449ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48459ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48469ef0b394Smrg ;; 4847266e564dSmrg 48489ef0b394Smrg uts4*) 48499ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48509ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48519ef0b394Smrg ;; 4852266e564dSmrg 48539ef0b394Smrg *) 48549ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48559ef0b394Smrg ;; 48569ef0b394Smrg esac 48579ef0b394Smrg fi 48589ef0b394Smrg]) 48599ef0b394Smrgcase $host_os in 4860a3129944Smrg # For platforms that do not support PIC, -DPIC is meaningless: 48619ef0b394Smrg *djgpp*) 48629ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 48639ef0b394Smrg ;; 48649ef0b394Smrg *) 48659ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48669ef0b394Smrg ;; 48679ef0b394Smrgesac 4868266e564dSmrg 48699ef0b394SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 48709ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 48719ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 48729ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4873266e564dSmrg 48749ef0b394Smrg# 48759ef0b394Smrg# Check to make sure the PIC flag actually works. 48769ef0b394Smrg# 48779ef0b394Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 48789ef0b394Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 48799ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 48809ef0b394Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 48819ef0b394Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 48829ef0b394Smrg "" | " "*) ;; 48839ef0b394Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 48849ef0b394Smrg esac], 48859ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 48869ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 48879ef0b394Smrgfi 48889ef0b394Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 48899ef0b394Smrg [Additional compiler flags for building library objects]) 4890698f425bSmrg 48919ef0b394Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 48929ef0b394Smrg [How to pass a linker flag through the compiler]) 48939ef0b394Smrg# 48949ef0b394Smrg# Check to make sure the static flag actually works. 48959ef0b394Smrg# 48969ef0b394Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 48979ef0b394Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 48989ef0b394Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 48999ef0b394Smrg $lt_tmp_static_flag, 49009ef0b394Smrg [], 49019ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49029ef0b394Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49039ef0b394Smrg [Compiler flag to prevent dynamic linking]) 49049ef0b394Smrg])# _LT_COMPILER_PIC 4905266e564dSmrg 4906698f425bSmrg 49079ef0b394Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 49089ef0b394Smrg# ---------------------------- 49099ef0b394Smrg# See if the linker supports building shared libraries. 49109ef0b394Smrgm4_defun([_LT_LINKER_SHLIBS], 49119ef0b394Smrg[AC_REQUIRE([LT_PATH_LD])dnl 49129ef0b394SmrgAC_REQUIRE([LT_PATH_NM])dnl 49139ef0b394Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49149ef0b394Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49159ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 49169ef0b394Smrgm4_require([_LT_DECL_SED])dnl 49179ef0b394Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49189ef0b394Smrgm4_require([_LT_TAG_COMPILER])dnl 49199ef0b394SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49209ef0b394Smrgm4_if([$1], [CXX], [ 49219ef0b394Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49229ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49239ef0b394Smrg case $host_os in 49249ef0b394Smrg aix[[4-9]]*) 49259ef0b394Smrg # If we're using GNU nm, then we don't want the "-C" option. 4926a3129944Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4927a3129944Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4928a3129944Smrg # weak defined symbols like other global defined symbols, whereas 4929a3129944Smrg # GNU nm marks them as "W". 4930a3129944Smrg # While the 'weak' keyword is ignored in the Export File, we need 4931a3129944Smrg # it in the Import File for the 'aix-soname' feature, so we have 4932a3129944Smrg # to replace the "-B" option with "-P" for AIX nm. 49339ef0b394Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4934a3129944Smrg _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' 49359ef0b394Smrg else 4936a3129944Smrg _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' 49379ef0b394Smrg fi 49389ef0b394Smrg ;; 49399ef0b394Smrg pw32*) 4940a3129944Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49419ef0b394Smrg ;; 49429ef0b394Smrg cygwin* | mingw* | cegcc*) 49439ef0b394Smrg case $cc_basename in 4944fb5e8d76Smrg cl*) 4945fb5e8d76Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4946fb5e8d76Smrg ;; 49479ef0b394Smrg *) 49489ef0b394Smrg _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' 49499ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49509ef0b394Smrg ;; 49519ef0b394Smrg esac 49529ef0b394Smrg ;; 49539ef0b394Smrg *) 49549ef0b394Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49559ef0b394Smrg ;; 49569ef0b394Smrg esac 49579ef0b394Smrg], [ 49589ef0b394Smrg runpath_var= 49599ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 49609ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=no 49619ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)= 49629ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 49639ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 49649ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49659ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49669ef0b394Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49679ef0b394Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 49689ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 49699ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49709ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49719ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 49729ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 49739ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49749ef0b394Smrg _LT_TAGVAR(inherit_rpath, $1)=no 49759ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 49769ef0b394Smrg _LT_TAGVAR(module_cmds, $1)= 49779ef0b394Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 49789ef0b394Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 49799ef0b394Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 49809ef0b394Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 49819ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49829ef0b394Smrg # include_expsyms should be a list of space-separated symbols to be *always* 49839ef0b394Smrg # included in the symbol list 49849ef0b394Smrg _LT_TAGVAR(include_expsyms, $1)= 49859ef0b394Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4986a3129944Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 4987a3129944Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4988a3129944Smrg # as well as any symbol that contains 'd'. 49899ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49909ef0b394Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 49919ef0b394Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 49929ef0b394Smrg # the symbol is explicitly referenced. Since portable code cannot 49939ef0b394Smrg # rely on this symbol name, it's probably fine to never include it in 49949ef0b394Smrg # preloaded symbol tables. 49959ef0b394Smrg # Exclude shared library initialization/finalization symbols. 49969ef0b394Smrgdnl Note also adjust exclude_expsyms for C++ above. 49979ef0b394Smrg extract_expsyms_cmds= 4998698f425bSmrg 49999ef0b394Smrg case $host_os in 50009ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 50019ef0b394Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 50029ef0b394Smrg # When not using gcc, we currently assume that we are using 50039ef0b394Smrg # Microsoft Visual C++. 5004a3129944Smrg if test yes != "$GCC"; then 50059ef0b394Smrg with_gnu_ld=no 50069ef0b394Smrg fi 50079ef0b394Smrg ;; 50089ef0b394Smrg interix*) 50099ef0b394Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 50109ef0b394Smrg with_gnu_ld=yes 50119ef0b394Smrg ;; 5012a3129944Smrg openbsd* | bitrig*) 50139ef0b394Smrg with_gnu_ld=no 50149ef0b394Smrg ;; 50159ef0b394Smrg esac 5016266e564dSmrg 50179ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5018698f425bSmrg 50199ef0b394Smrg # On some targets, GNU ld is compatible enough with the native linker 50209ef0b394Smrg # that we're better off using the native interface for both. 50219ef0b394Smrg lt_use_gnu_ld_interface=no 5022a3129944Smrg if test yes = "$with_gnu_ld"; then 50239ef0b394Smrg case $host_os in 50249ef0b394Smrg aix*) 50259ef0b394Smrg # The AIX port of GNU ld has always aspired to compatibility 50269ef0b394Smrg # with the native linker. However, as the warning in the GNU ld 50279ef0b394Smrg # block says, versions before 2.19.5* couldn't really create working 50289ef0b394Smrg # shared libraries, regardless of the interface used. 50299ef0b394Smrg case `$LD -v 2>&1` in 50309ef0b394Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50319ef0b394Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50329ef0b394Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50339ef0b394Smrg *) 50349ef0b394Smrg lt_use_gnu_ld_interface=yes 5035698f425bSmrg ;; 50369ef0b394Smrg esac 50379ef0b394Smrg ;; 50389ef0b394Smrg *) 50399ef0b394Smrg lt_use_gnu_ld_interface=yes 50409ef0b394Smrg ;; 50419ef0b394Smrg esac 50429ef0b394Smrg fi 5043266e564dSmrg 5044a3129944Smrg if test yes = "$lt_use_gnu_ld_interface"; then 50459ef0b394Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5046a3129944Smrg wlarc='$wl' 5047698f425bSmrg 50489ef0b394Smrg # Set some defaults for GNU ld with shared library support. These 50499ef0b394Smrg # are reset later if shared libraries are not supported. Putting them 50509ef0b394Smrg # here allows them to be overridden if necessary. 50519ef0b394Smrg runpath_var=LD_RUN_PATH 5052a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5053a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50549ef0b394Smrg # ancient GNU ld didn't support --whole-archive et. al. 50559ef0b394Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5056a3129944Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50579ef0b394Smrg else 50589ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50599ef0b394Smrg fi 50609ef0b394Smrg supports_anon_versioning=no 5061a3129944Smrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 50629ef0b394Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 50639ef0b394Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50649ef0b394Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50659ef0b394Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50669ef0b394Smrg *\ 2.11.*) ;; # other 2.11 versions 50679ef0b394Smrg *) supports_anon_versioning=yes ;; 50689ef0b394Smrg esac 5069698f425bSmrg 50709ef0b394Smrg # See if GNU ld supports shared libraries. 50719ef0b394Smrg case $host_os in 50729ef0b394Smrg aix[[3-9]]*) 50739ef0b394Smrg # On AIX/PPC, the GNU linker is very broken 5074a3129944Smrg if test ia64 != "$host_cpu"; then 50759ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 50769ef0b394Smrg cat <<_LT_EOF 1>&2 5077698f425bSmrg 50789ef0b394Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 50799ef0b394Smrg*** to be unable to reliably create shared libraries on AIX. 50809ef0b394Smrg*** Therefore, libtool is disabling shared libraries support. If you 50819ef0b394Smrg*** really care for shared libraries, you may want to install binutils 50829ef0b394Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 50839ef0b394Smrg*** You will then need to restart the configuration process. 5084266e564dSmrg 50859ef0b394Smrg_LT_EOF 50869ef0b394Smrg fi 50879ef0b394Smrg ;; 5088266e564dSmrg 50899ef0b394Smrg amigaos*) 50909ef0b394Smrg case $host_cpu in 50919ef0b394Smrg powerpc) 50929ef0b394Smrg # see comment about AmigaOS4 .so support 5093a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 50949ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 50959ef0b394Smrg ;; 50969ef0b394Smrg m68k) 50979ef0b394Smrg _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)' 50989ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50999ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51009ef0b394Smrg ;; 51019ef0b394Smrg esac 51029ef0b394Smrg ;; 5103266e564dSmrg 51049ef0b394Smrg beos*) 51059ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51069ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51079ef0b394Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51089ef0b394Smrg # support --undefined. This deserves some investigation. FIXME 5109a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51109ef0b394Smrg else 51119ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51129ef0b394Smrg fi 51139ef0b394Smrg ;; 5114698f425bSmrg 51159ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 51169ef0b394Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51179ef0b394Smrg # as there is no search path for DLLs. 51189ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5119a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51209ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51219ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=no 51229ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51239ef0b394Smrg _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' 51249ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51259ef0b394Smrg 51269ef0b394Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5127a3129944Smrg _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' 5128a3129944Smrg # If the export-symbols file already is a .def file, use it as 5129a3129944Smrg # is; otherwise, prepend EXPORTS... 5130a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5131a3129944Smrg cp $export_symbols $output_objdir/$soname.def; 5132a3129944Smrg else 5133a3129944Smrg echo EXPORTS > $output_objdir/$soname.def; 5134a3129944Smrg cat $export_symbols >> $output_objdir/$soname.def; 5135a3129944Smrg fi~ 5136a3129944Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51379ef0b394Smrg else 51389ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51399ef0b394Smrg fi 51409ef0b394Smrg ;; 51419ef0b394Smrg 51429ef0b394Smrg haiku*) 5143a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51449ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51459ef0b394Smrg ;; 51469ef0b394Smrg 5147a3129944Smrg os2*) 5148a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5149a3129944Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5150a3129944Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5151a3129944Smrg shrext_cmds=.dll 5152a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5153a3129944Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5154a3129944Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5155a3129944Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5156a3129944Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5157a3129944Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5158a3129944Smrg emximp -o $lib $output_objdir/$libname.def' 5159a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5160a3129944Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5161a3129944Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5162a3129944Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5163a3129944Smrg prefix_cmds="$SED"~ 5164a3129944Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5165a3129944Smrg prefix_cmds="$prefix_cmds -e 1d"; 5166a3129944Smrg fi~ 5167a3129944Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5168a3129944Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5169a3129944Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5170a3129944Smrg emximp -o $lib $output_objdir/$libname.def' 5171a3129944Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5172a3129944Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5173a3129944Smrg ;; 5174a3129944Smrg 51759ef0b394Smrg interix[[3-9]]*) 51769ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 51779ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5178a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5179a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 51809ef0b394Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 51819ef0b394Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 51829ef0b394Smrg # default) and relocated if they conflict, which is a slow very memory 51839ef0b394Smrg # consuming and fragmenting process. To avoid this, we pick a random, 51849ef0b394Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 51859ef0b394Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5186a3129944Smrg _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' 5187a3129944Smrg _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' 51889ef0b394Smrg ;; 5189698f425bSmrg 51909ef0b394Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 51919ef0b394Smrg tmp_diet=no 5192a3129944Smrg if test linux-dietlibc = "$host_os"; then 51939ef0b394Smrg case $cc_basename in 51949ef0b394Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5195698f425bSmrg esac 51969ef0b394Smrg fi 51979ef0b394Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5198a3129944Smrg && test no = "$tmp_diet" 51999ef0b394Smrg then 52009ef0b394Smrg tmp_addflag=' $pic_flag' 52019ef0b394Smrg tmp_sharedflag='-shared' 52029ef0b394Smrg case $cc_basename,$host_cpu in 52039ef0b394Smrg pgcc*) # Portland Group C compiler 5204a3129944Smrg _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' 52059ef0b394Smrg tmp_addflag=' $pic_flag' 52069ef0b394Smrg ;; 52079ef0b394Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 52089ef0b394Smrg # Portland Group f77 and f90 compilers 5209a3129944Smrg _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' 52109ef0b394Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 52119ef0b394Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52129ef0b394Smrg tmp_addflag=' -i_dynamic' ;; 52139ef0b394Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52149ef0b394Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52159ef0b394Smrg ifc* | ifort*) # Intel Fortran compiler 52169ef0b394Smrg tmp_addflag=' -nofor_main' ;; 52179ef0b394Smrg lf95*) # Lahey Fortran 8.1 52189ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52199ef0b394Smrg tmp_sharedflag='--shared' ;; 5220a3129944Smrg nagfor*) # NAGFOR 5.3 5221a3129944Smrg tmp_sharedflag='-Wl,-shared' ;; 52229ef0b394Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52239ef0b394Smrg tmp_sharedflag='-qmkshrobj' 52249ef0b394Smrg tmp_addflag= ;; 52259ef0b394Smrg nvcc*) # Cuda Compiler Driver 2.2 5226a3129944Smrg _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' 52279ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52289ef0b394Smrg ;; 52299ef0b394Smrg esac 52309ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 52319ef0b394Smrg *Sun\ C*) # Sun C 5.9 5232a3129944Smrg _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' 52339ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52349ef0b394Smrg tmp_sharedflag='-G' ;; 52359ef0b394Smrg *Sun\ F*) # Sun Fortran 8.3 52369ef0b394Smrg tmp_sharedflag='-G' ;; 52379ef0b394Smrg esac 5238a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5239266e564dSmrg 5240a3129944Smrg if test yes = "$supports_anon_versioning"; then 52419ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5242a3129944Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5243a3129944Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5244a3129944Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52459ef0b394Smrg fi 5246266e564dSmrg 52479ef0b394Smrg case $cc_basename in 5248a3129944Smrg tcc*) 5249a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5250a3129944Smrg ;; 52519ef0b394Smrg xlf* | bgf* | bgxlf* | mpixlf*) 52529ef0b394Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52539ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5254a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52559ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5256a3129944Smrg if test yes = "$supports_anon_versioning"; then 52579ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5258a3129944Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5259a3129944Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5260a3129944Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52619ef0b394Smrg fi 52629ef0b394Smrg ;; 52639ef0b394Smrg esac 52649ef0b394Smrg else 5265698f425bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 52669ef0b394Smrg fi 52679ef0b394Smrg ;; 5268266e564dSmrg 52699ef0b394Smrg netbsd*) 52709ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 52719ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 52729ef0b394Smrg wlarc= 52739ef0b394Smrg else 5274a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5275a3129944Smrg _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' 52769ef0b394Smrg fi 52779ef0b394Smrg ;; 5278266e564dSmrg 52799ef0b394Smrg solaris*) 52809ef0b394Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 52819ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52829ef0b394Smrg cat <<_LT_EOF 1>&2 5283266e564dSmrg 52849ef0b394Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 52859ef0b394Smrg*** create shared libraries on Solaris systems. Therefore, libtool 52869ef0b394Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 52879ef0b394Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 52889ef0b394Smrg*** your PATH or compiler configuration so that the native linker is 52899ef0b394Smrg*** used, and then restart. 5290266e564dSmrg 52919ef0b394Smrg_LT_EOF 52929ef0b394Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5293a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5294a3129944Smrg _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' 52959ef0b394Smrg else 5296698f425bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 52979ef0b394Smrg fi 52989ef0b394Smrg ;; 5299266e564dSmrg 53009ef0b394Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53019ef0b394Smrg case `$LD -v 2>&1` in 53029ef0b394Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53039ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53049ef0b394Smrg cat <<_LT_EOF 1>&2 53059ef0b394Smrg 5306a3129944Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53079ef0b394Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53089ef0b394Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53099ef0b394Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53109ef0b394Smrg*** your PATH or compiler configuration so that the native linker is 53119ef0b394Smrg*** used, and then restart. 53129ef0b394Smrg 53139ef0b394Smrg_LT_EOF 53149ef0b394Smrg ;; 53159ef0b394Smrg *) 53169ef0b394Smrg # For security reasons, it is highly recommended that you always 53179ef0b394Smrg # use absolute paths for naming shared libraries, and exclude the 53189ef0b394Smrg # DT_RUNPATH tag from executables and libraries. But doing so 53199ef0b394Smrg # requires that you compile everything twice, which is a pain. 53209ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5321a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5322a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5323a3129944Smrg _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' 53249ef0b394Smrg else 53259ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5326698f425bSmrg fi 5327698f425bSmrg ;; 53289ef0b394Smrg esac 53299ef0b394Smrg ;; 5330266e564dSmrg 53319ef0b394Smrg sunos4*) 53329ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53339ef0b394Smrg wlarc= 53349ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53359ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53369ef0b394Smrg ;; 5337698f425bSmrg 53389ef0b394Smrg *) 53399ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5340a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5341a3129944Smrg _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' 53429ef0b394Smrg else 53439ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53449ef0b394Smrg fi 53459ef0b394Smrg ;; 53469ef0b394Smrg esac 5347698f425bSmrg 5348a3129944Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53499ef0b394Smrg runpath_var= 53509ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53519ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53529ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53539ef0b394Smrg fi 53549ef0b394Smrg else 53559ef0b394Smrg # PORTME fill in a description of your system's linker (not GNU ld) 53569ef0b394Smrg case $host_os in 53579ef0b394Smrg aix3*) 53589ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53599ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 53609ef0b394Smrg _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' 53619ef0b394Smrg # Note: this linker hardcodes the directories in LIBPATH if there 53629ef0b394Smrg # are no directories specified by -L. 53639ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5364a3129944Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53659ef0b394Smrg # Neither direct hardcoding nor static linking is supported with a 53669ef0b394Smrg # broken collect2. 53679ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 53689ef0b394Smrg fi 53699ef0b394Smrg ;; 5370698f425bSmrg 53719ef0b394Smrg aix[[4-9]]*) 5372a3129944Smrg if test ia64 = "$host_cpu"; then 53739ef0b394Smrg # On IA64, the linker does run time linking by default, so we don't 53749ef0b394Smrg # have to do anything special. 53759ef0b394Smrg aix_use_runtimelinking=no 53769ef0b394Smrg exp_sym_flag='-Bexport' 5377a3129944Smrg no_entry_flag= 53789ef0b394Smrg else 53799ef0b394Smrg # If we're using GNU nm, then we don't want the "-C" option. 5380a3129944Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5381a3129944Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5382a3129944Smrg # weak defined symbols like other global defined symbols, whereas 5383a3129944Smrg # GNU nm marks them as "W". 5384a3129944Smrg # While the 'weak' keyword is ignored in the Export File, we need 5385a3129944Smrg # it in the Import File for the 'aix-soname' feature, so we have 5386a3129944Smrg # to replace the "-B" option with "-P" for AIX nm. 53879ef0b394Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5388a3129944Smrg _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' 53899ef0b394Smrg else 5390a3129944Smrg _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' 53919ef0b394Smrg fi 53929ef0b394Smrg aix_use_runtimelinking=no 5393266e564dSmrg 53949ef0b394Smrg # Test if we are trying to use run time linking or normal 53959ef0b394Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5396a3129944Smrg # have runtime linking enabled, and use it for executables. 5397a3129944Smrg # For shared libraries, we enable/disable runtime linking 5398a3129944Smrg # depending on the kind of the shared library created - 5399a3129944Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 5400a3129944Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5401a3129944Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 5402a3129944Smrg # lib.a static archive 5403a3129944Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5404a3129944Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 5405a3129944Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5406a3129944Smrg # lib.a(lib.so.V) shared, rtl:no 5407a3129944Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5408a3129944Smrg # lib.a static archive 54099ef0b394Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54109ef0b394Smrg for ld_flag in $LDFLAGS; do 5411a3129944Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54129ef0b394Smrg aix_use_runtimelinking=yes 54139ef0b394Smrg break 54149ef0b394Smrg fi 54159ef0b394Smrg done 5416a3129944Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5417a3129944Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5418a3129944Smrg # so we don't have lib.a shared libs to link our executables. 5419a3129944Smrg # We have to force runtime linking in this case. 5420a3129944Smrg aix_use_runtimelinking=yes 5421a3129944Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5422a3129944Smrg fi 54239ef0b394Smrg ;; 54249ef0b394Smrg esac 5425266e564dSmrg 54269ef0b394Smrg exp_sym_flag='-bexport' 54279ef0b394Smrg no_entry_flag='-bnoentry' 54289ef0b394Smrg fi 5429698f425bSmrg 54309ef0b394Smrg # When large executables or shared objects are built, AIX ld can 54319ef0b394Smrg # have problems creating the table of contents. If linking a library 54329ef0b394Smrg # or program results in "error TOC overflow" add -mminimal-toc to 54339ef0b394Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54349ef0b394Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5435698f425bSmrg 54369ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='' 54379ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54389ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54399ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54409ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5441a3129944Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5442a3129944Smrg case $with_aix_soname,$aix_use_runtimelinking in 5443a3129944Smrg aix,*) ;; # traditional, no import file 5444a3129944Smrg svr4,* | *,yes) # use import file 5445a3129944Smrg # The Import File defines what to hardcode. 5446a3129944Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5447a3129944Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5448a3129944Smrg ;; 5449a3129944Smrg esac 5450698f425bSmrg 5451a3129944Smrg if test yes = "$GCC"; then 54529ef0b394Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54539ef0b394Smrg # We only want to do this on AIX 4.2 and lower, the check 54549ef0b394Smrg # below for broken collect2 doesn't work under 4.3+ 5455a3129944Smrg collect2name=`$CC -print-prog-name=collect2` 54569ef0b394Smrg if test -f "$collect2name" && 54579ef0b394Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54589ef0b394Smrg then 54599ef0b394Smrg # We have reworked collect2 54609ef0b394Smrg : 54619ef0b394Smrg else 54629ef0b394Smrg # We have old collect2 54639ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54649ef0b394Smrg # It fails to find uninstalled libraries when the uninstalled 54659ef0b394Smrg # path is not listed in the libpath. Setting hardcode_minus_L 54669ef0b394Smrg # to unsupported forces relinking 54679ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54689ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54699ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 54709ef0b394Smrg fi 54719ef0b394Smrg ;; 54729ef0b394Smrg esac 54739ef0b394Smrg shared_flag='-shared' 5474a3129944Smrg if test yes = "$aix_use_runtimelinking"; then 5475a3129944Smrg shared_flag="$shared_flag "'$wl-G' 54769ef0b394Smrg fi 5477a3129944Smrg # Need to ensure runtime linking is disabled for the traditional 5478a3129944Smrg # shared library, or the linker may eventually find shared libraries 5479a3129944Smrg # /with/ Import File - we do not want to mix them. 5480a3129944Smrg shared_flag_aix='-shared' 5481a3129944Smrg shared_flag_svr4='-shared $wl-G' 54829ef0b394Smrg else 54839ef0b394Smrg # not using gcc 5484a3129944Smrg if test ia64 = "$host_cpu"; then 54859ef0b394Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 54869ef0b394Smrg # chokes on -Wl,-G. The following line is correct: 54879ef0b394Smrg shared_flag='-G' 54889ef0b394Smrg else 5489a3129944Smrg if test yes = "$aix_use_runtimelinking"; then 5490a3129944Smrg shared_flag='$wl-G' 54919ef0b394Smrg else 5492a3129944Smrg shared_flag='$wl-bM:SRE' 54939ef0b394Smrg fi 5494a3129944Smrg shared_flag_aix='$wl-bM:SRE' 5495a3129944Smrg shared_flag_svr4='$wl-G' 54969ef0b394Smrg fi 54979ef0b394Smrg fi 5498266e564dSmrg 5499a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55009ef0b394Smrg # It seems that -bexpall does not export symbols beginning with 55019ef0b394Smrg # underscore (_), so it is better to generate a list of symbols to export. 55029ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5503a3129944Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55049ef0b394Smrg # Warning - without using the other runtime loading flags (-brtl), 55059ef0b394Smrg # -berok will link without error, but may produce a broken library. 55069ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55079ef0b394Smrg # Determine the default libpath from the value encoded in an 55089ef0b394Smrg # empty executable. 55099ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5510a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5511a3129944Smrg _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 55129ef0b394Smrg else 5513a3129944Smrg if test ia64 = "$host_cpu"; then 5514a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55159ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5516a3129944Smrg _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" 55179ef0b394Smrg else 55189ef0b394Smrg # Determine the default libpath from the value encoded in an 55199ef0b394Smrg # empty executable. 55209ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5521a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55229ef0b394Smrg # Warning - without using the other run time loading flags, 55239ef0b394Smrg # -berok will link without error, but may produce a broken library. 5524a3129944Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5525a3129944Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5526a3129944Smrg if test yes = "$with_gnu_ld"; then 55279ef0b394Smrg # We only use this code for GNU lds that support --whole-archive. 5528a3129944Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55299ef0b394Smrg else 55309ef0b394Smrg # Exported symbols can be pulled into shared objects from archives 55319ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55329ef0b394Smrg fi 55339ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5534a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5535a3129944Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5536a3129944Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5537a3129944Smrg if test svr4 != "$with_aix_soname"; then 5538a3129944Smrg # This is similar to how AIX traditionally builds its shared libraries. 5539a3129944Smrg _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' 5540a3129944Smrg fi 5541a3129944Smrg if test aix != "$with_aix_soname"; then 5542a3129944Smrg _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' 5543a3129944Smrg else 5544a3129944Smrg # used by -dlpreopen to get the symbols 5545a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5546a3129944Smrg fi 5547a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55489ef0b394Smrg fi 55499ef0b394Smrg fi 55509ef0b394Smrg ;; 5551266e564dSmrg 55529ef0b394Smrg amigaos*) 55539ef0b394Smrg case $host_cpu in 55549ef0b394Smrg powerpc) 55559ef0b394Smrg # see comment about AmigaOS4 .so support 5556a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55579ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55589ef0b394Smrg ;; 55599ef0b394Smrg m68k) 55609ef0b394Smrg _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)' 55619ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55629ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5563698f425bSmrg ;; 55649ef0b394Smrg esac 55659ef0b394Smrg ;; 5566266e564dSmrg 55679ef0b394Smrg bsdi[[45]]*) 55689ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 55699ef0b394Smrg ;; 5570698f425bSmrg 55719ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 55729ef0b394Smrg # When not using gcc, we currently assume that we are using 55739ef0b394Smrg # Microsoft Visual C++. 55749ef0b394Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 55759ef0b394Smrg # no search path for DLLs. 55769ef0b394Smrg case $cc_basename in 55779ef0b394Smrg cl*) 55789ef0b394Smrg # Native MSVC 55799ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 55809ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 55819ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55829ef0b394Smrg _LT_TAGVAR(file_list_spec, $1)='@' 55839ef0b394Smrg # Tell ltmain to make .lib files, not .a files. 55849ef0b394Smrg libext=lib 55859ef0b394Smrg # Tell ltmain to make .dll files, not .so files. 5586a3129944Smrg shrext_cmds=.dll 55879ef0b394Smrg # FIXME: Setting linknames here is a bad hack. 5588a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5589a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5590a3129944Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 5591a3129944Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5592a3129944Smrg else 5593a3129944Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5594a3129944Smrg fi~ 5595a3129944Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5596a3129944Smrg linknames=' 55979ef0b394Smrg # The linker will not automatically build a static lib if we build a DLL. 55989ef0b394Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 55999ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5600fb5e8d76Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56019ef0b394Smrg _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' 56029ef0b394Smrg # Don't use ranlib 56039ef0b394Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 56049ef0b394Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5605a3129944Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5606a3129944Smrg case $lt_outputfile in 5607a3129944Smrg *.exe|*.EXE) ;; 5608a3129944Smrg *) 5609a3129944Smrg lt_outputfile=$lt_outputfile.exe 5610a3129944Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 5611a3129944Smrg ;; 5612a3129944Smrg esac~ 5613a3129944Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5614a3129944Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5615a3129944Smrg $RM "$lt_outputfile.manifest"; 5616a3129944Smrg fi' 56179ef0b394Smrg ;; 56189ef0b394Smrg *) 56199ef0b394Smrg # Assume MSVC wrapper 56209ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56219ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56229ef0b394Smrg # Tell ltmain to make .lib files, not .a files. 56239ef0b394Smrg libext=lib 56249ef0b394Smrg # Tell ltmain to make .dll files, not .so files. 5625a3129944Smrg shrext_cmds=.dll 56269ef0b394Smrg # FIXME: Setting linknames here is a bad hack. 56279ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56289ef0b394Smrg # The linker will automatically build a .lib file if we build a DLL. 56299ef0b394Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56309ef0b394Smrg # FIXME: Should let the user specify the lib program. 56319ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56329ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56339ef0b394Smrg ;; 56349ef0b394Smrg esac 56359ef0b394Smrg ;; 5636266e564dSmrg 56379ef0b394Smrg darwin* | rhapsody*) 56389ef0b394Smrg _LT_DARWIN_LINKER_FEATURES($1) 56399ef0b394Smrg ;; 5640266e564dSmrg 56419ef0b394Smrg dgux*) 56429ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56439ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56449ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56459ef0b394Smrg ;; 5646266e564dSmrg 56479ef0b394Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56489ef0b394Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 56499ef0b394Smrg # does not break anything, and helps significantly (at the cost of a little 56509ef0b394Smrg # extra space). 56519ef0b394Smrg freebsd2.2*) 56529ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56539ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56549ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56559ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56569ef0b394Smrg ;; 56579ef0b394Smrg 56589ef0b394Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5659fb5e8d76Smrg freebsd2.*) 56609ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56619ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56629ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56639ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56649ef0b394Smrg ;; 5665698f425bSmrg 56669ef0b394Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 56679ef0b394Smrg freebsd* | dragonfly*) 56689ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 56699ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56709ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56719ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56729ef0b394Smrg ;; 5673698f425bSmrg 56749ef0b394Smrg hpux9*) 5675a3129944Smrg if test yes = "$GCC"; then 5676a3129944Smrg _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' 56779ef0b394Smrg else 5678a3129944Smrg _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' 56799ef0b394Smrg fi 5680a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 56819ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 56829ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5683698f425bSmrg 56849ef0b394Smrg # hardcode_minus_L: Not really in the search PATH, 56859ef0b394Smrg # but as the default location of the library. 56869ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5687a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 56889ef0b394Smrg ;; 5689266e564dSmrg 56909ef0b394Smrg hpux10*) 5691a3129944Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5692a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 56939ef0b394Smrg else 56949ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 56959ef0b394Smrg fi 5696a3129944Smrg if test no = "$with_gnu_ld"; then 5697a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 56989ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 56999ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57009ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5701a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57029ef0b394Smrg # hardcode_minus_L: Not really in the search PATH, 57039ef0b394Smrg # but as the default location of the library. 57049ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57059ef0b394Smrg fi 57069ef0b394Smrg ;; 5707266e564dSmrg 57089ef0b394Smrg hpux11*) 5709a3129944Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 57109ef0b394Smrg case $host_cpu in 57119ef0b394Smrg hppa*64*) 5712a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57139ef0b394Smrg ;; 57149ef0b394Smrg ia64*) 5715a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5716698f425bSmrg ;; 5717698f425bSmrg *) 5718a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5719698f425bSmrg ;; 57209ef0b394Smrg esac 57219ef0b394Smrg else 57229ef0b394Smrg case $host_cpu in 57239ef0b394Smrg hppa*64*) 5724a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57259ef0b394Smrg ;; 57269ef0b394Smrg ia64*) 5727a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57289ef0b394Smrg ;; 57299ef0b394Smrg *) 57309ef0b394Smrg m4_if($1, [], [ 57319ef0b394Smrg # Older versions of the 11.00 compiler do not understand -b yet 57329ef0b394Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57339ef0b394Smrg _LT_LINKER_OPTION([if $CC understands -b], 57349ef0b394Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5735a3129944Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57369ef0b394Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5737a3129944Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57389ef0b394Smrg ;; 57399ef0b394Smrg esac 57409ef0b394Smrg fi 5741a3129944Smrg if test no = "$with_gnu_ld"; then 5742a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57439ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5744266e564dSmrg 57459ef0b394Smrg case $host_cpu in 57469ef0b394Smrg hppa*64*|ia64*) 57479ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57489ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57499ef0b394Smrg ;; 57509ef0b394Smrg *) 57519ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57529ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5753a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5754266e564dSmrg 57559ef0b394Smrg # hardcode_minus_L: Not really in the search PATH, 57569ef0b394Smrg # but as the default location of the library. 57579ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57589ef0b394Smrg ;; 5759698f425bSmrg esac 57609ef0b394Smrg fi 5761698f425bSmrg ;; 5762266e564dSmrg 57639ef0b394Smrg irix5* | irix6* | nonstopux*) 5764a3129944Smrg if test yes = "$GCC"; then 5765a3129944Smrg _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' 57669ef0b394Smrg # Try to use the -exported_symbol ld option, if it does not 57679ef0b394Smrg # work, assume that -exports_file does not work either and 57689ef0b394Smrg # implicitly export all symbols. 57699ef0b394Smrg # This should be the same for all languages, so no per-tag cache variable. 57709ef0b394Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 57719ef0b394Smrg [lt_cv_irix_exported_symbol], 5772a3129944Smrg [save_LDFLAGS=$LDFLAGS 5773a3129944Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 57749ef0b394Smrg AC_LINK_IFELSE( 57759ef0b394Smrg [AC_LANG_SOURCE( 57769ef0b394Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 57779ef0b394Smrg [C++], [[int foo (void) { return 0; }]], 57789ef0b394Smrg [Fortran 77], [[ 57799ef0b394Smrg subroutine foo 57809ef0b394Smrg end]], 57819ef0b394Smrg [Fortran], [[ 57829ef0b394Smrg subroutine foo 57839ef0b394Smrg end]])])], 57849ef0b394Smrg [lt_cv_irix_exported_symbol=yes], 57859ef0b394Smrg [lt_cv_irix_exported_symbol=no]) 5786a3129944Smrg LDFLAGS=$save_LDFLAGS]) 5787a3129944Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 5788a3129944Smrg _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' 57899ef0b394Smrg fi 57909ef0b394Smrg else 5791a3129944Smrg _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' 5792a3129944Smrg _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' 57939ef0b394Smrg fi 57949ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5795a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 57969ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57979ef0b394Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 57989ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 57999ef0b394Smrg ;; 5800266e564dSmrg 5801a3129944Smrg linux*) 5802a3129944Smrg case $cc_basename in 5803a3129944Smrg tcc*) 5804a3129944Smrg # Fabrice Bellard et al's Tiny C Compiler 5805a3129944Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5806a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5807a3129944Smrg ;; 5808a3129944Smrg esac 5809a3129944Smrg ;; 5810a3129944Smrg 58119ef0b394Smrg netbsd*) 58129ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58139ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58149ef0b394Smrg else 58159ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58169ef0b394Smrg fi 58179ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58189ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58199ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58209ef0b394Smrg ;; 5821266e564dSmrg 58229ef0b394Smrg newsos6) 58239ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58249ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5825a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58269ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58279ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58289ef0b394Smrg ;; 5829698f425bSmrg 58309ef0b394Smrg *nto* | *qnx*) 58319ef0b394Smrg ;; 5832698f425bSmrg 5833a3129944Smrg openbsd* | bitrig*) 58349ef0b394Smrg if test -f /usr/libexec/ld.so; then 58359ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58369ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58379ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5838a3129944Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58399ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5840a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5841a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5842a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58439ef0b394Smrg else 5844a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5845a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58469ef0b394Smrg fi 58479ef0b394Smrg else 58489ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58499ef0b394Smrg fi 58509ef0b394Smrg ;; 5851698f425bSmrg 58529ef0b394Smrg os2*) 58539ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58549ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58559ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5856a3129944Smrg shrext_cmds=.dll 5857a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5858a3129944Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5859a3129944Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5860a3129944Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5861a3129944Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5862a3129944Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5863a3129944Smrg emximp -o $lib $output_objdir/$libname.def' 5864a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5865a3129944Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5866a3129944Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5867a3129944Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5868a3129944Smrg prefix_cmds="$SED"~ 5869a3129944Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5870a3129944Smrg prefix_cmds="$prefix_cmds -e 1d"; 5871a3129944Smrg fi~ 5872a3129944Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5873a3129944Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5874a3129944Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5875a3129944Smrg emximp -o $lib $output_objdir/$libname.def' 5876a3129944Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5877a3129944Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58789ef0b394Smrg ;; 5879698f425bSmrg 58809ef0b394Smrg osf3*) 5881a3129944Smrg if test yes = "$GCC"; then 5882a3129944Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5883a3129944Smrg _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' 58849ef0b394Smrg else 58859ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5886a3129944Smrg _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' 58879ef0b394Smrg fi 58889ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5889a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58909ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58919ef0b394Smrg ;; 5892266e564dSmrg 58939ef0b394Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5894a3129944Smrg if test yes = "$GCC"; then 5895a3129944Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5896a3129944Smrg _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' 5897a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58989ef0b394Smrg else 58999ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5900a3129944Smrg _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' 59019ef0b394Smrg _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~ 5902a3129944Smrg $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' 5903266e564dSmrg 59049ef0b394Smrg # Both c and cxx compiler support -rpath directly 59059ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59069ef0b394Smrg fi 59079ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59089ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59099ef0b394Smrg ;; 5910266e564dSmrg 59119ef0b394Smrg solaris*) 59129ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5913a3129944Smrg if test yes = "$GCC"; then 5914a3129944Smrg wlarc='$wl' 5915a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59169ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5917a3129944Smrg $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' 59189ef0b394Smrg else 59199ef0b394Smrg case `$CC -V 2>&1` in 59209ef0b394Smrg *"Compilers 5.0"*) 59219ef0b394Smrg wlarc='' 5922a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59239ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5924a3129944Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59259ef0b394Smrg ;; 59269ef0b394Smrg *) 5927a3129944Smrg wlarc='$wl' 5928a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59299ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5930a3129944Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59319ef0b394Smrg ;; 59329ef0b394Smrg esac 59339ef0b394Smrg fi 59349ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59359ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59369ef0b394Smrg case $host_os in 59379ef0b394Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59389ef0b394Smrg *) 59399ef0b394Smrg # The compiler driver will combine and reorder linker options, 5940a3129944Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59419ef0b394Smrg # but is careful enough not to reorder. 59429ef0b394Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5943a3129944Smrg if test yes = "$GCC"; then 5944a3129944Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59459ef0b394Smrg else 59469ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59479ef0b394Smrg fi 59489ef0b394Smrg ;; 59499ef0b394Smrg esac 59509ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59519ef0b394Smrg ;; 5952266e564dSmrg 59539ef0b394Smrg sunos4*) 5954a3129944Smrg if test sequent = "$host_vendor"; then 59559ef0b394Smrg # Use $CC to link under sequent, because it throws in some extra .o 59569ef0b394Smrg # files that make .init and .fini sections work. 5957a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59589ef0b394Smrg else 59599ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59609ef0b394Smrg fi 59619ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59629ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 59639ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59649ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59659ef0b394Smrg ;; 5966266e564dSmrg 59679ef0b394Smrg sysv4) 59689ef0b394Smrg case $host_vendor in 59699ef0b394Smrg sni) 59709ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59719ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 59729ef0b394Smrg ;; 59739ef0b394Smrg siemens) 59749ef0b394Smrg ## LD is ld it makes a PLAMLIB 59759ef0b394Smrg ## CC just makes a GrossModule. 59769ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 59779ef0b394Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 59789ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 59799ef0b394Smrg ;; 59809ef0b394Smrg motorola) 59819ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59829ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 59839ef0b394Smrg ;; 59849ef0b394Smrg esac 59859ef0b394Smrg runpath_var='LD_RUN_PATH' 59869ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59879ef0b394Smrg ;; 5988266e564dSmrg 59899ef0b394Smrg sysv4.3*) 59909ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59919ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59929ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 59939ef0b394Smrg ;; 5994266e564dSmrg 59959ef0b394Smrg sysv4*MP*) 59969ef0b394Smrg if test -d /usr/nec; then 59979ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59989ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59999ef0b394Smrg runpath_var=LD_RUN_PATH 60009ef0b394Smrg hardcode_runpath_var=yes 60019ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 60029ef0b394Smrg fi 60039ef0b394Smrg ;; 6004266e564dSmrg 60059ef0b394Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6006a3129944Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60079ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60089ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60099ef0b394Smrg runpath_var='LD_RUN_PATH' 6010266e564dSmrg 6011a3129944Smrg if test yes = "$GCC"; then 6012a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6013a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60149ef0b394Smrg else 6015a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6016a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60179ef0b394Smrg fi 60189ef0b394Smrg ;; 6019266e564dSmrg 60209ef0b394Smrg sysv5* | sco3.2v5* | sco5v6*) 6021a3129944Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 60229ef0b394Smrg # link with -lc, and that would cause any symbols used from libc to 60239ef0b394Smrg # always be unresolved, which means just about no library would 60249ef0b394Smrg # ever link correctly. If we're not using GNU ld we use -z text 60259ef0b394Smrg # though, which does catch some bad symbols but isn't as heavy-handed 60269ef0b394Smrg # as -z defs. 6027a3129944Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6028a3129944Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60299ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60309ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6031a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60329ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60339ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6034a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60359ef0b394Smrg runpath_var='LD_RUN_PATH' 6036266e564dSmrg 6037a3129944Smrg if test yes = "$GCC"; then 6038a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6039a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60409ef0b394Smrg else 6041a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6042a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60439ef0b394Smrg fi 60449ef0b394Smrg ;; 60459ef0b394Smrg 60469ef0b394Smrg uts4*) 60479ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60489ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60499ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60509ef0b394Smrg ;; 6051266e564dSmrg 60529ef0b394Smrg *) 60539ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60549ef0b394Smrg ;; 6055698f425bSmrg esac 6056266e564dSmrg 6057a3129944Smrg if test sni = "$host_vendor"; then 60589ef0b394Smrg case $host in 60599ef0b394Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6060a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60619ef0b394Smrg ;; 60629ef0b394Smrg esac 60639ef0b394Smrg fi 60649ef0b394Smrg fi 60659ef0b394Smrg]) 60669ef0b394SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6067a3129944Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6068266e564dSmrg 60699ef0b394Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6070266e564dSmrg 60719ef0b394Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 60729ef0b394Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 60739ef0b394Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 60749ef0b394Smrg [The commands to extract the exported symbol list from a shared archive]) 6075266e564dSmrg 60769ef0b394Smrg# 60779ef0b394Smrg# Do we need to explicitly link libc? 60789ef0b394Smrg# 60799ef0b394Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 60809ef0b394Smrgx|xyes) 60819ef0b394Smrg # Assume -lc should be added 60829ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6083266e564dSmrg 6084a3129944Smrg if test yes,yes = "$GCC,$enable_shared"; then 60859ef0b394Smrg case $_LT_TAGVAR(archive_cmds, $1) in 60869ef0b394Smrg *'~'*) 60879ef0b394Smrg # FIXME: we may have to deal with multi-command sequences. 6088698f425bSmrg ;; 60899ef0b394Smrg '$CC '*) 60909ef0b394Smrg # Test whether the compiler implicitly links with -lc since on some 60919ef0b394Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 60929ef0b394Smrg # to ld, don't add -lc before -lgcc. 60939ef0b394Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 60949ef0b394Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 60959ef0b394Smrg [$RM conftest* 60969ef0b394Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 60979ef0b394Smrg 60989ef0b394Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 60999ef0b394Smrg soname=conftest 61009ef0b394Smrg lib=conftest 61019ef0b394Smrg libobjs=conftest.$ac_objext 61029ef0b394Smrg deplibs= 61039ef0b394Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61049ef0b394Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61059ef0b394Smrg compiler_flags=-v 61069ef0b394Smrg linker_flags=-v 61079ef0b394Smrg verstring= 61089ef0b394Smrg output_objdir=. 61099ef0b394Smrg libname=conftest 61109ef0b394Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61119ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 61129ef0b394Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61139ef0b394Smrg then 61149ef0b394Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61159ef0b394Smrg else 61169ef0b394Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61179ef0b394Smrg fi 61189ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61199ef0b394Smrg else 61209ef0b394Smrg cat conftest.err 1>&5 61219ef0b394Smrg fi 61229ef0b394Smrg $RM conftest* 61239ef0b394Smrg ]) 61249ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6125698f425bSmrg ;; 6126698f425bSmrg esac 61279ef0b394Smrg fi 6128698f425bSmrg ;; 6129698f425bSmrgesac 6130266e564dSmrg 61319ef0b394Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61329ef0b394Smrg [Whether or not to add -lc for building shared libraries]) 61339ef0b394Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61349ef0b394Smrg [enable_shared_with_static_runtimes], [0], 61359ef0b394Smrg [Whether or not to disallow shared libs when runtime libs are static]) 61369ef0b394Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61379ef0b394Smrg [Compiler flag to allow reflexive dlopens]) 61389ef0b394Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61399ef0b394Smrg [Compiler flag to generate shared objects directly from archives]) 61409ef0b394Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 61419ef0b394Smrg [Whether the compiler copes with passing no objects directly]) 61429ef0b394Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61439ef0b394Smrg [Create an old-style archive from a shared archive]) 61449ef0b394Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61459ef0b394Smrg [Create a temporary old-style archive to link instead of a shared archive]) 61469ef0b394Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61479ef0b394Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61489ef0b394Smrg_LT_TAGDECL([], [module_cmds], [2], 61499ef0b394Smrg [Commands used to build a loadable module if different from building 61509ef0b394Smrg a shared archive.]) 61519ef0b394Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61529ef0b394Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 61539ef0b394Smrg [Whether we are building with GNU ld or not]) 61549ef0b394Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61559ef0b394Smrg [Flag that allows shared libraries with undefined symbols to be built]) 61569ef0b394Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 61579ef0b394Smrg [Flag that enforces no undefined symbols]) 61589ef0b394Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61599ef0b394Smrg [Flag to hardcode $libdir into a binary during linking. 61609ef0b394Smrg This must work even if $libdir does not exist]) 61619ef0b394Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61629ef0b394Smrg [Whether we need a single "-rpath" flag with a separated argument]) 61639ef0b394Smrg_LT_TAGDECL([], [hardcode_direct], [0], 6164a3129944Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61659ef0b394Smrg DIR into the resulting binary]) 61669ef0b394Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6167a3129944Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61689ef0b394Smrg DIR into the resulting binary and the resulting library dependency is 6169a3129944Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 61709ef0b394Smrg library is relocated]) 61719ef0b394Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 61729ef0b394Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 61739ef0b394Smrg into the resulting binary]) 61749ef0b394Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 61759ef0b394Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 61769ef0b394Smrg into the resulting binary]) 61779ef0b394Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 61789ef0b394Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 61799ef0b394Smrg into the library and all subsequent libraries and executables linked 61809ef0b394Smrg against it]) 61819ef0b394Smrg_LT_TAGDECL([], [inherit_rpath], [0], 61829ef0b394Smrg [Set to yes if linker adds runtime paths of dependent libraries 61839ef0b394Smrg to runtime path list]) 61849ef0b394Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 61859ef0b394Smrg [Whether libtool must link a program against all its dependency libraries]) 61869ef0b394Smrg_LT_TAGDECL([], [always_export_symbols], [0], 61879ef0b394Smrg [Set to "yes" if exported symbols are required]) 61889ef0b394Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 61899ef0b394Smrg [The commands to list exported symbols]) 61909ef0b394Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 61919ef0b394Smrg [Symbols that should not be listed in the preloaded symbols]) 61929ef0b394Smrg_LT_TAGDECL([], [include_expsyms], [1], 61939ef0b394Smrg [Symbols that must always be exported]) 61949ef0b394Smrg_LT_TAGDECL([], [prelink_cmds], [2], 61959ef0b394Smrg [Commands necessary for linking programs (against libraries) with templates]) 61969ef0b394Smrg_LT_TAGDECL([], [postlink_cmds], [2], 61979ef0b394Smrg [Commands necessary for finishing linking programs]) 61989ef0b394Smrg_LT_TAGDECL([], [file_list_spec], [1], 61999ef0b394Smrg [Specify filename containing input files]) 62009ef0b394Smrgdnl FIXME: Not yet implemented 62019ef0b394Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62029ef0b394Smrgdnl [Compiler flag to generate thread safe objects]) 62039ef0b394Smrg])# _LT_LINKER_SHLIBS 62049ef0b394Smrg 62059ef0b394Smrg 62069ef0b394Smrg# _LT_LANG_C_CONFIG([TAG]) 62079ef0b394Smrg# ------------------------ 62089ef0b394Smrg# Ensure that the configuration variables for a C compiler are suitably 62099ef0b394Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6210a3129944Smrg# the compiler configuration to 'libtool'. 62119ef0b394Smrgm4_defun([_LT_LANG_C_CONFIG], 62129ef0b394Smrg[m4_require([_LT_DECL_EGREP])dnl 6213a3129944Smrglt_save_CC=$CC 62149ef0b394SmrgAC_LANG_PUSH(C) 62159ef0b394Smrg 62169ef0b394Smrg# Source file extension for C test sources. 62179ef0b394Smrgac_ext=c 62189ef0b394Smrg 62199ef0b394Smrg# Object file extension for compiled C test sources. 62209ef0b394Smrgobjext=o 62219ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 62229ef0b394Smrg 62239ef0b394Smrg# Code to be used in simple compile tests 62249ef0b394Smrglt_simple_compile_test_code="int some_variable = 0;" 62259ef0b394Smrg 62269ef0b394Smrg# Code to be used in simple link tests 62279ef0b394Smrglt_simple_link_test_code='int main(){return(0);}' 62289ef0b394Smrg 62299ef0b394Smrg_LT_TAG_COMPILER 62309ef0b394Smrg# Save the default compiler, since it gets overwritten when the other 62319ef0b394Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62329ef0b394Smrgcompiler_DEFAULT=$CC 62339ef0b394Smrg 62349ef0b394Smrg# save warnings/boilerplate of simple test code 62359ef0b394Smrg_LT_COMPILER_BOILERPLATE 62369ef0b394Smrg_LT_LINKER_BOILERPLATE 62379ef0b394Smrg 62389ef0b394Smrgif test -n "$compiler"; then 62399ef0b394Smrg _LT_COMPILER_NO_RTTI($1) 62409ef0b394Smrg _LT_COMPILER_PIC($1) 62419ef0b394Smrg _LT_COMPILER_C_O($1) 62429ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 62439ef0b394Smrg _LT_LINKER_SHLIBS($1) 62449ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 62459ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 62469ef0b394Smrg LT_SYS_DLOPEN_SELF 62479ef0b394Smrg _LT_CMD_STRIPLIB 62489ef0b394Smrg 6249a3129944Smrg # Report what library types will actually be built 62509ef0b394Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62519ef0b394Smrg AC_MSG_RESULT([$can_build_shared]) 62529ef0b394Smrg 62539ef0b394Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6254a3129944Smrg test no = "$can_build_shared" && enable_shared=no 6255698f425bSmrg 62569ef0b394Smrg # On AIX, shared libraries and static libraries use the same namespace, and 62579ef0b394Smrg # are all built from PIC. 62589ef0b394Smrg case $host_os in 62599ef0b394Smrg aix3*) 6260a3129944Smrg test yes = "$enable_shared" && enable_static=no 62619ef0b394Smrg if test -n "$RANLIB"; then 62629ef0b394Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 62639ef0b394Smrg postinstall_cmds='$RANLIB $lib' 62649ef0b394Smrg fi 62659ef0b394Smrg ;; 6266698f425bSmrg 62679ef0b394Smrg aix[[4-9]]*) 6268a3129944Smrg if test ia64 != "$host_cpu"; then 6269a3129944Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6270a3129944Smrg yes,aix,yes) ;; # shared object as lib.so file only 6271a3129944Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 6272a3129944Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6273a3129944Smrg esac 62749ef0b394Smrg fi 62759ef0b394Smrg ;; 62769ef0b394Smrg esac 62779ef0b394Smrg AC_MSG_RESULT([$enable_shared]) 6278266e564dSmrg 62799ef0b394Smrg AC_MSG_CHECKING([whether to build static libraries]) 62809ef0b394Smrg # Make sure either enable_shared or enable_static is yes. 6281a3129944Smrg test yes = "$enable_shared" || enable_static=yes 62829ef0b394Smrg AC_MSG_RESULT([$enable_static]) 62839ef0b394Smrg 62849ef0b394Smrg _LT_CONFIG($1) 62859ef0b394Smrgfi 62869ef0b394SmrgAC_LANG_POP 6287a3129944SmrgCC=$lt_save_CC 62889ef0b394Smrg])# _LT_LANG_C_CONFIG 6289266e564dSmrg 6290266e564dSmrg 62919ef0b394Smrg# _LT_LANG_CXX_CONFIG([TAG]) 6292698f425bSmrg# -------------------------- 62939ef0b394Smrg# Ensure that the configuration variables for a C++ compiler are suitably 62949ef0b394Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6295a3129944Smrg# the compiler configuration to 'libtool'. 62969ef0b394Smrgm4_defun([_LT_LANG_CXX_CONFIG], 62979ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 62989ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 62999ef0b394Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6300a3129944Smrgif test -n "$CXX" && ( test no != "$CXX" && 6301a3129944Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6302a3129944Smrg (test g++ != "$CXX"))); then 63039ef0b394Smrg AC_PROG_CXXCPP 63049ef0b394Smrgelse 63059ef0b394Smrg _lt_caught_CXX_error=yes 63069ef0b394Smrgfi 6307266e564dSmrg 63089ef0b394SmrgAC_LANG_PUSH(C++) 6309698f425bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6310698f425bSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6311698f425bSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6312698f425bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63139ef0b394Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6314698f425bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6315698f425bSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6316698f425bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6317698f425bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6318698f425bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6319698f425bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63209ef0b394Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6321698f425bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6322698f425bSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6323698f425bSmrg_LT_TAGVAR(module_cmds, $1)= 6324698f425bSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6325698f425bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6326698f425bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 63279ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 63289ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6329698f425bSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6330698f425bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6331698f425bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6332266e564dSmrg 63339ef0b394Smrg# Source file extension for C++ test sources. 63349ef0b394Smrgac_ext=cpp 6335266e564dSmrg 63369ef0b394Smrg# Object file extension for compiled C++ test sources. 6337698f425bSmrgobjext=o 6338698f425bSmrg_LT_TAGVAR(objext, $1)=$objext 6339698f425bSmrg 6340698f425bSmrg# No sense in running all these tests if we already determined that 63419ef0b394Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6342698f425bSmrg# are currently assumed to apply to all compilers on this platform, 6343698f425bSmrg# and will be corrupted by setting them based on a non-working compiler. 6344a3129944Smrgif test yes != "$_lt_caught_CXX_error"; then 6345698f425bSmrg # Code to be used in simple compile tests 63469ef0b394Smrg lt_simple_compile_test_code="int some_variable = 0;" 6347266e564dSmrg 6348698f425bSmrg # Code to be used in simple link tests 63499ef0b394Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6350266e564dSmrg 6351698f425bSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6352698f425bSmrg _LT_TAG_COMPILER 6353266e564dSmrg 6354698f425bSmrg # save warnings/boilerplate of simple test code 6355698f425bSmrg _LT_COMPILER_BOILERPLATE 6356698f425bSmrg _LT_LINKER_BOILERPLATE 6357266e564dSmrg 6358698f425bSmrg # Allow CC to be a program name with arguments. 63599ef0b394Smrg lt_save_CC=$CC 63609ef0b394Smrg lt_save_CFLAGS=$CFLAGS 63619ef0b394Smrg lt_save_LD=$LD 6362698f425bSmrg lt_save_GCC=$GCC 63639ef0b394Smrg GCC=$GXX 63649ef0b394Smrg lt_save_with_gnu_ld=$with_gnu_ld 63659ef0b394Smrg lt_save_path_LD=$lt_cv_path_LD 63669ef0b394Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 63679ef0b394Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63689ef0b394Smrg else 63699ef0b394Smrg $as_unset lt_cv_prog_gnu_ld 63709ef0b394Smrg fi 63719ef0b394Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 63729ef0b394Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 63739ef0b394Smrg else 63749ef0b394Smrg $as_unset lt_cv_path_LD 63759ef0b394Smrg fi 63769ef0b394Smrg test -z "${LDCXX+set}" || LD=$LDCXX 63779ef0b394Smrg CC=${CXX-"c++"} 63789ef0b394Smrg CFLAGS=$CXXFLAGS 6379698f425bSmrg compiler=$CC 6380698f425bSmrg _LT_TAGVAR(compiler, $1)=$CC 6381698f425bSmrg _LT_CC_BASENAME([$compiler]) 6382698f425bSmrg 63839ef0b394Smrg if test -n "$compiler"; then 63849ef0b394Smrg # We don't want -fno-exception when compiling C++ code, so set the 63859ef0b394Smrg # no_builtin_flag separately 6386a3129944Smrg if test yes = "$GXX"; then 63879ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 63889ef0b394Smrg else 63899ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 63909ef0b394Smrg fi 6391266e564dSmrg 6392a3129944Smrg if test yes = "$GXX"; then 63939ef0b394Smrg # Set up default GNU C++ configuration 6394266e564dSmrg 63959ef0b394Smrg LT_PATH_LD 6396266e564dSmrg 63979ef0b394Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 63989ef0b394Smrg # archiving commands below assume that GNU ld is being used. 6399a3129944Smrg if test yes = "$with_gnu_ld"; then 6400a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6401a3129944Smrg _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' 6402266e564dSmrg 6403a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6404a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6405266e564dSmrg 64069ef0b394Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 64079ef0b394Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64089ef0b394Smrg # investigate it a little bit more. (MM) 6409a3129944Smrg wlarc='$wl' 6410698f425bSmrg 64119ef0b394Smrg # ancient GNU ld didn't support --whole-archive et. al. 64129ef0b394Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64139ef0b394Smrg $GREP 'no-whole-archive' > /dev/null; then 6414a3129944Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64159ef0b394Smrg else 64169ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64179ef0b394Smrg fi 64189ef0b394Smrg else 64199ef0b394Smrg with_gnu_ld=no 64209ef0b394Smrg wlarc= 6421698f425bSmrg 64229ef0b394Smrg # A generic and very simple default shared library creation 64239ef0b394Smrg # command for GNU C++ for the case where it uses the native 64249ef0b394Smrg # linker, instead of GNU ld. If possible, this setting should 64259ef0b394Smrg # overridden to take advantage of the native linker features on 64269ef0b394Smrg # the platform it is being used on. 64279ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64289ef0b394Smrg fi 6429698f425bSmrg 64309ef0b394Smrg # Commands to make compiler produce verbose output that lists 64319ef0b394Smrg # what "hidden" libraries, object files and flags are used when 64329ef0b394Smrg # linking a shared library. 64339ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6434698f425bSmrg 64359ef0b394Smrg else 64369ef0b394Smrg GXX=no 64379ef0b394Smrg with_gnu_ld=no 64389ef0b394Smrg wlarc= 64399ef0b394Smrg fi 6440266e564dSmrg 64419ef0b394Smrg # PORTME: fill in a description of your system's C++ link characteristics 64429ef0b394Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64439ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 64449ef0b394Smrg case $host_os in 64459ef0b394Smrg aix3*) 64469ef0b394Smrg # FIXME: insert proper C++ library support 64479ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 64489ef0b394Smrg ;; 64499ef0b394Smrg aix[[4-9]]*) 6450a3129944Smrg if test ia64 = "$host_cpu"; then 64519ef0b394Smrg # On IA64, the linker does run time linking by default, so we don't 64529ef0b394Smrg # have to do anything special. 64539ef0b394Smrg aix_use_runtimelinking=no 64549ef0b394Smrg exp_sym_flag='-Bexport' 6455a3129944Smrg no_entry_flag= 64569ef0b394Smrg else 64579ef0b394Smrg aix_use_runtimelinking=no 6458266e564dSmrg 64599ef0b394Smrg # Test if we are trying to use run time linking or normal 64609ef0b394Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6461a3129944Smrg # have runtime linking enabled, and use it for executables. 6462a3129944Smrg # For shared libraries, we enable/disable runtime linking 6463a3129944Smrg # depending on the kind of the shared library created - 6464a3129944Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 6465a3129944Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6466a3129944Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 6467a3129944Smrg # lib.a static archive 6468a3129944Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6469a3129944Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 6470a3129944Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6471a3129944Smrg # lib.a(lib.so.V) shared, rtl:no 6472a3129944Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6473a3129944Smrg # lib.a static archive 64749ef0b394Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 64759ef0b394Smrg for ld_flag in $LDFLAGS; do 64769ef0b394Smrg case $ld_flag in 64779ef0b394Smrg *-brtl*) 64789ef0b394Smrg aix_use_runtimelinking=yes 64799ef0b394Smrg break 64809ef0b394Smrg ;; 64819ef0b394Smrg esac 64829ef0b394Smrg done 6483a3129944Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6484a3129944Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6485a3129944Smrg # so we don't have lib.a shared libs to link our executables. 6486a3129944Smrg # We have to force runtime linking in this case. 6487a3129944Smrg aix_use_runtimelinking=yes 6488a3129944Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6489a3129944Smrg fi 64909ef0b394Smrg ;; 64919ef0b394Smrg esac 6492266e564dSmrg 64939ef0b394Smrg exp_sym_flag='-bexport' 64949ef0b394Smrg no_entry_flag='-bnoentry' 64959ef0b394Smrg fi 6496266e564dSmrg 64979ef0b394Smrg # When large executables or shared objects are built, AIX ld can 64989ef0b394Smrg # have problems creating the table of contents. If linking a library 64999ef0b394Smrg # or program results in "error TOC overflow" add -mminimal-toc to 65009ef0b394Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65019ef0b394Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6502698f425bSmrg 65039ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='' 65049ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65059ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65069ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65079ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6508a3129944Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6509a3129944Smrg case $with_aix_soname,$aix_use_runtimelinking in 6510a3129944Smrg aix,*) ;; # no import file 6511a3129944Smrg svr4,* | *,yes) # use import file 6512a3129944Smrg # The Import File defines what to hardcode. 6513a3129944Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6514a3129944Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6515a3129944Smrg ;; 6516a3129944Smrg esac 6517698f425bSmrg 6518a3129944Smrg if test yes = "$GXX"; then 65199ef0b394Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65209ef0b394Smrg # We only want to do this on AIX 4.2 and lower, the check 65219ef0b394Smrg # below for broken collect2 doesn't work under 4.3+ 6522a3129944Smrg collect2name=`$CC -print-prog-name=collect2` 65239ef0b394Smrg if test -f "$collect2name" && 65249ef0b394Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65259ef0b394Smrg then 65269ef0b394Smrg # We have reworked collect2 65279ef0b394Smrg : 65289ef0b394Smrg else 65299ef0b394Smrg # We have old collect2 65309ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65319ef0b394Smrg # It fails to find uninstalled libraries when the uninstalled 65329ef0b394Smrg # path is not listed in the libpath. Setting hardcode_minus_L 65339ef0b394Smrg # to unsupported forces relinking 65349ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65359ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65369ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65379ef0b394Smrg fi 65389ef0b394Smrg esac 65399ef0b394Smrg shared_flag='-shared' 6540a3129944Smrg if test yes = "$aix_use_runtimelinking"; then 6541a3129944Smrg shared_flag=$shared_flag' $wl-G' 65429ef0b394Smrg fi 6543a3129944Smrg # Need to ensure runtime linking is disabled for the traditional 6544a3129944Smrg # shared library, or the linker may eventually find shared libraries 6545a3129944Smrg # /with/ Import File - we do not want to mix them. 6546a3129944Smrg shared_flag_aix='-shared' 6547a3129944Smrg shared_flag_svr4='-shared $wl-G' 65489ef0b394Smrg else 65499ef0b394Smrg # not using gcc 6550a3129944Smrg if test ia64 = "$host_cpu"; then 65519ef0b394Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65529ef0b394Smrg # chokes on -Wl,-G. The following line is correct: 65539ef0b394Smrg shared_flag='-G' 65549ef0b394Smrg else 6555a3129944Smrg if test yes = "$aix_use_runtimelinking"; then 6556a3129944Smrg shared_flag='$wl-G' 65579ef0b394Smrg else 6558a3129944Smrg shared_flag='$wl-bM:SRE' 65599ef0b394Smrg fi 6560a3129944Smrg shared_flag_aix='$wl-bM:SRE' 6561a3129944Smrg shared_flag_svr4='$wl-G' 65629ef0b394Smrg fi 65639ef0b394Smrg fi 6564266e564dSmrg 6565a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 65669ef0b394Smrg # It seems that -bexpall does not export symbols beginning with 65679ef0b394Smrg # underscore (_), so it is better to generate a list of symbols to 65689ef0b394Smrg # export. 65699ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6570a3129944Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 65719ef0b394Smrg # Warning - without using the other runtime loading flags (-brtl), 65729ef0b394Smrg # -berok will link without error, but may produce a broken library. 6573a3129944Smrg # The "-G" linker flag allows undefined symbols. 6574a3129944Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 65759ef0b394Smrg # Determine the default libpath from the value encoded in an empty 65769ef0b394Smrg # executable. 65779ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6578a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6579698f425bSmrg 6580a3129944Smrg _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 65819ef0b394Smrg else 6582a3129944Smrg if test ia64 = "$host_cpu"; then 6583a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 65849ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6585a3129944Smrg _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" 65869ef0b394Smrg else 65879ef0b394Smrg # Determine the default libpath from the value encoded in an 65889ef0b394Smrg # empty executable. 65899ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6590a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65919ef0b394Smrg # Warning - without using the other run time loading flags, 65929ef0b394Smrg # -berok will link without error, but may produce a broken library. 6593a3129944Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6594a3129944Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6595a3129944Smrg if test yes = "$with_gnu_ld"; then 65969ef0b394Smrg # We only use this code for GNU lds that support --whole-archive. 6597a3129944Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 65989ef0b394Smrg else 65999ef0b394Smrg # Exported symbols can be pulled into shared objects from archives 66009ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66019ef0b394Smrg fi 66029ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6603a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6604a3129944Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6605a3129944Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6606a3129944Smrg if test svr4 != "$with_aix_soname"; then 6607a3129944Smrg # This is similar to how AIX traditionally builds its shared 6608a3129944Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6609a3129944Smrg _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' 6610a3129944Smrg fi 6611a3129944Smrg if test aix != "$with_aix_soname"; then 6612a3129944Smrg _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' 6613a3129944Smrg else 6614a3129944Smrg # used by -dlpreopen to get the symbols 6615a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6616a3129944Smrg fi 6617a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66189ef0b394Smrg fi 6619698f425bSmrg fi 6620698f425bSmrg ;; 6621698f425bSmrg 66229ef0b394Smrg beos*) 66239ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66249ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66259ef0b394Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66269ef0b394Smrg # support --undefined. This deserves some investigation. FIXME 6627a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66289ef0b394Smrg else 66299ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66309ef0b394Smrg fi 66319ef0b394Smrg ;; 6632698f425bSmrg 66339ef0b394Smrg chorus*) 66349ef0b394Smrg case $cc_basename in 66359ef0b394Smrg *) 66369ef0b394Smrg # FIXME: insert proper C++ library support 66379ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66389ef0b394Smrg ;; 66399ef0b394Smrg esac 66409ef0b394Smrg ;; 6641698f425bSmrg 66429ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 66439ef0b394Smrg case $GXX,$cc_basename in 66449ef0b394Smrg ,cl* | no,cl*) 66459ef0b394Smrg # Native MSVC 66469ef0b394Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 66479ef0b394Smrg # no search path for DLLs. 66489ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66499ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66509ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 66519ef0b394Smrg _LT_TAGVAR(file_list_spec, $1)='@' 66529ef0b394Smrg # Tell ltmain to make .lib files, not .a files. 66539ef0b394Smrg libext=lib 66549ef0b394Smrg # Tell ltmain to make .dll files, not .so files. 6655a3129944Smrg shrext_cmds=.dll 66569ef0b394Smrg # FIXME: Setting linknames here is a bad hack. 6657a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6658a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6659a3129944Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 6660a3129944Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6661a3129944Smrg else 6662a3129944Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6663a3129944Smrg fi~ 6664a3129944Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6665a3129944Smrg linknames=' 66669ef0b394Smrg # The linker will not automatically build a static lib if we build a DLL. 66679ef0b394Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 66689ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66699ef0b394Smrg # Don't use ranlib 66709ef0b394Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 66719ef0b394Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6672a3129944Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6673a3129944Smrg case $lt_outputfile in 6674a3129944Smrg *.exe|*.EXE) ;; 6675a3129944Smrg *) 6676a3129944Smrg lt_outputfile=$lt_outputfile.exe 6677a3129944Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 6678a3129944Smrg ;; 6679a3129944Smrg esac~ 6680a3129944Smrg func_to_tool_file "$lt_outputfile"~ 6681a3129944Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6682a3129944Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6683a3129944Smrg $RM "$lt_outputfile.manifest"; 6684a3129944Smrg fi' 66859ef0b394Smrg ;; 66869ef0b394Smrg *) 66879ef0b394Smrg # g++ 66889ef0b394Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 66899ef0b394Smrg # as there is no search path for DLLs. 66909ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6691a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 66929ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66939ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=no 66949ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66959ef0b394Smrg 66969ef0b394Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6697a3129944Smrg _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' 6698a3129944Smrg # If the export-symbols file already is a .def file, use it as 6699a3129944Smrg # is; otherwise, prepend EXPORTS... 6700a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6701a3129944Smrg cp $export_symbols $output_objdir/$soname.def; 6702a3129944Smrg else 6703a3129944Smrg echo EXPORTS > $output_objdir/$soname.def; 6704a3129944Smrg cat $export_symbols >> $output_objdir/$soname.def; 6705a3129944Smrg fi~ 6706a3129944Smrg $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' 67079ef0b394Smrg else 67089ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67099ef0b394Smrg fi 67109ef0b394Smrg ;; 67119ef0b394Smrg esac 67129ef0b394Smrg ;; 67139ef0b394Smrg darwin* | rhapsody*) 67149ef0b394Smrg _LT_DARWIN_LINKER_FEATURES($1) 67159ef0b394Smrg ;; 6716266e564dSmrg 6717a3129944Smrg os2*) 6718a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6719a3129944Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6720a3129944Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6721a3129944Smrg shrext_cmds=.dll 6722a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6723a3129944Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6724a3129944Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6725a3129944Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6726a3129944Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6727a3129944Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6728a3129944Smrg emximp -o $lib $output_objdir/$libname.def' 6729a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6730a3129944Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6731a3129944Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6732a3129944Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6733a3129944Smrg prefix_cmds="$SED"~ 6734a3129944Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6735a3129944Smrg prefix_cmds="$prefix_cmds -e 1d"; 6736a3129944Smrg fi~ 6737a3129944Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6738a3129944Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6739a3129944Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6740a3129944Smrg emximp -o $lib $output_objdir/$libname.def' 6741a3129944Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6742a3129944Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6743a3129944Smrg ;; 6744a3129944Smrg 67459ef0b394Smrg dgux*) 67469ef0b394Smrg case $cc_basename in 67479ef0b394Smrg ec++*) 67489ef0b394Smrg # FIXME: insert proper C++ library support 67499ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67509ef0b394Smrg ;; 67519ef0b394Smrg ghcx*) 67529ef0b394Smrg # Green Hills C++ Compiler 67539ef0b394Smrg # FIXME: insert proper C++ library support 67549ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67559ef0b394Smrg ;; 67569ef0b394Smrg *) 67579ef0b394Smrg # FIXME: insert proper C++ library support 67589ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67599ef0b394Smrg ;; 67609ef0b394Smrg esac 67619ef0b394Smrg ;; 6762266e564dSmrg 6763fb5e8d76Smrg freebsd2.*) 67649ef0b394Smrg # C++ shared libraries reported to be fairly broken before 67659ef0b394Smrg # switch to ELF 67669ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67679ef0b394Smrg ;; 6768266e564dSmrg 67699ef0b394Smrg freebsd-elf*) 67709ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67719ef0b394Smrg ;; 6772266e564dSmrg 67739ef0b394Smrg freebsd* | dragonfly*) 67749ef0b394Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 67759ef0b394Smrg # conventions 67769ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 67779ef0b394Smrg ;; 6778266e564dSmrg 67799ef0b394Smrg haiku*) 6780a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 67819ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67829ef0b394Smrg ;; 6783266e564dSmrg 67849ef0b394Smrg hpux9*) 6785a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 67869ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6787a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 67889ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 67899ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 67909ef0b394Smrg # but as the default 67919ef0b394Smrg # location of the library. 6792266e564dSmrg 67939ef0b394Smrg case $cc_basename in 67949ef0b394Smrg CC*) 67959ef0b394Smrg # FIXME: insert proper C++ library support 67969ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67979ef0b394Smrg ;; 67989ef0b394Smrg aCC*) 6799a3129944Smrg _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' 68009ef0b394Smrg # Commands to make compiler produce verbose output that lists 68019ef0b394Smrg # what "hidden" libraries, object files and flags are used when 68029ef0b394Smrg # linking a shared library. 68039ef0b394Smrg # 68049ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 68059ef0b394Smrg # explicitly linking system object files so we need to strip them 68069ef0b394Smrg # from the output so that they don't get included in the library 68079ef0b394Smrg # dependencies. 6808a3129944Smrg 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"' 68099ef0b394Smrg ;; 68109ef0b394Smrg *) 6811a3129944Smrg if test yes = "$GXX"; then 6812a3129944Smrg _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' 68139ef0b394Smrg else 68149ef0b394Smrg # FIXME: insert proper C++ library support 68159ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68169ef0b394Smrg fi 68179ef0b394Smrg ;; 68189ef0b394Smrg esac 68199ef0b394Smrg ;; 6820266e564dSmrg 68219ef0b394Smrg hpux10*|hpux11*) 6822a3129944Smrg if test no = "$with_gnu_ld"; then 6823a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68249ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6825266e564dSmrg 68269ef0b394Smrg case $host_cpu in 68279ef0b394Smrg hppa*64*|ia64*) 68289ef0b394Smrg ;; 68299ef0b394Smrg *) 6830a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68319ef0b394Smrg ;; 68329ef0b394Smrg esac 68339ef0b394Smrg fi 68349ef0b394Smrg case $host_cpu in 68359ef0b394Smrg hppa*64*|ia64*) 68369ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 68379ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68389ef0b394Smrg ;; 68399ef0b394Smrg *) 68409ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68419ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68429ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68439ef0b394Smrg # but as the default 68449ef0b394Smrg # location of the library. 68459ef0b394Smrg ;; 68469ef0b394Smrg esac 6847266e564dSmrg 68489ef0b394Smrg case $cc_basename in 68499ef0b394Smrg CC*) 68509ef0b394Smrg # FIXME: insert proper C++ library support 68519ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68529ef0b394Smrg ;; 68539ef0b394Smrg aCC*) 68549ef0b394Smrg case $host_cpu in 68559ef0b394Smrg hppa*64*) 6856a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68579ef0b394Smrg ;; 68589ef0b394Smrg ia64*) 6859a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68609ef0b394Smrg ;; 68619ef0b394Smrg *) 6862a3129944Smrg _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' 68639ef0b394Smrg ;; 68649ef0b394Smrg esac 68659ef0b394Smrg # Commands to make compiler produce verbose output that lists 68669ef0b394Smrg # what "hidden" libraries, object files and flags are used when 68679ef0b394Smrg # linking a shared library. 68689ef0b394Smrg # 68699ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 68709ef0b394Smrg # explicitly linking system object files so we need to strip them 68719ef0b394Smrg # from the output so that they don't get included in the library 68729ef0b394Smrg # dependencies. 6873a3129944Smrg 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"' 68749ef0b394Smrg ;; 68759ef0b394Smrg *) 6876a3129944Smrg if test yes = "$GXX"; then 6877a3129944Smrg if test no = "$with_gnu_ld"; then 68789ef0b394Smrg case $host_cpu in 68799ef0b394Smrg hppa*64*) 6880a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68819ef0b394Smrg ;; 68829ef0b394Smrg ia64*) 6883a3129944Smrg _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' 68849ef0b394Smrg ;; 68859ef0b394Smrg *) 6886a3129944Smrg _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' 68879ef0b394Smrg ;; 68889ef0b394Smrg esac 68899ef0b394Smrg fi 68909ef0b394Smrg else 68919ef0b394Smrg # FIXME: insert proper C++ library support 68929ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68939ef0b394Smrg fi 68949ef0b394Smrg ;; 68959ef0b394Smrg esac 68969ef0b394Smrg ;; 6897c5629e66Smrg 68989ef0b394Smrg interix[[3-9]]*) 68999ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 69009ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6901a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6902a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69039ef0b394Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69049ef0b394Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69059ef0b394Smrg # default) and relocated if they conflict, which is a slow very memory 69069ef0b394Smrg # consuming and fragmenting process. To avoid this, we pick a random, 69079ef0b394Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69089ef0b394Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6909a3129944Smrg _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' 6910a3129944Smrg _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' 69119ef0b394Smrg ;; 69129ef0b394Smrg irix5* | irix6*) 69139ef0b394Smrg case $cc_basename in 69149ef0b394Smrg CC*) 69159ef0b394Smrg # SGI C++ 6916a3129944Smrg _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' 6917266e564dSmrg 69189ef0b394Smrg # Archives containing C++ object files must be created using 69199ef0b394Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69209ef0b394Smrg # necessary to make sure instantiated templates are included 69219ef0b394Smrg # in the archive. 69229ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69239ef0b394Smrg ;; 69249ef0b394Smrg *) 6925a3129944Smrg if test yes = "$GXX"; then 6926a3129944Smrg if test no = "$with_gnu_ld"; then 6927a3129944Smrg _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' 69289ef0b394Smrg else 6929a3129944Smrg _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' 69309ef0b394Smrg fi 69319ef0b394Smrg fi 69329ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69339ef0b394Smrg ;; 69349ef0b394Smrg esac 6935a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69369ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69379ef0b394Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 69389ef0b394Smrg ;; 6939266e564dSmrg 6940a3129944Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69419ef0b394Smrg case $cc_basename in 69429ef0b394Smrg KCC*) 69439ef0b394Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6944266e564dSmrg 69459ef0b394Smrg # KCC will only create a shared library if the output file 69469ef0b394Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69479ef0b394Smrg # to its proper name (with version) after linking. 6948a3129944Smrg _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' 6949a3129944Smrg _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' 69509ef0b394Smrg # Commands to make compiler produce verbose output that lists 69519ef0b394Smrg # what "hidden" libraries, object files and flags are used when 69529ef0b394Smrg # linking a shared library. 69539ef0b394Smrg # 69549ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 69559ef0b394Smrg # explicitly linking system object files so we need to strip them 69569ef0b394Smrg # from the output so that they don't get included in the library 69579ef0b394Smrg # dependencies. 6958a3129944Smrg 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"' 6959266e564dSmrg 6960a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6961a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6962266e564dSmrg 69639ef0b394Smrg # Archives containing C++ object files must be created using 69649ef0b394Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 69659ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 69669ef0b394Smrg ;; 69679ef0b394Smrg icpc* | ecpc* ) 69689ef0b394Smrg # Intel C++ 69699ef0b394Smrg with_gnu_ld=yes 69709ef0b394Smrg # version 8.0 and above of icpc choke on multiply defined symbols 69719ef0b394Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 69729ef0b394Smrg # earlier do not add the objects themselves. 69739ef0b394Smrg case `$CC -V 2>&1` in 69749ef0b394Smrg *"Version 7."*) 6975a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6976a3129944Smrg _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' 69779ef0b394Smrg ;; 69789ef0b394Smrg *) # Version 8.0 or newer 69799ef0b394Smrg tmp_idyn= 69809ef0b394Smrg case $host_cpu in 69819ef0b394Smrg ia64*) tmp_idyn=' -i_dynamic';; 69829ef0b394Smrg esac 6983a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6984a3129944Smrg _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' 69859ef0b394Smrg ;; 69869ef0b394Smrg esac 69879ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6988a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6989a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6990a3129944Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 69919ef0b394Smrg ;; 69929ef0b394Smrg pgCC* | pgcpp*) 69939ef0b394Smrg # Portland Group C++ compiler 69949ef0b394Smrg case `$CC -V` in 69959ef0b394Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 69969ef0b394Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6997a3129944Smrg rm -rf $tpldir~ 6998a3129944Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6999a3129944Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70009ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7001a3129944Smrg rm -rf $tpldir~ 7002a3129944Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7003a3129944Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7004a3129944Smrg $RANLIB $oldlib' 70059ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7006a3129944Smrg rm -rf $tpldir~ 7007a3129944Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7008a3129944Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70099ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7010a3129944Smrg rm -rf $tpldir~ 7011a3129944Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7012a3129944Smrg $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' 70139ef0b394Smrg ;; 70149ef0b394Smrg *) # Version 6 and above use weak symbols 7015a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7016a3129944Smrg _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' 70179ef0b394Smrg ;; 70189ef0b394Smrg esac 7019266e564dSmrg 7020a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7021a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7022a3129944Smrg _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' 70239ef0b394Smrg ;; 70249ef0b394Smrg cxx*) 70259ef0b394Smrg # Compaq C++ 7026a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7027a3129944Smrg _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' 7028266e564dSmrg 70299ef0b394Smrg runpath_var=LD_RUN_PATH 70309ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70319ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7032266e564dSmrg 70339ef0b394Smrg # Commands to make compiler produce verbose output that lists 70349ef0b394Smrg # what "hidden" libraries, object files and flags are used when 70359ef0b394Smrg # linking a shared library. 70369ef0b394Smrg # 70379ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 70389ef0b394Smrg # explicitly linking system object files so we need to strip them 70399ef0b394Smrg # from the output so that they don't get included in the library 70409ef0b394Smrg # dependencies. 7041a3129944Smrg 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' 70429ef0b394Smrg ;; 70439ef0b394Smrg xl* | mpixl* | bgxl*) 70449ef0b394Smrg # IBM XL 8.0 on PPC, with GNU ld 7045a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7046a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7047a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7048a3129944Smrg if test yes = "$supports_anon_versioning"; then 70499ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7050a3129944Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7051a3129944Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7052a3129944Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70539ef0b394Smrg fi 70549ef0b394Smrg ;; 70559ef0b394Smrg *) 70569ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 70579ef0b394Smrg *Sun\ C*) 70589ef0b394Smrg # Sun C++ 5.9 70599ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7060a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7061a3129944Smrg _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' 70629ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7063a3129944Smrg _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' 70649ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7065266e564dSmrg 70669ef0b394Smrg # Not sure whether something based on 70679ef0b394Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 70689ef0b394Smrg # would be better. 70699ef0b394Smrg output_verbose_link_cmd='func_echo_all' 7070266e564dSmrg 70719ef0b394Smrg # Archives containing C++ object files must be created using 70729ef0b394Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 70739ef0b394Smrg # necessary to make sure instantiated templates are included 70749ef0b394Smrg # in the archive. 70759ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 70769ef0b394Smrg ;; 70779ef0b394Smrg esac 70789ef0b394Smrg ;; 70799ef0b394Smrg esac 70809ef0b394Smrg ;; 7081266e564dSmrg 70829ef0b394Smrg lynxos*) 70839ef0b394Smrg # FIXME: insert proper C++ library support 70849ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70859ef0b394Smrg ;; 7086266e564dSmrg 70879ef0b394Smrg m88k*) 70889ef0b394Smrg # FIXME: insert proper C++ library support 70899ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70909ef0b394Smrg ;; 7091266e564dSmrg 70929ef0b394Smrg mvs*) 70939ef0b394Smrg case $cc_basename in 70949ef0b394Smrg cxx*) 70959ef0b394Smrg # FIXME: insert proper C++ library support 70969ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70979ef0b394Smrg ;; 70989ef0b394Smrg *) 70999ef0b394Smrg # FIXME: insert proper C++ library support 71009ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71019ef0b394Smrg ;; 71029ef0b394Smrg esac 71039ef0b394Smrg ;; 7104266e564dSmrg 71059ef0b394Smrg netbsd*) 71069ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71079ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71089ef0b394Smrg wlarc= 71099ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71109ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71119ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71129ef0b394Smrg fi 71139ef0b394Smrg # Workaround some broken pre-1.5 toolchains 71149ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71159ef0b394Smrg ;; 7116266e564dSmrg 71179ef0b394Smrg *nto* | *qnx*) 71189ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71199ef0b394Smrg ;; 7120266e564dSmrg 7121a3129944Smrg openbsd* | bitrig*) 71229ef0b394Smrg if test -f /usr/libexec/ld.so; then 71239ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71249ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71259ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71269ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7127a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7128a3129944Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7129a3129944Smrg _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' 7130a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7131a3129944Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71329ef0b394Smrg fi 71339ef0b394Smrg output_verbose_link_cmd=func_echo_all 71349ef0b394Smrg else 71359ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71369ef0b394Smrg fi 71379ef0b394Smrg ;; 7138266e564dSmrg 71399ef0b394Smrg osf3* | osf4* | osf5*) 71409ef0b394Smrg case $cc_basename in 71419ef0b394Smrg KCC*) 71429ef0b394Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7143266e564dSmrg 71449ef0b394Smrg # KCC will only create a shared library if the output file 71459ef0b394Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71469ef0b394Smrg # to its proper name (with version) after linking. 7147a3129944Smrg _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' 7148266e564dSmrg 7149a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71509ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7151266e564dSmrg 71529ef0b394Smrg # Archives containing C++ object files must be created using 71539ef0b394Smrg # the KAI C++ compiler. 71549ef0b394Smrg case $host in 71559ef0b394Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71569ef0b394Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71579ef0b394Smrg esac 71589ef0b394Smrg ;; 71599ef0b394Smrg RCC*) 71609ef0b394Smrg # Rational C++ 2.4.1 71619ef0b394Smrg # FIXME: insert proper C++ library support 71629ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71639ef0b394Smrg ;; 71649ef0b394Smrg cxx*) 71659ef0b394Smrg case $host in 71669ef0b394Smrg osf3*) 7167a3129944Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7168a3129944Smrg _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' 7169a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 71709ef0b394Smrg ;; 71719ef0b394Smrg *) 71729ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7173a3129944Smrg _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' 71749ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7175a3129944Smrg echo "-hidden">> $lib.exp~ 7176a3129944Smrg $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~ 7177a3129944Smrg $RM $lib.exp' 71789ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 71799ef0b394Smrg ;; 71809ef0b394Smrg esac 7181266e564dSmrg 71829ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7183266e564dSmrg 71849ef0b394Smrg # Commands to make compiler produce verbose output that lists 71859ef0b394Smrg # what "hidden" libraries, object files and flags are used when 71869ef0b394Smrg # linking a shared library. 71879ef0b394Smrg # 71889ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 71899ef0b394Smrg # explicitly linking system object files so we need to strip them 71909ef0b394Smrg # from the output so that they don't get included in the library 71919ef0b394Smrg # dependencies. 7192a3129944Smrg 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"' 71939ef0b394Smrg ;; 71949ef0b394Smrg *) 7195a3129944Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7196a3129944Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 71979ef0b394Smrg case $host in 71989ef0b394Smrg osf3*) 7199a3129944Smrg _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' 72009ef0b394Smrg ;; 72019ef0b394Smrg *) 7202a3129944Smrg _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' 72039ef0b394Smrg ;; 72049ef0b394Smrg esac 7205266e564dSmrg 7206a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72079ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7208266e564dSmrg 72099ef0b394Smrg # Commands to make compiler produce verbose output that lists 72109ef0b394Smrg # what "hidden" libraries, object files and flags are used when 72119ef0b394Smrg # linking a shared library. 72129ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7213266e564dSmrg 72149ef0b394Smrg else 72159ef0b394Smrg # FIXME: insert proper C++ library support 72169ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72179ef0b394Smrg fi 72189ef0b394Smrg ;; 72199ef0b394Smrg esac 72209ef0b394Smrg ;; 7221266e564dSmrg 72229ef0b394Smrg psos*) 72239ef0b394Smrg # FIXME: insert proper C++ library support 72249ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72259ef0b394Smrg ;; 7226266e564dSmrg 72279ef0b394Smrg sunos4*) 72289ef0b394Smrg case $cc_basename in 72299ef0b394Smrg CC*) 72309ef0b394Smrg # Sun C++ 4.x 72319ef0b394Smrg # FIXME: insert proper C++ library support 72329ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72339ef0b394Smrg ;; 72349ef0b394Smrg lcc*) 72359ef0b394Smrg # Lucid 72369ef0b394Smrg # FIXME: insert proper C++ library support 72379ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72389ef0b394Smrg ;; 72399ef0b394Smrg *) 72409ef0b394Smrg # FIXME: insert proper C++ library support 72419ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72429ef0b394Smrg ;; 72439ef0b394Smrg esac 72449ef0b394Smrg ;; 7245266e564dSmrg 72469ef0b394Smrg solaris*) 72479ef0b394Smrg case $cc_basename in 72489ef0b394Smrg CC* | sunCC*) 72499ef0b394Smrg # Sun C++ 4.2, 5.x and Centerline C++ 72509ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72519ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7252a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72539ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7254a3129944Smrg $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' 7255266e564dSmrg 72569ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72579ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72589ef0b394Smrg case $host_os in 72599ef0b394Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 72609ef0b394Smrg *) 72619ef0b394Smrg # The compiler driver will combine and reorder linker options, 7262a3129944Smrg # but understands '-z linker_flag'. 72639ef0b394Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 72649ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72659ef0b394Smrg ;; 72669ef0b394Smrg esac 72679ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7268266e564dSmrg 72699ef0b394Smrg output_verbose_link_cmd='func_echo_all' 7270266e564dSmrg 72719ef0b394Smrg # Archives containing C++ object files must be created using 72729ef0b394Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 72739ef0b394Smrg # necessary to make sure instantiated templates are included 72749ef0b394Smrg # in the archive. 72759ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 72769ef0b394Smrg ;; 72779ef0b394Smrg gcx*) 72789ef0b394Smrg # Green Hills C++ Compiler 7279a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7280698f425bSmrg 72819ef0b394Smrg # The C++ compiler must be used to create the archive. 72829ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 72839ef0b394Smrg ;; 72849ef0b394Smrg *) 72859ef0b394Smrg # GNU C++ compiler with Solaris linker 7286a3129944Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7287a3129944Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 72889ef0b394Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7289a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72909ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7291a3129944Smrg $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' 7292698f425bSmrg 72939ef0b394Smrg # Commands to make compiler produce verbose output that lists 72949ef0b394Smrg # what "hidden" libraries, object files and flags are used when 72959ef0b394Smrg # linking a shared library. 72969ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72979ef0b394Smrg else 7298a3129944Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 72999ef0b394Smrg # platform. 7300a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73019ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7302a3129944Smrg $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' 7303698f425bSmrg 73049ef0b394Smrg # Commands to make compiler produce verbose output that lists 73059ef0b394Smrg # what "hidden" libraries, object files and flags are used when 73069ef0b394Smrg # linking a shared library. 73079ef0b394Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73089ef0b394Smrg fi 7309266e564dSmrg 7310a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73119ef0b394Smrg case $host_os in 73129ef0b394Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73139ef0b394Smrg *) 7314a3129944Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73159ef0b394Smrg ;; 73169ef0b394Smrg esac 73179ef0b394Smrg fi 73189ef0b394Smrg ;; 73199ef0b394Smrg esac 73209ef0b394Smrg ;; 7321266e564dSmrg 73229ef0b394Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7323a3129944Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73249ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73259ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73269ef0b394Smrg runpath_var='LD_RUN_PATH' 7327266e564dSmrg 73289ef0b394Smrg case $cc_basename in 73299ef0b394Smrg CC*) 7330a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7331a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73329ef0b394Smrg ;; 73339ef0b394Smrg *) 7334a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7335a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73369ef0b394Smrg ;; 73379ef0b394Smrg esac 73389ef0b394Smrg ;; 7339266e564dSmrg 73409ef0b394Smrg sysv5* | sco3.2v5* | sco5v6*) 7341a3129944Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 73429ef0b394Smrg # link with -lc, and that would cause any symbols used from libc to 73439ef0b394Smrg # always be unresolved, which means just about no library would 73449ef0b394Smrg # ever link correctly. If we're not using GNU ld we use -z text 73459ef0b394Smrg # though, which does catch some bad symbols but isn't as heavy-handed 73469ef0b394Smrg # as -z defs. 7347a3129944Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7348a3129944Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73499ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73509ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7351a3129944Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73529ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73539ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7354a3129944Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73559ef0b394Smrg runpath_var='LD_RUN_PATH' 7356266e564dSmrg 73579ef0b394Smrg case $cc_basename in 73589ef0b394Smrg CC*) 7359a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7360a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73619ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7362a3129944Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 73639ef0b394Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7364a3129944Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 73659ef0b394Smrg ;; 73669ef0b394Smrg *) 7367a3129944Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7368a3129944Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73699ef0b394Smrg ;; 73709ef0b394Smrg esac 73719ef0b394Smrg ;; 73729ef0b394Smrg 73739ef0b394Smrg tandem*) 73749ef0b394Smrg case $cc_basename in 73759ef0b394Smrg NCC*) 73769ef0b394Smrg # NonStop-UX NCC 3.20 73779ef0b394Smrg # FIXME: insert proper C++ library support 73789ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73799ef0b394Smrg ;; 73809ef0b394Smrg *) 73819ef0b394Smrg # FIXME: insert proper C++ library support 73829ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73839ef0b394Smrg ;; 73849ef0b394Smrg esac 73859ef0b394Smrg ;; 7386c5629e66Smrg 73879ef0b394Smrg vxworks*) 73889ef0b394Smrg # FIXME: insert proper C++ library support 73899ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73909ef0b394Smrg ;; 7391266e564dSmrg 73929ef0b394Smrg *) 73939ef0b394Smrg # FIXME: insert proper C++ library support 73949ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73959ef0b394Smrg ;; 73969ef0b394Smrg esac 7397266e564dSmrg 73989ef0b394Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7399a3129944Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7400266e564dSmrg 7401a3129944Smrg _LT_TAGVAR(GCC, $1)=$GXX 7402a3129944Smrg _LT_TAGVAR(LD, $1)=$LD 7403266e564dSmrg 74049ef0b394Smrg ## CAVEAT EMPTOR: 74059ef0b394Smrg ## There is no encapsulation within the following macros, do not change 74069ef0b394Smrg ## the running order or otherwise move them around unless you know exactly 74079ef0b394Smrg ## what you are doing... 74089ef0b394Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74099ef0b394Smrg _LT_COMPILER_PIC($1) 74109ef0b394Smrg _LT_COMPILER_C_O($1) 74119ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 74129ef0b394Smrg _LT_LINKER_SHLIBS($1) 74139ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 74149ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7415266e564dSmrg 74169ef0b394Smrg _LT_CONFIG($1) 74179ef0b394Smrg fi # test -n "$compiler" 7418266e564dSmrg 74199ef0b394Smrg CC=$lt_save_CC 74209ef0b394Smrg CFLAGS=$lt_save_CFLAGS 74219ef0b394Smrg LDCXX=$LD 74229ef0b394Smrg LD=$lt_save_LD 74239ef0b394Smrg GCC=$lt_save_GCC 74249ef0b394Smrg with_gnu_ld=$lt_save_with_gnu_ld 74259ef0b394Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 74269ef0b394Smrg lt_cv_path_LD=$lt_save_path_LD 74279ef0b394Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74289ef0b394Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7429a3129944Smrgfi # test yes != "$_lt_caught_CXX_error" 7430266e564dSmrg 74319ef0b394SmrgAC_LANG_POP 74329ef0b394Smrg])# _LT_LANG_CXX_CONFIG 7433266e564dSmrg 7434698f425bSmrg 74359ef0b394Smrg# _LT_FUNC_STRIPNAME_CNF 74369ef0b394Smrg# ---------------------- 74379ef0b394Smrg# func_stripname_cnf prefix suffix name 7438698f425bSmrg# strip PREFIX and SUFFIX off of NAME. 7439698f425bSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7440698f425bSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7441698f425bSmrg# dot (in which case that matches only a dot). 74429ef0b394Smrg# 74439ef0b394Smrg# This function is identical to the (non-XSI) version of func_stripname, 74449ef0b394Smrg# except this one can be used by m4 code that may be executed by configure, 74459ef0b394Smrg# rather than the libtool script. 74469ef0b394Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74479ef0b394SmrgAC_REQUIRE([_LT_DECL_SED]) 74489ef0b394SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74499ef0b394Smrgfunc_stripname_cnf () 7450698f425bSmrg{ 7451a3129944Smrg case @S|@2 in 7452a3129944Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7453a3129944Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7454698f425bSmrg esac 74559ef0b394Smrg} # func_stripname_cnf 74569ef0b394Smrg])# _LT_FUNC_STRIPNAME_CNF 7457266e564dSmrg 7458a3129944Smrg 74599ef0b394Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 74609ef0b394Smrg# --------------------------------- 74619ef0b394Smrg# Figure out "hidden" library dependencies from verbose 74629ef0b394Smrg# compiler output when linking a shared library. 74639ef0b394Smrg# Parse the compiler output and extract the necessary 74649ef0b394Smrg# objects, libraries and library flags. 74659ef0b394Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 74669ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 74679ef0b394SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 74689ef0b394Smrg# Dependencies to place before and after the object being linked: 74699ef0b394Smrg_LT_TAGVAR(predep_objects, $1)= 74709ef0b394Smrg_LT_TAGVAR(postdep_objects, $1)= 74719ef0b394Smrg_LT_TAGVAR(predeps, $1)= 74729ef0b394Smrg_LT_TAGVAR(postdeps, $1)= 74739ef0b394Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7474266e564dSmrg 74759ef0b394Smrgdnl we can't use the lt_simple_compile_test_code here, 74769ef0b394Smrgdnl because it contains code intended for an executable, 74779ef0b394Smrgdnl not a library. It's possible we should let each 74789ef0b394Smrgdnl tag define a new lt_????_link_test_code variable, 74799ef0b394Smrgdnl but it's only used here... 74809ef0b394Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 74819ef0b394Smrgint a; 74829ef0b394Smrgvoid foo (void) { a = 0; } 7483698f425bSmrg_LT_EOF 74849ef0b394Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 74859ef0b394Smrgclass Foo 7486698f425bSmrg{ 74879ef0b394Smrgpublic: 74889ef0b394Smrg Foo (void) { a = 0; } 74899ef0b394Smrgprivate: 74909ef0b394Smrg int a; 74919ef0b394Smrg}; 7492698f425bSmrg_LT_EOF 74939ef0b394Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 74949ef0b394Smrg subroutine foo 74959ef0b394Smrg implicit none 74969ef0b394Smrg integer*4 a 74979ef0b394Smrg a=0 74989ef0b394Smrg return 74999ef0b394Smrg end 75009ef0b394Smrg_LT_EOF 75019ef0b394Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75029ef0b394Smrg subroutine foo 75039ef0b394Smrg implicit none 75049ef0b394Smrg integer a 75059ef0b394Smrg a=0 75069ef0b394Smrg return 75079ef0b394Smrg end 75089ef0b394Smrg_LT_EOF 75099ef0b394Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75109ef0b394Smrgpublic class foo { 75119ef0b394Smrg private int a; 75129ef0b394Smrg public void bar (void) { 75139ef0b394Smrg a = 0; 75149ef0b394Smrg } 75159ef0b394Smrg}; 7516698f425bSmrg_LT_EOF 7517fb5e8d76Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7518fb5e8d76Smrgpackage foo 7519fb5e8d76Smrgfunc foo() { 7520fb5e8d76Smrg} 7521fb5e8d76Smrg_LT_EOF 7522698f425bSmrg]) 7523266e564dSmrg 75249ef0b394Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 75259ef0b394Smrgcase "$CC $CFLAGS " in #( 75269ef0b394Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75279ef0b394Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7528fb5e8d76Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75299ef0b394Smrgesac 7530c5629e66Smrg 75319ef0b394Smrgdnl Parse the compiler output and extract the necessary 75329ef0b394Smrgdnl objects, libraries and library flags. 75339ef0b394Smrgif AC_TRY_EVAL(ac_compile); then 75349ef0b394Smrg # Parse the compiler output and extract the necessary 75359ef0b394Smrg # objects, libraries and library flags. 7536c5629e66Smrg 75379ef0b394Smrg # Sentinel used to keep track of whether or not we are before 75389ef0b394Smrg # the conftest object file. 75399ef0b394Smrg pre_test_object_deps_done=no 7540c5629e66Smrg 75419ef0b394Smrg for p in `eval "$output_verbose_link_cmd"`; do 7542a3129944Smrg case $prev$p in 7543c5629e66Smrg 75449ef0b394Smrg -L* | -R* | -l*) 75459ef0b394Smrg # Some compilers place space between "-{L,R}" and the path. 75469ef0b394Smrg # Remove the space. 7547a3129944Smrg if test x-L = "$p" || 7548a3129944Smrg test x-R = "$p"; then 75499ef0b394Smrg prev=$p 75509ef0b394Smrg continue 75519ef0b394Smrg fi 7552698f425bSmrg 75539ef0b394Smrg # Expand the sysroot to ease extracting the directories later. 75549ef0b394Smrg if test -z "$prev"; then 75559ef0b394Smrg case $p in 75569ef0b394Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75579ef0b394Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75589ef0b394Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 75599ef0b394Smrg esac 75609ef0b394Smrg fi 75619ef0b394Smrg case $p in 75629ef0b394Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 75639ef0b394Smrg esac 7564a3129944Smrg if test no = "$pre_test_object_deps_done"; then 7565a3129944Smrg case $prev in 75669ef0b394Smrg -L | -R) 75679ef0b394Smrg # Internal compiler library paths should come after those 75689ef0b394Smrg # provided the user. The postdeps already come after the 75699ef0b394Smrg # user supplied libs so there is no need to process them. 75709ef0b394Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7571a3129944Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 75729ef0b394Smrg else 7573a3129944Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 75749ef0b394Smrg fi 75759ef0b394Smrg ;; 75769ef0b394Smrg # The "-l" case would never come before the object being 75779ef0b394Smrg # linked, so don't bother handling this case. 75789ef0b394Smrg esac 75799ef0b394Smrg else 75809ef0b394Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7581a3129944Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 75829ef0b394Smrg else 7583a3129944Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 75849ef0b394Smrg fi 75859ef0b394Smrg fi 75869ef0b394Smrg prev= 75879ef0b394Smrg ;; 7588698f425bSmrg 75899ef0b394Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 75909ef0b394Smrg *.$objext) 75919ef0b394Smrg # This assumes that the test object file only shows up 75929ef0b394Smrg # once in the compiler output. 75939ef0b394Smrg if test "$p" = "conftest.$objext"; then 75949ef0b394Smrg pre_test_object_deps_done=yes 75959ef0b394Smrg continue 75969ef0b394Smrg fi 7597c5629e66Smrg 7598a3129944Smrg if test no = "$pre_test_object_deps_done"; then 75999ef0b394Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7600a3129944Smrg _LT_TAGVAR(predep_objects, $1)=$p 76019ef0b394Smrg else 76029ef0b394Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76039ef0b394Smrg fi 76049ef0b394Smrg else 76059ef0b394Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7606a3129944Smrg _LT_TAGVAR(postdep_objects, $1)=$p 76079ef0b394Smrg else 76089ef0b394Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76099ef0b394Smrg fi 76109ef0b394Smrg fi 76119ef0b394Smrg ;; 7612c5629e66Smrg 76139ef0b394Smrg *) ;; # Ignore the rest. 7614698f425bSmrg 76159ef0b394Smrg esac 76169ef0b394Smrg done 7617c5629e66Smrg 76189ef0b394Smrg # Clean up. 76199ef0b394Smrg rm -f a.out a.exe 76209ef0b394Smrgelse 76219ef0b394Smrg echo "libtool.m4: error: problem compiling $1 test program" 76229ef0b394Smrgfi 7623c5629e66Smrg 76249ef0b394Smrg$RM -f confest.$objext 76259ef0b394SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7626c5629e66Smrg 76279ef0b394Smrg# PORTME: override above test on systems where it is broken 76289ef0b394Smrgm4_if([$1], [CXX], 76299ef0b394Smrg[case $host_os in 76309ef0b394Smrginterix[[3-9]]*) 76319ef0b394Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76329ef0b394Smrg # hack all around it, let's just trust "g++" to DTRT. 76339ef0b394Smrg _LT_TAGVAR(predep_objects,$1)= 76349ef0b394Smrg _LT_TAGVAR(postdep_objects,$1)= 76359ef0b394Smrg _LT_TAGVAR(postdeps,$1)= 76369ef0b394Smrg ;; 76379ef0b394Smrgesac 7638698f425bSmrg]) 7639c5629e66Smrg 76409ef0b394Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 76419ef0b394Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76429ef0b394Smrgesac 76439ef0b394Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76449ef0b394Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7645a3129944Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76469ef0b394Smrgfi 76479ef0b394Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76489ef0b394Smrg [The directories searched by this compiler when creating a shared library]) 76499ef0b394Smrg_LT_TAGDECL([], [predep_objects], [1], 76509ef0b394Smrg [Dependencies to place before and after the objects being linked to 76519ef0b394Smrg create a shared library]) 76529ef0b394Smrg_LT_TAGDECL([], [postdep_objects], [1]) 76539ef0b394Smrg_LT_TAGDECL([], [predeps], [1]) 76549ef0b394Smrg_LT_TAGDECL([], [postdeps], [1]) 76559ef0b394Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76569ef0b394Smrg [The library search path used internally by the compiler when linking 76579ef0b394Smrg a shared library]) 76589ef0b394Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7659c5629e66Smrg 7660c5629e66Smrg 76619ef0b394Smrg# _LT_LANG_F77_CONFIG([TAG]) 76629ef0b394Smrg# -------------------------- 76639ef0b394Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 76649ef0b394Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7665a3129944Smrg# to write the compiler configuration to 'libtool'. 76669ef0b394Smrgm4_defun([_LT_LANG_F77_CONFIG], 76679ef0b394Smrg[AC_LANG_PUSH(Fortran 77) 7668a3129944Smrgif test -z "$F77" || test no = "$F77"; then 76699ef0b394Smrg _lt_disable_F77=yes 76709ef0b394Smrgfi 7671698f425bSmrg 76729ef0b394Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 76739ef0b394Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 76749ef0b394Smrg_LT_TAGVAR(always_export_symbols, $1)=no 76759ef0b394Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 76769ef0b394Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 76779ef0b394Smrg_LT_TAGVAR(hardcode_direct, $1)=no 76789ef0b394Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 76799ef0b394Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 76809ef0b394Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 76819ef0b394Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 76829ef0b394Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 76839ef0b394Smrg_LT_TAGVAR(inherit_rpath, $1)=no 76849ef0b394Smrg_LT_TAGVAR(module_cmds, $1)= 76859ef0b394Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 76869ef0b394Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 76879ef0b394Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 76889ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 76899ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 76909ef0b394Smrg_LT_TAGVAR(no_undefined_flag, $1)= 76919ef0b394Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 76929ef0b394Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7693698f425bSmrg 76949ef0b394Smrg# Source file extension for f77 test sources. 76959ef0b394Smrgac_ext=f 7696698f425bSmrg 76979ef0b394Smrg# Object file extension for compiled f77 test sources. 76989ef0b394Smrgobjext=o 76999ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 7700698f425bSmrg 77019ef0b394Smrg# No sense in running all these tests if we already determined that 77029ef0b394Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 77039ef0b394Smrg# are currently assumed to apply to all compilers on this platform, 77049ef0b394Smrg# and will be corrupted by setting them based on a non-working compiler. 7705a3129944Smrgif test yes != "$_lt_disable_F77"; then 77069ef0b394Smrg # Code to be used in simple compile tests 77079ef0b394Smrg lt_simple_compile_test_code="\ 77089ef0b394Smrg subroutine t 77099ef0b394Smrg return 77109ef0b394Smrg end 77119ef0b394Smrg" 7712698f425bSmrg 77139ef0b394Smrg # Code to be used in simple link tests 77149ef0b394Smrg lt_simple_link_test_code="\ 77159ef0b394Smrg program t 77169ef0b394Smrg end 77179ef0b394Smrg" 7718698f425bSmrg 77199ef0b394Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77209ef0b394Smrg _LT_TAG_COMPILER 7721c5629e66Smrg 77229ef0b394Smrg # save warnings/boilerplate of simple test code 77239ef0b394Smrg _LT_COMPILER_BOILERPLATE 77249ef0b394Smrg _LT_LINKER_BOILERPLATE 7725c5629e66Smrg 77269ef0b394Smrg # Allow CC to be a program name with arguments. 7727a3129944Smrg lt_save_CC=$CC 77289ef0b394Smrg lt_save_GCC=$GCC 77299ef0b394Smrg lt_save_CFLAGS=$CFLAGS 77309ef0b394Smrg CC=${F77-"f77"} 77319ef0b394Smrg CFLAGS=$FFLAGS 77329ef0b394Smrg compiler=$CC 77339ef0b394Smrg _LT_TAGVAR(compiler, $1)=$CC 77349ef0b394Smrg _LT_CC_BASENAME([$compiler]) 77359ef0b394Smrg GCC=$G77 77369ef0b394Smrg if test -n "$compiler"; then 77379ef0b394Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77389ef0b394Smrg AC_MSG_RESULT([$can_build_shared]) 77399ef0b394Smrg 77409ef0b394Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7741a3129944Smrg test no = "$can_build_shared" && enable_shared=no 77429ef0b394Smrg 77439ef0b394Smrg # On AIX, shared libraries and static libraries use the same namespace, and 77449ef0b394Smrg # are all built from PIC. 77459ef0b394Smrg case $host_os in 77469ef0b394Smrg aix3*) 7747a3129944Smrg test yes = "$enable_shared" && enable_static=no 77489ef0b394Smrg if test -n "$RANLIB"; then 77499ef0b394Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77509ef0b394Smrg postinstall_cmds='$RANLIB $lib' 77519ef0b394Smrg fi 77529ef0b394Smrg ;; 77539ef0b394Smrg aix[[4-9]]*) 7754a3129944Smrg if test ia64 != "$host_cpu"; then 7755a3129944Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7756a3129944Smrg yes,aix,yes) ;; # shared object as lib.so file only 7757a3129944Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7758a3129944Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7759a3129944Smrg esac 7760698f425bSmrg fi 77619ef0b394Smrg ;; 77629ef0b394Smrg esac 77639ef0b394Smrg AC_MSG_RESULT([$enable_shared]) 77649ef0b394Smrg 77659ef0b394Smrg AC_MSG_CHECKING([whether to build static libraries]) 77669ef0b394Smrg # Make sure either enable_shared or enable_static is yes. 7767a3129944Smrg test yes = "$enable_shared" || enable_static=yes 77689ef0b394Smrg AC_MSG_RESULT([$enable_static]) 7769698f425bSmrg 7770a3129944Smrg _LT_TAGVAR(GCC, $1)=$G77 7771a3129944Smrg _LT_TAGVAR(LD, $1)=$LD 7772698f425bSmrg 77739ef0b394Smrg ## CAVEAT EMPTOR: 77749ef0b394Smrg ## There is no encapsulation within the following macros, do not change 77759ef0b394Smrg ## the running order or otherwise move them around unless you know exactly 77769ef0b394Smrg ## what you are doing... 77779ef0b394Smrg _LT_COMPILER_PIC($1) 77789ef0b394Smrg _LT_COMPILER_C_O($1) 77799ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 77809ef0b394Smrg _LT_LINKER_SHLIBS($1) 77819ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 77829ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7783698f425bSmrg 77849ef0b394Smrg _LT_CONFIG($1) 77859ef0b394Smrg fi # test -n "$compiler" 7786c5629e66Smrg 77879ef0b394Smrg GCC=$lt_save_GCC 7788a3129944Smrg CC=$lt_save_CC 7789a3129944Smrg CFLAGS=$lt_save_CFLAGS 7790a3129944Smrgfi # test yes != "$_lt_disable_F77" 7791c5629e66Smrg 77929ef0b394SmrgAC_LANG_POP 77939ef0b394Smrg])# _LT_LANG_F77_CONFIG 7794698f425bSmrg 7795698f425bSmrg 77969ef0b394Smrg# _LT_LANG_FC_CONFIG([TAG]) 77979ef0b394Smrg# ------------------------- 77989ef0b394Smrg# Ensure that the configuration variables for a Fortran compiler are 77999ef0b394Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7800a3129944Smrg# to write the compiler configuration to 'libtool'. 78019ef0b394Smrgm4_defun([_LT_LANG_FC_CONFIG], 78029ef0b394Smrg[AC_LANG_PUSH(Fortran) 7803698f425bSmrg 7804a3129944Smrgif test -z "$FC" || test no = "$FC"; then 78059ef0b394Smrg _lt_disable_FC=yes 78069ef0b394Smrgfi 7807698f425bSmrg 78089ef0b394Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78099ef0b394Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 78109ef0b394Smrg_LT_TAGVAR(always_export_symbols, $1)=no 78119ef0b394Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78129ef0b394Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78139ef0b394Smrg_LT_TAGVAR(hardcode_direct, $1)=no 78149ef0b394Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78159ef0b394Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78169ef0b394Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78179ef0b394Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78189ef0b394Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 78199ef0b394Smrg_LT_TAGVAR(inherit_rpath, $1)=no 78209ef0b394Smrg_LT_TAGVAR(module_cmds, $1)= 78219ef0b394Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 78229ef0b394Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78239ef0b394Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78249ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78259ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78269ef0b394Smrg_LT_TAGVAR(no_undefined_flag, $1)= 78279ef0b394Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78289ef0b394Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7829c5629e66Smrg 78309ef0b394Smrg# Source file extension for fc test sources. 78319ef0b394Smrgac_ext=${ac_fc_srcext-f} 7832698f425bSmrg 78339ef0b394Smrg# Object file extension for compiled fc test sources. 78349ef0b394Smrgobjext=o 78359ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 7836698f425bSmrg 78379ef0b394Smrg# No sense in running all these tests if we already determined that 78389ef0b394Smrg# the FC compiler isn't working. Some variables (like enable_shared) 78399ef0b394Smrg# are currently assumed to apply to all compilers on this platform, 78409ef0b394Smrg# and will be corrupted by setting them based on a non-working compiler. 7841a3129944Smrgif test yes != "$_lt_disable_FC"; then 78429ef0b394Smrg # Code to be used in simple compile tests 78439ef0b394Smrg lt_simple_compile_test_code="\ 78449ef0b394Smrg subroutine t 78459ef0b394Smrg return 78469ef0b394Smrg end 78479ef0b394Smrg" 7848698f425bSmrg 78499ef0b394Smrg # Code to be used in simple link tests 78509ef0b394Smrg lt_simple_link_test_code="\ 78519ef0b394Smrg program t 78529ef0b394Smrg end 78539ef0b394Smrg" 7854698f425bSmrg 78559ef0b394Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78569ef0b394Smrg _LT_TAG_COMPILER 7857698f425bSmrg 78589ef0b394Smrg # save warnings/boilerplate of simple test code 78599ef0b394Smrg _LT_COMPILER_BOILERPLATE 78609ef0b394Smrg _LT_LINKER_BOILERPLATE 7861698f425bSmrg 78629ef0b394Smrg # Allow CC to be a program name with arguments. 7863a3129944Smrg lt_save_CC=$CC 78649ef0b394Smrg lt_save_GCC=$GCC 78659ef0b394Smrg lt_save_CFLAGS=$CFLAGS 78669ef0b394Smrg CC=${FC-"f95"} 78679ef0b394Smrg CFLAGS=$FCFLAGS 78689ef0b394Smrg compiler=$CC 78699ef0b394Smrg GCC=$ac_cv_fc_compiler_gnu 7870698f425bSmrg 78719ef0b394Smrg _LT_TAGVAR(compiler, $1)=$CC 78729ef0b394Smrg _LT_CC_BASENAME([$compiler]) 7873698f425bSmrg 78749ef0b394Smrg if test -n "$compiler"; then 78759ef0b394Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 78769ef0b394Smrg AC_MSG_RESULT([$can_build_shared]) 78779ef0b394Smrg 78789ef0b394Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7879a3129944Smrg test no = "$can_build_shared" && enable_shared=no 78809ef0b394Smrg 78819ef0b394Smrg # On AIX, shared libraries and static libraries use the same namespace, and 78829ef0b394Smrg # are all built from PIC. 78839ef0b394Smrg case $host_os in 78849ef0b394Smrg aix3*) 7885a3129944Smrg test yes = "$enable_shared" && enable_static=no 78869ef0b394Smrg if test -n "$RANLIB"; then 78879ef0b394Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 78889ef0b394Smrg postinstall_cmds='$RANLIB $lib' 78899ef0b394Smrg fi 78909ef0b394Smrg ;; 78919ef0b394Smrg aix[[4-9]]*) 7892a3129944Smrg if test ia64 != "$host_cpu"; then 7893a3129944Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7894a3129944Smrg yes,aix,yes) ;; # shared object as lib.so file only 7895a3129944Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7896a3129944Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7897a3129944Smrg esac 7898698f425bSmrg fi 78999ef0b394Smrg ;; 79009ef0b394Smrg esac 79019ef0b394Smrg AC_MSG_RESULT([$enable_shared]) 7902c5629e66Smrg 79039ef0b394Smrg AC_MSG_CHECKING([whether to build static libraries]) 79049ef0b394Smrg # Make sure either enable_shared or enable_static is yes. 7905a3129944Smrg test yes = "$enable_shared" || enable_static=yes 79069ef0b394Smrg AC_MSG_RESULT([$enable_static]) 7907c5629e66Smrg 7908a3129944Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7909a3129944Smrg _LT_TAGVAR(LD, $1)=$LD 7910698f425bSmrg 79119ef0b394Smrg ## CAVEAT EMPTOR: 79129ef0b394Smrg ## There is no encapsulation within the following macros, do not change 79139ef0b394Smrg ## the running order or otherwise move them around unless you know exactly 79149ef0b394Smrg ## what you are doing... 79159ef0b394Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 79169ef0b394Smrg _LT_COMPILER_PIC($1) 79179ef0b394Smrg _LT_COMPILER_C_O($1) 79189ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 79199ef0b394Smrg _LT_LINKER_SHLIBS($1) 79209ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 79219ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7922698f425bSmrg 7923fb5e8d76Smrg _LT_CONFIG($1) 7924fb5e8d76Smrg fi # test -n "$compiler" 7925fb5e8d76Smrg 7926fb5e8d76Smrg GCC=$lt_save_GCC 7927fb5e8d76Smrg CC=$lt_save_CC 7928fb5e8d76Smrg CFLAGS=$lt_save_CFLAGS 7929a3129944Smrgfi # test yes != "$_lt_disable_FC" 7930fb5e8d76Smrg 7931fb5e8d76SmrgAC_LANG_POP 7932fb5e8d76Smrg])# _LT_LANG_FC_CONFIG 7933fb5e8d76Smrg 7934fb5e8d76Smrg 7935fb5e8d76Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7936fb5e8d76Smrg# -------------------------- 7937fb5e8d76Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7938fb5e8d76Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7939a3129944Smrg# to write the compiler configuration to 'libtool'. 7940fb5e8d76Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7941fb5e8d76Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7942fb5e8d76SmrgAC_LANG_SAVE 7943fb5e8d76Smrg 7944fb5e8d76Smrg# Source file extension for Java test sources. 7945fb5e8d76Smrgac_ext=java 7946fb5e8d76Smrg 7947fb5e8d76Smrg# Object file extension for compiled Java test sources. 7948fb5e8d76Smrgobjext=o 7949fb5e8d76Smrg_LT_TAGVAR(objext, $1)=$objext 7950fb5e8d76Smrg 7951fb5e8d76Smrg# Code to be used in simple compile tests 7952fb5e8d76Smrglt_simple_compile_test_code="class foo {}" 7953fb5e8d76Smrg 7954fb5e8d76Smrg# Code to be used in simple link tests 7955fb5e8d76Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7956fb5e8d76Smrg 7957fb5e8d76Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7958fb5e8d76Smrg_LT_TAG_COMPILER 7959fb5e8d76Smrg 7960fb5e8d76Smrg# save warnings/boilerplate of simple test code 7961fb5e8d76Smrg_LT_COMPILER_BOILERPLATE 7962fb5e8d76Smrg_LT_LINKER_BOILERPLATE 7963fb5e8d76Smrg 7964fb5e8d76Smrg# Allow CC to be a program name with arguments. 7965fb5e8d76Smrglt_save_CC=$CC 7966fb5e8d76Smrglt_save_CFLAGS=$CFLAGS 7967fb5e8d76Smrglt_save_GCC=$GCC 7968fb5e8d76SmrgGCC=yes 7969fb5e8d76SmrgCC=${GCJ-"gcj"} 7970fb5e8d76SmrgCFLAGS=$GCJFLAGS 7971fb5e8d76Smrgcompiler=$CC 7972fb5e8d76Smrg_LT_TAGVAR(compiler, $1)=$CC 7973a3129944Smrg_LT_TAGVAR(LD, $1)=$LD 7974fb5e8d76Smrg_LT_CC_BASENAME([$compiler]) 7975fb5e8d76Smrg 7976fb5e8d76Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7977fb5e8d76Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7978fb5e8d76Smrg 7979fb5e8d76Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7980fb5e8d76Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7981fb5e8d76Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7982fb5e8d76Smrg 7983fb5e8d76Smrgif test -n "$compiler"; then 7984fb5e8d76Smrg _LT_COMPILER_NO_RTTI($1) 7985fb5e8d76Smrg _LT_COMPILER_PIC($1) 7986fb5e8d76Smrg _LT_COMPILER_C_O($1) 7987fb5e8d76Smrg _LT_COMPILER_FILE_LOCKS($1) 7988fb5e8d76Smrg _LT_LINKER_SHLIBS($1) 7989fb5e8d76Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7990698f425bSmrg 7991fb5e8d76Smrg _LT_CONFIG($1) 7992fb5e8d76Smrgfi 7993698f425bSmrg 7994fb5e8d76SmrgAC_LANG_RESTORE 7995fb5e8d76Smrg 7996fb5e8d76SmrgGCC=$lt_save_GCC 7997fb5e8d76SmrgCC=$lt_save_CC 7998fb5e8d76SmrgCFLAGS=$lt_save_CFLAGS 7999fb5e8d76Smrg])# _LT_LANG_GCJ_CONFIG 8000698f425bSmrg 8001698f425bSmrg 8002fb5e8d76Smrg# _LT_LANG_GO_CONFIG([TAG]) 80039ef0b394Smrg# -------------------------- 8004fb5e8d76Smrg# Ensure that the configuration variables for the GNU Go compiler 80059ef0b394Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8006a3129944Smrg# to write the compiler configuration to 'libtool'. 8007fb5e8d76Smrgm4_defun([_LT_LANG_GO_CONFIG], 8008fb5e8d76Smrg[AC_REQUIRE([LT_PROG_GO])dnl 80099ef0b394SmrgAC_LANG_SAVE 80109ef0b394Smrg 8011fb5e8d76Smrg# Source file extension for Go test sources. 8012fb5e8d76Smrgac_ext=go 8013698f425bSmrg 8014fb5e8d76Smrg# Object file extension for compiled Go test sources. 80159ef0b394Smrgobjext=o 80169ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 8017698f425bSmrg 80189ef0b394Smrg# Code to be used in simple compile tests 8019fb5e8d76Smrglt_simple_compile_test_code="package main; func main() { }" 8020698f425bSmrg 80219ef0b394Smrg# Code to be used in simple link tests 8022fb5e8d76Smrglt_simple_link_test_code='package main; func main() { }' 8023698f425bSmrg 80249ef0b394Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80259ef0b394Smrg_LT_TAG_COMPILER 8026698f425bSmrg 80279ef0b394Smrg# save warnings/boilerplate of simple test code 80289ef0b394Smrg_LT_COMPILER_BOILERPLATE 80299ef0b394Smrg_LT_LINKER_BOILERPLATE 8030698f425bSmrg 80319ef0b394Smrg# Allow CC to be a program name with arguments. 80329ef0b394Smrglt_save_CC=$CC 80339ef0b394Smrglt_save_CFLAGS=$CFLAGS 80349ef0b394Smrglt_save_GCC=$GCC 80359ef0b394SmrgGCC=yes 8036fb5e8d76SmrgCC=${GOC-"gccgo"} 8037fb5e8d76SmrgCFLAGS=$GOFLAGS 80389ef0b394Smrgcompiler=$CC 80399ef0b394Smrg_LT_TAGVAR(compiler, $1)=$CC 8040a3129944Smrg_LT_TAGVAR(LD, $1)=$LD 80419ef0b394Smrg_LT_CC_BASENAME([$compiler]) 8042698f425bSmrg 8043fb5e8d76Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 80449ef0b394Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8045698f425bSmrg 80469ef0b394Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80479ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80489ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8049698f425bSmrg 80509ef0b394Smrgif test -n "$compiler"; then 80519ef0b394Smrg _LT_COMPILER_NO_RTTI($1) 80529ef0b394Smrg _LT_COMPILER_PIC($1) 80539ef0b394Smrg _LT_COMPILER_C_O($1) 80549ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 80559ef0b394Smrg _LT_LINKER_SHLIBS($1) 80569ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8057698f425bSmrg 80589ef0b394Smrg _LT_CONFIG($1) 80599ef0b394Smrgfi 8060698f425bSmrg 80619ef0b394SmrgAC_LANG_RESTORE 8062698f425bSmrg 80639ef0b394SmrgGCC=$lt_save_GCC 80649ef0b394SmrgCC=$lt_save_CC 80659ef0b394SmrgCFLAGS=$lt_save_CFLAGS 8066fb5e8d76Smrg])# _LT_LANG_GO_CONFIG 8067698f425bSmrg 8068698f425bSmrg 80699ef0b394Smrg# _LT_LANG_RC_CONFIG([TAG]) 80709ef0b394Smrg# ------------------------- 80719ef0b394Smrg# Ensure that the configuration variables for the Windows resource compiler 80729ef0b394Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8073a3129944Smrg# to write the compiler configuration to 'libtool'. 80749ef0b394Smrgm4_defun([_LT_LANG_RC_CONFIG], 80759ef0b394Smrg[AC_REQUIRE([LT_PROG_RC])dnl 80769ef0b394SmrgAC_LANG_SAVE 8077698f425bSmrg 80789ef0b394Smrg# Source file extension for RC test sources. 80799ef0b394Smrgac_ext=rc 8080698f425bSmrg 80819ef0b394Smrg# Object file extension for compiled RC test sources. 80829ef0b394Smrgobjext=o 80839ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 8084698f425bSmrg 80859ef0b394Smrg# Code to be used in simple compile tests 80869ef0b394Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8087698f425bSmrg 80889ef0b394Smrg# Code to be used in simple link tests 8089a3129944Smrglt_simple_link_test_code=$lt_simple_compile_test_code 8090698f425bSmrg 80919ef0b394Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80929ef0b394Smrg_LT_TAG_COMPILER 8093698f425bSmrg 80949ef0b394Smrg# save warnings/boilerplate of simple test code 80959ef0b394Smrg_LT_COMPILER_BOILERPLATE 80969ef0b394Smrg_LT_LINKER_BOILERPLATE 8097698f425bSmrg 80989ef0b394Smrg# Allow CC to be a program name with arguments. 8099a3129944Smrglt_save_CC=$CC 81009ef0b394Smrglt_save_CFLAGS=$CFLAGS 81019ef0b394Smrglt_save_GCC=$GCC 81029ef0b394SmrgGCC= 81039ef0b394SmrgCC=${RC-"windres"} 81049ef0b394SmrgCFLAGS= 81059ef0b394Smrgcompiler=$CC 81069ef0b394Smrg_LT_TAGVAR(compiler, $1)=$CC 81079ef0b394Smrg_LT_CC_BASENAME([$compiler]) 81089ef0b394Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8109698f425bSmrg 81109ef0b394Smrgif test -n "$compiler"; then 81119ef0b394Smrg : 81129ef0b394Smrg _LT_CONFIG($1) 81139ef0b394Smrgfi 8114698f425bSmrg 81159ef0b394SmrgGCC=$lt_save_GCC 81169ef0b394SmrgAC_LANG_RESTORE 81179ef0b394SmrgCC=$lt_save_CC 81189ef0b394SmrgCFLAGS=$lt_save_CFLAGS 81199ef0b394Smrg])# _LT_LANG_RC_CONFIG 8120c5629e66Smrg 8121c5629e66Smrg 81229ef0b394Smrg# LT_PROG_GCJ 81239ef0b394Smrg# ----------- 81249ef0b394SmrgAC_DEFUN([LT_PROG_GCJ], 81259ef0b394Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81269ef0b394Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81279ef0b394Smrg [AC_CHECK_TOOL(GCJ, gcj,) 8128a3129944Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81299ef0b394Smrg AC_SUBST(GCJFLAGS)])])[]dnl 81309ef0b394Smrg]) 8131c5629e66Smrg 81329ef0b394Smrg# Old name: 81339ef0b394SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81349ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 81359ef0b394Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8136c5629e66Smrg 8137c5629e66Smrg 8138fb5e8d76Smrg# LT_PROG_GO 8139fb5e8d76Smrg# ---------- 8140fb5e8d76SmrgAC_DEFUN([LT_PROG_GO], 8141fb5e8d76Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8142fb5e8d76Smrg]) 8143fb5e8d76Smrg 8144fb5e8d76Smrg 81459ef0b394Smrg# LT_PROG_RC 81469ef0b394Smrg# ---------- 81479ef0b394SmrgAC_DEFUN([LT_PROG_RC], 81489ef0b394Smrg[AC_CHECK_TOOL(RC, windres,) 81499ef0b394Smrg]) 8150c5629e66Smrg 81519ef0b394Smrg# Old name: 81529ef0b394SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81539ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 81549ef0b394Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8155c5629e66Smrg 8156698f425bSmrg 81579ef0b394Smrg# _LT_DECL_EGREP 81589ef0b394Smrg# -------------- 81599ef0b394Smrg# If we don't have a new enough Autoconf to choose the best grep 81609ef0b394Smrg# available, choose the one first in the user's PATH. 81619ef0b394Smrgm4_defun([_LT_DECL_EGREP], 81629ef0b394Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 81639ef0b394SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 81649ef0b394Smrgtest -z "$GREP" && GREP=grep 81659ef0b394Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 81669ef0b394Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 81679ef0b394Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 81689ef0b394Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 81699ef0b394SmrgAC_SUBST([GREP]) 8170c5629e66Smrg]) 8171c5629e66Smrg 8172c5629e66Smrg 81739ef0b394Smrg# _LT_DECL_OBJDUMP 81749ef0b394Smrg# -------------- 81759ef0b394Smrg# If we don't have a new enough Autoconf to choose the best objdump 81769ef0b394Smrg# available, choose the one first in the user's PATH. 81779ef0b394Smrgm4_defun([_LT_DECL_OBJDUMP], 81789ef0b394Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 81799ef0b394Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 81809ef0b394Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 81819ef0b394SmrgAC_SUBST([OBJDUMP]) 81829ef0b394Smrg]) 81839ef0b394Smrg 81849ef0b394Smrg# _LT_DECL_DLLTOOL 81859ef0b394Smrg# ---------------- 81869ef0b394Smrg# Ensure DLLTOOL variable is set. 81879ef0b394Smrgm4_defun([_LT_DECL_DLLTOOL], 81889ef0b394Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 81899ef0b394Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 81909ef0b394Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 81919ef0b394SmrgAC_SUBST([DLLTOOL]) 81929ef0b394Smrg]) 8193c5629e66Smrg 81949ef0b394Smrg# _LT_DECL_SED 81959ef0b394Smrg# ------------ 81969ef0b394Smrg# Check for a fully-functional sed program, that truncates 81979ef0b394Smrg# as few characters as possible. Prefer GNU sed if found. 81989ef0b394Smrgm4_defun([_LT_DECL_SED], 81999ef0b394Smrg[AC_PROG_SED 82009ef0b394Smrgtest -z "$SED" && SED=sed 82019ef0b394SmrgXsed="$SED -e 1s/^X//" 82029ef0b394Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82039ef0b394Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82049ef0b394Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82059ef0b394Smrg])# _LT_DECL_SED 8206c5629e66Smrg 82079ef0b394Smrgm4_ifndef([AC_PROG_SED], [ 82089ef0b394Smrg# NOTE: This macro has been submitted for inclusion into # 82099ef0b394Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 82109ef0b394Smrg# a released version of Autoconf we should remove this # 82119ef0b394Smrg# macro and use it instead. # 8212c5629e66Smrg 82139ef0b394Smrgm4_defun([AC_PROG_SED], 82149ef0b394Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 82159ef0b394SmrgAC_CACHE_VAL(lt_cv_path_SED, 82169ef0b394Smrg[# Loop through the user's path and test for sed and gsed. 82179ef0b394Smrg# Then use that list of sed's as ones to test for truncation. 82189ef0b394Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82199ef0b394Smrgfor as_dir in $PATH 82209ef0b394Smrgdo 82219ef0b394Smrg IFS=$as_save_IFS 82229ef0b394Smrg test -z "$as_dir" && as_dir=. 82239ef0b394Smrg for lt_ac_prog in sed gsed; do 82249ef0b394Smrg for ac_exec_ext in '' $ac_executable_extensions; do 82259ef0b394Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82269ef0b394Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82279ef0b394Smrg fi 82289ef0b394Smrg done 82299ef0b394Smrg done 82309ef0b394Smrgdone 82319ef0b394SmrgIFS=$as_save_IFS 82329ef0b394Smrglt_ac_max=0 82339ef0b394Smrglt_ac_count=0 82349ef0b394Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82359ef0b394Smrg# along with /bin/sed that truncates output. 82369ef0b394Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8237a3129944Smrg test ! -f "$lt_ac_sed" && continue 82389ef0b394Smrg cat /dev/null > conftest.in 82399ef0b394Smrg lt_ac_count=0 82409ef0b394Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82419ef0b394Smrg # Check for GNU sed and select it if it is found. 82429ef0b394Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82439ef0b394Smrg lt_cv_path_SED=$lt_ac_sed 82449ef0b394Smrg break 82459ef0b394Smrg fi 82469ef0b394Smrg while true; do 82479ef0b394Smrg cat conftest.in conftest.in >conftest.tmp 82489ef0b394Smrg mv conftest.tmp conftest.in 82499ef0b394Smrg cp conftest.in conftest.nl 82509ef0b394Smrg echo >>conftest.nl 82519ef0b394Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 82529ef0b394Smrg cmp -s conftest.out conftest.nl || break 82539ef0b394Smrg # 10000 chars as input seems more than enough 8254a3129944Smrg test 10 -lt "$lt_ac_count" && break 82559ef0b394Smrg lt_ac_count=`expr $lt_ac_count + 1` 8256a3129944Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 82579ef0b394Smrg lt_ac_max=$lt_ac_count 82589ef0b394Smrg lt_cv_path_SED=$lt_ac_sed 82599ef0b394Smrg fi 82609ef0b394Smrg done 82619ef0b394Smrgdone 8262c5629e66Smrg]) 82639ef0b394SmrgSED=$lt_cv_path_SED 82649ef0b394SmrgAC_SUBST([SED]) 82659ef0b394SmrgAC_MSG_RESULT([$SED]) 82669ef0b394Smrg])#AC_PROG_SED 82679ef0b394Smrg])#m4_ifndef 8268c5629e66Smrg 82699ef0b394Smrg# Old name: 82709ef0b394SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 82719ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 82729ef0b394Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8273698f425bSmrg 8274698f425bSmrg 82759ef0b394Smrg# _LT_CHECK_SHELL_FEATURES 82769ef0b394Smrg# ------------------------ 82779ef0b394Smrg# Find out whether the shell is Bourne or XSI compatible, 82789ef0b394Smrg# or has some other useful features. 82799ef0b394Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8280a3129944Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 82819ef0b394Smrg lt_unset=unset 82829ef0b394Smrgelse 82839ef0b394Smrg lt_unset=false 8284c5629e66Smrgfi 82859ef0b394Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 82869ef0b394Smrg 82879ef0b394Smrg# test EBCDIC or ASCII 82889ef0b394Smrgcase `echo X|tr X '\101'` in 82899ef0b394Smrg A) # ASCII based system 82909ef0b394Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 82919ef0b394Smrg lt_SP2NL='tr \040 \012' 82929ef0b394Smrg lt_NL2SP='tr \015\012 \040\040' 82939ef0b394Smrg ;; 82949ef0b394Smrg *) # EBCDIC based system 82959ef0b394Smrg lt_SP2NL='tr \100 \n' 82969ef0b394Smrg lt_NL2SP='tr \r\n \100\100' 82979ef0b394Smrg ;; 82989ef0b394Smrgesac 82999ef0b394Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83009ef0b394Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83019ef0b394Smrg])# _LT_CHECK_SHELL_FEATURES 8302c5629e66Smrg 8303c5629e66Smrg 83049ef0b394Smrg# _LT_PATH_CONVERSION_FUNCTIONS 83059ef0b394Smrg# ----------------------------- 8306a3129944Smrg# Determine what file name conversion functions should be used by 83079ef0b394Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 83089ef0b394Smrg# for certain cross-compile configurations and native mingw. 83099ef0b394Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 83109ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 83119ef0b394SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 83129ef0b394SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 83139ef0b394SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 83149ef0b394Smrg[case $host in 83159ef0b394Smrg *-*-mingw* ) 83169ef0b394Smrg case $build in 83179ef0b394Smrg *-*-mingw* ) # actually msys 83189ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 83199ef0b394Smrg ;; 83209ef0b394Smrg *-*-cygwin* ) 83219ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 83229ef0b394Smrg ;; 83239ef0b394Smrg * ) # otherwise, assume *nix 83249ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 83259ef0b394Smrg ;; 83269ef0b394Smrg esac 83279ef0b394Smrg ;; 83289ef0b394Smrg *-*-cygwin* ) 83299ef0b394Smrg case $build in 83309ef0b394Smrg *-*-mingw* ) # actually msys 83319ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 83329ef0b394Smrg ;; 83339ef0b394Smrg *-*-cygwin* ) 83349ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83359ef0b394Smrg ;; 83369ef0b394Smrg * ) # otherwise, assume *nix 83379ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 83389ef0b394Smrg ;; 83399ef0b394Smrg esac 83409ef0b394Smrg ;; 83419ef0b394Smrg * ) # unhandled hosts (and "normal" native builds) 83429ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83439ef0b394Smrg ;; 83449ef0b394Smrgesac 83459ef0b394Smrg]) 83469ef0b394Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 83479ef0b394SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 83489ef0b394Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 83499ef0b394Smrg [0], [convert $build file names to $host format])dnl 83509ef0b394Smrg 83519ef0b394SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 83529ef0b394SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 83539ef0b394Smrg[#assume ordinary cross tools, or native build. 83549ef0b394Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 83559ef0b394Smrgcase $host in 83569ef0b394Smrg *-*-mingw* ) 83579ef0b394Smrg case $build in 83589ef0b394Smrg *-*-mingw* ) # actually msys 83599ef0b394Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 83609ef0b394Smrg ;; 83619ef0b394Smrg esac 83629ef0b394Smrg ;; 83639ef0b394Smrgesac 83649ef0b394Smrg]) 83659ef0b394Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 83669ef0b394SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 83679ef0b394Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 83689ef0b394Smrg [0], [convert $build files to toolchain format])dnl 83699ef0b394Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 83709ef0b394Smrg 83719ef0b394Smrg# Helper functions for option handling. -*- Autoconf -*- 8372c5629e66Smrg# 8373a3129944Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 8374a3129944Smrg# Foundation, Inc. 83759ef0b394Smrg# Written by Gary V. Vaughan, 2004 8376c5629e66Smrg# 83779ef0b394Smrg# This file is free software; the Free Software Foundation gives 83789ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 83799ef0b394Smrg# modifications, as long as this notice is preserved. 8380c5629e66Smrg 8381a3129944Smrg# serial 8 ltoptions.m4 8382c5629e66Smrg 83839ef0b394Smrg# This is to help aclocal find these macros, as it can't see m4_define. 83849ef0b394SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8385c5629e66Smrg 8386c5629e66Smrg 83879ef0b394Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 83889ef0b394Smrg# ------------------------------------------ 83899ef0b394Smrgm4_define([_LT_MANGLE_OPTION], 83909ef0b394Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8391c5629e66Smrg 8392c5629e66Smrg 83939ef0b394Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 83949ef0b394Smrg# --------------------------------------- 83959ef0b394Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 83969ef0b394Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 83979ef0b394Smrg# saved as a flag. 83989ef0b394Smrgm4_define([_LT_SET_OPTION], 83999ef0b394Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 84009ef0b394Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 84019ef0b394Smrg _LT_MANGLE_DEFUN([$1], [$2]), 8402a3129944Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 84039ef0b394Smrg]) 8404c5629e66Smrg 8405c5629e66Smrg 84069ef0b394Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 84079ef0b394Smrg# ------------------------------------------------------------ 84089ef0b394Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 84099ef0b394Smrgm4_define([_LT_IF_OPTION], 84109ef0b394Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8411c5629e66Smrg 8412c5629e66Smrg 84139ef0b394Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 84149ef0b394Smrg# ------------------------------------------------------- 84159ef0b394Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 84169ef0b394Smrg# are set. 84179ef0b394Smrgm4_define([_LT_UNLESS_OPTIONS], 84189ef0b394Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84199ef0b394Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 84209ef0b394Smrg [m4_define([$0_found])])])[]dnl 84219ef0b394Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 84229ef0b394Smrg])[]dnl 84239ef0b394Smrg]) 8424c5629e66Smrg 8425266e564dSmrg 84269ef0b394Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 84279ef0b394Smrg# ---------------------------------------- 84289ef0b394Smrg# OPTION-LIST is a space-separated list of Libtool options associated 84299ef0b394Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 84309ef0b394Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 84319ef0b394Smrg# the unknown option and exit. 84329ef0b394Smrgm4_defun([_LT_SET_OPTIONS], 84339ef0b394Smrg[# Set options 84349ef0b394Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84359ef0b394Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 84369ef0b394Smrg 84379ef0b394Smrgm4_if([$1],[LT_INIT],[ 84389ef0b394Smrg dnl 84399ef0b394Smrg dnl Simply set some default values (i.e off) if boolean options were not 84409ef0b394Smrg dnl specified: 84419ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 84429ef0b394Smrg ]) 84439ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 84449ef0b394Smrg ]) 84459ef0b394Smrg dnl 84469ef0b394Smrg dnl If no reference was made to various pairs of opposing options, then 84479ef0b394Smrg dnl we run the default mode handler for the pair. For example, if neither 8448a3129944Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 84499ef0b394Smrg dnl archives by default: 84509ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 84519ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 84529ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 84539ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8454a3129944Smrg [_LT_ENABLE_FAST_INSTALL]) 8455a3129944Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8456a3129944Smrg [_LT_WITH_AIX_SONAME([aix])]) 84579ef0b394Smrg ]) 84589ef0b394Smrg])# _LT_SET_OPTIONS 84599ef0b394Smrg 84609ef0b394Smrg 84619ef0b394Smrg 84629ef0b394Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 84639ef0b394Smrg# ----------------------------------------- 84649ef0b394Smrgm4_define([_LT_MANGLE_DEFUN], 84659ef0b394Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8466c5629e66Smrg 8467266e564dSmrg 84689ef0b394Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 84699ef0b394Smrg# ----------------------------------------------- 84709ef0b394Smrgm4_define([LT_OPTION_DEFINE], 84719ef0b394Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 84729ef0b394Smrg])# LT_OPTION_DEFINE 8473266e564dSmrg 8474266e564dSmrg 84759ef0b394Smrg# dlopen 84769ef0b394Smrg# ------ 84779ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 84789ef0b394Smrg]) 8479266e564dSmrg 84809ef0b394SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 84819ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 84829ef0b394SmrgAC_DIAGNOSE([obsolete], 84839ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8484a3129944Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 84859ef0b394Smrg]) 8486266e564dSmrg 84879ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 84889ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8489266e564dSmrg 8490266e564dSmrg 84919ef0b394Smrg# win32-dll 84929ef0b394Smrg# --------- 84939ef0b394Smrg# Declare package support for building win32 dll's. 84949ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 84959ef0b394Smrg[enable_win32_dll=yes 8496266e564dSmrg 84979ef0b394Smrgcase $host in 84989ef0b394Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 84999ef0b394Smrg AC_CHECK_TOOL(AS, as, false) 85009ef0b394Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 85019ef0b394Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 85029ef0b394Smrg ;; 85039ef0b394Smrgesac 8504266e564dSmrg 85059ef0b394Smrgtest -z "$AS" && AS=as 85069ef0b394Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8507266e564dSmrg 85089ef0b394Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 85099ef0b394Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8510c5629e66Smrg 85119ef0b394Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 85129ef0b394Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 85139ef0b394Smrg])# win32-dll 8514c5629e66Smrg 85159ef0b394SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 85169ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 85179ef0b394Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 85189ef0b394SmrgAC_DIAGNOSE([obsolete], 85199ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8520a3129944Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 85219ef0b394Smrg]) 8522c5629e66Smrg 85239ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 85249ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8525d17cd367Smrg 8526d17cd367Smrg 85279ef0b394Smrg# _LT_ENABLE_SHARED([DEFAULT]) 85289ef0b394Smrg# ---------------------------- 8529a3129944Smrg# implement the --enable-shared flag, and supports the 'shared' and 8530a3129944Smrg# 'disable-shared' LT_INIT options. 8531a3129944Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85329ef0b394Smrgm4_define([_LT_ENABLE_SHARED], 85339ef0b394Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 85349ef0b394SmrgAC_ARG_ENABLE([shared], 85359ef0b394Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 85369ef0b394Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 85379ef0b394Smrg [p=${PACKAGE-default} 85389ef0b394Smrg case $enableval in 85399ef0b394Smrg yes) enable_shared=yes ;; 85409ef0b394Smrg no) enable_shared=no ;; 85419ef0b394Smrg *) 85429ef0b394Smrg enable_shared=no 85439ef0b394Smrg # Look at the argument we got. We use all the common list separators. 8544a3129944Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 85459ef0b394Smrg for pkg in $enableval; do 8546a3129944Smrg IFS=$lt_save_ifs 85479ef0b394Smrg if test "X$pkg" = "X$p"; then 85489ef0b394Smrg enable_shared=yes 85499ef0b394Smrg fi 85509ef0b394Smrg done 8551a3129944Smrg IFS=$lt_save_ifs 85529ef0b394Smrg ;; 85539ef0b394Smrg esac], 85549ef0b394Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8555d17cd367Smrg 85569ef0b394Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 85579ef0b394Smrg [Whether or not to build shared libraries]) 85589ef0b394Smrg])# _LT_ENABLE_SHARED 8559266e564dSmrg 85609ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 85619ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8562266e564dSmrg 85639ef0b394Smrg# Old names: 85649ef0b394SmrgAC_DEFUN([AC_ENABLE_SHARED], 85659ef0b394Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 85669ef0b394Smrg]) 85679ef0b394Smrg 85689ef0b394SmrgAC_DEFUN([AC_DISABLE_SHARED], 85699ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 85709ef0b394Smrg]) 8571266e564dSmrg 85729ef0b394SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 85739ef0b394SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8574266e564dSmrg 85759ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 85769ef0b394Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 85779ef0b394Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8578d17cd367Smrg 8579266e564dSmrg 8580266e564dSmrg 85819ef0b394Smrg# _LT_ENABLE_STATIC([DEFAULT]) 85829ef0b394Smrg# ---------------------------- 8583a3129944Smrg# implement the --enable-static flag, and support the 'static' and 8584a3129944Smrg# 'disable-static' LT_INIT options. 8585a3129944Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85869ef0b394Smrgm4_define([_LT_ENABLE_STATIC], 85879ef0b394Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 85889ef0b394SmrgAC_ARG_ENABLE([static], 85899ef0b394Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 85909ef0b394Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 85919ef0b394Smrg [p=${PACKAGE-default} 85929ef0b394Smrg case $enableval in 85939ef0b394Smrg yes) enable_static=yes ;; 85949ef0b394Smrg no) enable_static=no ;; 85959ef0b394Smrg *) 85969ef0b394Smrg enable_static=no 85979ef0b394Smrg # Look at the argument we got. We use all the common list separators. 8598a3129944Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 85999ef0b394Smrg for pkg in $enableval; do 8600a3129944Smrg IFS=$lt_save_ifs 86019ef0b394Smrg if test "X$pkg" = "X$p"; then 86029ef0b394Smrg enable_static=yes 86039ef0b394Smrg fi 86049ef0b394Smrg done 8605a3129944Smrg IFS=$lt_save_ifs 86069ef0b394Smrg ;; 86079ef0b394Smrg esac], 86089ef0b394Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8609266e564dSmrg 86109ef0b394Smrg _LT_DECL([build_old_libs], [enable_static], [0], 86119ef0b394Smrg [Whether or not to build static libraries]) 86129ef0b394Smrg])# _LT_ENABLE_STATIC 8613266e564dSmrg 86149ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 86159ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8616266e564dSmrg 86179ef0b394Smrg# Old names: 86189ef0b394SmrgAC_DEFUN([AC_ENABLE_STATIC], 86199ef0b394Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 86209ef0b394Smrg]) 8621c5629e66Smrg 86229ef0b394SmrgAC_DEFUN([AC_DISABLE_STATIC], 86239ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 86249ef0b394Smrg]) 8625266e564dSmrg 86269ef0b394SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 86279ef0b394SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8628266e564dSmrg 86299ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 86309ef0b394Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 86319ef0b394Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8632266e564dSmrg 8633266e564dSmrg 8634266e564dSmrg 86359ef0b394Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 86369ef0b394Smrg# ---------------------------------- 8637a3129944Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 8638a3129944Smrg# and 'disable-fast-install' LT_INIT options. 8639a3129944Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 86409ef0b394Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 86419ef0b394Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 86429ef0b394SmrgAC_ARG_ENABLE([fast-install], 86439ef0b394Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 86449ef0b394Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 86459ef0b394Smrg [p=${PACKAGE-default} 86469ef0b394Smrg case $enableval in 86479ef0b394Smrg yes) enable_fast_install=yes ;; 86489ef0b394Smrg no) enable_fast_install=no ;; 86499ef0b394Smrg *) 86509ef0b394Smrg enable_fast_install=no 86519ef0b394Smrg # Look at the argument we got. We use all the common list separators. 8652a3129944Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86539ef0b394Smrg for pkg in $enableval; do 8654a3129944Smrg IFS=$lt_save_ifs 86559ef0b394Smrg if test "X$pkg" = "X$p"; then 86569ef0b394Smrg enable_fast_install=yes 86579ef0b394Smrg fi 86589ef0b394Smrg done 8659a3129944Smrg IFS=$lt_save_ifs 86609ef0b394Smrg ;; 86619ef0b394Smrg esac], 86629ef0b394Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8663266e564dSmrg 86649ef0b394Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 86659ef0b394Smrg [Whether or not to optimize for fast installation])dnl 86669ef0b394Smrg])# _LT_ENABLE_FAST_INSTALL 8667266e564dSmrg 86689ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 86699ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8670266e564dSmrg 86719ef0b394Smrg# Old names: 86729ef0b394SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 86739ef0b394Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 86749ef0b394SmrgAC_DIAGNOSE([obsolete], 86759ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8676a3129944Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 86779ef0b394Smrg]) 8678266e564dSmrg 86799ef0b394SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 86809ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 86819ef0b394SmrgAC_DIAGNOSE([obsolete], 86829ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8683a3129944Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 86849ef0b394Smrg]) 8685c5629e66Smrg 86869ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 86879ef0b394Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 86889ef0b394Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8689266e564dSmrg 8690266e564dSmrg 8691a3129944Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 8692a3129944Smrg# ---------------------------------- 8693a3129944Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8694a3129944Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8695a3129944Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8696a3129944Smrgm4_define([_LT_WITH_AIX_SONAME], 8697a3129944Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8698a3129944Smrgshared_archive_member_spec= 8699a3129944Smrgcase $host,$enable_shared in 8700a3129944Smrgpower*-*-aix[[5-9]]*,yes) 8701a3129944Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8702a3129944Smrg AC_ARG_WITH([aix-soname], 8703a3129944Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8704a3129944Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8705a3129944Smrg [case $withval in 8706a3129944Smrg aix|svr4|both) 8707a3129944Smrg ;; 8708a3129944Smrg *) 8709a3129944Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8710a3129944Smrg ;; 8711a3129944Smrg esac 8712a3129944Smrg lt_cv_with_aix_soname=$with_aix_soname], 8713a3129944Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 8714a3129944Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8715a3129944Smrg with_aix_soname=$lt_cv_with_aix_soname]) 8716a3129944Smrg AC_MSG_RESULT([$with_aix_soname]) 8717a3129944Smrg if test aix != "$with_aix_soname"; then 8718a3129944Smrg # For the AIX way of multilib, we name the shared archive member 8719a3129944Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8720a3129944Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8721a3129944Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8722a3129944Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 8723a3129944Smrg if test 64 = "${OBJECT_MODE-32}"; then 8724a3129944Smrg shared_archive_member_spec=shr_64 8725a3129944Smrg else 8726a3129944Smrg shared_archive_member_spec=shr 8727a3129944Smrg fi 8728a3129944Smrg fi 8729a3129944Smrg ;; 8730a3129944Smrg*) 8731a3129944Smrg with_aix_soname=aix 8732a3129944Smrg ;; 8733a3129944Smrgesac 8734a3129944Smrg 8735a3129944Smrg_LT_DECL([], [shared_archive_member_spec], [0], 8736a3129944Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8737a3129944Smrg])# _LT_WITH_AIX_SONAME 8738a3129944Smrg 8739a3129944SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8740a3129944SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8741a3129944SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8742a3129944Smrg 8743a3129944Smrg 87449ef0b394Smrg# _LT_WITH_PIC([MODE]) 87459ef0b394Smrg# -------------------- 8746a3129944Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 87479ef0b394Smrg# LT_INIT options. 8748a3129944Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 87499ef0b394Smrgm4_define([_LT_WITH_PIC], 87509ef0b394Smrg[AC_ARG_WITH([pic], 8751fb5e8d76Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 87529ef0b394Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8753fb5e8d76Smrg [lt_p=${PACKAGE-default} 8754fb5e8d76Smrg case $withval in 8755fb5e8d76Smrg yes|no) pic_mode=$withval ;; 8756fb5e8d76Smrg *) 8757fb5e8d76Smrg pic_mode=default 8758fb5e8d76Smrg # Look at the argument we got. We use all the common list separators. 8759a3129944Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8760fb5e8d76Smrg for lt_pkg in $withval; do 8761a3129944Smrg IFS=$lt_save_ifs 8762fb5e8d76Smrg if test "X$lt_pkg" = "X$lt_p"; then 8763fb5e8d76Smrg pic_mode=yes 8764fb5e8d76Smrg fi 8765fb5e8d76Smrg done 8766a3129944Smrg IFS=$lt_save_ifs 8767fb5e8d76Smrg ;; 8768fb5e8d76Smrg esac], 8769a3129944Smrg [pic_mode=m4_default([$1], [default])]) 87709ef0b394Smrg 87719ef0b394Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 87729ef0b394Smrg])# _LT_WITH_PIC 87739ef0b394Smrg 87749ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 87759ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 87769ef0b394Smrg 87779ef0b394Smrg# Old name: 87789ef0b394SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 87799ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 87809ef0b394SmrgAC_DIAGNOSE([obsolete], 87819ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8782a3129944Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 87839ef0b394Smrg]) 87849ef0b394Smrg 87859ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 87869ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8787266e564dSmrg 8788266e564dSmrg 87899ef0b394Smrgm4_define([_LTDL_MODE], []) 87909ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 87919ef0b394Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 87929ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 87939ef0b394Smrg [m4_define([_LTDL_MODE], [recursive])]) 87949ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 87959ef0b394Smrg [m4_define([_LTDL_MODE], [subproject])]) 8796d17cd367Smrg 87979ef0b394Smrgm4_define([_LTDL_TYPE], []) 87989ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 87999ef0b394Smrg [m4_define([_LTDL_TYPE], [installable])]) 88009ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 88019ef0b394Smrg [m4_define([_LTDL_TYPE], [convenience])]) 88029ef0b394Smrg 88039ef0b394Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8804d17cd367Smrg# 8805a3129944Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 8806a3129944Smrg# Foundation, Inc. 88079ef0b394Smrg# Written by Gary V. Vaughan, 2004 8808d17cd367Smrg# 88099ef0b394Smrg# This file is free software; the Free Software Foundation gives 88109ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 88119ef0b394Smrg# modifications, as long as this notice is preserved. 8812d17cd367Smrg 88139ef0b394Smrg# serial 6 ltsugar.m4 8814c5629e66Smrg 88159ef0b394Smrg# This is to help aclocal find these macros, as it can't see m4_define. 88169ef0b394SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8817d17cd367Smrg 8818698f425bSmrg 88199ef0b394Smrg# lt_join(SEP, ARG1, [ARG2...]) 88209ef0b394Smrg# ----------------------------- 88219ef0b394Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 88229ef0b394Smrg# associated separator. 88239ef0b394Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 88249ef0b394Smrg# versions in m4sugar had bugs. 88259ef0b394Smrgm4_define([lt_join], 88269ef0b394Smrg[m4_if([$#], [1], [], 88279ef0b394Smrg [$#], [2], [[$2]], 88289ef0b394Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 88299ef0b394Smrgm4_define([_lt_join], 88309ef0b394Smrg[m4_if([$#$2], [2], [], 88319ef0b394Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 88329ef0b394Smrg 88339ef0b394Smrg 88349ef0b394Smrg# lt_car(LIST) 88359ef0b394Smrg# lt_cdr(LIST) 88369ef0b394Smrg# ------------ 88379ef0b394Smrg# Manipulate m4 lists. 88389ef0b394Smrg# These macros are necessary as long as will still need to support 8839a3129944Smrg# Autoconf-2.59, which quotes differently. 88409ef0b394Smrgm4_define([lt_car], [[$1]]) 88419ef0b394Smrgm4_define([lt_cdr], 88429ef0b394Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 88439ef0b394Smrg [$#], 1, [], 88449ef0b394Smrg [m4_dquote(m4_shift($@))])]) 88459ef0b394Smrgm4_define([lt_unquote], $1) 88469ef0b394Smrg 88479ef0b394Smrg 88489ef0b394Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 88499ef0b394Smrg# ------------------------------------------ 8850a3129944Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 88519ef0b394Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 88529ef0b394Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 88539ef0b394Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 88549ef0b394Smrg# than defined and empty). 8855d17cd367Smrg# 88569ef0b394Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 88579ef0b394Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 88589ef0b394Smrgm4_define([lt_append], 88599ef0b394Smrg[m4_define([$1], 88609ef0b394Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 88619ef0b394Smrg 88629ef0b394Smrg 88639ef0b394Smrg 88649ef0b394Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 88659ef0b394Smrg# ---------------------------------------------------------- 88669ef0b394Smrg# Produce a SEP delimited list of all paired combinations of elements of 88679ef0b394Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 88689ef0b394Smrg# has the form PREFIXmINFIXSUFFIXn. 88699ef0b394Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 88709ef0b394Smrgm4_define([lt_combine], 88719ef0b394Smrg[m4_if(m4_eval([$# > 3]), [1], 88729ef0b394Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 88739ef0b394Smrg[[m4_foreach([_Lt_prefix], [$2], 88749ef0b394Smrg [m4_foreach([_Lt_suffix], 88759ef0b394Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 88769ef0b394Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8877d17cd367Smrg 8878266e564dSmrg 88799ef0b394Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 88809ef0b394Smrg# ----------------------------------------------------------------------- 88819ef0b394Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 88829ef0b394Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 88839ef0b394Smrgm4_define([lt_if_append_uniq], 88849ef0b394Smrg[m4_ifdef([$1], 88859ef0b394Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 88869ef0b394Smrg [lt_append([$1], [$2], [$3])$4], 88879ef0b394Smrg [$5])], 88889ef0b394Smrg [lt_append([$1], [$2], [$3])$4])]) 8889266e564dSmrg 8890266e564dSmrg 88919ef0b394Smrg# lt_dict_add(DICT, KEY, VALUE) 88929ef0b394Smrg# ----------------------------- 88939ef0b394Smrgm4_define([lt_dict_add], 88949ef0b394Smrg[m4_define([$1($2)], [$3])]) 8895266e564dSmrg 8896d17cd367Smrg 88979ef0b394Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 88989ef0b394Smrg# -------------------------------------------- 88999ef0b394Smrgm4_define([lt_dict_add_subkey], 89009ef0b394Smrg[m4_define([$1($2:$3)], [$4])]) 8901266e564dSmrg 8902d17cd367Smrg 89039ef0b394Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 89049ef0b394Smrg# ---------------------------------- 89059ef0b394Smrgm4_define([lt_dict_fetch], 89069ef0b394Smrg[m4_ifval([$3], 89079ef0b394Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 89089ef0b394Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8909266e564dSmrg 89109ef0b394Smrg 89119ef0b394Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 89129ef0b394Smrg# ----------------------------------------------------------------- 89139ef0b394Smrgm4_define([lt_if_dict_fetch], 89149ef0b394Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 89159ef0b394Smrg [$5], 89169ef0b394Smrg [$6])]) 89179ef0b394Smrg 89189ef0b394Smrg 89199ef0b394Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 89209ef0b394Smrg# -------------------------------------------------------------- 89219ef0b394Smrgm4_define([lt_dict_filter], 89229ef0b394Smrg[m4_if([$5], [], [], 89239ef0b394Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 89249ef0b394Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 89259ef0b394Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 89269ef0b394Smrg]) 89279ef0b394Smrg 89289ef0b394Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8929d17cd367Smrg# 8930a3129944Smrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 89319ef0b394Smrg# Written by Scott James Remnant, 2004 8932d17cd367Smrg# 89339ef0b394Smrg# This file is free software; the Free Software Foundation gives 89349ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 89359ef0b394Smrg# modifications, as long as this notice is preserved. 8936d17cd367Smrg 89379ef0b394Smrg# @configure_input@ 89389ef0b394Smrg 8939a3129944Smrg# serial 4179 ltversion.m4 89409ef0b394Smrg# This file is part of GNU Libtool 89419ef0b394Smrg 8942a3129944Smrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 8943a3129944Smrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 89449ef0b394Smrg 89459ef0b394SmrgAC_DEFUN([LTVERSION_VERSION], 8946a3129944Smrg[macro_version='2.4.6' 8947a3129944Smrgmacro_revision='2.4.6' 89489ef0b394Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 89499ef0b394Smrg_LT_DECL(, macro_revision, 0) 89509ef0b394Smrg]) 89519ef0b394Smrg 89529ef0b394Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8953d17cd367Smrg# 8954a3129944Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 8955a3129944Smrg# Foundation, Inc. 89569ef0b394Smrg# Written by Scott James Remnant, 2004. 8957d17cd367Smrg# 89589ef0b394Smrg# This file is free software; the Free Software Foundation gives 89599ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 89609ef0b394Smrg# modifications, as long as this notice is preserved. 8961d17cd367Smrg 89629ef0b394Smrg# serial 5 lt~obsolete.m4 89639ef0b394Smrg 89649ef0b394Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8965d17cd367Smrg# 8966a3129944Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 89679ef0b394Smrg# which have later been changed to m4_define as they aren't part of the 89689ef0b394Smrg# exported API, or moved to Autoconf or Automake where they belong. 8969d17cd367Smrg# 89709ef0b394Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 89719ef0b394Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 89729ef0b394Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 89739ef0b394Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 89749ef0b394Smrg# and doesn't know about Autoconf macros at all.) 8975d17cd367Smrg# 89769ef0b394Smrg# So we provide this file, which has a silly filename so it's always 89779ef0b394Smrg# included after everything else. This provides aclocal with the 89789ef0b394Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 89799ef0b394Smrg# because those macros already exist, or will be overwritten later. 8980a3129944Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8981d17cd367Smrg# 89829ef0b394Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 89839ef0b394Smrg# Yes, that means every name once taken will need to remain here until 89849ef0b394Smrg# we give up compatibility with versions before 1.7, at which point 89859ef0b394Smrg# we need to keep only those names which we still refer to. 8986266e564dSmrg 89879ef0b394Smrg# This is to help aclocal find these macros, as it can't see m4_define. 89889ef0b394SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8989d17cd367Smrg 89909ef0b394Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 89919ef0b394Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 89929ef0b394Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 89939ef0b394Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 89949ef0b394Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 89959ef0b394Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 89969ef0b394Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 89979ef0b394Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 89989ef0b394Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 89999ef0b394Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 90009ef0b394Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 90019ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 90029ef0b394Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 90039ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 90049ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 90059ef0b394Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 90069ef0b394Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 90079ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 90089ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 90099ef0b394Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 90109ef0b394Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 90119ef0b394Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 90129ef0b394Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 90139ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 90149ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 90159ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 90169ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 90179ef0b394Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 90189ef0b394Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 90199ef0b394Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 90209ef0b394Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 90219ef0b394Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 90229ef0b394Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 90239ef0b394Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 90249ef0b394Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 90259ef0b394Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 90269ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 90279ef0b394Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 90289ef0b394Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 90299ef0b394Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 90309ef0b394Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 90319ef0b394Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 90329ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 90339ef0b394Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 90349ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 90359ef0b394Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 90369ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 90379ef0b394Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 90389ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 90399ef0b394Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 90409ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 90419ef0b394Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 90429ef0b394Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 90439ef0b394Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 90449ef0b394Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 90459ef0b394Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 90469ef0b394Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 90479ef0b394Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 90489ef0b394Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 90499ef0b394Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 90509ef0b394Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9051266e564dSmrg 9052a3129944Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9053a3129944Smrgdnl serial 11 (pkg-config-0.29) 9054a3129944Smrgdnl 9055a3129944Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9056a3129944Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9057a3129944Smrgdnl 9058a3129944Smrgdnl This program is free software; you can redistribute it and/or modify 9059a3129944Smrgdnl it under the terms of the GNU General Public License as published by 9060a3129944Smrgdnl the Free Software Foundation; either version 2 of the License, or 9061a3129944Smrgdnl (at your option) any later version. 9062a3129944Smrgdnl 9063a3129944Smrgdnl This program is distributed in the hope that it will be useful, but 9064a3129944Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 9065a3129944Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9066a3129944Smrgdnl General Public License for more details. 9067a3129944Smrgdnl 9068a3129944Smrgdnl You should have received a copy of the GNU General Public License 9069a3129944Smrgdnl along with this program; if not, write to the Free Software 9070a3129944Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9071a3129944Smrgdnl 02111-1307, USA. 9072a3129944Smrgdnl 9073a3129944Smrgdnl As a special exception to the GNU General Public License, if you 9074a3129944Smrgdnl distribute this file as part of a program that contains a 9075a3129944Smrgdnl configuration script generated by Autoconf, you may include it under 9076a3129944Smrgdnl the same distribution terms that you use for the rest of that 9077a3129944Smrgdnl program. 9078a3129944Smrg 9079a3129944Smrgdnl PKG_PREREQ(MIN-VERSION) 9080a3129944Smrgdnl ----------------------- 9081a3129944Smrgdnl Since: 0.29 9082a3129944Smrgdnl 9083a3129944Smrgdnl Verify that the version of the pkg-config macros are at least 9084a3129944Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9085a3129944Smrgdnl installed version of pkg-config, this checks the developer's version 9086a3129944Smrgdnl of pkg.m4 when generating configure. 9087a3129944Smrgdnl 9088a3129944Smrgdnl To ensure that this macro is defined, also add: 9089a3129944Smrgdnl m4_ifndef([PKG_PREREQ], 9090a3129944Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9091a3129944Smrgdnl 9092a3129944Smrgdnl See the "Since" comment for each macro you use to see what version 9093a3129944Smrgdnl of the macros you require. 9094a3129944Smrgm4_defun([PKG_PREREQ], 9095a3129944Smrg[m4_define([PKG_MACROS_VERSION], [0.29]) 9096a3129944Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9097a3129944Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9098a3129944Smrg])dnl PKG_PREREQ 9099a3129944Smrg 9100a3129944Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9101a3129944Smrgdnl ---------------------------------- 9102a3129944Smrgdnl Since: 0.16 9103a3129944Smrgdnl 9104a3129944Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9105a3129944Smrgdnl first found in the path. Checks that the version of pkg-config found 9106a3129944Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9107a3129944Smrgdnl used since that's the first version where most current features of 9108a3129944Smrgdnl pkg-config existed. 9109fb5e8d76SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9110fb5e8d76Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9111a3129944Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9112a3129944Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9113a3129944SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9114a3129944SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9115a3129944SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9116a3129944Smrg 9117fb5e8d76Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9118fb5e8d76Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9119fb5e8d76Smrgfi 9120fb5e8d76Smrgif test -n "$PKG_CONFIG"; then 9121fb5e8d76Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 9122fb5e8d76Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9123fb5e8d76Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9124fb5e8d76Smrg AC_MSG_RESULT([yes]) 9125fb5e8d76Smrg else 9126fb5e8d76Smrg AC_MSG_RESULT([no]) 9127fb5e8d76Smrg PKG_CONFIG="" 9128fb5e8d76Smrg fi 9129fb5e8d76Smrgfi[]dnl 9130a3129944Smrg])dnl PKG_PROG_PKG_CONFIG 9131fb5e8d76Smrg 9132a3129944Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9133a3129944Smrgdnl ------------------------------------------------------------------- 9134a3129944Smrgdnl Since: 0.18 9135a3129944Smrgdnl 9136a3129944Smrgdnl Check to see whether a particular set of modules exists. Similar to 9137a3129944Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9138a3129944Smrgdnl 9139a3129944Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9140a3129944Smrgdnl only at the first occurence in configure.ac, so if the first place 9141a3129944Smrgdnl it's called might be skipped (such as if it is within an "if", you 9142a3129944Smrgdnl have to call PKG_CHECK_EXISTS manually 9143fb5e8d76SmrgAC_DEFUN([PKG_CHECK_EXISTS], 9144fb5e8d76Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9145fb5e8d76Smrgif test -n "$PKG_CONFIG" && \ 9146fb5e8d76Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9147a3129944Smrg m4_default([$2], [:]) 9148fb5e8d76Smrgm4_ifvaln([$3], [else 9149fb5e8d76Smrg $3])dnl 9150fb5e8d76Smrgfi]) 9151fb5e8d76Smrg 9152a3129944Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9153a3129944Smrgdnl --------------------------------------------- 9154a3129944Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9155a3129944Smrgdnl pkg_failed based on the result. 9156fb5e8d76Smrgm4_define([_PKG_CONFIG], 9157fb5e8d76Smrg[if test -n "$$1"; then 9158fb5e8d76Smrg pkg_cv_[]$1="$$1" 9159fb5e8d76Smrg elif test -n "$PKG_CONFIG"; then 9160fb5e8d76Smrg PKG_CHECK_EXISTS([$3], 9161a3129944Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9162a3129944Smrg test "x$?" != "x0" && pkg_failed=yes ], 9163fb5e8d76Smrg [pkg_failed=yes]) 9164fb5e8d76Smrg else 9165fb5e8d76Smrg pkg_failed=untried 9166fb5e8d76Smrgfi[]dnl 9167a3129944Smrg])dnl _PKG_CONFIG 9168fb5e8d76Smrg 9169a3129944Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 9170a3129944Smrgdnl --------------------------- 9171a3129944Smrgdnl Internal check to see if pkg-config supports short errors. 9172fb5e8d76SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9173fb5e8d76Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9174fb5e8d76Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9175fb5e8d76Smrg _pkg_short_errors_supported=yes 9176fb5e8d76Smrgelse 9177fb5e8d76Smrg _pkg_short_errors_supported=no 9178fb5e8d76Smrgfi[]dnl 9179a3129944Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 9180fb5e8d76Smrg 9181fb5e8d76Smrg 9182a3129944Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9183a3129944Smrgdnl [ACTION-IF-NOT-FOUND]) 9184a3129944Smrgdnl -------------------------------------------------------------- 9185a3129944Smrgdnl Since: 0.4.0 9186a3129944Smrgdnl 9187a3129944Smrgdnl Note that if there is a possibility the first call to 9188a3129944Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9189a3129944Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9190fb5e8d76SmrgAC_DEFUN([PKG_CHECK_MODULES], 9191fb5e8d76Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9192fb5e8d76SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9193fb5e8d76SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9194fb5e8d76Smrg 9195fb5e8d76Smrgpkg_failed=no 9196fb5e8d76SmrgAC_MSG_CHECKING([for $1]) 9197fb5e8d76Smrg 9198fb5e8d76Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9199fb5e8d76Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9200fb5e8d76Smrg 9201fb5e8d76Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9202fb5e8d76Smrgand $1[]_LIBS to avoid the need to call pkg-config. 9203fb5e8d76SmrgSee the pkg-config man page for more details.]) 9204fb5e8d76Smrg 9205fb5e8d76Smrgif test $pkg_failed = yes; then 9206a3129944Smrg AC_MSG_RESULT([no]) 9207fb5e8d76Smrg _PKG_SHORT_ERRORS_SUPPORTED 9208fb5e8d76Smrg if test $_pkg_short_errors_supported = yes; then 9209a3129944Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9210fb5e8d76Smrg else 9211a3129944Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9212fb5e8d76Smrg fi 9213fb5e8d76Smrg # Put the nasty error message in config.log where it belongs 9214fb5e8d76Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9215fb5e8d76Smrg 9216a3129944Smrg m4_default([$4], [AC_MSG_ERROR( 9217fb5e8d76Smrg[Package requirements ($2) were not met: 9218fb5e8d76Smrg 9219fb5e8d76Smrg$$1_PKG_ERRORS 9220fb5e8d76Smrg 9221fb5e8d76SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9222fb5e8d76Smrginstalled software in a non-standard prefix. 9223fb5e8d76Smrg 9224a3129944Smrg_PKG_TEXT])[]dnl 9225a3129944Smrg ]) 9226fb5e8d76Smrgelif test $pkg_failed = untried; then 9227a3129944Smrg AC_MSG_RESULT([no]) 9228a3129944Smrg m4_default([$4], [AC_MSG_FAILURE( 9229fb5e8d76Smrg[The pkg-config script could not be found or is too old. Make sure it 9230fb5e8d76Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 9231fb5e8d76Smrgpath to pkg-config. 9232fb5e8d76Smrg 9233fb5e8d76Smrg_PKG_TEXT 9234fb5e8d76Smrg 9235a3129944SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9236a3129944Smrg ]) 9237fb5e8d76Smrgelse 9238fb5e8d76Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9239fb5e8d76Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9240fb5e8d76Smrg AC_MSG_RESULT([yes]) 9241a3129944Smrg $3 9242fb5e8d76Smrgfi[]dnl 9243a3129944Smrg])dnl PKG_CHECK_MODULES 9244a3129944Smrg 9245a3129944Smrg 9246a3129944Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9247a3129944Smrgdnl [ACTION-IF-NOT-FOUND]) 9248a3129944Smrgdnl --------------------------------------------------------------------- 9249a3129944Smrgdnl Since: 0.29 9250a3129944Smrgdnl 9251a3129944Smrgdnl Checks for existence of MODULES and gathers its build flags with 9252a3129944Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9253a3129944Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 9254a3129944Smrgdnl 9255a3129944Smrgdnl Note that if there is a possibility the first call to 9256a3129944Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9257a3129944Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9258a3129944Smrgdnl configure.ac. 9259a3129944SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 9260a3129944Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9261a3129944Smrg_save_PKG_CONFIG=$PKG_CONFIG 9262a3129944SmrgPKG_CONFIG="$PKG_CONFIG --static" 9263a3129944SmrgPKG_CHECK_MODULES($@) 9264a3129944SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 9265a3129944Smrg])dnl PKG_CHECK_MODULES_STATIC 9266a3129944Smrg 9267a3129944Smrg 9268a3129944Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 9269a3129944Smrgdnl ------------------------- 9270a3129944Smrgdnl Since: 0.27 9271a3129944Smrgdnl 9272a3129944Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 9273a3129944Smrgdnl should install pkg-config .pc files. By default the directory is 9274a3129944Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 9275a3129944Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 9276a3129944Smrgdnl parameter. 9277a3129944SmrgAC_DEFUN([PKG_INSTALLDIR], 9278a3129944Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9279a3129944Smrgm4_pushdef([pkg_description], 9280a3129944Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 9281a3129944SmrgAC_ARG_WITH([pkgconfigdir], 9282a3129944Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9283a3129944Smrg [with_pkgconfigdir=]pkg_default) 9284a3129944SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9285a3129944Smrgm4_popdef([pkg_default]) 9286a3129944Smrgm4_popdef([pkg_description]) 9287a3129944Smrg])dnl PKG_INSTALLDIR 9288a3129944Smrg 9289a3129944Smrg 9290a3129944Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9291a3129944Smrgdnl -------------------------------- 9292a3129944Smrgdnl Since: 0.27 9293a3129944Smrgdnl 9294a3129944Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 9295a3129944Smrgdnl module should install arch-independent pkg-config .pc files. By 9296a3129944Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 9297a3129944Smrgdnl changed by passing DIRECTORY. The user can override through the 9298a3129944Smrgdnl --with-noarch-pkgconfigdir parameter. 9299a3129944SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 9300a3129944Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9301a3129944Smrgm4_pushdef([pkg_description], 9302a3129944Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9303a3129944SmrgAC_ARG_WITH([noarch-pkgconfigdir], 9304a3129944Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9305a3129944Smrg [with_noarch_pkgconfigdir=]pkg_default) 9306a3129944SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9307a3129944Smrgm4_popdef([pkg_default]) 9308a3129944Smrgm4_popdef([pkg_description]) 9309a3129944Smrg])dnl PKG_NOARCH_INSTALLDIR 9310a3129944Smrg 9311a3129944Smrg 9312a3129944Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9313a3129944Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9314a3129944Smrgdnl ------------------------------------------- 9315a3129944Smrgdnl Since: 0.28 9316a3129944Smrgdnl 9317a3129944Smrgdnl Retrieves the value of the pkg-config variable for the given module. 9318a3129944SmrgAC_DEFUN([PKG_CHECK_VAR], 9319a3129944Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9320a3129944SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9321a3129944Smrg 9322a3129944Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9323a3129944SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 9324a3129944Smrg 9325a3129944SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 9326a3129944Smrg])dnl PKG_CHECK_VAR 9327fb5e8d76Smrg 93289ef0b394Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 93299ef0b394Smrgdnl 9330a3129944Smrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 9331fb5e8d76Smrgdnl 93329ef0b394Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 93339ef0b394Smrgdnl copy of this software and associated documentation files (the "Software"), 93349ef0b394Smrgdnl to deal in the Software without restriction, including without limitation 93359ef0b394Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 93369ef0b394Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 93379ef0b394Smrgdnl Software is furnished to do so, subject to the following conditions: 93389ef0b394Smrgdnl 93399ef0b394Smrgdnl The above copyright notice and this permission notice (including the next 93409ef0b394Smrgdnl paragraph) shall be included in all copies or substantial portions of the 93419ef0b394Smrgdnl Software. 93429ef0b394Smrgdnl 93439ef0b394Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 93449ef0b394Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 93459ef0b394Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 93469ef0b394Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 93479ef0b394Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 93489ef0b394Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 93499ef0b394Smrgdnl DEALINGS IN THE SOFTWARE. 9350d17cd367Smrg 93519ef0b394Smrg# XORG_MACROS_VERSION(required-version) 93529ef0b394Smrg# ------------------------------------- 9353d17cd367Smrg# Minimum version: 1.1.0 9354698f425bSmrg# 93559ef0b394Smrg# If you're using a macro added in Version 1.1 or newer, include this in 93569ef0b394Smrg# your configure.ac with the minimum required version, such as: 93579ef0b394Smrg# XORG_MACROS_VERSION(1.1) 9358d17cd367Smrg# 93599ef0b394Smrg# To ensure that this macro is defined, also add: 93609ef0b394Smrg# m4_ifndef([XORG_MACROS_VERSION], 93619ef0b394Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9362d17cd367Smrg# 9363d17cd367Smrg# 9364fb5e8d76Smrg# See the "minimum version" comment for each macro you use to see what 93659ef0b394Smrg# version you require. 93669ef0b394Smrgm4_defun([XORG_MACROS_VERSION],[ 9367fb5e8d76Smrgm4_define([vers_have], [1.19.0]) 93689ef0b394Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 93699ef0b394Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 93709ef0b394Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 93719ef0b394Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 93729ef0b394Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 93739ef0b394Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 93749ef0b394Smrgm4_undefine([vers_have]) 93759ef0b394Smrgm4_undefine([maj_have]) 93769ef0b394Smrgm4_undefine([maj_needed]) 93779ef0b394Smrg]) # XORG_MACROS_VERSION 9378d17cd367Smrg 93799ef0b394Smrg# XORG_PROG_RAWCPP() 93809ef0b394Smrg# ------------------ 93819ef0b394Smrg# Minimum version: 1.0.0 93829ef0b394Smrg# 93839ef0b394Smrg# Find cpp program and necessary flags for use in pre-processing text files 93849ef0b394Smrg# such as man pages and config files 93859ef0b394SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 93869ef0b394SmrgAC_REQUIRE([AC_PROG_CPP]) 9387fb5e8d76SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 93889ef0b394Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9389266e564dSmrg 93909ef0b394Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 93919ef0b394Smrg# which is not the best choice for supporting other OS'es, but covers most 93929ef0b394Smrg# of the ones we need for now. 93939ef0b394SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 93949ef0b394SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 93959ef0b394Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 93969ef0b394Smrg AC_MSG_RESULT([no]) 9397d17cd367Smrgelse 93989ef0b394Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 93999ef0b394Smrg RAWCPPFLAGS=-undef 94009ef0b394Smrg AC_MSG_RESULT([yes]) 94019ef0b394Smrg # under Cygwin unix is still defined even with -undef 94029ef0b394Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 94039ef0b394Smrg RAWCPPFLAGS="-undef -ansi" 94049ef0b394Smrg AC_MSG_RESULT([yes, with -ansi]) 94059ef0b394Smrg else 94069ef0b394Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 94079ef0b394Smrg fi 9408d17cd367Smrgfi 94099ef0b394Smrgrm -f conftest.$ac_ext 9410266e564dSmrg 94119ef0b394SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 94129ef0b394SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 94139ef0b394Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 94149ef0b394Smrg AC_MSG_RESULT([no]) 94159ef0b394Smrgelse 94169ef0b394Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9417fb5e8d76Smrg TRADITIONALCPPFLAGS="-traditional" 94189ef0b394Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 94199ef0b394Smrg AC_MSG_RESULT([yes]) 94209ef0b394Smrg else 94219ef0b394Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 94229ef0b394Smrg fi 9423d17cd367Smrgfi 94249ef0b394Smrgrm -f conftest.$ac_ext 94259ef0b394SmrgAC_SUBST(RAWCPPFLAGS) 9426fb5e8d76SmrgAC_SUBST(TRADITIONALCPPFLAGS) 94279ef0b394Smrg]) # XORG_PROG_RAWCPP 9428266e564dSmrg 94299ef0b394Smrg# XORG_MANPAGE_SECTIONS() 94309ef0b394Smrg# ----------------------- 94319ef0b394Smrg# Minimum version: 1.0.0 9432d17cd367Smrg# 94339ef0b394Smrg# Determine which sections man pages go in for the different man page types 94349ef0b394Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 94359ef0b394Smrg# Not sure if there's any better way than just hardcoding by OS name. 94369ef0b394Smrg# Override default settings by setting environment variables 94379ef0b394Smrg# Added MAN_SUBSTS in version 1.8 94389ef0b394Smrg# Added AC_PROG_SED in version 1.8 9439266e564dSmrg 94409ef0b394SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 94419ef0b394SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 94429ef0b394SmrgAC_REQUIRE([AC_PROG_SED]) 9443266e564dSmrg 94449ef0b394Smrgif test x$APP_MAN_SUFFIX = x ; then 94459ef0b394Smrg APP_MAN_SUFFIX=1 94469ef0b394Smrgfi 94479ef0b394Smrgif test x$APP_MAN_DIR = x ; then 94489ef0b394Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9449d17cd367Smrgfi 9450266e564dSmrg 94519ef0b394Smrgif test x$LIB_MAN_SUFFIX = x ; then 94529ef0b394Smrg LIB_MAN_SUFFIX=3 94539ef0b394Smrgfi 94549ef0b394Smrgif test x$LIB_MAN_DIR = x ; then 94559ef0b394Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 94569ef0b394Smrgfi 9457266e564dSmrg 94589ef0b394Smrgif test x$FILE_MAN_SUFFIX = x ; then 94599ef0b394Smrg case $host_os in 9460a3129944Smrg # Solaris 2.0 - 11 use SysV man page sections 9461a3129944Smrg solaris2.?|solaris2.1[[01]]) FILE_MAN_SUFFIX=4 ;; 9462a3129944Smrg *) FILE_MAN_SUFFIX=5 ;; 94639ef0b394Smrg esac 94649ef0b394Smrgfi 94659ef0b394Smrgif test x$FILE_MAN_DIR = x ; then 94669ef0b394Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 94679ef0b394Smrgfi 9468d17cd367Smrg 94699ef0b394Smrgif test x$MISC_MAN_SUFFIX = x ; then 94709ef0b394Smrg case $host_os in 9471a3129944Smrg # Solaris 2.0 - 11 use SysV man page sections 9472a3129944Smrg solaris2.?|solaris2.1[[01]]) MISC_MAN_SUFFIX=5 ;; 9473a3129944Smrg *) MISC_MAN_SUFFIX=7 ;; 9474d17cd367Smrg esac 9475698f425bSmrgfi 94769ef0b394Smrgif test x$MISC_MAN_DIR = x ; then 94779ef0b394Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 94789ef0b394Smrgfi 9479266e564dSmrg 94809ef0b394Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 94819ef0b394Smrg case $host_os in 9482a3129944Smrg # Solaris 2.0 - 11 use SysV man page sections 9483a3129944Smrg solaris2.?|solaris2.1[[01]]) DRIVER_MAN_SUFFIX=7 ;; 9484a3129944Smrg *) DRIVER_MAN_SUFFIX=4 ;; 94859ef0b394Smrg esac 94869ef0b394Smrgfi 94879ef0b394Smrgif test x$DRIVER_MAN_DIR = x ; then 94889ef0b394Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 94899ef0b394Smrgfi 9490d17cd367Smrg 94919ef0b394Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 94929ef0b394Smrg case $host_os in 9493a3129944Smrg # Solaris 2.0 - 11 use SysV man page sections 9494a3129944Smrg solaris2.?|solaris2.1[[01]]) ADMIN_MAN_SUFFIX=1m ;; 9495a3129944Smrg *) ADMIN_MAN_SUFFIX=8 ;; 94969ef0b394Smrg esac 94979ef0b394Smrgfi 94989ef0b394Smrgif test x$ADMIN_MAN_DIR = x ; then 94999ef0b394Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9500d17cd367Smrgfi 9501266e564dSmrg 9502d17cd367Smrg 95039ef0b394SmrgAC_SUBST([APP_MAN_SUFFIX]) 95049ef0b394SmrgAC_SUBST([LIB_MAN_SUFFIX]) 95059ef0b394SmrgAC_SUBST([FILE_MAN_SUFFIX]) 95069ef0b394SmrgAC_SUBST([MISC_MAN_SUFFIX]) 95079ef0b394SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 95089ef0b394SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 95099ef0b394SmrgAC_SUBST([APP_MAN_DIR]) 95109ef0b394SmrgAC_SUBST([LIB_MAN_DIR]) 95119ef0b394SmrgAC_SUBST([FILE_MAN_DIR]) 95129ef0b394SmrgAC_SUBST([MISC_MAN_DIR]) 95139ef0b394SmrgAC_SUBST([DRIVER_MAN_DIR]) 95149ef0b394SmrgAC_SUBST([ADMIN_MAN_DIR]) 95159ef0b394Smrg 95169ef0b394SmrgXORG_MAN_PAGE="X Version 11" 95179ef0b394SmrgAC_SUBST([XORG_MAN_PAGE]) 95189ef0b394SmrgMAN_SUBSTS="\ 95199ef0b394Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 95209ef0b394Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 95219ef0b394Smrg -e 's|__xservername__|Xorg|g' \ 95229ef0b394Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 95239ef0b394Smrg -e 's|__projectroot__|\$(prefix)|g' \ 95249ef0b394Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 95259ef0b394Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 95269ef0b394Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 95279ef0b394Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 95289ef0b394Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 95299ef0b394Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 95309ef0b394Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 95319ef0b394SmrgAC_SUBST([MAN_SUBSTS]) 95329ef0b394Smrg 95339ef0b394Smrg]) # XORG_MANPAGE_SECTIONS 95349ef0b394Smrg 95359ef0b394Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 95369ef0b394Smrg# ------------------------ 95379ef0b394Smrg# Minimum version: 1.7.0 9538d17cd367Smrg# 95399ef0b394Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 95409ef0b394Smrg# provided by xorg-sgml-doctools, if installed. 95419ef0b394SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 95429ef0b394SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 95439ef0b394SmrgXORG_SGML_PATH= 95449ef0b394SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 95459ef0b394Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 95469ef0b394Smrg [m4_ifval([$1],[:], 95479ef0b394Smrg [if test x"$cross_compiling" != x"yes" ; then 95489ef0b394Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 95499ef0b394Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 95509ef0b394Smrg fi]) 95519ef0b394Smrg ]) 95529ef0b394Smrg 95539ef0b394Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 95549ef0b394Smrg# the path and the name of the doc stylesheet 95559ef0b394Smrgif test "x$XORG_SGML_PATH" != "x" ; then 95569ef0b394Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 95579ef0b394Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 95589ef0b394Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 95599ef0b394Smrgelse 95609ef0b394Smrg AC_MSG_RESULT([no]) 95619ef0b394Smrgfi 9562266e564dSmrg 95639ef0b394SmrgAC_SUBST(XORG_SGML_PATH) 95649ef0b394SmrgAC_SUBST(STYLESHEET_SRCDIR) 95659ef0b394SmrgAC_SUBST(XSL_STYLESHEET) 95669ef0b394SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 95679ef0b394Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9568698f425bSmrg 95699ef0b394Smrg# XORG_CHECK_LINUXDOC 95709ef0b394Smrg# ------------------- 95719ef0b394Smrg# Minimum version: 1.0.0 9572c5629e66Smrg# 95739ef0b394Smrg# Defines the variable MAKE_TEXT if the necessary tools and 95749ef0b394Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 95759ef0b394Smrg# Whether or not the necessary tools and files are found can be checked 95769ef0b394Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 95779ef0b394SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 95789ef0b394SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 95799ef0b394SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9580266e564dSmrg 95819ef0b394SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9582d17cd367Smrg 95839ef0b394SmrgAC_MSG_CHECKING([whether to build documentation]) 9584d17cd367Smrg 95859ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 95869ef0b394Smrg BUILDDOC=yes 95879ef0b394Smrgelse 95889ef0b394Smrg BUILDDOC=no 95899ef0b394Smrgfi 9590d17cd367Smrg 95919ef0b394SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9592d17cd367Smrg 95939ef0b394SmrgAC_MSG_RESULT([$BUILDDOC]) 9594d17cd367Smrg 95959ef0b394SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9596d17cd367Smrg 95979ef0b394Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 95989ef0b394Smrg BUILDPDFDOC=yes 95999ef0b394Smrgelse 96009ef0b394Smrg BUILDPDFDOC=no 96019ef0b394Smrgfi 9602d17cd367Smrg 96039ef0b394SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9604d17cd367Smrg 96059ef0b394SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 96069ef0b394Smrg 96079ef0b394SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 96089ef0b394SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 96099ef0b394SmrgMAKE_PDF="$PS2PDF" 96109ef0b394SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 96119ef0b394Smrg 96129ef0b394SmrgAC_SUBST(MAKE_TEXT) 96139ef0b394SmrgAC_SUBST(MAKE_PS) 96149ef0b394SmrgAC_SUBST(MAKE_PDF) 96159ef0b394SmrgAC_SUBST(MAKE_HTML) 96169ef0b394Smrg]) # XORG_CHECK_LINUXDOC 96179ef0b394Smrg 96189ef0b394Smrg# XORG_CHECK_DOCBOOK 96199ef0b394Smrg# ------------------- 96209ef0b394Smrg# Minimum version: 1.0.0 96219ef0b394Smrg# 96229ef0b394Smrg# Checks for the ability to build output formats from SGML DocBook source. 96239ef0b394Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 96249ef0b394Smrg# indicates whether the necessary tools and files are found and, if set, 96259ef0b394Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 96269ef0b394SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 96279ef0b394SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 96289ef0b394Smrg 96299ef0b394SmrgBUILDTXTDOC=no 96309ef0b394SmrgBUILDPDFDOC=no 96319ef0b394SmrgBUILDPSDOC=no 96329ef0b394SmrgBUILDHTMLDOC=no 96339ef0b394Smrg 96349ef0b394SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 96359ef0b394SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 96369ef0b394SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 96379ef0b394SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 96389ef0b394Smrg 96399ef0b394SmrgAC_MSG_CHECKING([whether to build text documentation]) 96409ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 96419ef0b394Smrg test x$BUILD_TXTDOC != xno; then 96429ef0b394Smrg BUILDTXTDOC=yes 96439ef0b394Smrgfi 96449ef0b394SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 96459ef0b394SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 96469ef0b394Smrg 96479ef0b394SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 96489ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 96499ef0b394Smrg test x$BUILD_PDFDOC != xno; then 96509ef0b394Smrg BUILDPDFDOC=yes 96519ef0b394Smrgfi 96529ef0b394SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 96539ef0b394SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 96549ef0b394Smrg 96559ef0b394SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 96569ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 96579ef0b394Smrg test x$BUILD_PSDOC != xno; then 96589ef0b394Smrg BUILDPSDOC=yes 96599ef0b394Smrgfi 96609ef0b394SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 96619ef0b394SmrgAC_MSG_RESULT([$BUILDPSDOC]) 96629ef0b394Smrg 96639ef0b394SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 96649ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 96659ef0b394Smrg test x$BUILD_HTMLDOC != xno; then 96669ef0b394Smrg BUILDHTMLDOC=yes 96679ef0b394Smrgfi 96689ef0b394SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 96699ef0b394SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9670d17cd367Smrg 96719ef0b394SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 96729ef0b394SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 96739ef0b394SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 96749ef0b394SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9675d17cd367Smrg 96769ef0b394SmrgAC_SUBST(MAKE_TEXT) 96779ef0b394SmrgAC_SUBST(MAKE_PS) 96789ef0b394SmrgAC_SUBST(MAKE_PDF) 96799ef0b394SmrgAC_SUBST(MAKE_HTML) 96809ef0b394Smrg]) # XORG_CHECK_DOCBOOK 9681d17cd367Smrg 96829ef0b394Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 96839ef0b394Smrg# ---------------- 96849ef0b394Smrg# Minimum version: 1.5.0 96859ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 96869ef0b394Smrg# 96879ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 96889ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 96899ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 96909ef0b394Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 96919ef0b394Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 96929ef0b394Smrg# --with-xmlto assumes 'auto'. 96939ef0b394Smrg# 96949ef0b394Smrg# Interface to module: 96959ef0b394Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 96969ef0b394Smrg# XMLTO: returns the path of the xmlto program found 96979ef0b394Smrg# returns the path set by the user in the environment 96989ef0b394Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 96999ef0b394Smrg# 'no' user instructs the module not to use xmlto 97009ef0b394Smrg# 97019ef0b394Smrg# Added in version 1.10.0 97029ef0b394Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 97039ef0b394Smrg# xmlto for text output requires either lynx, links, or w3m browsers 97049ef0b394Smrg# 97059ef0b394Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 97069ef0b394Smrg# 97079ef0b394SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 97089ef0b394SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 97099ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 97109ef0b394SmrgAC_ARG_WITH(xmlto, 97119ef0b394Smrg AS_HELP_STRING([--with-xmlto], 97129ef0b394Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 97139ef0b394Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 97149ef0b394Smrgm4_undefine([_defopt]) 9715d17cd367Smrg 97169ef0b394Smrgif test "x$use_xmlto" = x"auto"; then 97179ef0b394Smrg AC_PATH_PROG([XMLTO], [xmlto]) 97189ef0b394Smrg if test "x$XMLTO" = "x"; then 97199ef0b394Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 97209ef0b394Smrg have_xmlto=no 97219ef0b394Smrg else 97229ef0b394Smrg have_xmlto=yes 97239ef0b394Smrg fi 97249ef0b394Smrgelif test "x$use_xmlto" = x"yes" ; then 97259ef0b394Smrg AC_PATH_PROG([XMLTO], [xmlto]) 97269ef0b394Smrg if test "x$XMLTO" = "x"; then 97279ef0b394Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 97289ef0b394Smrg fi 97299ef0b394Smrg have_xmlto=yes 97309ef0b394Smrgelif test "x$use_xmlto" = x"no" ; then 97319ef0b394Smrg if test "x$XMLTO" != "x"; then 97329ef0b394Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 97339ef0b394Smrg fi 97349ef0b394Smrg have_xmlto=no 97359ef0b394Smrgelse 97369ef0b394Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 97379ef0b394Smrgfi 9738d17cd367Smrg 97399ef0b394Smrg# Test for a minimum version of xmlto, if provided. 97409ef0b394Smrgm4_ifval([$1], 97419ef0b394Smrg[if test "$have_xmlto" = yes; then 97429ef0b394Smrg # scrape the xmlto version 97439ef0b394Smrg AC_MSG_CHECKING([the xmlto version]) 97449ef0b394Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 97459ef0b394Smrg AC_MSG_RESULT([$xmlto_version]) 97469ef0b394Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 97479ef0b394Smrg [if test "x$use_xmlto" = xauto; then 97489ef0b394Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 97499ef0b394Smrg have_xmlto=no 97509ef0b394Smrg else 97519ef0b394Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 97529ef0b394Smrg fi]) 97539ef0b394Smrgfi]) 9754d17cd367Smrg 97559ef0b394Smrg# Test for the ability of xmlto to generate a text target 9756a3129944Smrg# 9757a3129944Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 9758a3129944Smrg# following test for empty XML docbook files. 9759a3129944Smrg# For compatibility reasons use the following empty XML docbook file and if 9760a3129944Smrg# it fails try it again with a non-empty XML file. 97619ef0b394Smrghave_xmlto_text=no 97629ef0b394Smrgcat > conftest.xml << "EOF" 97639ef0b394SmrgEOF 97649ef0b394SmrgAS_IF([test "$have_xmlto" = yes], 97659ef0b394Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 97669ef0b394Smrg [have_xmlto_text=yes], 9767a3129944Smrg [# Try it again with a non-empty XML file. 9768a3129944Smrg cat > conftest.xml << "EOF" 9769a3129944Smrg<x></x> 9770a3129944SmrgEOF 9771a3129944Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9772a3129944Smrg [have_xmlto_text=yes], 9773a3129944Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 97749ef0b394Smrgrm -f conftest.xml 97759ef0b394SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 97769ef0b394SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 97779ef0b394Smrg]) # XORG_WITH_XMLTO 9778d17cd367Smrg 97799ef0b394Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 97809ef0b394Smrg# -------------------------------------------- 97819ef0b394Smrg# Minimum version: 1.12.0 97829ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9783c5629e66Smrg# 97849ef0b394Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 97859ef0b394Smrg# XML-based language used for the transformation of XML documents. 97869ef0b394Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 97879ef0b394Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 97889ef0b394Smrg# The XSLT processor is often used as a standalone tool for transformations. 97899ef0b394Smrg# It should not be assumed that this tool is used only to work with documnetation. 97909ef0b394Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 97919ef0b394Smrg# 97929ef0b394Smrg# Interface to module: 97939ef0b394Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 97949ef0b394Smrg# XSLTPROC: returns the path of the xsltproc program found 97959ef0b394Smrg# returns the path set by the user in the environment 97969ef0b394Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 97979ef0b394Smrg# 'no' user instructs the module not to use xsltproc 97989ef0b394Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 97999ef0b394Smrg# 98009ef0b394Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 98019ef0b394Smrg# 98029ef0b394SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 98039ef0b394SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 98049ef0b394Smrg# Preserves the interface, should it be implemented later 98059ef0b394Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 98069ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 98079ef0b394SmrgAC_ARG_WITH(xsltproc, 98089ef0b394Smrg AS_HELP_STRING([--with-xsltproc], 98099ef0b394Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 98109ef0b394Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 98119ef0b394Smrgm4_undefine([_defopt]) 98129ef0b394Smrg 98139ef0b394Smrgif test "x$use_xsltproc" = x"auto"; then 98149ef0b394Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 98159ef0b394Smrg if test "x$XSLTPROC" = "x"; then 98169ef0b394Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 98179ef0b394Smrg have_xsltproc=no 98189ef0b394Smrg else 98199ef0b394Smrg have_xsltproc=yes 98209ef0b394Smrg fi 98219ef0b394Smrgelif test "x$use_xsltproc" = x"yes" ; then 98229ef0b394Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 98239ef0b394Smrg if test "x$XSLTPROC" = "x"; then 98249ef0b394Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 98259ef0b394Smrg fi 98269ef0b394Smrg have_xsltproc=yes 98279ef0b394Smrgelif test "x$use_xsltproc" = x"no" ; then 98289ef0b394Smrg if test "x$XSLTPROC" != "x"; then 98299ef0b394Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 98309ef0b394Smrg fi 98319ef0b394Smrg have_xsltproc=no 98329ef0b394Smrgelse 98339ef0b394Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 98349ef0b394Smrgfi 9835d17cd367Smrg 98369ef0b394SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 98379ef0b394Smrg]) # XORG_WITH_XSLTPROC 98389ef0b394Smrg 98399ef0b394Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 98409ef0b394Smrg# ---------------------------------------- 98419ef0b394Smrg# Minimum version: 1.15.0 9842d17cd367Smrg# 98439ef0b394Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 98449ef0b394Smrg# scanning arbitrary text files, extracting information from those text files, 98459ef0b394Smrg# and printing reports based on that information. 9846d17cd367Smrg# 98479ef0b394Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9848d17cd367Smrg# 98499ef0b394Smrg# Interface to module: 98509ef0b394Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 98519ef0b394Smrg# PERL: returns the path of the perl program found 98529ef0b394Smrg# returns the path set by the user in the environment 98539ef0b394Smrg# --with-perl: 'yes' user instructs the module to use perl 98549ef0b394Smrg# 'no' user instructs the module not to use perl 98559ef0b394Smrg# have_perl: returns yes if perl found in PATH or no 98569ef0b394Smrg# 98579ef0b394Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 98589ef0b394Smrg# 98599ef0b394SmrgAC_DEFUN([XORG_WITH_PERL],[ 98609ef0b394SmrgAC_ARG_VAR([PERL], [Path to perl command]) 98619ef0b394Smrg# Preserves the interface, should it be implemented later 98629ef0b394Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 98639ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 98649ef0b394SmrgAC_ARG_WITH(perl, 98659ef0b394Smrg AS_HELP_STRING([--with-perl], 98669ef0b394Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 98679ef0b394Smrg [use_perl=$withval], [use_perl=]_defopt) 98689ef0b394Smrgm4_undefine([_defopt]) 98699ef0b394Smrg 98709ef0b394Smrgif test "x$use_perl" = x"auto"; then 98719ef0b394Smrg AC_PATH_PROG([PERL], [perl]) 98729ef0b394Smrg if test "x$PERL" = "x"; then 98739ef0b394Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 98749ef0b394Smrg have_perl=no 98759ef0b394Smrg else 98769ef0b394Smrg have_perl=yes 98779ef0b394Smrg fi 98789ef0b394Smrgelif test "x$use_perl" = x"yes" ; then 98799ef0b394Smrg AC_PATH_PROG([PERL], [perl]) 98809ef0b394Smrg if test "x$PERL" = "x"; then 98819ef0b394Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 98829ef0b394Smrg fi 98839ef0b394Smrg have_perl=yes 98849ef0b394Smrgelif test "x$use_perl" = x"no" ; then 98859ef0b394Smrg if test "x$PERL" != "x"; then 98869ef0b394Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 98879ef0b394Smrg fi 98889ef0b394Smrg have_perl=no 98899ef0b394Smrgelse 98909ef0b394Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 98919ef0b394Smrgfi 98929ef0b394Smrg 98939ef0b394SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 98949ef0b394Smrg]) # XORG_WITH_PERL 98959ef0b394Smrg 98969ef0b394Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 98979ef0b394Smrg# ---------------- 98989ef0b394Smrg# Minimum version: 1.5.0 98999ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9900d17cd367Smrg# 99019ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 99029ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 99039ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 99049ef0b394Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 99059ef0b394Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 99069ef0b394Smrg# --with-asciidoc assumes 'auto'. 9907d17cd367Smrg# 99089ef0b394Smrg# Interface to module: 99099ef0b394Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 99109ef0b394Smrg# ASCIIDOC: returns the path of the asciidoc program found 99119ef0b394Smrg# returns the path set by the user in the environment 99129ef0b394Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 99139ef0b394Smrg# 'no' user instructs the module not to use asciidoc 99149ef0b394Smrg# 99159ef0b394Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 99169ef0b394Smrg# 99179ef0b394SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 99189ef0b394SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 99199ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 99209ef0b394SmrgAC_ARG_WITH(asciidoc, 99219ef0b394Smrg AS_HELP_STRING([--with-asciidoc], 99229ef0b394Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 99239ef0b394Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 99249ef0b394Smrgm4_undefine([_defopt]) 9925d17cd367Smrg 99269ef0b394Smrgif test "x$use_asciidoc" = x"auto"; then 99279ef0b394Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 99289ef0b394Smrg if test "x$ASCIIDOC" = "x"; then 99299ef0b394Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 99309ef0b394Smrg have_asciidoc=no 99319ef0b394Smrg else 99329ef0b394Smrg have_asciidoc=yes 99339ef0b394Smrg fi 99349ef0b394Smrgelif test "x$use_asciidoc" = x"yes" ; then 99359ef0b394Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 99369ef0b394Smrg if test "x$ASCIIDOC" = "x"; then 99379ef0b394Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 99389ef0b394Smrg fi 99399ef0b394Smrg have_asciidoc=yes 99409ef0b394Smrgelif test "x$use_asciidoc" = x"no" ; then 99419ef0b394Smrg if test "x$ASCIIDOC" != "x"; then 99429ef0b394Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 99439ef0b394Smrg fi 99449ef0b394Smrg have_asciidoc=no 99459ef0b394Smrgelse 99469ef0b394Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 99479ef0b394Smrgfi 99489ef0b394Smrgm4_ifval([$1], 99499ef0b394Smrg[if test "$have_asciidoc" = yes; then 99509ef0b394Smrg # scrape the asciidoc version 99519ef0b394Smrg AC_MSG_CHECKING([the asciidoc version]) 99529ef0b394Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 99539ef0b394Smrg AC_MSG_RESULT([$asciidoc_version]) 99549ef0b394Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 99559ef0b394Smrg [if test "x$use_asciidoc" = xauto; then 99569ef0b394Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 99579ef0b394Smrg have_asciidoc=no 99589ef0b394Smrg else 99599ef0b394Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 99609ef0b394Smrg fi]) 99619ef0b394Smrgfi]) 99629ef0b394SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 99639ef0b394Smrg]) # XORG_WITH_ASCIIDOC 9964d17cd367Smrg 99659ef0b394Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9966fb5e8d76Smrg# ------------------------------------------- 99679ef0b394Smrg# Minimum version: 1.5.0 99689ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9969fb5e8d76Smrg# Minimum version for optional DOT checking: 1.18.0 99709ef0b394Smrg# 99719ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 99729ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 99739ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 99749ef0b394Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 99759ef0b394Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 99769ef0b394Smrg# --with-doxygen assumes 'auto'. 99779ef0b394Smrg# 99789ef0b394Smrg# Interface to module: 99799ef0b394Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 99809ef0b394Smrg# DOXYGEN: returns the path of the doxygen program found 99819ef0b394Smrg# returns the path set by the user in the environment 99829ef0b394Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 99839ef0b394Smrg# 'no' user instructs the module not to use doxygen 99849ef0b394Smrg# 99859ef0b394Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9986d17cd367Smrg# 99879ef0b394SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 99889ef0b394SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9989fb5e8d76SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 99909ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 99919ef0b394SmrgAC_ARG_WITH(doxygen, 99929ef0b394Smrg AS_HELP_STRING([--with-doxygen], 99939ef0b394Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 99949ef0b394Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 99959ef0b394Smrgm4_undefine([_defopt]) 9996d17cd367Smrg 99979ef0b394Smrgif test "x$use_doxygen" = x"auto"; then 99989ef0b394Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 99999ef0b394Smrg if test "x$DOXYGEN" = "x"; then 100009ef0b394Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 100019ef0b394Smrg have_doxygen=no 100029ef0b394Smrg else 100039ef0b394Smrg have_doxygen=yes 100049ef0b394Smrg fi 100059ef0b394Smrgelif test "x$use_doxygen" = x"yes" ; then 100069ef0b394Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 100079ef0b394Smrg if test "x$DOXYGEN" = "x"; then 100089ef0b394Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 100099ef0b394Smrg fi 100109ef0b394Smrg have_doxygen=yes 100119ef0b394Smrgelif test "x$use_doxygen" = x"no" ; then 100129ef0b394Smrg if test "x$DOXYGEN" != "x"; then 100139ef0b394Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 100149ef0b394Smrg fi 100159ef0b394Smrg have_doxygen=no 10016d17cd367Smrgelse 100179ef0b394Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10018d17cd367Smrgfi 100199ef0b394Smrgm4_ifval([$1], 100209ef0b394Smrg[if test "$have_doxygen" = yes; then 100219ef0b394Smrg # scrape the doxygen version 100229ef0b394Smrg AC_MSG_CHECKING([the doxygen version]) 100239ef0b394Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 100249ef0b394Smrg AC_MSG_RESULT([$doxygen_version]) 100259ef0b394Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 100269ef0b394Smrg [if test "x$use_doxygen" = xauto; then 100279ef0b394Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 100289ef0b394Smrg have_doxygen=no 100299ef0b394Smrg else 100309ef0b394Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 100319ef0b394Smrg fi]) 100329ef0b394Smrgfi]) 10033fb5e8d76Smrg 10034fb5e8d76Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10035fb5e8d76Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10036fb5e8d76Smrgdnl HAVE_DOT = @HAVE_DOT@ 10037fb5e8d76SmrgHAVE_DOT=no 10038fb5e8d76Smrgif test "x$have_doxygen" = "xyes"; then 10039fb5e8d76Smrg AC_PATH_PROG([DOT], [dot]) 10040fb5e8d76Smrg if test "x$DOT" != "x"; then 10041fb5e8d76Smrg HAVE_DOT=yes 10042fb5e8d76Smrg fi 10043fb5e8d76Smrgfi 10044fb5e8d76Smrg 10045fb5e8d76SmrgAC_SUBST([HAVE_DOT]) 10046fb5e8d76SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 100479ef0b394SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 100489ef0b394Smrg]) # XORG_WITH_DOXYGEN 10049d17cd367Smrg 100509ef0b394Smrg# XORG_WITH_GROFF([DEFAULT]) 100519ef0b394Smrg# ---------------- 100529ef0b394Smrg# Minimum version: 1.6.0 100539ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10054d17cd367Smrg# 100559ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 100569ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 100579ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 100589ef0b394Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 100599ef0b394Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 100609ef0b394Smrg# --with-groff assumes 'auto'. 10061d17cd367Smrg# 100629ef0b394Smrg# Interface to module: 100639ef0b394Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 100649ef0b394Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 100659ef0b394Smrg# HAVE_GROFF_MS: the -ms macros package 100669ef0b394Smrg# GROFF: returns the path of the groff program found 100679ef0b394Smrg# returns the path set by the user in the environment 100689ef0b394Smrg# --with-groff: 'yes' user instructs the module to use groff 100699ef0b394Smrg# 'no' user instructs the module not to use groff 100709ef0b394Smrg# 100719ef0b394Smrg# Added in version 1.9.0: 100729ef0b394Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 100739ef0b394Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 100749ef0b394Smrg# psselect from the psutils package. 100759ef0b394Smrg# the ghostcript package. Refer to the grohtml man pages 100769ef0b394Smrg# 100779ef0b394Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 100789ef0b394Smrg# 100799ef0b394Smrg# OS and distros often splits groff in a basic and full package, the former 100809ef0b394Smrg# having the groff program and the later having devices, fonts and macros 100819ef0b394Smrg# Checking for the groff executable is not enough. 100829ef0b394Smrg# 100839ef0b394Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 100849ef0b394Smrg# unset HAVE_GROFF or GROFF env variables. 100859ef0b394Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 100869ef0b394Smrg# 100879ef0b394SmrgAC_DEFUN([XORG_WITH_GROFF],[ 100889ef0b394SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 100899ef0b394Smrgm4_define([_defopt], m4_default([$1], [auto])) 100909ef0b394SmrgAC_ARG_WITH(groff, 100919ef0b394Smrg AS_HELP_STRING([--with-groff], 100929ef0b394Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 100939ef0b394Smrg [use_groff=$withval], [use_groff=]_defopt) 100949ef0b394Smrgm4_undefine([_defopt]) 10095266e564dSmrg 100969ef0b394Smrgif test "x$use_groff" = x"auto"; then 100979ef0b394Smrg AC_PATH_PROG([GROFF], [groff]) 100989ef0b394Smrg if test "x$GROFF" = "x"; then 100999ef0b394Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 101009ef0b394Smrg have_groff=no 101019ef0b394Smrg else 101029ef0b394Smrg have_groff=yes 101039ef0b394Smrg fi 101049ef0b394Smrgelif test "x$use_groff" = x"yes" ; then 101059ef0b394Smrg AC_PATH_PROG([GROFF], [groff]) 101069ef0b394Smrg if test "x$GROFF" = "x"; then 101079ef0b394Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 101089ef0b394Smrg fi 101099ef0b394Smrg have_groff=yes 101109ef0b394Smrgelif test "x$use_groff" = x"no" ; then 101119ef0b394Smrg if test "x$GROFF" != "x"; then 101129ef0b394Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 101139ef0b394Smrg fi 101149ef0b394Smrg have_groff=no 10115d17cd367Smrgelse 101169ef0b394Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10117d17cd367Smrgfi 10118c5629e66Smrg 101199ef0b394Smrg# We have groff, test for the presence of the macro packages 101209ef0b394Smrgif test "x$have_groff" = x"yes"; then 101219ef0b394Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 101229ef0b394Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 101239ef0b394Smrg groff_ms_works=yes 101249ef0b394Smrg else 101259ef0b394Smrg groff_ms_works=no 101269ef0b394Smrg fi 101279ef0b394Smrg AC_MSG_RESULT([$groff_ms_works]) 101289ef0b394Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 101299ef0b394Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 101309ef0b394Smrg groff_mm_works=yes 101319ef0b394Smrg else 101329ef0b394Smrg groff_mm_works=no 101339ef0b394Smrg fi 101349ef0b394Smrg AC_MSG_RESULT([$groff_mm_works]) 101359ef0b394Smrgfi 10136266e564dSmrg 101379ef0b394Smrg# We have groff, test for HTML dependencies, one command per package 101389ef0b394Smrgif test "x$have_groff" = x"yes"; then 101399ef0b394Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 101409ef0b394Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 101419ef0b394Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 101429ef0b394Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 101439ef0b394Smrg have_groff_html=yes 101449ef0b394Smrg else 101459ef0b394Smrg have_groff_html=no 101469ef0b394Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 101479ef0b394Smrg fi 101489ef0b394Smrgfi 10149698f425bSmrg 101509ef0b394Smrg# Set Automake conditionals for Makefiles 101519ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 101529ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 101539ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 101549ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 101559ef0b394Smrg]) # XORG_WITH_GROFF 10156d17cd367Smrg 101579ef0b394Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 101589ef0b394Smrg# --------------------------------------- 101599ef0b394Smrg# Minimum version: 1.6.0 101609ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 101619ef0b394Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 101629ef0b394Smrg# 101639ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 101649ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 101659ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 101669ef0b394Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 101679ef0b394Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 101689ef0b394Smrg# --with-fop assumes 'auto'. 101699ef0b394Smrg# 101709ef0b394Smrg# Interface to module: 101719ef0b394Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 101729ef0b394Smrg# FOP: returns the path of the fop program found 101739ef0b394Smrg# returns the path set by the user in the environment 101749ef0b394Smrg# --with-fop: 'yes' user instructs the module to use fop 101759ef0b394Smrg# 'no' user instructs the module not to use fop 101769ef0b394Smrg# 101779ef0b394Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 101789ef0b394Smrg# 101799ef0b394SmrgAC_DEFUN([XORG_WITH_FOP],[ 101809ef0b394SmrgAC_ARG_VAR([FOP], [Path to fop command]) 101819ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 101829ef0b394SmrgAC_ARG_WITH(fop, 101839ef0b394Smrg AS_HELP_STRING([--with-fop], 101849ef0b394Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 101859ef0b394Smrg [use_fop=$withval], [use_fop=]_defopt) 101869ef0b394Smrgm4_undefine([_defopt]) 101879ef0b394Smrg 101889ef0b394Smrgif test "x$use_fop" = x"auto"; then 101899ef0b394Smrg AC_PATH_PROG([FOP], [fop]) 101909ef0b394Smrg if test "x$FOP" = "x"; then 101919ef0b394Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 101929ef0b394Smrg have_fop=no 101939ef0b394Smrg else 101949ef0b394Smrg have_fop=yes 101959ef0b394Smrg fi 101969ef0b394Smrgelif test "x$use_fop" = x"yes" ; then 101979ef0b394Smrg AC_PATH_PROG([FOP], [fop]) 101989ef0b394Smrg if test "x$FOP" = "x"; then 101999ef0b394Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 102009ef0b394Smrg fi 102019ef0b394Smrg have_fop=yes 102029ef0b394Smrgelif test "x$use_fop" = x"no" ; then 102039ef0b394Smrg if test "x$FOP" != "x"; then 102049ef0b394Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 102059ef0b394Smrg fi 102069ef0b394Smrg have_fop=no 102079ef0b394Smrgelse 102089ef0b394Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10209d17cd367Smrgfi 10210d17cd367Smrg 102119ef0b394Smrg# Test for a minimum version of fop, if provided. 102129ef0b394Smrgm4_ifval([$1], 102139ef0b394Smrg[if test "$have_fop" = yes; then 102149ef0b394Smrg # scrape the fop version 102159ef0b394Smrg AC_MSG_CHECKING([for fop minimum version]) 102169ef0b394Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 102179ef0b394Smrg AC_MSG_RESULT([$fop_version]) 102189ef0b394Smrg AS_VERSION_COMPARE([$fop_version], [$1], 102199ef0b394Smrg [if test "x$use_fop" = xauto; then 102209ef0b394Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 102219ef0b394Smrg have_fop=no 102229ef0b394Smrg else 102239ef0b394Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 102249ef0b394Smrg fi]) 102259ef0b394Smrgfi]) 102269ef0b394SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 102279ef0b394Smrg]) # XORG_WITH_FOP 10228d17cd367Smrg 10229fb5e8d76Smrg# XORG_WITH_M4([MIN-VERSION]) 10230fb5e8d76Smrg# --------------------------- 10231fb5e8d76Smrg# Minimum version: 1.19.0 10232fb5e8d76Smrg# 10233fb5e8d76Smrg# This macro attempts to locate an m4 macro processor which supports 10234fb5e8d76Smrg# -I option and is only useful for modules relying on M4 in order to 10235fb5e8d76Smrg# expand macros in source code files. 10236fb5e8d76Smrg# 10237fb5e8d76Smrg# Interface to module: 10238fb5e8d76Smrg# M4: returns the path of the m4 program found 10239fb5e8d76Smrg# returns the path set by the user in the environment 10240fb5e8d76Smrg# 10241fb5e8d76SmrgAC_DEFUN([XORG_WITH_M4], [ 10242fb5e8d76SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10243fb5e8d76Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10244fb5e8d76Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10245fb5e8d76Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10246fb5e8d76Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 10247fb5e8d76Smrg [$PATH:/usr/gnu/bin])]) 10248fb5e8d76Smrg 10249fb5e8d76SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 10250fb5e8d76Smrg]) # XORG_WITH_M4 10251fb5e8d76Smrg 102529ef0b394Smrg# XORG_WITH_PS2PDF([DEFAULT]) 102539ef0b394Smrg# ---------------- 102549ef0b394Smrg# Minimum version: 1.6.0 102559ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10256698f425bSmrg# 102579ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 102589ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 102599ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 102609ef0b394Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 102619ef0b394Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 102629ef0b394Smrg# --with-ps2pdf assumes 'auto'. 102639ef0b394Smrg# 102649ef0b394Smrg# Interface to module: 102659ef0b394Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 102669ef0b394Smrg# PS2PDF: returns the path of the ps2pdf program found 102679ef0b394Smrg# returns the path set by the user in the environment 102689ef0b394Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 102699ef0b394Smrg# 'no' user instructs the module not to use ps2pdf 102709ef0b394Smrg# 102719ef0b394Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 102729ef0b394Smrg# 102739ef0b394SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 102749ef0b394SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 102759ef0b394Smrgm4_define([_defopt], m4_default([$1], [auto])) 102769ef0b394SmrgAC_ARG_WITH(ps2pdf, 102779ef0b394Smrg AS_HELP_STRING([--with-ps2pdf], 102789ef0b394Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 102799ef0b394Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 102809ef0b394Smrgm4_undefine([_defopt]) 10281d17cd367Smrg 102829ef0b394Smrgif test "x$use_ps2pdf" = x"auto"; then 102839ef0b394Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 102849ef0b394Smrg if test "x$PS2PDF" = "x"; then 102859ef0b394Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 102869ef0b394Smrg have_ps2pdf=no 102879ef0b394Smrg else 102889ef0b394Smrg have_ps2pdf=yes 102899ef0b394Smrg fi 102909ef0b394Smrgelif test "x$use_ps2pdf" = x"yes" ; then 102919ef0b394Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 102929ef0b394Smrg if test "x$PS2PDF" = "x"; then 102939ef0b394Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 102949ef0b394Smrg fi 102959ef0b394Smrg have_ps2pdf=yes 102969ef0b394Smrgelif test "x$use_ps2pdf" = x"no" ; then 102979ef0b394Smrg if test "x$PS2PDF" != "x"; then 102989ef0b394Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 102999ef0b394Smrg fi 103009ef0b394Smrg have_ps2pdf=no 103019ef0b394Smrgelse 103029ef0b394Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 103039ef0b394Smrgfi 103049ef0b394SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 103059ef0b394Smrg]) # XORG_WITH_PS2PDF 10306d17cd367Smrg 103079ef0b394Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 103089ef0b394Smrg# ---------------- 103099ef0b394Smrg# Minimum version: 1.6.0 103109ef0b394Smrg# 103119ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 103129ef0b394Smrg# not at the appropriate level. This macro enables a builder to skip all 103139ef0b394Smrg# documentation targets except traditional man pages. 103149ef0b394Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 103159ef0b394Smrg# maximum flexibilty in controlling documentation building. 103169ef0b394Smrg# Refer to: 103179ef0b394Smrg# XORG_WITH_XMLTO --with-xmlto 103189ef0b394Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 103199ef0b394Smrg# XORG_WITH_DOXYGEN --with-doxygen 103209ef0b394Smrg# XORG_WITH_FOP --with-fop 103219ef0b394Smrg# XORG_WITH_GROFF --with-groff 103229ef0b394Smrg# XORG_WITH_PS2PDF --with-ps2pdf 103239ef0b394Smrg# 103249ef0b394Smrg# Interface to module: 103259ef0b394Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 103269ef0b394Smrg# --enable-docs: 'yes' user instructs the module to generate docs 103279ef0b394Smrg# 'no' user instructs the module not to generate docs 103289ef0b394Smrg# parm1: specify the default value, yes or no. 103299ef0b394Smrg# 103309ef0b394SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 103319ef0b394Smrgm4_define([docs_default], m4_default([$1], [yes])) 103329ef0b394SmrgAC_ARG_ENABLE(docs, 103339ef0b394Smrg AS_HELP_STRING([--enable-docs], 103349ef0b394Smrg [Enable building the documentation (default: ]docs_default[)]), 103359ef0b394Smrg [build_docs=$enableval], [build_docs=]docs_default) 103369ef0b394Smrgm4_undefine([docs_default]) 103379ef0b394SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 103389ef0b394SmrgAC_MSG_CHECKING([whether to build documentation]) 103399ef0b394SmrgAC_MSG_RESULT([$build_docs]) 103409ef0b394Smrg]) # XORG_ENABLE_DOCS 10341d17cd367Smrg 103429ef0b394Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 103439ef0b394Smrg# ---------------- 103449ef0b394Smrg# Minimum version: 1.6.0 10345698f425bSmrg# 103469ef0b394Smrg# This macro enables a builder to skip all developer documentation. 103479ef0b394Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 103489ef0b394Smrg# maximum flexibilty in controlling documentation building. 103499ef0b394Smrg# Refer to: 103509ef0b394Smrg# XORG_WITH_XMLTO --with-xmlto 103519ef0b394Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 103529ef0b394Smrg# XORG_WITH_DOXYGEN --with-doxygen 103539ef0b394Smrg# XORG_WITH_FOP --with-fop 103549ef0b394Smrg# XORG_WITH_GROFF --with-groff 103559ef0b394Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10356698f425bSmrg# 103579ef0b394Smrg# Interface to module: 103589ef0b394Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 103599ef0b394Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 103609ef0b394Smrg# 'no' user instructs the module not to generate developer docs 103619ef0b394Smrg# parm1: specify the default value, yes or no. 10362698f425bSmrg# 103639ef0b394SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 103649ef0b394Smrgm4_define([devel_default], m4_default([$1], [yes])) 103659ef0b394SmrgAC_ARG_ENABLE(devel-docs, 103669ef0b394Smrg AS_HELP_STRING([--enable-devel-docs], 103679ef0b394Smrg [Enable building the developer documentation (default: ]devel_default[)]), 103689ef0b394Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 103699ef0b394Smrgm4_undefine([devel_default]) 103709ef0b394SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 103719ef0b394SmrgAC_MSG_CHECKING([whether to build developer documentation]) 103729ef0b394SmrgAC_MSG_RESULT([$build_devel_docs]) 103739ef0b394Smrg]) # XORG_ENABLE_DEVEL_DOCS 10374698f425bSmrg 103759ef0b394Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 103769ef0b394Smrg# ---------------- 103779ef0b394Smrg# Minimum version: 1.6.0 103789ef0b394Smrg# 103799ef0b394Smrg# This macro enables a builder to skip all functional specification targets. 103809ef0b394Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 103819ef0b394Smrg# maximum flexibilty in controlling documentation building. 103829ef0b394Smrg# Refer to: 103839ef0b394Smrg# XORG_WITH_XMLTO --with-xmlto 103849ef0b394Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 103859ef0b394Smrg# XORG_WITH_DOXYGEN --with-doxygen 103869ef0b394Smrg# XORG_WITH_FOP --with-fop 103879ef0b394Smrg# XORG_WITH_GROFF --with-groff 103889ef0b394Smrg# XORG_WITH_PS2PDF --with-ps2pdf 103899ef0b394Smrg# 103909ef0b394Smrg# Interface to module: 103919ef0b394Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 103929ef0b394Smrg# --enable-specs: 'yes' user instructs the module to generate specs 103939ef0b394Smrg# 'no' user instructs the module not to generate specs 103949ef0b394Smrg# parm1: specify the default value, yes or no. 103959ef0b394Smrg# 103969ef0b394SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 103979ef0b394Smrgm4_define([spec_default], m4_default([$1], [yes])) 103989ef0b394SmrgAC_ARG_ENABLE(specs, 103999ef0b394Smrg AS_HELP_STRING([--enable-specs], 104009ef0b394Smrg [Enable building the specs (default: ]spec_default[)]), 104019ef0b394Smrg [build_specs=$enableval], [build_specs=]spec_default) 104029ef0b394Smrgm4_undefine([spec_default]) 104039ef0b394SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 104049ef0b394SmrgAC_MSG_CHECKING([whether to build functional specifications]) 104059ef0b394SmrgAC_MSG_RESULT([$build_specs]) 104069ef0b394Smrg]) # XORG_ENABLE_SPECS 10407698f425bSmrg 104089ef0b394Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 104099ef0b394Smrg# ---------------------------------------------- 104109ef0b394Smrg# Minimum version: 1.13.0 104119ef0b394Smrg# 104129ef0b394Smrg# This macro enables a builder to enable/disable unit testing 104139ef0b394Smrg# It makes no assumption about the test cases implementation 104149ef0b394Smrg# Test cases may or may not use Automake "Support for test suites" 104159ef0b394Smrg# They may or may not use the software utility library GLib 104169ef0b394Smrg# 104179ef0b394Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 104189ef0b394Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 104199ef0b394Smrg# The variable enable_unit_tests is used by other macros in this file. 104209ef0b394Smrg# 104219ef0b394Smrg# Interface to module: 104229ef0b394Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 104239ef0b394Smrg# enable_unit_tests: used in configure.ac for additional configuration 104249ef0b394Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 104259ef0b394Smrg# 'no' user instructs the module not to build tests 104269ef0b394Smrg# parm1: specify the default value, yes or no. 104279ef0b394Smrg# 104289ef0b394SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 104299ef0b394SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 104309ef0b394SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 104319ef0b394SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 104329ef0b394Smrgm4_define([_defopt], m4_default([$1], [auto])) 104339ef0b394SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 104349ef0b394Smrg [Enable building unit test cases (default: ]_defopt[)]), 104359ef0b394Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 104369ef0b394Smrgm4_undefine([_defopt]) 104379ef0b394SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 104389ef0b394SmrgAC_MSG_CHECKING([whether to build unit test cases]) 104399ef0b394SmrgAC_MSG_RESULT([$enable_unit_tests]) 104409ef0b394Smrg]) # XORG_ENABLE_UNIT_TESTS 104419ef0b394Smrg 10442fb5e8d76Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10443fb5e8d76Smrg# ------------------------------------------------------ 10444fb5e8d76Smrg# Minimum version: 1.17.0 10445fb5e8d76Smrg# 10446fb5e8d76Smrg# This macro enables a builder to enable/disable integration testing 10447fb5e8d76Smrg# It makes no assumption about the test cases' implementation 10448fb5e8d76Smrg# Test cases may or may not use Automake "Support for test suites" 10449fb5e8d76Smrg# 10450fb5e8d76Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10451fb5e8d76Smrg# usually requires less dependencies and may be built and run under less 10452fb5e8d76Smrg# stringent environments than integration tests. 10453fb5e8d76Smrg# 10454fb5e8d76Smrg# Interface to module: 10455fb5e8d76Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10456fb5e8d76Smrg# enable_integration_tests: used in configure.ac for additional configuration 10457fb5e8d76Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 10458fb5e8d76Smrg# 'no' user instructs the module not to build tests 10459fb5e8d76Smrg# parm1: specify the default value, yes or no. 10460fb5e8d76Smrg# 10461fb5e8d76SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10462fb5e8d76SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10463fb5e8d76Smrgm4_define([_defopt], m4_default([$1], [auto])) 10464fb5e8d76SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10465fb5e8d76Smrg [Enable building integration test cases (default: ]_defopt[)]), 10466fb5e8d76Smrg [enable_integration_tests=$enableval], 10467fb5e8d76Smrg [enable_integration_tests=]_defopt) 10468fb5e8d76Smrgm4_undefine([_defopt]) 10469fb5e8d76SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10470fb5e8d76Smrg [test "x$enable_integration_tests" != xno]) 10471fb5e8d76SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10472fb5e8d76SmrgAC_MSG_RESULT([$enable_integration_tests]) 10473fb5e8d76Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 10474fb5e8d76Smrg 104759ef0b394Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 104769ef0b394Smrg# ---------------------------------------- 104779ef0b394Smrg# Minimum version: 1.13.0 104789ef0b394Smrg# 104799ef0b394Smrg# GLib is a library which provides advanced data structures and functions. 104809ef0b394Smrg# This macro enables a module to test for the presence of Glib. 104819ef0b394Smrg# 104829ef0b394Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 104839ef0b394Smrg# Otherwise the value of $enable_unit_tests is blank. 104849ef0b394Smrg# 10485fb5e8d76Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10486fb5e8d76Smrg# test support usually requires less dependencies and may be built and run under 10487fb5e8d76Smrg# less stringent environments than integration tests. 10488fb5e8d76Smrg# 104899ef0b394Smrg# Interface to module: 104909ef0b394Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 104919ef0b394Smrg# with_glib: used in configure.ac to know if GLib has been found 104929ef0b394Smrg# --with-glib: 'yes' user instructs the module to use glib 104939ef0b394Smrg# 'no' user instructs the module not to use glib 104949ef0b394Smrg# 104959ef0b394SmrgAC_DEFUN([XORG_WITH_GLIB],[ 104969ef0b394SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 104979ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 104989ef0b394SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 104999ef0b394Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 105009ef0b394Smrg [with_glib=$withval], [with_glib=]_defopt) 105019ef0b394Smrgm4_undefine([_defopt]) 105029ef0b394Smrg 105039ef0b394Smrghave_glib=no 105049ef0b394Smrg# Do not probe GLib if user explicitly disabled unit testing 105059ef0b394Smrgif test "x$enable_unit_tests" != x"no"; then 105069ef0b394Smrg # Do not probe GLib if user explicitly disabled it 105079ef0b394Smrg if test "x$with_glib" != x"no"; then 105089ef0b394Smrg m4_ifval( 105099ef0b394Smrg [$1], 105109ef0b394Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 105119ef0b394Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 105129ef0b394Smrg ) 10513d17cd367Smrg fi 10514698f425bSmrgfi 10515698f425bSmrg 105169ef0b394Smrg# Not having GLib when unit testing has been explicitly requested is an error 105179ef0b394Smrgif test "x$enable_unit_tests" = x"yes"; then 105189ef0b394Smrg if test "x$have_glib" = x"no"; then 105199ef0b394Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10520d17cd367Smrg fi 10521698f425bSmrgfi 10522d17cd367Smrg 105239ef0b394Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 105249ef0b394Smrgif test "x$enable_unit_tests" = x"no"; then 105259ef0b394Smrg if test "x$with_glib" = x"yes"; then 105269ef0b394Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 105279ef0b394Smrg fi 105289ef0b394Smrgfi 10529d17cd367Smrg 105309ef0b394Smrg# Not having GLib when it has been explicitly requested is an error 105319ef0b394Smrgif test "x$with_glib" = x"yes"; then 105329ef0b394Smrg if test "x$have_glib" = x"no"; then 105339ef0b394Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 105349ef0b394Smrg fi 105359ef0b394Smrgfi 10536d17cd367Smrg 105379ef0b394SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 105389ef0b394Smrg]) # XORG_WITH_GLIB 10539d17cd367Smrg 105409ef0b394Smrg# XORG_LD_WRAP([required|optional]) 105419ef0b394Smrg# --------------------------------- 105429ef0b394Smrg# Minimum version: 1.13.0 105439ef0b394Smrg# 105449ef0b394Smrg# Check if linker supports -wrap, passed via compiler flags 105459ef0b394Smrg# 105469ef0b394Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 105479ef0b394Smrg# Otherwise the value of $enable_unit_tests is blank. 105489ef0b394Smrg# 105499ef0b394Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 105509ef0b394Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 105519ef0b394Smrg# available, an argument of "optional" allows use when some unit tests require 105529ef0b394Smrg# ld -wrap and others do not. 105539ef0b394Smrg# 105549ef0b394SmrgAC_DEFUN([XORG_LD_WRAP],[ 105559ef0b394SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 105569ef0b394Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 105579ef0b394Smrg void __wrap_exit(int status) { return; }], 105589ef0b394Smrg [exit(0);])]) 105599ef0b394Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 105609ef0b394Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 105619ef0b394Smrg if test "x$have_ld_wrap" = x"no"; then 105629ef0b394Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 105639ef0b394Smrg fi 105649ef0b394Smrgfi 105659ef0b394SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10566d17cd367Smrg# 105679ef0b394Smrg]) # XORG_LD_WRAP 10568d17cd367Smrg 105699ef0b394Smrg# XORG_CHECK_LINKER_FLAGS 105709ef0b394Smrg# ----------------------- 105719ef0b394Smrg# SYNOPSIS 105729ef0b394Smrg# 105739ef0b394Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 105749ef0b394Smrg# 105759ef0b394Smrg# DESCRIPTION 105769ef0b394Smrg# 105779ef0b394Smrg# Check whether the given linker FLAGS work with the current language's 105789ef0b394Smrg# linker, or whether they give an error. 105799ef0b394Smrg# 105809ef0b394Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 105819ef0b394Smrg# success/failure. 105829ef0b394Smrg# 105839ef0b394Smrg# PROGRAM-SOURCE is the program source to link with, if needed 105849ef0b394Smrg# 105859ef0b394Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 105869ef0b394Smrg# 105879ef0b394Smrg# LICENSE 105889ef0b394Smrg# 105899ef0b394Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 105909ef0b394Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 105919ef0b394Smrg# Copyright (c) 2009 Matteo Frigo 105929ef0b394Smrg# 105939ef0b394Smrg# This program is free software: you can redistribute it and/or modify it 105949ef0b394Smrg# under the terms of the GNU General Public License as published by the 105959ef0b394Smrg# Free Software Foundation, either version 3 of the License, or (at your 105969ef0b394Smrg# option) any later version. 105979ef0b394Smrg# 105989ef0b394Smrg# This program is distributed in the hope that it will be useful, but 105999ef0b394Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 106009ef0b394Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 106019ef0b394Smrg# Public License for more details. 106029ef0b394Smrg# 106039ef0b394Smrg# You should have received a copy of the GNU General Public License along 106049ef0b394Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 106059ef0b394Smrg# 106069ef0b394Smrg# As a special exception, the respective Autoconf Macro's copyright owner 106079ef0b394Smrg# gives unlimited permission to copy, distribute and modify the configure 106089ef0b394Smrg# scripts that are the output of Autoconf when processing the Macro. You 106099ef0b394Smrg# need not follow the terms of the GNU General Public License when using 106109ef0b394Smrg# or distributing such scripts, even though portions of the text of the 106119ef0b394Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 106129ef0b394Smrg# all other use of the material that constitutes the Autoconf Macro. 106139ef0b394Smrg# 106149ef0b394Smrg# This special exception to the GPL applies to versions of the Autoconf 106159ef0b394Smrg# Macro released by the Autoconf Archive. When you make and distribute a 106169ef0b394Smrg# modified version of the Autoconf Macro, you may extend this special 106179ef0b394Smrg# exception to the GPL to apply to your modified version as well.# 106189ef0b394SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 106199ef0b394Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 106209ef0b394Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 106219ef0b394SmrgAS_LITERAL_IF([$1], 106229ef0b394Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 106239ef0b394Smrg ax_save_FLAGS=$LDFLAGS 106249ef0b394Smrg LDFLAGS="$1" 106259ef0b394Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 106269ef0b394Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 106279ef0b394Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 106289ef0b394Smrg LDFLAGS=$ax_save_FLAGS])], 106299ef0b394Smrg [ax_save_FLAGS=$LDFLAGS 106309ef0b394Smrg LDFLAGS="$1" 106319ef0b394Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 106329ef0b394Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 106339ef0b394Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 106349ef0b394Smrg LDFLAGS=$ax_save_FLAGS]) 106359ef0b394Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 106369ef0b394SmrgAC_MSG_RESULT($xorg_check_linker_flags) 106379ef0b394Smrgif test "x$xorg_check_linker_flags" = xyes; then 106389ef0b394Smrg m4_default([$2], :) 106399ef0b394Smrgelse 106409ef0b394Smrg m4_default([$3], :) 10641698f425bSmrgfi 106429ef0b394Smrg]) # XORG_CHECK_LINKER_FLAGS 10643698f425bSmrg 106449ef0b394Smrg# XORG_MEMORY_CHECK_FLAGS 106459ef0b394Smrg# ----------------------- 106469ef0b394Smrg# Minimum version: 1.16.0 10647698f425bSmrg# 106489ef0b394Smrg# This macro attempts to find appropriate memory checking functionality 106499ef0b394Smrg# for various platforms which unit testing code may use to catch various 106509ef0b394Smrg# forms of memory allocation and access errors in testing. 106519ef0b394Smrg# 106529ef0b394Smrg# Interface to module: 106539ef0b394Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 106549ef0b394Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 106559ef0b394Smrg# 106569ef0b394Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 106579ef0b394Smrg# 106589ef0b394SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10659d17cd367Smrg 106609ef0b394SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 106619ef0b394SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 106629ef0b394Smrg [Environment variables to enable memory checking in tests]) 106639ef0b394Smrg 106649ef0b394Smrg# Check for different types of support on different platforms 106659ef0b394Smrgcase $host_os in 106669ef0b394Smrg solaris*) 106679ef0b394Smrg AC_CHECK_LIB([umem], [umem_alloc], 106689ef0b394Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 106699ef0b394Smrg ;; 106709ef0b394Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 106719ef0b394Smrg # both directly and inverted, so should not be 0 or 255. 106729ef0b394Smrg malloc_debug_env='MALLOC_PERTURB_=15' 106739ef0b394Smrg ;; 106749ef0b394Smrg darwin*) 106759ef0b394Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 106769ef0b394Smrg ;; 106779ef0b394Smrg *bsd*) 106789ef0b394Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 106799ef0b394Smrg ;; 106809ef0b394Smrgesac 10681698f425bSmrg 106829ef0b394Smrg# User supplied flags override default flags 106839ef0b394Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 106849ef0b394Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10685698f425bSmrgfi 10686698f425bSmrg 106879ef0b394SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 106889ef0b394Smrg]) # XORG_WITH_LINT 10689698f425bSmrg 106909ef0b394Smrg# XORG_CHECK_MALLOC_ZERO 106919ef0b394Smrg# ---------------------- 106929ef0b394Smrg# Minimum version: 1.0.0 10693d17cd367Smrg# 106949ef0b394Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 106959ef0b394Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 106969ef0b394Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 106979ef0b394SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 106989ef0b394SmrgAC_ARG_ENABLE(malloc0returnsnull, 106999ef0b394Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 107009ef0b394Smrg [malloc(0) returns NULL (default: auto)]), 107019ef0b394Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 107029ef0b394Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10703698f425bSmrg 107049ef0b394SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 107059ef0b394Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10706fb5e8d76SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10707fb5e8d76Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 107089ef0b394Smrg#include <stdlib.h> 107099ef0b394Smrg],[ 107109ef0b394Smrg char *m0, *r0, *c0, *p; 107119ef0b394Smrg m0 = malloc(0); 107129ef0b394Smrg p = malloc(10); 107139ef0b394Smrg r0 = realloc(p,0); 107149ef0b394Smrg c0 = calloc(0,10); 107159ef0b394Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 107169ef0b394Smrg])], 10717fb5e8d76Smrg [xorg_cv_malloc0_returns_null=yes], 10718fb5e8d76Smrg [xorg_cv_malloc0_returns_null=no])]) 10719fb5e8d76SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 107209ef0b394Smrgfi 107219ef0b394SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10722698f425bSmrg 107239ef0b394Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 107249ef0b394Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 107259ef0b394Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 107269ef0b394Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 107279ef0b394Smrgelse 107289ef0b394Smrg MALLOC_ZERO_CFLAGS="" 107299ef0b394Smrg XMALLOC_ZERO_CFLAGS="" 107309ef0b394Smrg XTMALLOC_ZERO_CFLAGS="" 107319ef0b394Smrgfi 10732698f425bSmrg 107339ef0b394SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 107349ef0b394SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 107359ef0b394SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 107369ef0b394Smrg]) # XORG_CHECK_MALLOC_ZERO 10737698f425bSmrg 107389ef0b394Smrg# XORG_WITH_LINT() 107399ef0b394Smrg# ---------------- 107409ef0b394Smrg# Minimum version: 1.1.0 10741d17cd367Smrg# 107429ef0b394Smrg# This macro enables the use of a tool that flags some suspicious and 107439ef0b394Smrg# non-portable constructs (likely to be bugs) in C language source code. 107449ef0b394Smrg# It will attempt to locate the tool and use appropriate options. 107459ef0b394Smrg# There are various lint type tools on different platforms. 107469ef0b394Smrg# 107479ef0b394Smrg# Interface to module: 107489ef0b394Smrg# LINT: returns the path to the tool found on the platform 107499ef0b394Smrg# or the value set to LINT on the configure cmd line 107509ef0b394Smrg# also an Automake conditional 107519ef0b394Smrg# LINT_FLAGS: an Automake variable with appropriate flags 107529ef0b394Smrg# 107539ef0b394Smrg# --with-lint: 'yes' user instructs the module to use lint 107549ef0b394Smrg# 'no' user instructs the module not to use lint (default) 107559ef0b394Smrg# 107569ef0b394Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 107579ef0b394Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 107589ef0b394Smrg# 107599ef0b394SmrgAC_DEFUN([XORG_WITH_LINT],[ 10760d17cd367Smrg 107619ef0b394SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 107629ef0b394SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 107639ef0b394SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 107649ef0b394Smrg [Use a lint-style source code checker (default: disabled)])], 107659ef0b394Smrg [use_lint=$withval], [use_lint=no]) 10766d17cd367Smrg 107679ef0b394Smrg# Obtain platform specific info like program name and options 107689ef0b394Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 107699ef0b394Smrgcase $host_os in 107709ef0b394Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 107719ef0b394Smrg lint_name=splint 107729ef0b394Smrg lint_options="-badflag" 107739ef0b394Smrg ;; 107749ef0b394Smrg *freebsd* | *netbsd*) 107759ef0b394Smrg lint_name=lint 107769ef0b394Smrg lint_options="-u -b" 107779ef0b394Smrg ;; 107789ef0b394Smrg *solaris*) 107799ef0b394Smrg lint_name=lint 107809ef0b394Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 107819ef0b394Smrg ;; 10782d17cd367Smrgesac 107839ef0b394Smrg 107849ef0b394Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 107859ef0b394Smrgif test "x$use_lint" = x"yes" ; then 107869ef0b394Smrg AC_PATH_PROG([LINT], [$lint_name]) 107879ef0b394Smrg if test "x$LINT" = "x"; then 107889ef0b394Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 107899ef0b394Smrg fi 107909ef0b394Smrgelif test "x$use_lint" = x"no" ; then 107919ef0b394Smrg if test "x$LINT" != "x"; then 107929ef0b394Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 107939ef0b394Smrg fi 107949ef0b394Smrgelse 107959ef0b394Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10796698f425bSmrgfi 10797698f425bSmrg 107989ef0b394Smrg# User supplied flags override default flags 107999ef0b394Smrgif test "x$LINT_FLAGS" != "x"; then 108009ef0b394Smrg lint_options=$LINT_FLAGS 108019ef0b394Smrgfi 10802698f425bSmrg 108039ef0b394SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 108049ef0b394SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10805698f425bSmrg 108069ef0b394Smrg]) # XORG_WITH_LINT 10807698f425bSmrg 108089ef0b394Smrg# XORG_LINT_LIBRARY(LIBNAME) 108099ef0b394Smrg# -------------------------- 108109ef0b394Smrg# Minimum version: 1.1.0 108119ef0b394Smrg# 108129ef0b394Smrg# Sets up flags for building lint libraries for checking programs that call 108139ef0b394Smrg# functions in the library. 108149ef0b394Smrg# 108159ef0b394Smrg# Interface to module: 108169ef0b394Smrg# LINTLIB - Automake variable with the name of lint library file to make 108179ef0b394Smrg# MAKE_LINT_LIB - Automake conditional 108189ef0b394Smrg# 108199ef0b394Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 108209ef0b394Smrg# - 'no' user instructs the module not to create a lint library (default) 10821698f425bSmrg 108229ef0b394SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 108239ef0b394SmrgAC_REQUIRE([XORG_WITH_LINT]) 108249ef0b394SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 108259ef0b394Smrg [Create lint library (default: disabled)])], 108269ef0b394Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10827d17cd367Smrg 108289ef0b394Smrgif test "x$make_lint_lib" = x"yes" ; then 108299ef0b394Smrg LINTLIB=llib-l$1.ln 108309ef0b394Smrg if test "x$LINT" = "x"; then 108319ef0b394Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 108329ef0b394Smrg fi 108339ef0b394Smrgelif test "x$make_lint_lib" != x"no" ; then 108349ef0b394Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10835d17cd367Smrgfi 10836698f425bSmrg 108379ef0b394SmrgAC_SUBST(LINTLIB) 108389ef0b394SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 108399ef0b394Smrg 108409ef0b394Smrg]) # XORG_LINT_LIBRARY 108419ef0b394Smrg 108429ef0b394Smrg# XORG_COMPILER_BRAND 108439ef0b394Smrg# ------------------- 108449ef0b394Smrg# Minimum version: 1.14.0 10845d17cd367Smrg# 108469ef0b394Smrg# Checks for various brands of compilers and sets flags as appropriate: 108479ef0b394Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10848fb5e8d76Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 108499ef0b394Smrg# clang compiler - sets CLANGCC to "yes" 108509ef0b394Smrg# Intel compiler - sets INTELCC to "yes" 108519ef0b394Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 108529ef0b394Smrg# 108539ef0b394SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10854fb5e8d76SmrgAC_LANG_CASE( 10855fb5e8d76Smrg [C], [ 10856fb5e8d76Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10857fb5e8d76Smrg ], 10858fb5e8d76Smrg [C++], [ 10859fb5e8d76Smrg AC_REQUIRE([AC_PROG_CXX]) 10860fb5e8d76Smrg ] 10861fb5e8d76Smrg) 108629ef0b394SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 108639ef0b394SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 108649ef0b394SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 108659ef0b394Smrg]) # XORG_COMPILER_BRAND 10866698f425bSmrg 108679ef0b394Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10868d17cd367Smrg# --------------- 108699ef0b394Smrg# Minimum version: 1.16.0 10870d17cd367Smrg# 108719ef0b394Smrg# Test if the compiler works when passed the given flag as a command line argument. 108729ef0b394Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 108739ef0b394Smrg# next flag in the list until there are no more options. 108749ef0b394Smrg# 108759ef0b394Smrg# Note that this does not guarantee that the compiler supports the flag as some 108769ef0b394Smrg# compilers will simply ignore arguments that they do not understand, but we do 108779ef0b394Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 108789ef0b394Smrg# -Werror=unused-command-line-argument 108799ef0b394Smrg# 108809ef0b394SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 108819ef0b394Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 108829ef0b394Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 108839ef0b394Smrg 10884fb5e8d76SmrgAC_LANG_COMPILER_REQUIRE 10885fb5e8d76Smrg 10886fb5e8d76SmrgAC_LANG_CASE( 10887fb5e8d76Smrg [C], [ 10888fb5e8d76Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10889fb5e8d76Smrg define([PREFIX], [C]) 10890fb5e8d76Smrg define([CACHE_PREFIX], [cc]) 10891fb5e8d76Smrg define([COMPILER], [$CC]) 10892fb5e8d76Smrg ], 10893fb5e8d76Smrg [C++], [ 10894fb5e8d76Smrg define([PREFIX], [CXX]) 10895fb5e8d76Smrg define([CACHE_PREFIX], [cxx]) 10896fb5e8d76Smrg define([COMPILER], [$CXX]) 10897fb5e8d76Smrg ] 10898fb5e8d76Smrg) 10899fb5e8d76Smrg 10900fb5e8d76Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 109019ef0b394Smrg 10902fb5e8d76Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10903fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10904fb5e8d76Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10905fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 109069ef0b394Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10907fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10908fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10909fb5e8d76Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10910fb5e8d76Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 109119ef0b394Smrgfi 10912698f425bSmrg 10913fb5e8d76Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10914fb5e8d76Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10915fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 109169ef0b394Smrg fi 10917fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10918fb5e8d76Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10919fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 109209ef0b394Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10921fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10922fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10923fb5e8d76Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10924fb5e8d76Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 109259ef0b394Smrgfi 10926d17cd367Smrg 109279ef0b394Smrgfound="no" 109289ef0b394Smrgm4_foreach([flag], m4_cdr($@), [ 109299ef0b394Smrg if test $found = "no" ; then 10930fb5e8d76Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10931fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 109329ef0b394Smrg fi 109339ef0b394Smrg 10934fb5e8d76Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10935fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 109369ef0b394Smrg fi 109379ef0b394Smrg 10938fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 109399ef0b394Smrg 109409ef0b394Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10941fb5e8d76Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10942fb5e8d76Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10943fb5e8d76Smrg AC_CACHE_VAL($cacheid, 109449ef0b394Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10945fb5e8d76Smrg [eval $cacheid=yes], 10946fb5e8d76Smrg [eval $cacheid=no])]) 109479ef0b394Smrg 10948fb5e8d76Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 109499ef0b394Smrg 10950fb5e8d76Smrg eval supported=\$$cacheid 109519ef0b394Smrg AC_MSG_RESULT([$supported]) 109529ef0b394Smrg if test "$supported" = "yes" ; then 109539ef0b394Smrg $1="$$1 ]flag[" 109549ef0b394Smrg found="yes" 109559ef0b394Smrg fi 109569ef0b394Smrg fi 109579ef0b394Smrg]) 109589ef0b394Smrg]) # XORG_TESTSET_CFLAG 10959d17cd367Smrg 109609ef0b394Smrg# XORG_COMPILER_FLAGS 109619ef0b394Smrg# --------------- 109629ef0b394Smrg# Minimum version: 1.16.0 109639ef0b394Smrg# 10964fb5e8d76Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10965fb5e8d76Smrg# arguments supported by the selected compiler which do NOT alter the generated 10966fb5e8d76Smrg# code. These arguments will cause the compiler to print various warnings 10967fb5e8d76Smrg# during compilation AND turn a conservative set of warnings into errors. 109689ef0b394Smrg# 10969fb5e8d76Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10970fb5e8d76Smrg# future versions of util-macros as options are added to new compilers. 109719ef0b394Smrg# 109729ef0b394SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 109739ef0b394SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10974698f425bSmrg 109759ef0b394SmrgAC_ARG_ENABLE(selective-werror, 109769ef0b394Smrg AS_HELP_STRING([--disable-selective-werror], 109779ef0b394Smrg [Turn off selective compiler errors. (default: enabled)]), 109789ef0b394Smrg [SELECTIVE_WERROR=$enableval], 109799ef0b394Smrg [SELECTIVE_WERROR=yes]) 10980698f425bSmrg 10981fb5e8d76SmrgAC_LANG_CASE( 10982fb5e8d76Smrg [C], [ 10983fb5e8d76Smrg define([PREFIX], [C]) 10984fb5e8d76Smrg ], 10985fb5e8d76Smrg [C++], [ 10986fb5e8d76Smrg define([PREFIX], [CXX]) 10987fb5e8d76Smrg ] 10988fb5e8d76Smrg) 109899ef0b394Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 109909ef0b394Smrgif test "x$SUNCC" = "xyes"; then 10991fb5e8d76Smrg [BASE_]PREFIX[FLAGS]="-v" 109929ef0b394Smrgelse 10993fb5e8d76Smrg [BASE_]PREFIX[FLAGS]="" 109949ef0b394Smrgfi 10995698f425bSmrg 109969ef0b394Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10997fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10998fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10999fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11000fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11001fb5e8d76Smrg 11002fb5e8d76SmrgAC_LANG_CASE( 11003fb5e8d76Smrg [C], [ 11004fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11005fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11006fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11007fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11008fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11009fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11010fb5e8d76Smrg ] 11011fb5e8d76Smrg) 110129ef0b394Smrg 110139ef0b394Smrg# This chunk adds additional warnings that could catch undesired effects. 11014fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11015fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11016fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11017fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11018fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11019fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11020fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 110219ef0b394Smrg 110229ef0b394Smrg# These are currently disabled because they are noisy. They will be enabled 110239ef0b394Smrg# in the future once the codebase is sufficiently modernized to silence 110249ef0b394Smrg# them. For now, I don't want them to drown out the other warnings. 11025fb5e8d76Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11026fb5e8d76Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11027fb5e8d76Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 110289ef0b394Smrg 110299ef0b394Smrg# Turn some warnings into errors, so we don't accidently get successful builds 110309ef0b394Smrg# when there are problems that should be fixed. 110319ef0b394Smrg 110329ef0b394Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 11033fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11034fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11035fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11036fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11037fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11038fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11039fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11040fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11041fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11042fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11043fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11044fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11045fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 110469ef0b394Smrgelse 110479ef0b394SmrgAC_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]) 11048fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11049fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11050fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11051fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11052fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11053fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11054fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11055fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11056fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11057fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11058fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11059fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11060fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 110619ef0b394Smrgfi 11062698f425bSmrg 11063fb5e8d76SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 110649ef0b394Smrg]) # XORG_COMPILER_FLAGS 110659ef0b394Smrg 110669ef0b394Smrg# XORG_CWARNFLAGS 110679ef0b394Smrg# --------------- 110689ef0b394Smrg# Minimum version: 1.2.0 110699ef0b394Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11070698f425bSmrg# 110719ef0b394Smrg# Defines CWARNFLAGS to enable C compiler warnings. 110729ef0b394Smrg# 110739ef0b394Smrg# This function is deprecated because it defines -fno-strict-aliasing 110749ef0b394Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 110759ef0b394Smrg# is needed, then it should be added explicitly in the module when 110769ef0b394Smrg# it is updated to use BASE_CFLAGS. 110779ef0b394Smrg# 110789ef0b394SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 110799ef0b394SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 110809ef0b394SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11081fb5e8d76SmrgAC_LANG_CASE( 11082fb5e8d76Smrg [C], [ 11083fb5e8d76Smrg CWARNFLAGS="$BASE_CFLAGS" 11084fb5e8d76Smrg if test "x$GCC" = xyes ; then 11085fb5e8d76Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11086fb5e8d76Smrg fi 11087fb5e8d76Smrg AC_SUBST(CWARNFLAGS) 11088fb5e8d76Smrg ] 11089fb5e8d76Smrg) 110909ef0b394Smrg]) # XORG_CWARNFLAGS 11091698f425bSmrg 110929ef0b394Smrg# XORG_STRICT_OPTION 110939ef0b394Smrg# ----------------------- 110949ef0b394Smrg# Minimum version: 1.3.0 110959ef0b394Smrg# 110969ef0b394Smrg# Add configure option to enable strict compilation flags, such as treating 110979ef0b394Smrg# warnings as fatal errors. 110989ef0b394Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 11099fb5e8d76Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 111009ef0b394Smrg# 111019ef0b394Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 111029ef0b394Smrg# when strict compilation is unconditionally desired. 111039ef0b394SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 111049ef0b394SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 111059ef0b394SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11106698f425bSmrg 111079ef0b394SmrgAC_ARG_ENABLE(strict-compilation, 111089ef0b394Smrg AS_HELP_STRING([--enable-strict-compilation], 111099ef0b394Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 111109ef0b394Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11111698f425bSmrg 11112fb5e8d76SmrgAC_LANG_CASE( 11113fb5e8d76Smrg [C], [ 11114fb5e8d76Smrg define([PREFIX], [C]) 11115fb5e8d76Smrg ], 11116fb5e8d76Smrg [C++], [ 11117fb5e8d76Smrg define([PREFIX], [CXX]) 11118fb5e8d76Smrg ] 11119fb5e8d76Smrg) 11120fb5e8d76Smrg 11121fb5e8d76Smrg[STRICT_]PREFIX[FLAGS]="" 11122fb5e8d76SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11123fb5e8d76SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11124698f425bSmrg 111259ef0b394Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 111269ef0b394Smrg# activate it with -Werror, so we add it here explicitly. 11127fb5e8d76SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11128698f425bSmrg 111299ef0b394Smrgif test "x$STRICT_COMPILE" = "xyes"; then 11130fb5e8d76Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11131fb5e8d76Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11132698f425bSmrgfi 11133fb5e8d76SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 11134fb5e8d76SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11135fb5e8d76SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 111369ef0b394Smrg]) # XORG_STRICT_OPTION 11137698f425bSmrg 111389ef0b394Smrg# XORG_DEFAULT_OPTIONS 111399ef0b394Smrg# -------------------- 111409ef0b394Smrg# Minimum version: 1.3.0 11141698f425bSmrg# 111429ef0b394Smrg# Defines default options for X.Org modules. 111439ef0b394Smrg# 111449ef0b394SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 111459ef0b394SmrgAC_REQUIRE([AC_PROG_INSTALL]) 111469ef0b394SmrgXORG_COMPILER_FLAGS 111479ef0b394SmrgXORG_CWARNFLAGS 111489ef0b394SmrgXORG_STRICT_OPTION 111499ef0b394SmrgXORG_RELEASE_VERSION 111509ef0b394SmrgXORG_CHANGELOG 111519ef0b394SmrgXORG_INSTALL 111529ef0b394SmrgXORG_MANPAGE_SECTIONS 111539ef0b394Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 111549ef0b394Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 111559ef0b394Smrg]) # XORG_DEFAULT_OPTIONS 11156698f425bSmrg 111579ef0b394Smrg# XORG_INSTALL() 111589ef0b394Smrg# ---------------- 111599ef0b394Smrg# Minimum version: 1.4.0 111609ef0b394Smrg# 111619ef0b394Smrg# Defines the variable INSTALL_CMD as the command to copy 111629ef0b394Smrg# INSTALL from $prefix/share/util-macros. 111639ef0b394Smrg# 111649ef0b394SmrgAC_DEFUN([XORG_INSTALL], [ 111659ef0b394SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 111669ef0b394Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 111679ef0b394SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 111689ef0b394Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 111699ef0b394Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 111709ef0b394Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 111719ef0b394SmrgAC_SUBST([INSTALL_CMD]) 111729ef0b394Smrg]) # XORG_INSTALL 111739ef0b394Smrgdnl Copyright 2005 Red Hat, Inc 111749ef0b394Smrgdnl 111759ef0b394Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 111769ef0b394Smrgdnl documentation for any purpose is hereby granted without fee, provided that 111779ef0b394Smrgdnl the above copyright notice appear in all copies and that both that 111789ef0b394Smrgdnl copyright notice and this permission notice appear in supporting 111799ef0b394Smrgdnl documentation. 111809ef0b394Smrgdnl 111819ef0b394Smrgdnl The above copyright notice and this permission notice shall be included 111829ef0b394Smrgdnl in all copies or substantial portions of the Software. 111839ef0b394Smrgdnl 111849ef0b394Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 111859ef0b394Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 111869ef0b394Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 111879ef0b394Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 111889ef0b394Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 111899ef0b394Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 111909ef0b394Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 111919ef0b394Smrgdnl 111929ef0b394Smrgdnl Except as contained in this notice, the name of the copyright holders shall 111939ef0b394Smrgdnl not be used in advertising or otherwise to promote the sale, use or 111949ef0b394Smrgdnl other dealings in this Software without prior written authorization 111959ef0b394Smrgdnl from the copyright holders. 111969ef0b394Smrgdnl 11197698f425bSmrg 111989ef0b394Smrg# XORG_RELEASE_VERSION 111999ef0b394Smrg# -------------------- 112009ef0b394Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11201fb5e8d76Smrg 112029ef0b394SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 112039ef0b394Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 112049ef0b394Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 112059ef0b394Smrg [Major version of this package]) 112069ef0b394Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 112079ef0b394Smrg if test "x$PVM" = "x"; then 112089ef0b394Smrg PVM="0" 112099ef0b394Smrg fi 112109ef0b394Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 112119ef0b394Smrg [$PVM], 112129ef0b394Smrg [Minor version of this package]) 112139ef0b394Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 112149ef0b394Smrg if test "x$PVP" = "x"; then 112159ef0b394Smrg PVP="0" 112169ef0b394Smrg fi 112179ef0b394Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 112189ef0b394Smrg [$PVP], 112199ef0b394Smrg [Patch version of this package]) 11220d17cd367Smrg]) 11221698f425bSmrg 112229ef0b394Smrg# XORG_CHANGELOG() 112239ef0b394Smrg# ---------------- 112249ef0b394Smrg# Minimum version: 1.2.0 11225698f425bSmrg# 112269ef0b394Smrg# Defines the variable CHANGELOG_CMD as the command to generate 112279ef0b394Smrg# ChangeLog from git. 112289ef0b394Smrg# 112299ef0b394Smrg# 112309ef0b394SmrgAC_DEFUN([XORG_CHANGELOG], [ 112319ef0b394SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 112329ef0b394Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 112339ef0b394Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 112349ef0b394Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 112359ef0b394SmrgAC_SUBST([CHANGELOG_CMD]) 112369ef0b394Smrg]) # XORG_CHANGELOG 11237698f425bSmrg 112389ef0b394Smrgdnl 112399ef0b394Smrgdnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 112409ef0b394Smrgdnl 112419ef0b394Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 112429ef0b394Smrgdnl copy of this software and associated documentation files (the "Software"), 112439ef0b394Smrgdnl to deal in the Software without restriction, including without limitation 112449ef0b394Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 112459ef0b394Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 112469ef0b394Smrgdnl Software is furnished to do so, subject to the following conditions: 112479ef0b394Smrgdnl 112489ef0b394Smrgdnl The above copyright notice and this permission notice (including the next 112499ef0b394Smrgdnl paragraph) shall be included in all copies or substantial portions of the 112509ef0b394Smrgdnl Software. 112519ef0b394Smrgdnl 112529ef0b394Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 112539ef0b394Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 112549ef0b394Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 112559ef0b394Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 112569ef0b394Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 112579ef0b394Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 112589ef0b394Smrgdnl DEALINGS IN THE SOFTWARE. 112599ef0b394Smrgdnl 11260698f425bSmrg 11261a3129944Smrg# XTRANS_TCP_FLAGS() 11262a3129944Smrg# ------------------ 11263a3129944Smrg# Find needed libraries for TCP sockets, and check for IPv6 support 11264a3129944SmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 11265a3129944Smrg # SVR4 hides these in libraries other than libc 11266a3129944Smrg AC_SEARCH_LIBS(socket, [socket]) 11267a3129944Smrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 11268a3129944Smrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 11269a3129944Smrg AC_CHECK_LIB([ws2_32],[main]) 11270a3129944Smrg fi 11271a3129944Smrg 11272a3129944Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 11273a3129944Smrg AC_ARG_ENABLE(ipv6, 11274a3129944Smrg AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 11275a3129944Smrg [IPV6CONN=$enableval], 11276a3129944Smrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 11277a3129944Smrg AC_MSG_CHECKING([if IPv6 support should be built]) 11278a3129944Smrg if test "$IPV6CONN" = "yes"; then 11279a3129944Smrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 11280a3129944Smrg fi 11281a3129944Smrg AC_MSG_RESULT($IPV6CONN) 11282a3129944Smrg 11283a3129944Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in 11284a3129944Smrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 11285a3129944Smrg AC_DEFINE([BSD44SOCKETS],1, 11286a3129944Smrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 11287a3129944Smrg#include <sys/types.h> 11288a3129944Smrg#include <sys/socket.h> 11289a3129944Smrg#include <netinet/in.h> 11290a3129944Smrg ]) 11291a3129944Smrg 11292a3129944Smrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 11293a3129944Smrg AC_CHECK_TYPES([socklen_t], [], [], [ 11294a3129944SmrgAC_INCLUDES_DEFAULT 11295a3129944Smrg#include <sys/socket.h>]) 11296a3129944Smrg 11297a3129944Smrg # XPG4v2/UNIX95 added msg_control - check to see if we need to define 11298a3129944Smrg # _XOPEN_SOURCE to get it (such as on Solaris) 11299a3129944Smrg AC_CHECK_MEMBER([struct msghdr.msg_control], [], [], 11300a3129944Smrg [ 11301a3129944SmrgAC_INCLUDES_DEFAULT 11302a3129944Smrg#include <sys/socket.h> 11303a3129944Smrg ]) 11304a3129944Smrg # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03 11305a3129944Smrg if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then 11306a3129944Smrg unset ac_cv_member_struct_msghdr_msg_control 11307a3129944Smrg AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600]) 11308a3129944Smrg AC_CHECK_MEMBER([struct msghdr.msg_control], 11309a3129944Smrg [AC_DEFINE([_XOPEN_SOURCE], [600], 11310a3129944Smrg [Defined if needed to expose struct msghdr.msg_control]) 11311a3129944Smrg ], [], [ 11312a3129944Smrg#define _XOPEN_SOURCE 600 11313a3129944SmrgAC_INCLUDES_DEFAULT 11314a3129944Smrg#include <sys/socket.h> 11315a3129944Smrg ]) 11316a3129944Smrg fi 11317a3129944Smrg # If that didn't work, fall back to XPG5/UNIX98 with C89 11318a3129944Smrg if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then 11319a3129944Smrg unset ac_cv_member_struct_msghdr_msg_control 11320a3129944Smrg AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500]) 11321a3129944Smrg AC_CHECK_MEMBER([struct msghdr.msg_control], 11322a3129944Smrg [AC_DEFINE([_XOPEN_SOURCE], [500], 11323a3129944Smrg [Defined if needed to expose struct msghdr.msg_control]) 11324a3129944Smrg ], [], [ 11325a3129944Smrg#define _XOPEN_SOURCE 500 11326a3129944SmrgAC_INCLUDES_DEFAULT 11327a3129944Smrg#include <sys/socket.h> 11328a3129944Smrg ]) 11329a3129944Smrg fi 11330a3129944Smrg 11331a3129944Smrg 11332a3129944Smrg]) # XTRANS_TCP_FLAGS 11333a3129944Smrg 11334a3129944Smrg# XTRANS_CONNECTION_FLAGS() 11335a3129944Smrg# ------------------------- 11336a3129944Smrg# Standard checks for which Xtrans transports to use by the Xorg packages 11337a3129944Smrg# that use Xtrans functions 11338a3129944SmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 11339a3129944Smrg AC_REQUIRE([AC_CANONICAL_HOST]) 11340a3129944Smrg [case $host_os in 11341a3129944Smrg mingw*) unixdef="no" ;; 11342a3129944Smrg *) unixdef="yes" ;; 11343a3129944Smrg esac] 11344a3129944Smrg AC_ARG_ENABLE(unix-transport, 11345a3129944Smrg AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 11346a3129944Smrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 11347a3129944Smrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 11348a3129944Smrg if test "$UNIXCONN" = "yes"; then 11349a3129944Smrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 11350a3129944Smrg fi 11351a3129944Smrg AC_MSG_RESULT($UNIXCONN) 11352a3129944Smrg AC_ARG_ENABLE(tcp-transport, 11353a3129944Smrg AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 11354a3129944Smrg [TCPCONN=$enableval], [TCPCONN=yes]) 11355a3129944Smrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 11356a3129944Smrg AC_MSG_RESULT($TCPCONN) 11357a3129944Smrg if test "$TCPCONN" = "yes"; then 11358a3129944Smrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 11359a3129944Smrg XTRANS_TCP_FLAGS 11360a3129944Smrg fi 11361a3129944Smrg [case $host_os in 11362a3129944Smrg solaris*|sco*|sysv4*) localdef="yes" ;; 11363a3129944Smrg *) localdef="no" ;; 11364a3129944Smrg esac] 11365a3129944Smrg AC_ARG_ENABLE(local-transport, 11366a3129944Smrg AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 11367a3129944Smrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 11368a3129944Smrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 11369a3129944Smrg AC_MSG_RESULT($LOCALCONN) 11370a3129944Smrg if test "$LOCALCONN" = "yes"; then 11371a3129944Smrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 11372a3129944Smrg fi 11373a3129944Smrg 11374a3129944Smrg]) # XTRANS_CONNECTION_FLAGS 11375a3129944Smrg 11376a3129944Smrg 11377a3129944Smrg# XTRANS_SECURE_RPC_FLAGS() 11378a3129944Smrg# ------------------------- 11379a3129944Smrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 11380a3129944Smrg# so that any necessary networking libraries are already found 11381a3129944SmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 11382a3129944Smrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 11383a3129944Smrg AC_ARG_ENABLE(secure-rpc, 11384a3129944Smrg AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 11385a3129944Smrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 11386a3129944Smrg 11387a3129944Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 11388a3129944Smrg FOUND_SECURE_RPC="no" 11389a3129944Smrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 11390a3129944Smrg [FOUND_SECURE_RPC="yes"]) 11391a3129944Smrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 11392a3129944Smrg if test "x$SECURE_RPC" = "xyes" ; then 11393a3129944Smrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 11394a3129944Smrg fi 11395a3129944Smrg SECURE_RPC="no" 11396a3129944Smrg else 11397a3129944Smrg dnl FreeBSD keeps getsecretkey in librpcsvc 11398a3129944Smrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 11399a3129944Smrg SECURE_RPC="yes" 11400a3129944Smrg fi 11401a3129944Smrg fi 11402a3129944Smrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 11403a3129944Smrg if test "x$SECURE_RPC" = "xyes" ; then 11404a3129944Smrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 11405a3129944Smrg fi 11406a3129944Smrg AC_MSG_RESULT($SECURE_RPC) 11407a3129944Smrg]) # XTRANS_SECURE_RPC_FLAGS 11408a3129944Smrg 11409a3129944Smrg 11410a3129944Smrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 11411a3129944Smrg# 11412a3129944Smrg# This file is free software; the Free Software Foundation 11413a3129944Smrg# gives unlimited permission to copy and/or distribute it, 11414a3129944Smrg# with or without modifications, as long as this notice is preserved. 11415a3129944Smrg 11416a3129944Smrg# AM_AUTOMAKE_VERSION(VERSION) 11417a3129944Smrg# ---------------------------- 11418a3129944Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 11419a3129944Smrg# generated from the m4 files accompanying Automake X.Y. 11420a3129944Smrg# (This private macro should not be called outside this file.) 11421a3129944SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 11422a3129944Smrg[am__api_version='1.15' 11423a3129944Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11424a3129944Smrgdnl require some minimum version. Point them to the right macro. 11425a3129944Smrgm4_if([$1], [1.15], [], 11426a3129944Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11427a3129944Smrg]) 11428a3129944Smrg 11429a3129944Smrg# _AM_AUTOCONF_VERSION(VERSION) 11430a3129944Smrg# ----------------------------- 11431a3129944Smrg# aclocal traces this macro to find the Autoconf version. 11432a3129944Smrg# This is a private macro too. Using m4_define simplifies 11433a3129944Smrg# the logic in aclocal, which can simply ignore this definition. 11434a3129944Smrgm4_define([_AM_AUTOCONF_VERSION], []) 11435a3129944Smrg 11436a3129944Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 11437a3129944Smrg# ------------------------------- 11438a3129944Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11439a3129944Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11440a3129944SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11441a3129944Smrg[AM_AUTOMAKE_VERSION([1.15])dnl 11442a3129944Smrgm4_ifndef([AC_AUTOCONF_VERSION], 11443a3129944Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11444a3129944Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11445a3129944Smrg 11446a3129944Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11447a3129944Smrg 11448a3129944Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11449a3129944Smrg# 11450a3129944Smrg# This file is free software; the Free Software Foundation 11451a3129944Smrg# gives unlimited permission to copy and/or distribute it, 11452a3129944Smrg# with or without modifications, as long as this notice is preserved. 11453a3129944Smrg 11454a3129944Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11455a3129944Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11456a3129944Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11457a3129944Smrg# 11458a3129944Smrg# Of course, Automake must honor this variable whenever it calls a 11459a3129944Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 11460a3129944Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 11461a3129944Smrg# depending on how configure is run. This is pretty annoying, since 11462a3129944Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11463a3129944Smrg# source directory, any form will work fine, but in subdirectories a 11464a3129944Smrg# relative path needs to be adjusted first. 11465a3129944Smrg# 11466a3129944Smrg# $ac_aux_dir/missing 11467a3129944Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 11468a3129944Smrg# $top_srcdir/$ac_aux_dir/missing 11469a3129944Smrg# fails if $ac_aux_dir is absolute, 11470a3129944Smrg# fails when called from a subdirectory in a VPATH build with 11471a3129944Smrg# a relative $ac_aux_dir 11472a3129944Smrg# 11473a3129944Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11474a3129944Smrg# are both prefixed by $srcdir. In an in-source build this is usually 11475a3129944Smrg# harmless because $srcdir is '.', but things will broke when you 11476a3129944Smrg# start a VPATH build or use an absolute $srcdir. 11477a3129944Smrg# 11478a3129944Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11479a3129944Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11480a3129944Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11481a3129944Smrg# and then we would define $MISSING as 11482a3129944Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 11483a3129944Smrg# This will work as long as MISSING is not called from configure, because 11484a3129944Smrg# unfortunately $(top_srcdir) has no meaning in configure. 11485a3129944Smrg# However there are other variables, like CC, which are often used in 11486a3129944Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 11487a3129944Smrg# 11488a3129944Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 11489a3129944Smrg# absolute PATH. The drawback is that using absolute paths prevent a 11490a3129944Smrg# configured tree to be moved without reconfiguration. 11491a3129944Smrg 11492a3129944SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 11493a3129944Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11494a3129944Smrg# Expand $ac_aux_dir to an absolute path. 11495a3129944Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 11496a3129944Smrg]) 11497a3129944Smrg 11498a3129944Smrg# AM_CONDITIONAL -*- Autoconf -*- 11499a3129944Smrg 11500a3129944Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11501a3129944Smrg# 11502a3129944Smrg# This file is free software; the Free Software Foundation 11503a3129944Smrg# gives unlimited permission to copy and/or distribute it, 11504a3129944Smrg# with or without modifications, as long as this notice is preserved. 11505a3129944Smrg 11506a3129944Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11507a3129944Smrg# ------------------------------------- 11508a3129944Smrg# Define a conditional. 11509a3129944SmrgAC_DEFUN([AM_CONDITIONAL], 11510a3129944Smrg[AC_PREREQ([2.52])dnl 11511a3129944Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11512a3129944Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11513a3129944SmrgAC_SUBST([$1_TRUE])dnl 11514a3129944SmrgAC_SUBST([$1_FALSE])dnl 11515a3129944Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11516a3129944Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11517a3129944Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 11518a3129944Smrgif $2; then 11519a3129944Smrg $1_TRUE= 11520a3129944Smrg $1_FALSE='#' 11521a3129944Smrgelse 11522a3129944Smrg $1_TRUE='#' 11523a3129944Smrg $1_FALSE= 11524a3129944Smrgfi 11525a3129944SmrgAC_CONFIG_COMMANDS_PRE( 11526a3129944Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11527a3129944Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 11528a3129944SmrgUsually this means the macro was only invoked conditionally.]]) 11529a3129944Smrgfi])]) 11530a3129944Smrg 11531a3129944Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11532a3129944Smrg# 11533a3129944Smrg# This file is free software; the Free Software Foundation 11534a3129944Smrg# gives unlimited permission to copy and/or distribute it, 11535a3129944Smrg# with or without modifications, as long as this notice is preserved. 11536a3129944Smrg 11537a3129944Smrg 11538a3129944Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11539a3129944Smrg# written in clear, in which case automake, when reading aclocal.m4, 11540a3129944Smrg# will think it sees a *use*, and therefore will trigger all it's 11541a3129944Smrg# C support machinery. Also note that it means that autoscan, seeing 11542a3129944Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11543a3129944Smrg 11544a3129944Smrg 11545a3129944Smrg# _AM_DEPENDENCIES(NAME) 11546a3129944Smrg# ---------------------- 11547a3129944Smrg# See how the compiler implements dependency checking. 11548a3129944Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11549a3129944Smrg# We try a few techniques and use that to set a single cache variable. 11550a3129944Smrg# 11551a3129944Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11552a3129944Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11553a3129944Smrg# dependency, and given that the user is not expected to run this macro, 11554a3129944Smrg# just rely on AC_PROG_CC. 11555a3129944SmrgAC_DEFUN([_AM_DEPENDENCIES], 11556a3129944Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 11557a3129944SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11558a3129944SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 11559a3129944SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 11560a3129944Smrg 11561a3129944Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11562a3129944Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11563a3129944Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11564a3129944Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11565a3129944Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11566a3129944Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11567a3129944Smrg [depcc="$$1" am_compiler_list=]) 11568a3129944Smrg 11569a3129944SmrgAC_CACHE_CHECK([dependency style of $depcc], 11570a3129944Smrg [am_cv_$1_dependencies_compiler_type], 11571a3129944Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11572a3129944Smrg # We make a subdir and do the tests there. Otherwise we can end up 11573a3129944Smrg # making bogus files that we don't know about and never remove. For 11574a3129944Smrg # instance it was reported that on HP-UX the gcc test will end up 11575a3129944Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 11576a3129944Smrg # in D". 11577a3129944Smrg rm -rf conftest.dir 11578a3129944Smrg mkdir conftest.dir 11579a3129944Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 11580a3129944Smrg # using a relative directory. 11581a3129944Smrg cp "$am_depcomp" conftest.dir 11582a3129944Smrg cd conftest.dir 11583a3129944Smrg # We will build objects and dependencies in a subdirectory because 11584a3129944Smrg # it helps to detect inapplicable dependency modes. For instance 11585a3129944Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 11586a3129944Smrg # side effect of compilation, but ICC will put the dependencies in 11587a3129944Smrg # the current directory while Tru64 will put them in the object 11588a3129944Smrg # directory. 11589a3129944Smrg mkdir sub 11590a3129944Smrg 11591a3129944Smrg am_cv_$1_dependencies_compiler_type=none 11592a3129944Smrg if test "$am_compiler_list" = ""; then 11593a3129944Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11594a3129944Smrg fi 11595a3129944Smrg am__universal=false 11596a3129944Smrg m4_case([$1], [CC], 11597a3129944Smrg [case " $depcc " in #( 11598a3129944Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11599a3129944Smrg esac], 11600a3129944Smrg [CXX], 11601a3129944Smrg [case " $depcc " in #( 11602a3129944Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11603a3129944Smrg esac]) 11604a3129944Smrg 11605a3129944Smrg for depmode in $am_compiler_list; do 11606a3129944Smrg # Setup a source with many dependencies, because some compilers 11607a3129944Smrg # like to wrap large dependency lists on column 80 (with \), and 11608a3129944Smrg # we should not choose a depcomp mode which is confused by this. 11609a3129944Smrg # 11610a3129944Smrg # We need to recreate these files for each test, as the compiler may 11611a3129944Smrg # overwrite some of them when testing with obscure command lines. 11612a3129944Smrg # This happens at least with the AIX C compiler. 11613a3129944Smrg : > sub/conftest.c 11614a3129944Smrg for i in 1 2 3 4 5 6; do 11615a3129944Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 11616a3129944Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11617a3129944Smrg # Solaris 10 /bin/sh. 11618a3129944Smrg echo '/* dummy */' > sub/conftst$i.h 11619a3129944Smrg done 11620a3129944Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11621a3129944Smrg 11622a3129944Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 11623a3129944Smrg # mode. It turns out that the SunPro C++ compiler does not properly 11624a3129944Smrg # handle '-M -o', and we need to detect this. Also, some Intel 11625a3129944Smrg # versions had trouble with output in subdirs. 11626a3129944Smrg am__obj=sub/conftest.${OBJEXT-o} 11627a3129944Smrg am__minus_obj="-o $am__obj" 11628a3129944Smrg case $depmode in 11629a3129944Smrg gcc) 11630a3129944Smrg # This depmode causes a compiler race in universal mode. 11631a3129944Smrg test "$am__universal" = false || continue 11632a3129944Smrg ;; 11633a3129944Smrg nosideeffect) 11634a3129944Smrg # After this tag, mechanisms are not by side-effect, so they'll 11635a3129944Smrg # only be used when explicitly requested. 11636a3129944Smrg if test "x$enable_dependency_tracking" = xyes; then 11637a3129944Smrg continue 11638a3129944Smrg else 11639a3129944Smrg break 11640a3129944Smrg fi 11641a3129944Smrg ;; 11642a3129944Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11643a3129944Smrg # This compiler won't grok '-c -o', but also, the minuso test has 11644a3129944Smrg # not run yet. These depmodes are late enough in the game, and 11645a3129944Smrg # so weak that their functioning should not be impacted. 11646a3129944Smrg am__obj=conftest.${OBJEXT-o} 11647a3129944Smrg am__minus_obj= 11648a3129944Smrg ;; 11649a3129944Smrg none) break ;; 11650a3129944Smrg esac 11651a3129944Smrg if depmode=$depmode \ 11652a3129944Smrg source=sub/conftest.c object=$am__obj \ 11653a3129944Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11654a3129944Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11655a3129944Smrg >/dev/null 2>conftest.err && 11656a3129944Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11657a3129944Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11658a3129944Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11659a3129944Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11660a3129944Smrg # icc doesn't choke on unknown options, it will just issue warnings 11661a3129944Smrg # or remarks (even with -Werror). So we grep stderr for any message 11662a3129944Smrg # that says an option was ignored or not supported. 11663a3129944Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 11664a3129944Smrg # icc: Command line warning: ignoring option '-M'; no argument required 11665a3129944Smrg # The diagnosis changed in icc 8.0: 11666a3129944Smrg # icc: Command line remark: option '-MP' not supported 11667a3129944Smrg if (grep 'ignoring option' conftest.err || 11668a3129944Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11669a3129944Smrg am_cv_$1_dependencies_compiler_type=$depmode 11670a3129944Smrg break 11671a3129944Smrg fi 11672a3129944Smrg fi 11673a3129944Smrg done 11674a3129944Smrg 11675a3129944Smrg cd .. 11676a3129944Smrg rm -rf conftest.dir 11677a3129944Smrgelse 11678a3129944Smrg am_cv_$1_dependencies_compiler_type=none 11679a3129944Smrgfi 11680a3129944Smrg]) 11681a3129944SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11682a3129944SmrgAM_CONDITIONAL([am__fastdep$1], [ 11683a3129944Smrg test "x$enable_dependency_tracking" != xno \ 11684a3129944Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11685a3129944Smrg]) 11686a3129944Smrg 11687a3129944Smrg 11688a3129944Smrg# AM_SET_DEPDIR 11689a3129944Smrg# ------------- 11690a3129944Smrg# Choose a directory name for dependency files. 11691a3129944Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11692a3129944SmrgAC_DEFUN([AM_SET_DEPDIR], 11693a3129944Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11694a3129944SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11695a3129944Smrg]) 11696a3129944Smrg 11697a3129944Smrg 11698a3129944Smrg# AM_DEP_TRACK 11699a3129944Smrg# ------------ 11700a3129944SmrgAC_DEFUN([AM_DEP_TRACK], 11701a3129944Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 11702a3129944SmrgAS_HELP_STRING( 11703a3129944Smrg [--enable-dependency-tracking], 11704a3129944Smrg [do not reject slow dependency extractors]) 11705a3129944SmrgAS_HELP_STRING( 11706a3129944Smrg [--disable-dependency-tracking], 11707a3129944Smrg [speeds up one-time build])]) 11708a3129944Smrgif test "x$enable_dependency_tracking" != xno; then 11709a3129944Smrg am_depcomp="$ac_aux_dir/depcomp" 11710a3129944Smrg AMDEPBACKSLASH='\' 11711a3129944Smrg am__nodep='_no' 11712a3129944Smrgfi 11713a3129944SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11714a3129944SmrgAC_SUBST([AMDEPBACKSLASH])dnl 11715a3129944Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11716a3129944SmrgAC_SUBST([am__nodep])dnl 11717a3129944Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 11718a3129944Smrg]) 11719a3129944Smrg 11720a3129944Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 11721a3129944Smrg 11722a3129944Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11723a3129944Smrg# 11724a3129944Smrg# This file is free software; the Free Software Foundation 11725a3129944Smrg# gives unlimited permission to copy and/or distribute it, 11726a3129944Smrg# with or without modifications, as long as this notice is preserved. 11727a3129944Smrg 11728a3129944Smrg 11729a3129944Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11730a3129944Smrg# ------------------------------ 11731a3129944SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11732a3129944Smrg[{ 11733a3129944Smrg # Older Autoconf quotes --file arguments for eval, but not when files 11734a3129944Smrg # are listed without --file. Let's play safe and only enable the eval 11735a3129944Smrg # if we detect the quoting. 11736a3129944Smrg case $CONFIG_FILES in 11737a3129944Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11738a3129944Smrg *) set x $CONFIG_FILES ;; 11739a3129944Smrg esac 11740a3129944Smrg shift 11741a3129944Smrg for mf 11742a3129944Smrg do 11743a3129944Smrg # Strip MF so we end up with the name of the file. 11744a3129944Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11745a3129944Smrg # Check whether this is an Automake generated Makefile or not. 11746a3129944Smrg # We used to match only the files named 'Makefile.in', but 11747a3129944Smrg # some people rename them; so instead we look at the file content. 11748a3129944Smrg # Grep'ing the first line is not enough: some people post-process 11749a3129944Smrg # each Makefile.in and add a new line on top of each file to say so. 11750a3129944Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11751a3129944Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11752a3129944Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11753a3129944Smrg dirpart=`AS_DIRNAME("$mf")` 11754a3129944Smrg else 11755a3129944Smrg continue 11756a3129944Smrg fi 11757a3129944Smrg # Extract the definition of DEPDIR, am__include, and am__quote 11758a3129944Smrg # from the Makefile without running 'make'. 11759a3129944Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11760a3129944Smrg test -z "$DEPDIR" && continue 11761a3129944Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11762a3129944Smrg test -z "$am__include" && continue 11763a3129944Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11764a3129944Smrg # Find all dependency output files, they are included files with 11765a3129944Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11766a3129944Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11767a3129944Smrg # expansion. 11768a3129944Smrg for file in `sed -n " 11769a3129944Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11770a3129944Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11771a3129944Smrg # Make sure the directory exists. 11772a3129944Smrg test -f "$dirpart/$file" && continue 11773a3129944Smrg fdir=`AS_DIRNAME(["$file"])` 11774a3129944Smrg AS_MKDIR_P([$dirpart/$fdir]) 11775a3129944Smrg # echo "creating $dirpart/$file" 11776a3129944Smrg echo '# dummy' > "$dirpart/$file" 11777a3129944Smrg done 11778a3129944Smrg done 11779a3129944Smrg} 11780a3129944Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11781a3129944Smrg 11782a3129944Smrg 11783a3129944Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11784a3129944Smrg# ----------------------------- 11785a3129944Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 11786a3129944Smrg# 11787a3129944Smrg# This code is only required when automatic dependency tracking 11788a3129944Smrg# is enabled. FIXME. This creates each '.P' file that we will 11789a3129944Smrg# need in order to bootstrap the dependency handling code. 11790a3129944SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11791a3129944Smrg[AC_CONFIG_COMMANDS([depfiles], 11792a3129944Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11793a3129944Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11794a3129944Smrg]) 11795a3129944Smrg 11796a3129944Smrg# Do all the work for Automake. -*- Autoconf -*- 11797a3129944Smrg 11798a3129944Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11799a3129944Smrg# 11800a3129944Smrg# This file is free software; the Free Software Foundation 11801a3129944Smrg# gives unlimited permission to copy and/or distribute it, 11802a3129944Smrg# with or without modifications, as long as this notice is preserved. 11803a3129944Smrg 11804a3129944Smrg# This macro actually does too much. Some checks are only needed if 11805a3129944Smrg# your package does certain things. But this isn't really a big deal. 11806a3129944Smrg 11807a3129944Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 11808a3129944Smrgm4_define([AC_PROG_CC], 11809a3129944Smrgm4_defn([AC_PROG_CC]) 11810a3129944Smrg[_AM_PROG_CC_C_O 11811a3129944Smrg]) 11812a3129944Smrg 11813a3129944Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11814a3129944Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 11815a3129944Smrg# ----------------------------------------------- 11816a3129944Smrg# The call with PACKAGE and VERSION arguments is the old style 11817a3129944Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11818a3129944Smrg# and VERSION should now be passed to AC_INIT and removed from 11819a3129944Smrg# the call to AM_INIT_AUTOMAKE. 11820a3129944Smrg# We support both call styles for the transition. After 11821a3129944Smrg# the next Automake release, Autoconf can make the AC_INIT 11822a3129944Smrg# arguments mandatory, and then we can depend on a new Autoconf 11823a3129944Smrg# release and drop the old call support. 11824a3129944SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11825a3129944Smrg[AC_PREREQ([2.65])dnl 11826a3129944Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11827a3129944Smrgdnl the ones we care about. 11828a3129944Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11829a3129944SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11830a3129944SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11831a3129944Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11832a3129944Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11833a3129944Smrg # is not polluted with repeated "-I." 11834a3129944Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11835a3129944Smrg # test to see if srcdir already configured 11836a3129944Smrg if test -f $srcdir/config.status; then 11837a3129944Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11838a3129944Smrg fi 11839a3129944Smrgfi 11840a3129944Smrg 11841a3129944Smrg# test whether we have cygpath 11842a3129944Smrgif test -z "$CYGPATH_W"; then 11843a3129944Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 11844a3129944Smrg CYGPATH_W='cygpath -w' 11845a3129944Smrg else 11846a3129944Smrg CYGPATH_W=echo 11847a3129944Smrg fi 11848a3129944Smrgfi 11849a3129944SmrgAC_SUBST([CYGPATH_W]) 11850a3129944Smrg 11851a3129944Smrg# Define the identity of the package. 11852a3129944Smrgdnl Distinguish between old-style and new-style calls. 11853a3129944Smrgm4_ifval([$2], 11854a3129944Smrg[AC_DIAGNOSE([obsolete], 11855a3129944Smrg [$0: two- and three-arguments forms are deprecated.]) 11856a3129944Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11857a3129944Smrg AC_SUBST([PACKAGE], [$1])dnl 11858a3129944Smrg AC_SUBST([VERSION], [$2])], 11859a3129944Smrg[_AM_SET_OPTIONS([$1])dnl 11860a3129944Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11861a3129944Smrgm4_if( 11862a3129944Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11863a3129944Smrg [ok:ok],, 11864a3129944Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11865a3129944Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11866a3129944Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11867a3129944Smrg 11868a3129944Smrg_AM_IF_OPTION([no-define],, 11869a3129944Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11870a3129944Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11871a3129944Smrg 11872a3129944Smrg# Some tools Automake needs. 11873a3129944SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11874a3129944SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11875a3129944SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11876a3129944SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11877a3129944SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11878a3129944SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11879a3129944SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11880a3129944SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11881a3129944SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11882a3129944SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11883a3129944Smrg# For better backward compatibility. To be removed once Automake 1.9.x 11884a3129944Smrg# dies out for good. For more background, see: 11885a3129944Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11886a3129944Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11887a3129944SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11888a3129944Smrg# We need awk for the "check" target (and possibly the TAP driver). The 11889a3129944Smrg# system "awk" is bad on some platforms. 11890a3129944SmrgAC_REQUIRE([AC_PROG_AWK])dnl 11891a3129944SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11892a3129944SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11893a3129944Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11894a3129944Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11895a3129944Smrg [_AM_PROG_TAR([v7])])]) 11896a3129944Smrg_AM_IF_OPTION([no-dependencies],, 11897a3129944Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11898a3129944Smrg [_AM_DEPENDENCIES([CC])], 11899a3129944Smrg [m4_define([AC_PROG_CC], 11900a3129944Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11901a3129944SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11902a3129944Smrg [_AM_DEPENDENCIES([CXX])], 11903a3129944Smrg [m4_define([AC_PROG_CXX], 11904a3129944Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11905a3129944SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11906a3129944Smrg [_AM_DEPENDENCIES([OBJC])], 11907a3129944Smrg [m4_define([AC_PROG_OBJC], 11908a3129944Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11909a3129944SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11910a3129944Smrg [_AM_DEPENDENCIES([OBJCXX])], 11911a3129944Smrg [m4_define([AC_PROG_OBJCXX], 11912a3129944Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11913a3129944Smrg]) 11914a3129944SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 11915a3129944Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 11916a3129944Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11917a3129944Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11918a3129944SmrgAC_CONFIG_COMMANDS_PRE(dnl 11919a3129944Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11920a3129944Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11921a3129944Smrg 11922a3129944Smrg# POSIX will say in a future version that running "rm -f" with no argument 11923a3129944Smrg# is OK; and we want to be able to make that assumption in our Makefile 11924a3129944Smrg# recipes. So use an aggressive probe to check that the usage we want is 11925a3129944Smrg# actually supported "in the wild" to an acceptable degree. 11926a3129944Smrg# See automake bug#10828. 11927a3129944Smrg# To make any issue more visible, cause the running configure to be aborted 11928a3129944Smrg# by default if the 'rm' program in use doesn't match our expectations; the 11929a3129944Smrg# user can still override this though. 11930a3129944Smrgif rm -f && rm -fr && rm -rf; then : OK; else 11931a3129944Smrg cat >&2 <<'END' 11932a3129944SmrgOops! 11933a3129944Smrg 11934a3129944SmrgYour 'rm' program seems unable to run without file operands specified 11935a3129944Smrgon the command line, even when the '-f' option is present. This is contrary 11936a3129944Smrgto the behaviour of most rm programs out there, and not conforming with 11937a3129944Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11938a3129944Smrg 11939a3129944SmrgPlease tell bug-automake@gnu.org about your system, including the value 11940a3129944Smrgof your $PATH and any error possibly output before this message. This 11941a3129944Smrgcan help us improve future automake versions. 11942a3129944Smrg 11943a3129944SmrgEND 11944a3129944Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 11945a3129944Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 11946a3129944Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 11947a3129944Smrg echo >&2 11948a3129944Smrg else 11949a3129944Smrg cat >&2 <<'END' 11950a3129944SmrgAborting the configuration process, to ensure you take notice of the issue. 11951a3129944Smrg 11952a3129944SmrgYou can download and install GNU coreutils to get an 'rm' implementation 11953a3129944Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 11954a3129944Smrg 11955a3129944SmrgIf you want to complete the configuration process using your problematic 11956a3129944Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 11957a3129944Smrgto "yes", and re-run configure. 11958a3129944Smrg 11959a3129944SmrgEND 11960a3129944Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 11961a3129944Smrg fi 11962a3129944Smrgfi 11963a3129944Smrgdnl The trailing newline in this macro's definition is deliberate, for 11964a3129944Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 11965a3129944Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 11966a3129944Smrg]) 11967a3129944Smrg 11968a3129944Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11969a3129944Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11970a3129944Smrgdnl mangled by Autoconf and run in a shell conditional statement. 11971a3129944Smrgm4_define([_AC_COMPILER_EXEEXT], 11972a3129944Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11973a3129944Smrg 11974a3129944Smrg# When config.status generates a header, we must update the stamp-h file. 11975a3129944Smrg# This file resides in the same directory as the config header 11976a3129944Smrg# that is generated. The stamp files are numbered to have different names. 11977a3129944Smrg 11978a3129944Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11979a3129944Smrg# loop where config.status creates the headers, so we can generate 11980a3129944Smrg# our stamp files there. 11981a3129944SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11982a3129944Smrg[# Compute $1's index in $config_headers. 11983a3129944Smrg_am_arg=$1 11984a3129944Smrg_am_stamp_count=1 11985a3129944Smrgfor _am_header in $config_headers :; do 11986a3129944Smrg case $_am_header in 11987a3129944Smrg $_am_arg | $_am_arg:* ) 11988a3129944Smrg break ;; 11989a3129944Smrg * ) 11990a3129944Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11991a3129944Smrg esac 11992a3129944Smrgdone 11993a3129944Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11994a3129944Smrg 11995a3129944Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11996a3129944Smrg# 11997a3129944Smrg# This file is free software; the Free Software Foundation 11998a3129944Smrg# gives unlimited permission to copy and/or distribute it, 11999a3129944Smrg# with or without modifications, as long as this notice is preserved. 12000a3129944Smrg 12001a3129944Smrg# AM_PROG_INSTALL_SH 12002a3129944Smrg# ------------------ 12003a3129944Smrg# Define $install_sh. 12004a3129944SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 12005a3129944Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12006a3129944Smrgif test x"${install_sh+set}" != xset; then 12007a3129944Smrg case $am_aux_dir in 12008a3129944Smrg *\ * | *\ *) 12009a3129944Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 12010a3129944Smrg *) 12011a3129944Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 12012a3129944Smrg esac 12013a3129944Smrgfi 12014a3129944SmrgAC_SUBST([install_sh])]) 12015a3129944Smrg 12016a3129944Smrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 12017a3129944Smrg# 12018a3129944Smrg# This file is free software; the Free Software Foundation 12019a3129944Smrg# gives unlimited permission to copy and/or distribute it, 12020a3129944Smrg# with or without modifications, as long as this notice is preserved. 12021a3129944Smrg 12022a3129944Smrg# Check whether the underlying file-system supports filenames 12023a3129944Smrg# with a leading dot. For instance MS-DOS doesn't. 12024a3129944SmrgAC_DEFUN([AM_SET_LEADING_DOT], 12025a3129944Smrg[rm -rf .tst 2>/dev/null 12026a3129944Smrgmkdir .tst 2>/dev/null 12027a3129944Smrgif test -d .tst; then 12028a3129944Smrg am__leading_dot=. 12029a3129944Smrgelse 12030a3129944Smrg am__leading_dot=_ 12031a3129944Smrgfi 12032a3129944Smrgrmdir .tst 2>/dev/null 12033a3129944SmrgAC_SUBST([am__leading_dot])]) 12034a3129944Smrg 12035a3129944Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 12036a3129944Smrg 12037a3129944Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12038a3129944Smrg# 12039a3129944Smrg# This file is free software; the Free Software Foundation 12040a3129944Smrg# gives unlimited permission to copy and/or distribute it, 12041a3129944Smrg# with or without modifications, as long as this notice is preserved. 12042a3129944Smrg 12043a3129944Smrg# AM_MAKE_INCLUDE() 12044a3129944Smrg# ----------------- 12045a3129944Smrg# Check to see how make treats includes. 12046a3129944SmrgAC_DEFUN([AM_MAKE_INCLUDE], 12047a3129944Smrg[am_make=${MAKE-make} 12048a3129944Smrgcat > confinc << 'END' 12049a3129944Smrgam__doit: 12050a3129944Smrg @echo this is the am__doit target 12051a3129944Smrg.PHONY: am__doit 12052a3129944SmrgEND 12053a3129944Smrg# If we don't find an include directive, just comment out the code. 12054a3129944SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 12055a3129944Smrgam__include="#" 12056a3129944Smrgam__quote= 12057a3129944Smrg_am_result=none 12058a3129944Smrg# First try GNU make style include. 12059a3129944Smrgecho "include confinc" > confmf 12060a3129944Smrg# Ignore all kinds of additional output from 'make'. 12061a3129944Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 12062a3129944Smrg*the\ am__doit\ target*) 12063a3129944Smrg am__include=include 12064a3129944Smrg am__quote= 12065a3129944Smrg _am_result=GNU 12066a3129944Smrg ;; 12067a3129944Smrgesac 12068a3129944Smrg# Now try BSD make style include. 12069a3129944Smrgif test "$am__include" = "#"; then 12070a3129944Smrg echo '.include "confinc"' > confmf 12071a3129944Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 12072a3129944Smrg *the\ am__doit\ target*) 12073a3129944Smrg am__include=.include 12074a3129944Smrg am__quote="\"" 12075a3129944Smrg _am_result=BSD 12076a3129944Smrg ;; 12077a3129944Smrg esac 12078a3129944Smrgfi 12079a3129944SmrgAC_SUBST([am__include]) 12080a3129944SmrgAC_SUBST([am__quote]) 12081a3129944SmrgAC_MSG_RESULT([$_am_result]) 12082a3129944Smrgrm -f confinc confmf 12083a3129944Smrg]) 12084a3129944Smrg 12085a3129944Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 12086a3129944Smrg 12087a3129944Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 12088a3129944Smrg# 12089a3129944Smrg# This file is free software; the Free Software Foundation 12090a3129944Smrg# gives unlimited permission to copy and/or distribute it, 12091a3129944Smrg# with or without modifications, as long as this notice is preserved. 12092a3129944Smrg 12093a3129944Smrg# AM_MISSING_PROG(NAME, PROGRAM) 12094a3129944Smrg# ------------------------------ 12095a3129944SmrgAC_DEFUN([AM_MISSING_PROG], 12096a3129944Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 12097a3129944Smrg$1=${$1-"${am_missing_run}$2"} 12098a3129944SmrgAC_SUBST($1)]) 12099a3129944Smrg 12100a3129944Smrg# AM_MISSING_HAS_RUN 12101a3129944Smrg# ------------------ 12102a3129944Smrg# Define MISSING if not defined so far and test if it is modern enough. 12103a3129944Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 12104a3129944SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 12105a3129944Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12106a3129944SmrgAC_REQUIRE_AUX_FILE([missing])dnl 12107a3129944Smrgif test x"${MISSING+set}" != xset; then 12108a3129944Smrg case $am_aux_dir in 12109a3129944Smrg *\ * | *\ *) 12110a3129944Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 12111a3129944Smrg *) 12112a3129944Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 12113a3129944Smrg esac 12114a3129944Smrgfi 12115a3129944Smrg# Use eval to expand $SHELL 12116a3129944Smrgif eval "$MISSING --is-lightweight"; then 12117a3129944Smrg am_missing_run="$MISSING " 12118a3129944Smrgelse 12119a3129944Smrg am_missing_run= 12120a3129944Smrg AC_MSG_WARN(['missing' script is too old or missing]) 12121a3129944Smrgfi 12122a3129944Smrg]) 12123a3129944Smrg 12124a3129944Smrg# Helper functions for option handling. -*- Autoconf -*- 12125a3129944Smrg 12126a3129944Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12127a3129944Smrg# 12128a3129944Smrg# This file is free software; the Free Software Foundation 12129a3129944Smrg# gives unlimited permission to copy and/or distribute it, 12130a3129944Smrg# with or without modifications, as long as this notice is preserved. 12131a3129944Smrg 12132a3129944Smrg# _AM_MANGLE_OPTION(NAME) 12133a3129944Smrg# ----------------------- 12134a3129944SmrgAC_DEFUN([_AM_MANGLE_OPTION], 12135a3129944Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 12136a3129944Smrg 12137a3129944Smrg# _AM_SET_OPTION(NAME) 12138a3129944Smrg# -------------------- 12139a3129944Smrg# Set option NAME. Presently that only means defining a flag for this option. 12140a3129944SmrgAC_DEFUN([_AM_SET_OPTION], 12141a3129944Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 12142a3129944Smrg 12143a3129944Smrg# _AM_SET_OPTIONS(OPTIONS) 12144a3129944Smrg# ------------------------ 12145a3129944Smrg# OPTIONS is a space-separated list of Automake options. 12146a3129944SmrgAC_DEFUN([_AM_SET_OPTIONS], 12147a3129944Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 12148a3129944Smrg 12149a3129944Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 12150a3129944Smrg# ------------------------------------------- 12151a3129944Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12152a3129944SmrgAC_DEFUN([_AM_IF_OPTION], 12153a3129944Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 12154a3129944Smrg 12155a3129944Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 12156a3129944Smrg# 12157a3129944Smrg# This file is free software; the Free Software Foundation 12158a3129944Smrg# gives unlimited permission to copy and/or distribute it, 12159a3129944Smrg# with or without modifications, as long as this notice is preserved. 12160a3129944Smrg 12161a3129944Smrg# _AM_PROG_CC_C_O 12162a3129944Smrg# --------------- 12163a3129944Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 12164a3129944Smrg# to automatically call this. 12165a3129944SmrgAC_DEFUN([_AM_PROG_CC_C_O], 12166a3129944Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12167a3129944SmrgAC_REQUIRE_AUX_FILE([compile])dnl 12168a3129944SmrgAC_LANG_PUSH([C])dnl 12169a3129944SmrgAC_CACHE_CHECK( 12170a3129944Smrg [whether $CC understands -c and -o together], 12171a3129944Smrg [am_cv_prog_cc_c_o], 12172a3129944Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 12173a3129944Smrg # Make sure it works both with $CC and with simple cc. 12174a3129944Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 12175a3129944Smrg # compilers refuse to overwrite an existing .o file with -o, 12176a3129944Smrg # though they will create one. 12177a3129944Smrg am_cv_prog_cc_c_o=yes 12178a3129944Smrg for am_i in 1 2; do 12179a3129944Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 12180a3129944Smrg && test -f conftest2.$ac_objext; then 12181a3129944Smrg : OK 12182a3129944Smrg else 12183a3129944Smrg am_cv_prog_cc_c_o=no 12184a3129944Smrg break 12185a3129944Smrg fi 12186a3129944Smrg done 12187a3129944Smrg rm -f core conftest* 12188a3129944Smrg unset am_i]) 12189a3129944Smrgif test "$am_cv_prog_cc_c_o" != yes; then 12190a3129944Smrg # Losing compiler, so override with the script. 12191a3129944Smrg # FIXME: It is wrong to rewrite CC. 12192a3129944Smrg # But if we don't then we get into trouble of one sort or another. 12193a3129944Smrg # A longer-term fix would be to have automake use am__CC in this case, 12194a3129944Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 12195a3129944Smrg CC="$am_aux_dir/compile $CC" 12196a3129944Smrgfi 12197a3129944SmrgAC_LANG_POP([C])]) 12198a3129944Smrg 12199a3129944Smrg# For backward compatibility. 12200a3129944SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 12201a3129944Smrg 12202a3129944Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12203a3129944Smrg# 12204a3129944Smrg# This file is free software; the Free Software Foundation 12205a3129944Smrg# gives unlimited permission to copy and/or distribute it, 12206a3129944Smrg# with or without modifications, as long as this notice is preserved. 12207a3129944Smrg 12208a3129944Smrg# AM_RUN_LOG(COMMAND) 12209a3129944Smrg# ------------------- 12210a3129944Smrg# Run COMMAND, save the exit status in ac_status, and log it. 12211a3129944Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 12212a3129944SmrgAC_DEFUN([AM_RUN_LOG], 12213a3129944Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 12214a3129944Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 12215a3129944Smrg ac_status=$? 12216a3129944Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 12217a3129944Smrg (exit $ac_status); }]) 12218a3129944Smrg 12219a3129944Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 12220a3129944Smrg 12221a3129944Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 12222a3129944Smrg# 12223a3129944Smrg# This file is free software; the Free Software Foundation 12224a3129944Smrg# gives unlimited permission to copy and/or distribute it, 12225a3129944Smrg# with or without modifications, as long as this notice is preserved. 12226a3129944Smrg 12227a3129944Smrg# AM_SANITY_CHECK 12228a3129944Smrg# --------------- 12229a3129944SmrgAC_DEFUN([AM_SANITY_CHECK], 12230a3129944Smrg[AC_MSG_CHECKING([whether build environment is sane]) 12231a3129944Smrg# Reject unsafe characters in $srcdir or the absolute working directory 12232a3129944Smrg# name. Accept space and tab only in the latter. 12233a3129944Smrgam_lf=' 12234a3129944Smrg' 12235a3129944Smrgcase `pwd` in 12236a3129944Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 12237a3129944Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 12238a3129944Smrgesac 12239a3129944Smrgcase $srcdir in 12240a3129944Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12241a3129944Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12242a3129944Smrgesac 12243a3129944Smrg 12244a3129944Smrg# Do 'set' in a subshell so we don't clobber the current shell's 12245a3129944Smrg# arguments. Must try -L first in case configure is actually a 12246a3129944Smrg# symlink; some systems play weird games with the mod time of symlinks 12247a3129944Smrg# (eg FreeBSD returns the mod time of the symlink's containing 12248a3129944Smrg# directory). 12249a3129944Smrgif ( 12250a3129944Smrg am_has_slept=no 12251a3129944Smrg for am_try in 1 2; do 12252a3129944Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 12253a3129944Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12254a3129944Smrg if test "$[*]" = "X"; then 12255a3129944Smrg # -L didn't work. 12256a3129944Smrg set X `ls -t "$srcdir/configure" conftest.file` 12257a3129944Smrg fi 12258a3129944Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 12259a3129944Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 12260a3129944Smrg 12261a3129944Smrg # If neither matched, then we have a broken ls. This can happen 12262a3129944Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 12263a3129944Smrg # broken ls alias from the environment. This has actually 12264a3129944Smrg # happened. Such a system could not be considered "sane". 12265a3129944Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12266a3129944Smrg alias in your environment]) 12267a3129944Smrg fi 12268a3129944Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 12269a3129944Smrg break 12270a3129944Smrg fi 12271a3129944Smrg # Just in case. 12272a3129944Smrg sleep 1 12273a3129944Smrg am_has_slept=yes 12274a3129944Smrg done 12275a3129944Smrg test "$[2]" = conftest.file 12276a3129944Smrg ) 12277a3129944Smrgthen 12278a3129944Smrg # Ok. 12279a3129944Smrg : 12280a3129944Smrgelse 12281a3129944Smrg AC_MSG_ERROR([newly created file is older than distributed files! 12282a3129944SmrgCheck your system clock]) 12283a3129944Smrgfi 12284a3129944SmrgAC_MSG_RESULT([yes]) 12285a3129944Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 12286a3129944Smrg# generated files are strictly newer. 12287a3129944Smrgam_sleep_pid= 12288a3129944Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 12289a3129944Smrg ( sleep 1 ) & 12290a3129944Smrg am_sleep_pid=$! 12291a3129944Smrgfi 12292a3129944SmrgAC_CONFIG_COMMANDS_PRE( 12293a3129944Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 12294a3129944Smrg if test -n "$am_sleep_pid"; then 12295a3129944Smrg # Hide warnings about reused PIDs. 12296a3129944Smrg wait $am_sleep_pid 2>/dev/null 12297a3129944Smrg fi 12298a3129944Smrg AC_MSG_RESULT([done])]) 12299a3129944Smrgrm -f conftest.file 12300a3129944Smrg]) 12301a3129944Smrg 12302a3129944Smrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 12303a3129944Smrg# 12304a3129944Smrg# This file is free software; the Free Software Foundation 12305a3129944Smrg# gives unlimited permission to copy and/or distribute it, 12306a3129944Smrg# with or without modifications, as long as this notice is preserved. 12307a3129944Smrg 12308a3129944Smrg# AM_SILENT_RULES([DEFAULT]) 12309a3129944Smrg# -------------------------- 12310a3129944Smrg# Enable less verbose build rules; with the default set to DEFAULT 12311a3129944Smrg# ("yes" being less verbose, "no" or empty being verbose). 12312a3129944SmrgAC_DEFUN([AM_SILENT_RULES], 12313a3129944Smrg[AC_ARG_ENABLE([silent-rules], [dnl 12314a3129944SmrgAS_HELP_STRING( 12315a3129944Smrg [--enable-silent-rules], 12316a3129944Smrg [less verbose build output (undo: "make V=1")]) 12317a3129944SmrgAS_HELP_STRING( 12318a3129944Smrg [--disable-silent-rules], 12319a3129944Smrg [verbose build output (undo: "make V=0")])dnl 12320a3129944Smrg]) 12321a3129944Smrgcase $enable_silent_rules in @%:@ ((( 12322a3129944Smrg yes) AM_DEFAULT_VERBOSITY=0;; 12323a3129944Smrg no) AM_DEFAULT_VERBOSITY=1;; 12324a3129944Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12325a3129944Smrgesac 12326a3129944Smrgdnl 12327a3129944Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12328a3129944Smrgdnl do not support nested variable expansions. 12329a3129944Smrgdnl See automake bug#9928 and bug#10237. 12330a3129944Smrgam_make=${MAKE-make} 12331a3129944SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 12332a3129944Smrg [am_cv_make_support_nested_variables], 12333a3129944Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 12334a3129944SmrgBAR0=false 12335a3129944SmrgBAR1=true 12336a3129944SmrgV=1 12337a3129944Smrgam__doit: 12338a3129944Smrg @$(TRUE) 12339a3129944Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12340a3129944Smrg am_cv_make_support_nested_variables=yes 12341a3129944Smrgelse 12342a3129944Smrg am_cv_make_support_nested_variables=no 12343a3129944Smrgfi]) 12344a3129944Smrgif test $am_cv_make_support_nested_variables = yes; then 12345a3129944Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 12346a3129944Smrg AM_V='$(V)' 12347a3129944Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12348a3129944Smrgelse 12349a3129944Smrg AM_V=$AM_DEFAULT_VERBOSITY 12350a3129944Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12351a3129944Smrgfi 12352a3129944SmrgAC_SUBST([AM_V])dnl 12353a3129944SmrgAM_SUBST_NOTMAKE([AM_V])dnl 12354a3129944SmrgAC_SUBST([AM_DEFAULT_V])dnl 12355a3129944SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12356a3129944SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12357a3129944SmrgAM_BACKSLASH='\' 12358a3129944SmrgAC_SUBST([AM_BACKSLASH])dnl 12359a3129944Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12360a3129944Smrg]) 12361a3129944Smrg 12362a3129944Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12363a3129944Smrg# 12364a3129944Smrg# This file is free software; the Free Software Foundation 12365a3129944Smrg# gives unlimited permission to copy and/or distribute it, 12366a3129944Smrg# with or without modifications, as long as this notice is preserved. 12367a3129944Smrg 12368a3129944Smrg# AM_PROG_INSTALL_STRIP 12369a3129944Smrg# --------------------- 12370a3129944Smrg# One issue with vendor 'install' (even GNU) is that you can't 12371a3129944Smrg# specify the program used to strip binaries. This is especially 12372a3129944Smrg# annoying in cross-compiling environments, where the build's strip 12373a3129944Smrg# is unlikely to handle the host's binaries. 12374a3129944Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 12375a3129944Smrg# always use install-sh in "make install-strip", and initialize 12376a3129944Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 12377a3129944SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 12378a3129944Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12379a3129944Smrg# Installed binaries are usually stripped using 'strip' when the user 12380a3129944Smrg# run "make install-strip". However 'strip' might not be the right 12381a3129944Smrg# tool to use in cross-compilation environments, therefore Automake 12382a3129944Smrg# will honor the 'STRIP' environment variable to overrule this program. 12383a3129944Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12384a3129944Smrgif test "$cross_compiling" != no; then 12385a3129944Smrg AC_CHECK_TOOL([STRIP], [strip], :) 12386a3129944Smrgfi 12387a3129944SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12388a3129944SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 12389a3129944Smrg 12390a3129944Smrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 12391a3129944Smrg# 12392a3129944Smrg# This file is free software; the Free Software Foundation 12393a3129944Smrg# gives unlimited permission to copy and/or distribute it, 12394a3129944Smrg# with or without modifications, as long as this notice is preserved. 12395a3129944Smrg 12396a3129944Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 12397a3129944Smrg# --------------------------- 12398a3129944Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12399a3129944Smrg# This macro is traced by Automake. 12400a3129944SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 12401a3129944Smrg 12402a3129944Smrg# AM_SUBST_NOTMAKE(VARIABLE) 12403a3129944Smrg# -------------------------- 12404a3129944Smrg# Public sister of _AM_SUBST_NOTMAKE. 12405a3129944SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12406a3129944Smrg 12407a3129944Smrg# Check how to create a tarball. -*- Autoconf -*- 12408698f425bSmrg 12409a3129944Smrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 12410a3129944Smrg# 12411a3129944Smrg# This file is free software; the Free Software Foundation 12412a3129944Smrg# gives unlimited permission to copy and/or distribute it, 12413a3129944Smrg# with or without modifications, as long as this notice is preserved. 12414698f425bSmrg 12415a3129944Smrg# _AM_PROG_TAR(FORMAT) 12416a3129944Smrg# -------------------- 12417a3129944Smrg# Check how to create a tarball in format FORMAT. 12418a3129944Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 12419a3129944Smrg# 12420a3129944Smrg# Substitute a variable $(am__tar) that is a command 12421a3129944Smrg# writing to stdout a FORMAT-tarball containing the directory 12422a3129944Smrg# $tardir. 12423a3129944Smrg# tardir=directory && $(am__tar) > result.tar 12424a3129944Smrg# 12425a3129944Smrg# Substitute a variable $(am__untar) that extract such 12426a3129944Smrg# a tarball read from stdin. 12427a3129944Smrg# $(am__untar) < result.tar 12428a3129944Smrg# 12429a3129944SmrgAC_DEFUN([_AM_PROG_TAR], 12430a3129944Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 12431a3129944Smrg# in the wild :-( We should find a proper way to deprecate it ... 12432a3129944SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 12433698f425bSmrg 12434a3129944Smrg# We'll loop over all known methods to create a tar archive until one works. 12435a3129944Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12436698f425bSmrg 12437a3129944Smrgm4_if([$1], [v7], 12438a3129944Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12439fb5e8d76Smrg 12440a3129944Smrg [m4_case([$1], 12441a3129944Smrg [ustar], 12442a3129944Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12443a3129944Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 12444a3129944Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12445a3129944Smrg # and bug#13588). 12446a3129944Smrg am_max_uid=2097151 # 2^21 - 1 12447a3129944Smrg am_max_gid=$am_max_uid 12448a3129944Smrg # The $UID and $GID variables are not portable, so we need to resort 12449a3129944Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12450a3129944Smrg # below are definitely unexpected, so allow the users to see them 12451a3129944Smrg # (that is, avoid stderr redirection). 12452a3129944Smrg am_uid=`id -u || echo unknown` 12453a3129944Smrg am_gid=`id -g || echo unknown` 12454a3129944Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12455a3129944Smrg if test $am_uid -le $am_max_uid; then 12456a3129944Smrg AC_MSG_RESULT([yes]) 12457a3129944Smrg else 12458a3129944Smrg AC_MSG_RESULT([no]) 12459a3129944Smrg _am_tools=none 12460a3129944Smrg fi 12461a3129944Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12462a3129944Smrg if test $am_gid -le $am_max_gid; then 12463a3129944Smrg AC_MSG_RESULT([yes]) 12464a3129944Smrg else 12465a3129944Smrg AC_MSG_RESULT([no]) 12466a3129944Smrg _am_tools=none 12467a3129944Smrg fi], 12468fb5e8d76Smrg 12469a3129944Smrg [pax], 12470a3129944Smrg [], 12471698f425bSmrg 12472a3129944Smrg [m4_fatal([Unknown tar format])]) 12473698f425bSmrg 12474a3129944Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 12475698f425bSmrg 12476a3129944Smrg # Go ahead even if we have the value already cached. We do so because we 12477a3129944Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 12478a3129944Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12479698f425bSmrg 12480a3129944Smrg for _am_tool in $_am_tools; do 12481a3129944Smrg case $_am_tool in 12482a3129944Smrg gnutar) 12483a3129944Smrg for _am_tar in tar gnutar gtar; do 12484a3129944Smrg AM_RUN_LOG([$_am_tar --version]) && break 12485a3129944Smrg done 12486a3129944Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12487a3129944Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12488a3129944Smrg am__untar="$_am_tar -xf -" 12489a3129944Smrg ;; 12490a3129944Smrg plaintar) 12491a3129944Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 12492a3129944Smrg # ustar tarball either. 12493a3129944Smrg (tar --version) >/dev/null 2>&1 && continue 12494a3129944Smrg am__tar='tar chf - "$$tardir"' 12495a3129944Smrg am__tar_='tar chf - "$tardir"' 12496a3129944Smrg am__untar='tar xf -' 12497a3129944Smrg ;; 12498a3129944Smrg pax) 12499a3129944Smrg am__tar='pax -L -x $1 -w "$$tardir"' 12500a3129944Smrg am__tar_='pax -L -x $1 -w "$tardir"' 12501a3129944Smrg am__untar='pax -r' 12502a3129944Smrg ;; 12503a3129944Smrg cpio) 12504a3129944Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12505a3129944Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12506a3129944Smrg am__untar='cpio -i -H $1 -d' 12507a3129944Smrg ;; 12508a3129944Smrg none) 12509a3129944Smrg am__tar=false 12510a3129944Smrg am__tar_=false 12511a3129944Smrg am__untar=false 12512a3129944Smrg ;; 12513a3129944Smrg esac 12514698f425bSmrg 12515a3129944Smrg # If the value was cached, stop now. We just wanted to have am__tar 12516a3129944Smrg # and am__untar set. 12517a3129944Smrg test -n "${am_cv_prog_tar_$1}" && break 12518a3129944Smrg 12519a3129944Smrg # tar/untar a dummy directory, and stop if the command works. 12520a3129944Smrg rm -rf conftest.dir 12521a3129944Smrg mkdir conftest.dir 12522a3129944Smrg echo GrepMe > conftest.dir/file 12523a3129944Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12524a3129944Smrg rm -rf conftest.dir 12525a3129944Smrg if test -s conftest.tar; then 12526a3129944Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 12527a3129944Smrg AM_RUN_LOG([cat conftest.dir/file]) 12528a3129944Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12529a3129944Smrg fi 12530a3129944Smrg done 12531a3129944Smrg rm -rf conftest.dir 12532a3129944Smrg 12533a3129944Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12534a3129944Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12535698f425bSmrg 12536a3129944SmrgAC_SUBST([am__tar]) 12537a3129944SmrgAC_SUBST([am__untar]) 12538a3129944Smrg]) # _AM_PROG_TAR 12539698f425bSmrg 12540