aclocal.m4 revision eca46af7
1eca46af7Smrg# generated automatically by aclocal 1.14.1 -*- Autoconf -*- 2eca46af7Smrg 3eca46af7Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 495b296d0Smrg 595b296d0Smrg# This file is free software; the Free Software Foundation 695b296d0Smrg# gives unlimited permission to copy and/or distribute it, 795b296d0Smrg# with or without modifications, as long as this notice is preserved. 895b296d0Smrg 995b296d0Smrg# This program is distributed in the hope that it will be useful, 1095b296d0Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1195b296d0Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1295b296d0Smrg# PARTICULAR PURPOSE. 1395b296d0Smrg 14eca46af7Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15ff89ac2bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16ff89ac2bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17eca46af7Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18eca46af7Smrg[m4_warning([this file was generated for autoconf 2.69. 19ff89ac2bSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20ff89ac2bSmrgIf you have problems, you may need to regenerate the build system entirely. 21eca46af7SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22ff89ac2bSmrg 23eca46af7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 242378475aSmrg# 25eca46af7Smrg# Copyright (C) 1996-2001, 2003-2014 Free Software Foundation, Inc. 26eca46af7Smrg# Written by Gordon Matzigkeit, 1996 27eca46af7Smrg# 28eca46af7Smrg# This file is free software; the Free Software Foundation gives 29eca46af7Smrg# unlimited permission to copy and/or distribute it, with or without 30eca46af7Smrg# modifications, as long as this notice is preserved. 3114330f12Smrg 32eca46af7Smrgm4_define([_LT_COPYING], [dnl 33eca46af7Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 34eca46af7Smrg# This is free software; see the source for copying conditions. There is NO 35eca46af7Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3614330f12Smrg 37eca46af7Smrg# GNU Libtool is free software; you can redistribute it and/or modify 38eca46af7Smrg# it under the terms of the GNU General Public License as published by 39eca46af7Smrg# the Free Software Foundation; either version 2 of of the License, or 40eca46af7Smrg# (at your option) any later version. 41eca46af7Smrg# 42eca46af7Smrg# As a special exception to the GNU General Public License, if you 43eca46af7Smrg# distribute this file as part of a program or library that is built 44eca46af7Smrg# using GNU Libtool, you may include this file under the same 45eca46af7Smrg# distribution terms that you use for the rest of that program. 46eca46af7Smrg# 47eca46af7Smrg# GNU Libtool is distributed in the hope that it will be useful, but 48eca46af7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 49eca46af7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50eca46af7Smrg# GNU General Public License for more details. 51eca46af7Smrg# 52eca46af7Smrg# You should have received a copy of the GNU General Public License 53eca46af7Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 54eca46af7Smrg]) 5514330f12Smrg 56eca46af7Smrg# serial 58 LT_INIT 5714330f12Smrg 5814330f12Smrg 59eca46af7Smrg# LT_PREREQ(VERSION) 60eca46af7Smrg# ------------------ 61eca46af7Smrg# Complain and exit if this libtool version is less that VERSION. 62eca46af7Smrgm4_defun([LT_PREREQ], 63eca46af7Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64eca46af7Smrg [m4_default([$3], 65eca46af7Smrg [m4_fatal([Libtool version $1 or higher is required], 66eca46af7Smrg 63)])], 67eca46af7Smrg [$2])]) 682378475aSmrg 6939713583Smrg 70eca46af7Smrg# _LT_CHECK_BUILDDIR 71eca46af7Smrg# ------------------ 72eca46af7Smrg# Complain if the absolute build directory name contains unusual characters 73eca46af7Smrgm4_defun([_LT_CHECK_BUILDDIR], 74eca46af7Smrg[case `pwd` in 75eca46af7Smrg *\ * | *\ *) 76eca46af7Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77eca46af7Smrgesac 782378475aSmrg]) 792378475aSmrg 802378475aSmrg 81eca46af7Smrg# LT_INIT([OPTIONS]) 82eca46af7Smrg# ------------------ 83eca46af7SmrgAC_DEFUN([LT_INIT], 84eca46af7Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85eca46af7SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86eca46af7SmrgAC_BEFORE([$0], [LT_LANG])dnl 87eca46af7SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 88eca46af7SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 89eca46af7Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 9095b296d0Smrg 91eca46af7Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 92eca46af7Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93eca46af7Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94eca46af7Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95eca46af7Smrgdnl unless we require an AC_DEFUNed macro: 96eca46af7SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 97eca46af7SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 98eca46af7SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 99eca46af7SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 100eca46af7Smrgm4_require([_LT_PROG_LTMAIN])dnl 10139713583Smrg 102eca46af7Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 10339713583Smrg 104eca46af7Smrgdnl Parse OPTIONS 105eca46af7Smrg_LT_SET_OPTIONS([$0], [$1]) 1062378475aSmrg 107eca46af7Smrg# This can be used to rebuild libtool when needed 108eca46af7SmrgLIBTOOL_DEPS=$ltmain 1092378475aSmrg 110eca46af7Smrg# Always use our own libtool. 111eca46af7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 112eca46af7SmrgAC_SUBST(LIBTOOL)dnl 1132378475aSmrg 114eca46af7Smrg_LT_SETUP 1152378475aSmrg 116eca46af7Smrg# Only expand once: 117eca46af7Smrgm4_define([LT_INIT]) 118eca46af7Smrg])# LT_INIT 1192378475aSmrg 120eca46af7Smrg# Old names: 121eca46af7SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122eca46af7SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123eca46af7Smrgdnl aclocal-1.4 backwards compatibility: 124eca46af7Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125eca46af7Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1262378475aSmrg 12795b296d0Smrg 128eca46af7Smrg# _LT_CC_BASENAME(CC) 129eca46af7Smrg# ------------------- 130eca46af7Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 131eca46af7Smrgm4_defun([_LT_CC_BASENAME], 132eca46af7Smrg[for cc_temp in $1""; do 133eca46af7Smrg case $cc_temp in 134eca46af7Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 135eca46af7Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 136eca46af7Smrg \-*) ;; 137eca46af7Smrg *) break;; 138eca46af7Smrg esac 139eca46af7Smrgdone 140eca46af7Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 141eca46af7Smrg]) 142e6f085baSmrg 14395b296d0Smrg 144eca46af7Smrg# _LT_FILEUTILS_DEFAULTS 145eca46af7Smrg# ---------------------- 146eca46af7Smrg# It is okay to use these file commands and assume they have been set 147eca46af7Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 148eca46af7Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 149eca46af7Smrg[: ${CP="cp -f"} 150eca46af7Smrg: ${MV="mv -f"} 151eca46af7Smrg: ${RM="rm -f"} 152eca46af7Smrg])# _LT_FILEUTILS_DEFAULTS 15395b296d0Smrg 15495b296d0Smrg 155eca46af7Smrg# _LT_SETUP 156eca46af7Smrg# --------- 157eca46af7Smrgm4_defun([_LT_SETUP], 158eca46af7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 159eca46af7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 160eca46af7SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 161eca46af7SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 16239713583Smrg 163eca46af7Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 164eca46af7Smrgdnl 165eca46af7Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 166eca46af7Smrg_LT_DECL([], [host], [0])dnl 167eca46af7Smrg_LT_DECL([], [host_os], [0])dnl 168eca46af7Smrgdnl 169eca46af7Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 170eca46af7Smrg_LT_DECL([], [build], [0])dnl 171eca46af7Smrg_LT_DECL([], [build_os], [0])dnl 172eca46af7Smrgdnl 173eca46af7SmrgAC_REQUIRE([AC_PROG_CC])dnl 174eca46af7SmrgAC_REQUIRE([LT_PATH_LD])dnl 175eca46af7SmrgAC_REQUIRE([LT_PATH_NM])dnl 176eca46af7Smrgdnl 177eca46af7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 178eca46af7Smrgtest -z "$LN_S" && LN_S="ln -s" 179eca46af7Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 180eca46af7Smrgdnl 181eca46af7SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 182eca46af7Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 183eca46af7Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 184eca46af7Smrgdnl 185eca46af7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 186eca46af7Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 187eca46af7Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 188eca46af7Smrgm4_require([_LT_CMD_RELOAD])dnl 189eca46af7Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 190eca46af7Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 191eca46af7Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 192eca46af7Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 193eca46af7Smrgm4_require([_LT_WITH_SYSROOT])dnl 194eca46af7Smrgm4_require([_LT_CMD_TRUNCATE])dnl 19539713583Smrg 196eca46af7Smrg_LT_CONFIG_LIBTOOL_INIT([ 197eca46af7Smrg# See if we are running on zsh, and set the options that allow our 198eca46af7Smrg# commands through without removal of \ escapes INIT. 199eca46af7Smrgif test -n "\${ZSH_VERSION+set}"; then 200eca46af7Smrg setopt NO_GLOB_SUBST 20114330f12Smrgfi 20214330f12Smrg]) 203eca46af7Smrgif test -n "${ZSH_VERSION+set}"; then 204eca46af7Smrg setopt NO_GLOB_SUBST 205eca46af7Smrgfi 20639713583Smrg 207eca46af7Smrg_LT_CHECK_OBJDIR 2082378475aSmrg 209eca46af7Smrgm4_require([_LT_TAG_COMPILER])dnl 2102378475aSmrg 211eca46af7Smrgcase $host_os in 212eca46af7Smrgaix3*) 213eca46af7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 214eca46af7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 215eca46af7Smrg # vanish in a puff of smoke. 216eca46af7Smrg if test set != "${COLLECT_NAMES+set}"; then 217eca46af7Smrg COLLECT_NAMES= 218eca46af7Smrg export COLLECT_NAMES 219eca46af7Smrg fi 220eca46af7Smrg ;; 221eca46af7Smrgesac 2222378475aSmrg 223eca46af7Smrg# Global variables: 224eca46af7Smrgofile=libtool 225eca46af7Smrgcan_build_shared=yes 2262378475aSmrg 227eca46af7Smrg# All known linkers require a '.a' archive for static linking (except MSVC, 228eca46af7Smrg# which needs '.lib'). 229eca46af7Smrglibext=a 2302378475aSmrg 231eca46af7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2322378475aSmrg 233eca46af7Smrgold_CC=$CC 234eca46af7Smrgold_CFLAGS=$CFLAGS 2352378475aSmrg 236eca46af7Smrg# Set sane defaults for various variables 237eca46af7Smrgtest -z "$CC" && CC=cc 238eca46af7Smrgtest -z "$LTCC" && LTCC=$CC 239eca46af7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 240eca46af7Smrgtest -z "$LD" && LD=ld 241eca46af7Smrgtest -z "$ac_objext" && ac_objext=o 2422378475aSmrg 243eca46af7Smrg_LT_CC_BASENAME([$compiler]) 2442378475aSmrg 245eca46af7Smrg# Only perform the check for file, if the check method requires it 246eca46af7Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 247eca46af7Smrgcase $deplibs_check_method in 248eca46af7Smrgfile_magic*) 249eca46af7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 250eca46af7Smrg _LT_PATH_MAGIC 25114330f12Smrg fi 252eca46af7Smrg ;; 253eca46af7Smrgesac 2542378475aSmrg 255eca46af7Smrg# Use C for the default configuration in the libtool script 256eca46af7SmrgLT_SUPPORTED_TAG([CC]) 257eca46af7Smrg_LT_LANG_C_CONFIG 258eca46af7Smrg_LT_LANG_DEFAULT_CONFIG 259eca46af7Smrg_LT_CONFIG_COMMANDS 260eca46af7Smrg])# _LT_SETUP 2612378475aSmrg 2622378475aSmrg 263eca46af7Smrg# _LT_PREPARE_SED_QUOTE_VARS 264eca46af7Smrg# -------------------------- 265eca46af7Smrg# Define a few sed substitution that help us do robust quoting. 266eca46af7Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 267eca46af7Smrg[# Backslashify metacharacters that are still active within 268eca46af7Smrg# double-quoted strings. 269eca46af7Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2702378475aSmrg 271eca46af7Smrg# Same as above, but do not quote variable references. 272eca46af7Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2732378475aSmrg 274eca46af7Smrg# Sed substitution to delay expansion of an escaped shell variable in a 275eca46af7Smrg# double_quote_subst'ed string. 276eca46af7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2772378475aSmrg 278eca46af7Smrg# Sed substitution to delay expansion of an escaped single quote. 279eca46af7Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2802378475aSmrg 281eca46af7Smrg# Sed substitution to avoid accidental globbing in evaled expressions 282eca46af7Smrgno_glob_subst='s/\*/\\\*/g' 283eca46af7Smrg]) 2842378475aSmrg 285eca46af7Smrg# _LT_PROG_LTMAIN 286eca46af7Smrg# --------------- 287eca46af7Smrg# Note that this code is called both from 'configure', and 'config.status' 288eca46af7Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 289eca46af7Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 290eca46af7Smrg# so we pass a copy along to make sure it has a sensible value anyway. 291eca46af7Smrgm4_defun([_LT_PROG_LTMAIN], 292eca46af7Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 293eca46af7Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 294eca46af7Smrgltmain=$ac_aux_dir/ltmain.sh 295eca46af7Smrg])# _LT_PROG_LTMAIN 2962378475aSmrg 2972378475aSmrg 2982378475aSmrg 299eca46af7Smrg# So that we can recreate a full libtool script including additional 300eca46af7Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 301eca46af7Smrg# in macros and then make a single call at the end using the 'libtool' 302eca46af7Smrg# label. 3032378475aSmrg 3042378475aSmrg 305eca46af7Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 306eca46af7Smrg# ---------------------------------------- 307eca46af7Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 308eca46af7Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 309eca46af7Smrg[m4_ifval([$1], 310eca46af7Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 311eca46af7Smrg [$1 312eca46af7Smrg])])]) 3132378475aSmrg 314eca46af7Smrg# Initialize. 315eca46af7Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3162378475aSmrg 3172378475aSmrg 318eca46af7Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 319eca46af7Smrg# ------------------------------ 320eca46af7Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 321eca46af7Smrgm4_define([_LT_CONFIG_LIBTOOL], 322eca46af7Smrg[m4_ifval([$1], 323eca46af7Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 324eca46af7Smrg [$1 325eca46af7Smrg])])]) 32614330f12Smrg 327eca46af7Smrg# Initialize. 328eca46af7Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3292378475aSmrg 3302378475aSmrg 331eca46af7Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 332eca46af7Smrg# ----------------------------------------------------- 333eca46af7Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 334eca46af7Smrg[_LT_CONFIG_LIBTOOL([$1]) 335eca46af7Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 33614330f12Smrg]) 3372378475aSmrg 3382378475aSmrg 339eca46af7Smrg# _LT_FORMAT_COMMENT([COMMENT]) 340eca46af7Smrg# ----------------------------- 341eca46af7Smrg# Add leading comment marks to the start of each line, and a trailing 342eca46af7Smrg# full-stop to the whole comment if one is not present already. 343eca46af7Smrgm4_define([_LT_FORMAT_COMMENT], 344eca46af7Smrg[m4_ifval([$1], [ 345eca46af7Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 346eca46af7Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 347eca46af7Smrg)]) 34839713583Smrg 34939713583Smrg 3502378475aSmrg 3512378475aSmrg 3522378475aSmrg 353eca46af7Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 354eca46af7Smrg# ------------------------------------------------------------------- 355eca46af7Smrg# CONFIGNAME is the name given to the value in the libtool script. 356eca46af7Smrg# VARNAME is the (base) name used in the configure script. 357eca46af7Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 358eca46af7Smrg# VARNAME. Any other value will be used directly. 359eca46af7Smrgm4_define([_LT_DECL], 360eca46af7Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 361eca46af7Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 362eca46af7Smrg [m4_ifval([$1], [$1], [$2])]) 363eca46af7Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 364eca46af7Smrg m4_ifval([$4], 365eca46af7Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 366eca46af7Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 367eca46af7Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3682378475aSmrg]) 3692378475aSmrg 3702378475aSmrg 371eca46af7Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 372eca46af7Smrg# -------------------------------------------------------- 373eca46af7Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3742378475aSmrg 3752378475aSmrg 376eca46af7Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 377eca46af7Smrg# ------------------------------------------------ 378eca46af7Smrgm4_define([lt_decl_tag_varnames], 379eca46af7Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3802378475aSmrg 3812378475aSmrg 382eca46af7Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 383eca46af7Smrg# --------------------------------------------------------- 384eca46af7Smrgm4_define([_lt_decl_filter], 385eca46af7Smrg[m4_case([$#], 386eca46af7Smrg [0], [m4_fatal([$0: too few arguments: $#])], 387eca46af7Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 388eca46af7Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 389eca46af7Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 390eca46af7Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 391eca46af7Smrg]) 3922378475aSmrg 3932378475aSmrg 394eca46af7Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 395eca46af7Smrg# -------------------------------------------------- 396eca46af7Smrgm4_define([lt_decl_quote_varnames], 397eca46af7Smrg[_lt_decl_filter([value], [1], $@)]) 3982378475aSmrg 3992378475aSmrg 400eca46af7Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 401eca46af7Smrg# --------------------------------------------------- 402eca46af7Smrgm4_define([lt_decl_dquote_varnames], 403eca46af7Smrg[_lt_decl_filter([value], [2], $@)]) 4042378475aSmrg 4052378475aSmrg 406eca46af7Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 407eca46af7Smrg# --------------------------------------------------- 408eca46af7Smrgm4_define([lt_decl_varnames_tagged], 409eca46af7Smrg[m4_assert([$# <= 2])dnl 410eca46af7Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 411eca46af7Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 412eca46af7Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 413eca46af7Smrgm4_define([_lt_decl_varnames_tagged], 414eca46af7Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 415eca46af7Smrg 416eca46af7Smrg 417eca46af7Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 418eca46af7Smrg# ------------------------------------------------ 419eca46af7Smrgm4_define([lt_decl_all_varnames], 420eca46af7Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 421eca46af7Smrg m4_if([$2], [], 422eca46af7Smrg m4_quote(lt_decl_varnames), 423eca46af7Smrg m4_quote(m4_shift($@))))[]dnl 424eca46af7Smrg]) 425eca46af7Smrgm4_define([_lt_decl_all_varnames], 426eca46af7Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 427eca46af7Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 428eca46af7Smrg]) 4292378475aSmrg 4302378475aSmrg 431eca46af7Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 432eca46af7Smrg# ------------------------------------ 433eca46af7Smrg# Quote a variable value, and forward it to 'config.status' so that its 434eca46af7Smrg# declaration there will have the same value as in 'configure'. VARNAME 435eca46af7Smrg# must have a single quote delimited value for this to work. 436eca46af7Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 437eca46af7Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 438eca46af7Smrg 439eca46af7Smrg 440eca46af7Smrg# _LT_CONFIG_STATUS_DECLARATIONS 441eca46af7Smrg# ------------------------------ 442eca46af7Smrg# We delimit libtool config variables with single quotes, so when 443eca46af7Smrg# we write them to config.status, we have to be sure to quote all 444eca46af7Smrg# embedded single quotes properly. In configure, this macro expands 445eca46af7Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 44614330f12Smrg# 447eca46af7Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 448eca46af7Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 449eca46af7Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 450eca46af7Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4512378475aSmrg 4522378475aSmrg 453eca46af7Smrg# _LT_LIBTOOL_TAGS 454eca46af7Smrg# ---------------- 455eca46af7Smrg# Output comment and list of tags supported by the script 456eca46af7Smrgm4_defun([_LT_LIBTOOL_TAGS], 457eca46af7Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 458eca46af7Smrgavailable_tags='_LT_TAGS'dnl 45914330f12Smrg]) 4602378475aSmrg 461eca46af7Smrg 462eca46af7Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 463eca46af7Smrg# ----------------------------------- 464eca46af7Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 465eca46af7Smrg# expand to a commented shell variable setting: 4662378475aSmrg# 467eca46af7Smrg# # Some comment about what VAR is for. 468eca46af7Smrg# visible_name=$lt_internal_name 469eca46af7Smrgm4_define([_LT_LIBTOOL_DECLARE], 470eca46af7Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 471eca46af7Smrg [description])))[]dnl 472eca46af7Smrgm4_pushdef([_libtool_name], 473eca46af7Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 474eca46af7Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 475eca46af7Smrg [0], [_libtool_name=[$]$1], 476eca46af7Smrg [1], [_libtool_name=$lt_[]$1], 477eca46af7Smrg [2], [_libtool_name=$lt_[]$1], 478eca46af7Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 479eca46af7Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 480eca46af7Smrg]) 4812378475aSmrg 4822378475aSmrg 483eca46af7Smrg# _LT_LIBTOOL_CONFIG_VARS 484eca46af7Smrg# ----------------------- 485eca46af7Smrg# Produce commented declarations of non-tagged libtool config variables 486eca46af7Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 487eca46af7Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 488eca46af7Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 489eca46af7Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 490eca46af7Smrg[m4_foreach([_lt_var], 491eca46af7Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 492eca46af7Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4932378475aSmrg 4942378475aSmrg 495eca46af7Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 496eca46af7Smrg# ------------------------- 497eca46af7Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 498eca46af7Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 499eca46af7Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5002378475aSmrg 5012378475aSmrg 502eca46af7Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 503eca46af7Smrg# ------------------------------ 504eca46af7Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5052378475aSmrg 5062378475aSmrg 507eca46af7Smrg# _LT_CONFIG_COMMANDS 508eca46af7Smrg# ------------------- 509eca46af7Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 510eca46af7Smrg# variables for single and double quote escaping we saved from calls 511eca46af7Smrg# to _LT_DECL, we can put quote escaped variables declarations 512eca46af7Smrg# into 'config.status', and then the shell code to quote escape them in 513eca46af7Smrg# for loops in 'config.status'. Finally, any additional code accumulated 514eca46af7Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 515eca46af7Smrgm4_defun([_LT_CONFIG_COMMANDS], 516eca46af7Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 517eca46af7Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 518eca46af7Smrg dnl instead of duplicating it all over again into config.status, 519eca46af7Smrg dnl then we will have config.status run $CONFIG_LT later, so it 520eca46af7Smrg dnl needs to know what name is stored there: 521eca46af7Smrg [AC_CONFIG_COMMANDS([libtool], 522eca46af7Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 523eca46af7Smrg dnl If the libtool generation code is destined for config.status, 524eca46af7Smrg dnl expand the accumulated commands and init code now: 525eca46af7Smrg [AC_CONFIG_COMMANDS([libtool], 526eca46af7Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 527eca46af7Smrg])#_LT_CONFIG_COMMANDS 5282378475aSmrg 5292378475aSmrg 530eca46af7Smrg# Initialize. 531eca46af7Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 532eca46af7Smrg[ 5332378475aSmrg 534eca46af7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 535eca46af7Smrg# if CDPATH is set. 536eca46af7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5372378475aSmrg 538eca46af7Smrgsed_quote_subst='$sed_quote_subst' 539eca46af7Smrgdouble_quote_subst='$double_quote_subst' 540eca46af7Smrgdelay_variable_subst='$delay_variable_subst' 541eca46af7Smrg_LT_CONFIG_STATUS_DECLARATIONS 542eca46af7SmrgLTCC='$LTCC' 543eca46af7SmrgLTCFLAGS='$LTCFLAGS' 544eca46af7Smrgcompiler='$compiler_DEFAULT' 5452378475aSmrg 546eca46af7Smrg# A function that is used when there is no print builtin or printf. 547eca46af7Smrgfunc_fallback_echo () 548eca46af7Smrg{ 549eca46af7Smrg eval 'cat <<_LTECHO_EOF 550eca46af7Smrg\$[]1 551eca46af7Smrg_LTECHO_EOF' 552eca46af7Smrg} 5532378475aSmrg 554eca46af7Smrg# Quote evaled strings. 555eca46af7Smrgfor var in lt_decl_all_varnames([[ \ 556eca46af7Smrg]], lt_decl_quote_varnames); do 557eca46af7Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 558eca46af7Smrg *[[\\\\\\\`\\"\\\$]]*) 559eca46af7Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 560eca46af7Smrg ;; 561eca46af7Smrg *) 562eca46af7Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 563eca46af7Smrg ;; 564eca46af7Smrg esac 565eca46af7Smrgdone 5662378475aSmrg 567eca46af7Smrg# Double-quote double-evaled strings. 568eca46af7Smrgfor var in lt_decl_all_varnames([[ \ 569eca46af7Smrg]], lt_decl_dquote_varnames); do 570eca46af7Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 571eca46af7Smrg *[[\\\\\\\`\\"\\\$]]*) 572eca46af7Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 573eca46af7Smrg ;; 574eca46af7Smrg *) 575eca46af7Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 576eca46af7Smrg ;; 577eca46af7Smrg esac 578eca46af7Smrgdone 5792378475aSmrg 580eca46af7Smrg_LT_OUTPUT_LIBTOOL_INIT 581eca46af7Smrg]) 5822378475aSmrg 583eca46af7Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 584eca46af7Smrg# ------------------------------------ 585eca46af7Smrg# Generate a child script FILE with all initialization necessary to 586eca46af7Smrg# reuse the environment learned by the parent script, and make the 587eca46af7Smrg# file executable. If COMMENT is supplied, it is inserted after the 588eca46af7Smrg# '#!' sequence but before initialization text begins. After this 589eca46af7Smrg# macro, additional text can be appended to FILE to form the body of 590eca46af7Smrg# the child script. The macro ends with non-zero status if the 591eca46af7Smrg# file could not be fully written (such as if the disk is full). 592eca46af7Smrgm4_ifdef([AS_INIT_GENERATED], 593eca46af7Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 594eca46af7Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 595eca46af7Smrg[m4_require([AS_PREPARE])]dnl 596eca46af7Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 597eca46af7Smrg[lt_write_fail=0 598eca46af7Smrgcat >$1 <<_ASEOF || lt_write_fail=1 599eca46af7Smrg#! $SHELL 600eca46af7Smrg# Generated by $as_me. 601eca46af7Smrg$2 602eca46af7SmrgSHELL=\${CONFIG_SHELL-$SHELL} 603eca46af7Smrgexport SHELL 604eca46af7Smrg_ASEOF 605eca46af7Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 606eca46af7SmrgAS_SHELL_SANITIZE 607eca46af7Smrg_AS_PREPARE 608eca46af7Smrgexec AS_MESSAGE_FD>&1 609eca46af7Smrg_ASEOF 610eca46af7Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 611eca46af7Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6122378475aSmrg 613eca46af7Smrg# LT_OUTPUT 614eca46af7Smrg# --------- 615eca46af7Smrg# This macro allows early generation of the libtool script (before 616eca46af7Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 617eca46af7Smrg# tests. 618eca46af7SmrgAC_DEFUN([LT_OUTPUT], 619eca46af7Smrg[: ${CONFIG_LT=./config.lt} 620eca46af7SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 621eca46af7Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 622eca46af7Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6232378475aSmrg 624eca46af7Smrgcat >>"$CONFIG_LT" <<\_LTEOF 625eca46af7Smrglt_cl_silent=false 626eca46af7Smrgexec AS_MESSAGE_LOG_FD>>config.log 627eca46af7Smrg{ 628eca46af7Smrg echo 629eca46af7Smrg AS_BOX([Running $as_me.]) 630eca46af7Smrg} >&AS_MESSAGE_LOG_FD 6312378475aSmrg 632eca46af7Smrglt_cl_help="\ 633eca46af7Smrg'$as_me' creates a local libtool stub from the current configuration, 634eca46af7Smrgfor use in further configure time tests before the real libtool is 635eca46af7Smrggenerated. 6362378475aSmrg 637eca46af7SmrgUsage: $[0] [[OPTIONS]] 6382378475aSmrg 639eca46af7Smrg -h, --help print this help, then exit 640eca46af7Smrg -V, --version print version number, then exit 641eca46af7Smrg -q, --quiet do not print progress messages 642eca46af7Smrg -d, --debug don't remove temporary files 64395b296d0Smrg 644eca46af7SmrgReport bugs to <bug-libtool@gnu.org>." 6452378475aSmrg 646eca46af7Smrglt_cl_version="\ 647eca46af7Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 648eca46af7Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 649eca46af7Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 65095b296d0Smrg 651eca46af7SmrgCopyright (C) 2011 Free Software Foundation, Inc. 652eca46af7SmrgThis config.lt script is free software; the Free Software Foundation 653eca46af7Smrggives unlimited permision to copy, distribute and modify it." 65495b296d0Smrg 655eca46af7Smrgwhile test 0 != $[#] 656eca46af7Smrgdo 657eca46af7Smrg case $[1] in 658eca46af7Smrg --version | --v* | -V ) 659eca46af7Smrg echo "$lt_cl_version"; exit 0 ;; 660eca46af7Smrg --help | --h* | -h ) 661eca46af7Smrg echo "$lt_cl_help"; exit 0 ;; 662eca46af7Smrg --debug | --d* | -d ) 663eca46af7Smrg debug=: ;; 664eca46af7Smrg --quiet | --q* | --silent | --s* | -q ) 665eca46af7Smrg lt_cl_silent=: ;; 66695b296d0Smrg 667eca46af7Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 668eca46af7SmrgTry '$[0] --help' for more information.]) ;; 66995b296d0Smrg 670eca46af7Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 671eca46af7SmrgTry '$[0] --help' for more information.]) ;; 672eca46af7Smrg esac 673eca46af7Smrg shift 674eca46af7Smrgdone 67595b296d0Smrg 676eca46af7Smrgif $lt_cl_silent; then 677eca46af7Smrg exec AS_MESSAGE_FD>/dev/null 678eca46af7Smrgfi 679eca46af7Smrg_LTEOF 68095b296d0Smrg 681eca46af7Smrgcat >>"$CONFIG_LT" <<_LTEOF 682eca46af7Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 683eca46af7Smrg_LTEOF 68495b296d0Smrg 685eca46af7Smrgcat >>"$CONFIG_LT" <<\_LTEOF 686eca46af7SmrgAC_MSG_NOTICE([creating $ofile]) 687eca46af7Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 688eca46af7SmrgAS_EXIT(0) 689eca46af7Smrg_LTEOF 690eca46af7Smrgchmod +x "$CONFIG_LT" 691ff89ac2bSmrg 692eca46af7Smrg# configure is writing to config.log, but config.lt does its own redirection, 693eca46af7Smrg# appending to config.log, which fails on DOS, as config.log is still kept 694eca46af7Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 695eca46af7Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 696eca46af7Smrglt_cl_success=: 697eca46af7Smrgtest yes = "$silent" && 698eca46af7Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 699eca46af7Smrgexec AS_MESSAGE_LOG_FD>/dev/null 700eca46af7Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 701eca46af7Smrgexec AS_MESSAGE_LOG_FD>>config.log 702eca46af7Smrg$lt_cl_success || AS_EXIT(1) 703eca46af7Smrg])# LT_OUTPUT 7042378475aSmrg 70595b296d0Smrg 706eca46af7Smrg# _LT_CONFIG(TAG) 707eca46af7Smrg# --------------- 708eca46af7Smrg# If TAG is the built-in tag, create an initial libtool script with a 709eca46af7Smrg# default configuration from the untagged config vars. Otherwise add code 710eca46af7Smrg# to config.status for appending the configuration named by TAG from the 711eca46af7Smrg# matching tagged config vars. 712eca46af7Smrgm4_defun([_LT_CONFIG], 713eca46af7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 714eca46af7Smrg_LT_CONFIG_SAVE_COMMANDS([ 715eca46af7Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 716eca46af7Smrg m4_if(_LT_TAG, [C], [ 717eca46af7Smrg # See if we are running on zsh, and set the options that allow our 718eca46af7Smrg # commands through without removal of \ escapes. 719eca46af7Smrg if test -n "${ZSH_VERSION+set}"; then 720eca46af7Smrg setopt NO_GLOB_SUBST 721eca46af7Smrg fi 72295b296d0Smrg 723eca46af7Smrg cfgfile=${ofile}T 724eca46af7Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 725eca46af7Smrg $RM "$cfgfile" 72695b296d0Smrg 727eca46af7Smrg cat <<_LT_EOF >> "$cfgfile" 728eca46af7Smrg#! $SHELL 729eca46af7Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 730eca46af7Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 731eca46af7Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 73295b296d0Smrg 733eca46af7Smrg# Provide generalized library-building support services. 734eca46af7Smrg# Written by Gordon Matzigkeit, 1996 73595b296d0Smrg 736eca46af7Smrg_LT_COPYING 737eca46af7Smrg_LT_LIBTOOL_TAGS 73895b296d0Smrg 739eca46af7Smrg# ### BEGIN LIBTOOL CONFIG 740eca46af7Smrg_LT_LIBTOOL_CONFIG_VARS 741eca46af7Smrg_LT_LIBTOOL_TAG_VARS 742eca46af7Smrg# ### END LIBTOOL CONFIG 74395b296d0Smrg 744eca46af7Smrg_LT_EOF 74595b296d0Smrg 746eca46af7Smrg case $host_os in 747eca46af7Smrg aix3*) 748eca46af7Smrg cat <<\_LT_EOF >> "$cfgfile" 749eca46af7Smrg# AIX sometimes has problems with the GCC collect2 program. For some 750eca46af7Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 751eca46af7Smrg# vanish in a puff of smoke. 752eca46af7Smrgif test set != "${COLLECT_NAMES+set}"; then 753eca46af7Smrg COLLECT_NAMES= 754eca46af7Smrg export COLLECT_NAMES 755eca46af7Smrgfi 756eca46af7Smrg_LT_EOF 757eca46af7Smrg ;; 758eca46af7Smrg esac 75995b296d0Smrg 760eca46af7Smrg _LT_PROG_LTMAIN 76195b296d0Smrg 762eca46af7Smrg # We use sed instead of cat because bash on DJGPP gets confused if 763eca46af7Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 764eca46af7Smrg # text mode, it properly converts lines to CR/LF. This bash problem 765eca46af7Smrg # is reportedly fixed, but why not run on old versions too? 766eca46af7Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 767eca46af7Smrg || (rm -f "$cfgfile"; exit 1) 76895b296d0Smrg 769eca46af7Smrg mv -f "$cfgfile" "$ofile" || 770eca46af7Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 771eca46af7Smrg chmod +x "$ofile" 772eca46af7Smrg], 773eca46af7Smrg[cat <<_LT_EOF >> "$ofile" 77495b296d0Smrg 775eca46af7Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 776eca46af7Smrgdnl in a comment (ie after a #). 777eca46af7Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 778eca46af7Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 779eca46af7Smrg# ### END LIBTOOL TAG CONFIG: $1 780eca46af7Smrg_LT_EOF 781eca46af7Smrg])dnl /m4_if 782eca46af7Smrg], 783eca46af7Smrg[m4_if([$1], [], [ 784eca46af7Smrg PACKAGE='$PACKAGE' 785eca46af7Smrg VERSION='$VERSION' 786eca46af7Smrg RM='$RM' 787eca46af7Smrg ofile='$ofile'], []) 788eca46af7Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 789eca46af7Smrg])# _LT_CONFIG 790e6f085baSmrg 79114330f12Smrg 792eca46af7Smrg# LT_SUPPORTED_TAG(TAG) 793eca46af7Smrg# --------------------- 794eca46af7Smrg# Trace this macro to discover what tags are supported by the libtool 795eca46af7Smrg# --tag option, using: 796eca46af7Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 797eca46af7SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 79895b296d0Smrg 79995b296d0Smrg 800eca46af7Smrg# C support is built-in for now 801eca46af7Smrgm4_define([_LT_LANG_C_enabled], []) 802eca46af7Smrgm4_define([_LT_TAGS], []) 80395b296d0Smrg 80495b296d0Smrg 805eca46af7Smrg# LT_LANG(LANG) 806eca46af7Smrg# ------------- 807eca46af7Smrg# Enable libtool support for the given language if not already enabled. 808eca46af7SmrgAC_DEFUN([LT_LANG], 809eca46af7Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 810eca46af7Smrgm4_case([$1], 811eca46af7Smrg [C], [_LT_LANG(C)], 812eca46af7Smrg [C++], [_LT_LANG(CXX)], 813eca46af7Smrg [Go], [_LT_LANG(GO)], 814eca46af7Smrg [Java], [_LT_LANG(GCJ)], 815eca46af7Smrg [Fortran 77], [_LT_LANG(F77)], 816eca46af7Smrg [Fortran], [_LT_LANG(FC)], 817eca46af7Smrg [Windows Resource], [_LT_LANG(RC)], 818eca46af7Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 819eca46af7Smrg [_LT_LANG($1)], 820eca46af7Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 821eca46af7Smrg])# LT_LANG 82295b296d0Smrg 82395b296d0Smrg 824eca46af7Smrg# _LT_LANG(LANGNAME) 825eca46af7Smrg# ------------------ 826eca46af7Smrgm4_defun([_LT_LANG], 827eca46af7Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 828eca46af7Smrg [LT_SUPPORTED_TAG([$1])dnl 829eca46af7Smrg m4_append([_LT_TAGS], [$1 ])dnl 830eca46af7Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 831eca46af7Smrg _LT_LANG_$1_CONFIG($1)])dnl 832eca46af7Smrg])# _LT_LANG 83395b296d0Smrg 83414330f12Smrg 835eca46af7Smrgm4_ifndef([AC_PROG_GO], [ 836eca46af7Smrg# NOTE: This macro has been submitted for inclusion into # 837eca46af7Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 838eca46af7Smrg# a released version of Autoconf we should remove this # 839eca46af7Smrg# macro and use it instead. # 840eca46af7Smrgm4_defun([AC_PROG_GO], 841eca46af7Smrg[AC_LANG_PUSH(Go)dnl 842eca46af7SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 843eca46af7SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 844eca46af7Smrg_AC_ARG_VAR_LDFLAGS()dnl 845eca46af7SmrgAC_CHECK_TOOL(GOC, gccgo) 846eca46af7Smrgif test -z "$GOC"; then 847eca46af7Smrg if test -n "$ac_tool_prefix"; then 848eca46af7Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 849eca46af7Smrg fi 85014330f12Smrgfi 851eca46af7Smrgif test -z "$GOC"; then 852eca46af7Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 85314330f12Smrgfi 854eca46af7Smrg])#m4_defun 855eca46af7Smrg])#m4_ifndef 85614330f12Smrg 85795b296d0Smrg 858eca46af7Smrg# _LT_LANG_DEFAULT_CONFIG 859eca46af7Smrg# ----------------------- 860eca46af7Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 861eca46af7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 862eca46af7Smrg [LT_LANG(CXX)], 863eca46af7Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8642378475aSmrg 865eca46af7SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 866eca46af7Smrg [LT_LANG(F77)], 867eca46af7Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8682378475aSmrg 869eca46af7SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 870eca46af7Smrg [LT_LANG(FC)], 871eca46af7Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8722378475aSmrg 873eca46af7Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 874eca46af7Smrgdnl pulling things in needlessly. 875eca46af7SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 876eca46af7Smrg [LT_LANG(GCJ)], 877eca46af7Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 878eca46af7Smrg [LT_LANG(GCJ)], 879eca46af7Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 880eca46af7Smrg [LT_LANG(GCJ)], 881eca46af7Smrg [m4_ifdef([AC_PROG_GCJ], 882eca46af7Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 883eca46af7Smrg m4_ifdef([A][M_PROG_GCJ], 884eca46af7Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 885eca46af7Smrg m4_ifdef([LT_PROG_GCJ], 886eca46af7Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 8872378475aSmrg 888eca46af7SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 889eca46af7Smrg [LT_LANG(GO)], 890eca46af7Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 8912378475aSmrg 892eca46af7SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 893eca46af7Smrg [LT_LANG(RC)], 894eca46af7Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 895eca46af7Smrg])# _LT_LANG_DEFAULT_CONFIG 89639713583Smrg 897eca46af7Smrg# Obsolete macros: 898eca46af7SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 899eca46af7SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 900eca46af7SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 901eca46af7SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 902eca46af7SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 903eca46af7Smrgdnl aclocal-1.4 backwards compatibility: 904eca46af7Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 905eca46af7Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 906eca46af7Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 907eca46af7Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 908eca46af7Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 90995b296d0Smrg 91095b296d0Smrg 911eca46af7Smrg# _LT_TAG_COMPILER 912eca46af7Smrg# ---------------- 913eca46af7Smrgm4_defun([_LT_TAG_COMPILER], 914eca46af7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 91595b296d0Smrg 916eca46af7Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 917eca46af7Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 918eca46af7Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 919eca46af7Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 92095b296d0Smrg 921eca46af7Smrg# If no C compiler was specified, use CC. 922eca46af7SmrgLTCC=${LTCC-"$CC"} 92395b296d0Smrg 924eca46af7Smrg# If no C compiler flags were specified, use CFLAGS. 925eca46af7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 92695b296d0Smrg 927eca46af7Smrg# Allow CC to be a program name with arguments. 928eca46af7Smrgcompiler=$CC 929eca46af7Smrg])# _LT_TAG_COMPILER 9302378475aSmrg 93195b296d0Smrg 932eca46af7Smrg# _LT_COMPILER_BOILERPLATE 933eca46af7Smrg# ------------------------ 934eca46af7Smrg# Check for compiler boilerplate output or warnings with 935eca46af7Smrg# the simple compiler test code. 936eca46af7Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 937eca46af7Smrg[m4_require([_LT_DECL_SED])dnl 938eca46af7Smrgac_outfile=conftest.$ac_objext 939eca46af7Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 940eca46af7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 941eca46af7Smrg_lt_compiler_boilerplate=`cat conftest.err` 942eca46af7Smrg$RM conftest* 943eca46af7Smrg])# _LT_COMPILER_BOILERPLATE 94495b296d0Smrg 94595b296d0Smrg 946eca46af7Smrg# _LT_LINKER_BOILERPLATE 947eca46af7Smrg# ---------------------- 948eca46af7Smrg# Check for linker boilerplate output or warnings with 949eca46af7Smrg# the simple link test code. 950eca46af7Smrgm4_defun([_LT_LINKER_BOILERPLATE], 951eca46af7Smrg[m4_require([_LT_DECL_SED])dnl 952eca46af7Smrgac_outfile=conftest.$ac_objext 953eca46af7Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 954eca46af7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 955eca46af7Smrg_lt_linker_boilerplate=`cat conftest.err` 956eca46af7Smrg$RM -r conftest* 957eca46af7Smrg])# _LT_LINKER_BOILERPLATE 95895b296d0Smrg 959eca46af7Smrg# _LT_REQUIRED_DARWIN_CHECKS 960eca46af7Smrg# ------------------------- 961eca46af7Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 962eca46af7Smrg case $host_os in 963eca46af7Smrg rhapsody* | darwin*) 964eca46af7Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 965eca46af7Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 966eca46af7Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 967eca46af7Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 968eca46af7Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 969eca46af7Smrg _LT_DECL([], [DSYMUTIL], [1], 970eca46af7Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 971eca46af7Smrg _LT_DECL([], [NMEDIT], [1], 972eca46af7Smrg [Tool to change global to local symbols on Mac OS X]) 973eca46af7Smrg _LT_DECL([], [LIPO], [1], 974eca46af7Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 975eca46af7Smrg _LT_DECL([], [OTOOL], [1], 976eca46af7Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 977eca46af7Smrg _LT_DECL([], [OTOOL64], [1], 978eca46af7Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 97995b296d0Smrg 980eca46af7Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 981eca46af7Smrg [lt_cv_apple_cc_single_mod=no 982eca46af7Smrg if test -z "$LT_MULTI_MODULE"; then 983eca46af7Smrg # By default we will add the -single_module flag. You can override 984eca46af7Smrg # by either setting the environment variable LT_MULTI_MODULE 985eca46af7Smrg # non-empty at configure time, or by adding -multi_module to the 986eca46af7Smrg # link flags. 987eca46af7Smrg rm -rf libconftest.dylib* 988eca46af7Smrg echo "int foo(void){return 1;}" > conftest.c 989eca46af7Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 990eca46af7Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 991eca46af7Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 992eca46af7Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 993eca46af7Smrg _lt_result=$? 994eca46af7Smrg # If there is a non-empty error log, and "single_module" 995eca46af7Smrg # appears in it, assume the flag caused a linker warning 996eca46af7Smrg if test -s conftest.err && $GREP single_module conftest.err; then 997eca46af7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 998eca46af7Smrg # Otherwise, if the output was created with a 0 exit code from 999eca46af7Smrg # the compiler, it worked. 1000eca46af7Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1001eca46af7Smrg lt_cv_apple_cc_single_mod=yes 1002eca46af7Smrg else 1003eca46af7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1004eca46af7Smrg fi 1005eca46af7Smrg rm -rf libconftest.dylib* 1006eca46af7Smrg rm -f conftest.* 1007eca46af7Smrg fi]) 100895b296d0Smrg 1009eca46af7Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1010eca46af7Smrg [lt_cv_ld_exported_symbols_list], 1011eca46af7Smrg [lt_cv_ld_exported_symbols_list=no 1012eca46af7Smrg save_LDFLAGS=$LDFLAGS 1013eca46af7Smrg echo "_main" > conftest.sym 1014eca46af7Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1015eca46af7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1016eca46af7Smrg [lt_cv_ld_exported_symbols_list=yes], 1017eca46af7Smrg [lt_cv_ld_exported_symbols_list=no]) 1018eca46af7Smrg LDFLAGS=$save_LDFLAGS 1019eca46af7Smrg ]) 10202378475aSmrg 1021eca46af7Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1022eca46af7Smrg [lt_cv_ld_force_load=no 1023eca46af7Smrg cat > conftest.c << _LT_EOF 1024eca46af7Smrgint forced_loaded() { return 2;} 1025eca46af7Smrg_LT_EOF 1026eca46af7Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1027eca46af7Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1028eca46af7Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1029eca46af7Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1030eca46af7Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1031eca46af7Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1032eca46af7Smrg cat > conftest.c << _LT_EOF 1033eca46af7Smrgint main() { return 0;} 1034eca46af7Smrg_LT_EOF 1035eca46af7Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1036eca46af7Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1037eca46af7Smrg _lt_result=$? 1038eca46af7Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1039eca46af7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1040eca46af7Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1041eca46af7Smrg lt_cv_ld_force_load=yes 1042eca46af7Smrg else 1043eca46af7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1044eca46af7Smrg fi 1045eca46af7Smrg rm -f conftest.err libconftest.a conftest conftest.c 1046eca46af7Smrg rm -rf conftest.dSYM 1047eca46af7Smrg ]) 1048eca46af7Smrg case $host_os in 1049eca46af7Smrg rhapsody* | darwin1.[[012]]) 1050eca46af7Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1051eca46af7Smrg darwin1.*) 1052eca46af7Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1053eca46af7Smrg darwin*) # darwin 5.x on 1054eca46af7Smrg # if running on 10.5 or later, the deployment target defaults 1055eca46af7Smrg # to the OS version, if on x86, and 10.4, the deployment 1056eca46af7Smrg # target defaults to 10.4. Don't you love it? 1057eca46af7Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1058eca46af7Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1059eca46af7Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1060eca46af7Smrg 10.[[012]][[,.]]*) 1061eca46af7Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1062eca46af7Smrg 10.*) 1063eca46af7Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1064eca46af7Smrg esac 1065eca46af7Smrg ;; 1066eca46af7Smrg esac 1067eca46af7Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1068eca46af7Smrg _lt_dar_single_mod='$single_module' 1069eca46af7Smrg fi 1070eca46af7Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1071eca46af7Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1072eca46af7Smrg else 1073eca46af7Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1074eca46af7Smrg fi 1075eca46af7Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1076eca46af7Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1077eca46af7Smrg else 1078eca46af7Smrg _lt_dsymutil= 1079eca46af7Smrg fi 1080eca46af7Smrg ;; 1081eca46af7Smrg esac 1082eca46af7Smrg]) 108395b296d0Smrg 108495b296d0Smrg 1085eca46af7Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1086eca46af7Smrg# --------------------------------- 1087eca46af7Smrg# Checks for linker and compiler features on darwin 1088eca46af7Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1089eca46af7Smrg[ 1090eca46af7Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1091eca46af7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1092eca46af7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1093eca46af7Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1094eca46af7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1095eca46af7Smrg if test yes = "$lt_cv_ld_force_load"; then 1096eca46af7Smrg _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\"`' 1097eca46af7Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1098eca46af7Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1099eca46af7Smrg else 1100eca46af7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1101eca46af7Smrg fi 1102eca46af7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1103eca46af7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1104eca46af7Smrg case $cc_basename in 1105eca46af7Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1106eca46af7Smrg *) _lt_dar_can_shared=$GCC ;; 1107eca46af7Smrg esac 1108eca46af7Smrg if test yes = "$_lt_dar_can_shared"; then 1109eca46af7Smrg output_verbose_link_cmd=func_echo_all 1110eca46af7Smrg _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" 1111eca46af7Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1112eca46af7Smrg _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" 1113eca46af7Smrg _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" 1114eca46af7Smrg m4_if([$1], [CXX], 1115eca46af7Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1116eca46af7Smrg _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" 1117eca46af7Smrg _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" 1118eca46af7Smrg fi 1119eca46af7Smrg],[]) 1120eca46af7Smrg else 1121eca46af7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1122eca46af7Smrg fi 112314330f12Smrg]) 112495b296d0Smrg 1125eca46af7Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1126eca46af7Smrg# ---------------------------------- 1127eca46af7Smrg# Links a minimal program and checks the executable 1128eca46af7Smrg# for the system default hardcoded library path. In most cases, 1129eca46af7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1130eca46af7Smrg# the location of the communication and MPI libs are included too. 1131eca46af7Smrg# If we don't find anything, use the default library path according 1132eca46af7Smrg# to the aix ld manual. 1133eca46af7Smrg# Store the results from the different compilers for each TAGNAME. 1134eca46af7Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1135eca46af7Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1136eca46af7Smrg[m4_require([_LT_DECL_SED])dnl 1137eca46af7Smrgif test set = "${lt_cv_aix_libpath+set}"; then 1138eca46af7Smrg aix_libpath=$lt_cv_aix_libpath 1139eca46af7Smrgelse 1140eca46af7Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1141eca46af7Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1142eca46af7Smrg lt_aix_libpath_sed='[ 1143eca46af7Smrg /Import File Strings/,/^$/ { 1144eca46af7Smrg /^0/ { 1145eca46af7Smrg s/^0 *\([^ ]*\) *$/\1/ 1146eca46af7Smrg p 1147eca46af7Smrg } 1148eca46af7Smrg }]' 1149eca46af7Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1150eca46af7Smrg # Check for a 64-bit object if we didn't find anything. 1151eca46af7Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1152eca46af7Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1153eca46af7Smrg fi],[]) 1154eca46af7Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1155eca46af7Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1156eca46af7Smrg fi 1157eca46af7Smrg ]) 1158eca46af7Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1159eca46af7Smrgfi 1160eca46af7Smrg])# _LT_SYS_MODULE_PATH_AIX 116195b296d0Smrg 116295b296d0Smrg 1163eca46af7Smrg# _LT_SHELL_INIT(ARG) 1164eca46af7Smrg# ------------------- 1165eca46af7Smrgm4_define([_LT_SHELL_INIT], 1166eca46af7Smrg[m4_divert_text([M4SH-INIT], [$1 1167eca46af7Smrg])])# _LT_SHELL_INIT 116895b296d0Smrg 116995b296d0Smrg 117095b296d0Smrg 1171eca46af7Smrg# _LT_PROG_ECHO_BACKSLASH 1172eca46af7Smrg# ----------------------- 1173eca46af7Smrg# Find how we can fake an echo command that does not interpret backslash. 1174eca46af7Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1175eca46af7Smrg# of the generated configure script that will find a shell with a builtin 1176eca46af7Smrg# printf (that we can use as an echo command). 1177eca46af7Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1178eca46af7Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1179eca46af7SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1180eca46af7SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 118195b296d0Smrg 1182eca46af7SmrgAC_MSG_CHECKING([how to print strings]) 1183eca46af7Smrg# Test print first, because it will be a builtin if present. 1184eca46af7Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1185eca46af7Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1186eca46af7Smrg ECHO='print -r --' 1187eca46af7Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1188eca46af7Smrg ECHO='printf %s\n' 1189eca46af7Smrgelse 1190eca46af7Smrg # Use this function as a fallback that always works. 1191eca46af7Smrg func_fallback_echo () 1192eca46af7Smrg { 1193eca46af7Smrg eval 'cat <<_LTECHO_EOF 1194eca46af7Smrg$[]1 1195eca46af7Smrg_LTECHO_EOF' 1196eca46af7Smrg } 1197eca46af7Smrg ECHO='func_fallback_echo' 1198eca46af7Smrgfi 119995b296d0Smrg 1200eca46af7Smrg# func_echo_all arg... 1201eca46af7Smrg# Invoke $ECHO with all args, space-separated. 1202eca46af7Smrgfunc_echo_all () 1203eca46af7Smrg{ 1204eca46af7Smrg $ECHO "$*" 1205eca46af7Smrg} 120695b296d0Smrg 1207eca46af7Smrgcase $ECHO in 1208eca46af7Smrg printf*) AC_MSG_RESULT([printf]) ;; 1209eca46af7Smrg print*) AC_MSG_RESULT([print -r]) ;; 1210eca46af7Smrg *) AC_MSG_RESULT([cat]) ;; 1211eca46af7Smrgesac 121295b296d0Smrg 1213eca46af7Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1214eca46af7Smrg[_AS_DETECT_SUGGESTED([ 1215eca46af7Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1216eca46af7Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1217eca46af7Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1218eca46af7Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1219eca46af7Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1220eca46af7Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1221eca46af7Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 122295b296d0Smrg 1223eca46af7Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1224eca46af7Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1225eca46af7Smrg])# _LT_PROG_ECHO_BACKSLASH 122695b296d0Smrg 122795b296d0Smrg 1228eca46af7Smrg# _LT_WITH_SYSROOT 1229eca46af7Smrg# ---------------- 1230eca46af7SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1231eca46af7Smrg[AC_MSG_CHECKING([for sysroot]) 1232eca46af7SmrgAC_ARG_WITH([sysroot], 1233eca46af7Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1234eca46af7Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 1235eca46af7Smrg if not specified).])], 1236eca46af7Smrg[], [with_sysroot=no]) 123795b296d0Smrg 1238eca46af7Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1239eca46af7Smrgdnl in case the user passed a directory name. 1240eca46af7Smrglt_sysroot= 1241eca46af7Smrgcase $with_sysroot in #( 1242eca46af7Smrg yes) 1243eca46af7Smrg if test yes = "$GCC"; then 1244eca46af7Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1245eca46af7Smrg fi 1246eca46af7Smrg ;; #( 1247eca46af7Smrg /*) 1248eca46af7Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1249eca46af7Smrg ;; #( 1250eca46af7Smrg no|'') 1251eca46af7Smrg ;; #( 1252eca46af7Smrg *) 1253eca46af7Smrg AC_MSG_RESULT([$with_sysroot]) 1254eca46af7Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1255eca46af7Smrg ;; 1256eca46af7Smrgesac 125795b296d0Smrg 1258eca46af7Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1259eca46af7Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1260eca46af7Smrg[dependent libraries, and where our libraries should be installed.])]) 126195b296d0Smrg 1262eca46af7Smrg# _LT_ENABLE_LOCK 1263eca46af7Smrg# --------------- 1264eca46af7Smrgm4_defun([_LT_ENABLE_LOCK], 1265eca46af7Smrg[AC_ARG_ENABLE([libtool-lock], 1266eca46af7Smrg [AS_HELP_STRING([--disable-libtool-lock], 1267eca46af7Smrg [avoid locking (might break parallel builds)])]) 1268eca46af7Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 126995b296d0Smrg 1270eca46af7Smrg# Some flags need to be propagated to the compiler or linker for good 1271eca46af7Smrg# libtool support. 1272eca46af7Smrgcase $host in 1273eca46af7Smrgia64-*-hpux*) 1274eca46af7Smrg # Find out what ABI is being produced by ac_compile, and set mode 1275eca46af7Smrg # options accordingly. 1276eca46af7Smrg echo 'int i;' > conftest.$ac_ext 1277eca46af7Smrg if AC_TRY_EVAL(ac_compile); then 1278eca46af7Smrg case `/usr/bin/file conftest.$ac_objext` in 1279eca46af7Smrg *ELF-32*) 1280eca46af7Smrg HPUX_IA64_MODE=32 1281eca46af7Smrg ;; 1282eca46af7Smrg *ELF-64*) 1283eca46af7Smrg HPUX_IA64_MODE=64 1284eca46af7Smrg ;; 1285eca46af7Smrg esac 1286eca46af7Smrg fi 1287eca46af7Smrg rm -rf conftest* 1288eca46af7Smrg ;; 1289eca46af7Smrg*-*-irix6*) 1290eca46af7Smrg # Find out what ABI is being produced by ac_compile, and set linker 1291eca46af7Smrg # options accordingly. 1292eca46af7Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1293eca46af7Smrg if AC_TRY_EVAL(ac_compile); then 1294eca46af7Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 1295eca46af7Smrg case `/usr/bin/file conftest.$ac_objext` in 1296eca46af7Smrg *32-bit*) 1297eca46af7Smrg LD="${LD-ld} -melf32bsmip" 1298eca46af7Smrg ;; 1299eca46af7Smrg *N32*) 1300eca46af7Smrg LD="${LD-ld} -melf32bmipn32" 1301eca46af7Smrg ;; 1302eca46af7Smrg *64-bit*) 1303eca46af7Smrg LD="${LD-ld} -melf64bmip" 1304eca46af7Smrg ;; 1305eca46af7Smrg esac 1306eca46af7Smrg else 1307eca46af7Smrg case `/usr/bin/file conftest.$ac_objext` in 1308eca46af7Smrg *32-bit*) 1309eca46af7Smrg LD="${LD-ld} -32" 1310eca46af7Smrg ;; 1311eca46af7Smrg *N32*) 1312eca46af7Smrg LD="${LD-ld} -n32" 1313eca46af7Smrg ;; 1314eca46af7Smrg *64-bit*) 1315eca46af7Smrg LD="${LD-ld} -64" 1316eca46af7Smrg ;; 1317eca46af7Smrg esac 1318eca46af7Smrg fi 1319eca46af7Smrg fi 1320eca46af7Smrg rm -rf conftest* 1321eca46af7Smrg ;; 132295b296d0Smrg 1323eca46af7Smrgmips64*-*linux*) 1324eca46af7Smrg # Find out what ABI is being produced by ac_compile, and set linker 1325eca46af7Smrg # options accordingly. 1326eca46af7Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1327eca46af7Smrg if AC_TRY_EVAL(ac_compile); then 1328eca46af7Smrg emul=elf 1329eca46af7Smrg case `/usr/bin/file conftest.$ac_objext` in 1330eca46af7Smrg *32-bit*) 1331eca46af7Smrg emul="${emul}32" 1332eca46af7Smrg ;; 1333eca46af7Smrg *64-bit*) 1334eca46af7Smrg emul="${emul}64" 1335eca46af7Smrg ;; 1336eca46af7Smrg esac 1337eca46af7Smrg case `/usr/bin/file conftest.$ac_objext` in 1338eca46af7Smrg *MSB*) 1339eca46af7Smrg emul="${emul}btsmip" 1340eca46af7Smrg ;; 1341eca46af7Smrg *LSB*) 1342eca46af7Smrg emul="${emul}ltsmip" 1343eca46af7Smrg ;; 1344eca46af7Smrg esac 1345eca46af7Smrg case `/usr/bin/file conftest.$ac_objext` in 1346eca46af7Smrg *N32*) 1347eca46af7Smrg emul="${emul}n32" 1348eca46af7Smrg ;; 1349eca46af7Smrg esac 1350eca46af7Smrg LD="${LD-ld} -m $emul" 1351eca46af7Smrg fi 1352eca46af7Smrg rm -rf conftest* 1353eca46af7Smrg ;; 135495b296d0Smrg 1355eca46af7Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1356eca46af7Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1357eca46af7Smrg # Find out what ABI is being produced by ac_compile, and set linker 1358eca46af7Smrg # options accordingly. Note that the listed cases only cover the 1359eca46af7Smrg # situations where additional linker options are needed (such as when 1360eca46af7Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1361eca46af7Smrg # vice versa); the common cases where no linker options are needed do 1362eca46af7Smrg # not appear in the list. 1363eca46af7Smrg echo 'int i;' > conftest.$ac_ext 1364eca46af7Smrg if AC_TRY_EVAL(ac_compile); then 1365eca46af7Smrg case `/usr/bin/file conftest.o` in 1366eca46af7Smrg *32-bit*) 1367eca46af7Smrg case $host in 1368eca46af7Smrg x86_64-*kfreebsd*-gnu) 1369eca46af7Smrg LD="${LD-ld} -m elf_i386_fbsd" 1370eca46af7Smrg ;; 1371eca46af7Smrg x86_64-*linux*) 1372eca46af7Smrg case `/usr/bin/file conftest.o` in 1373eca46af7Smrg *x86-64*) 1374eca46af7Smrg LD="${LD-ld} -m elf32_x86_64" 1375eca46af7Smrg ;; 1376eca46af7Smrg *) 1377eca46af7Smrg LD="${LD-ld} -m elf_i386" 1378eca46af7Smrg ;; 1379eca46af7Smrg esac 1380eca46af7Smrg ;; 1381eca46af7Smrg powerpc64le-*linux*) 1382eca46af7Smrg LD="${LD-ld} -m elf32lppclinux" 1383eca46af7Smrg ;; 1384eca46af7Smrg powerpc64-*linux*) 1385eca46af7Smrg LD="${LD-ld} -m elf32ppclinux" 1386eca46af7Smrg ;; 1387eca46af7Smrg s390x-*linux*) 1388eca46af7Smrg LD="${LD-ld} -m elf_s390" 1389eca46af7Smrg ;; 1390eca46af7Smrg sparc64-*linux*) 1391eca46af7Smrg LD="${LD-ld} -m elf32_sparc" 1392eca46af7Smrg ;; 1393eca46af7Smrg esac 1394eca46af7Smrg ;; 1395eca46af7Smrg *64-bit*) 1396eca46af7Smrg case $host in 1397eca46af7Smrg x86_64-*kfreebsd*-gnu) 1398eca46af7Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1399eca46af7Smrg ;; 1400eca46af7Smrg x86_64-*linux*) 1401eca46af7Smrg LD="${LD-ld} -m elf_x86_64" 1402eca46af7Smrg ;; 1403eca46af7Smrg powerpcle-*linux*) 1404eca46af7Smrg LD="${LD-ld} -m elf64lppc" 1405eca46af7Smrg ;; 1406eca46af7Smrg powerpc-*linux*) 1407eca46af7Smrg LD="${LD-ld} -m elf64ppc" 1408eca46af7Smrg ;; 1409eca46af7Smrg s390*-*linux*|s390*-*tpf*) 1410eca46af7Smrg LD="${LD-ld} -m elf64_s390" 1411eca46af7Smrg ;; 1412eca46af7Smrg sparc*-*linux*) 1413eca46af7Smrg LD="${LD-ld} -m elf64_sparc" 1414eca46af7Smrg ;; 1415eca46af7Smrg esac 1416eca46af7Smrg ;; 1417eca46af7Smrg esac 1418eca46af7Smrg fi 1419eca46af7Smrg rm -rf conftest* 1420eca46af7Smrg ;; 142195b296d0Smrg 1422eca46af7Smrg*-*-sco3.2v5*) 1423eca46af7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1424eca46af7Smrg SAVE_CFLAGS=$CFLAGS 1425eca46af7Smrg CFLAGS="$CFLAGS -belf" 1426eca46af7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1427eca46af7Smrg [AC_LANG_PUSH(C) 1428eca46af7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1429eca46af7Smrg AC_LANG_POP]) 1430eca46af7Smrg if test yes != "$lt_cv_cc_needs_belf"; then 1431eca46af7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1432eca46af7Smrg CFLAGS=$SAVE_CFLAGS 1433eca46af7Smrg fi 1434eca46af7Smrg ;; 1435eca46af7Smrg*-*solaris*) 1436eca46af7Smrg # Find out what ABI is being produced by ac_compile, and set linker 1437eca46af7Smrg # options accordingly. 1438eca46af7Smrg echo 'int i;' > conftest.$ac_ext 1439eca46af7Smrg if AC_TRY_EVAL(ac_compile); then 1440eca46af7Smrg case `/usr/bin/file conftest.o` in 1441eca46af7Smrg *64-bit*) 1442eca46af7Smrg case $lt_cv_prog_gnu_ld in 1443eca46af7Smrg yes*) 1444eca46af7Smrg case $host in 1445eca46af7Smrg i?86-*-solaris*|x86_64-*-solaris*) 1446eca46af7Smrg LD="${LD-ld} -m elf_x86_64" 1447eca46af7Smrg ;; 1448eca46af7Smrg sparc*-*-solaris*) 1449eca46af7Smrg LD="${LD-ld} -m elf64_sparc" 1450eca46af7Smrg ;; 1451eca46af7Smrg esac 1452eca46af7Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1453eca46af7Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1454eca46af7Smrg LD=${LD-ld}_sol2 1455eca46af7Smrg fi 1456eca46af7Smrg ;; 1457eca46af7Smrg *) 1458eca46af7Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1459eca46af7Smrg LD="${LD-ld} -64" 1460eca46af7Smrg fi 1461eca46af7Smrg ;; 1462eca46af7Smrg esac 1463eca46af7Smrg ;; 1464eca46af7Smrg esac 1465eca46af7Smrg fi 1466eca46af7Smrg rm -rf conftest* 1467eca46af7Smrg ;; 1468eca46af7Smrgesac 146995b296d0Smrg 1470eca46af7Smrgneed_locks=$enable_libtool_lock 1471eca46af7Smrg])# _LT_ENABLE_LOCK 147295b296d0Smrg 147395b296d0Smrg 1474eca46af7Smrg# _LT_PROG_AR 1475eca46af7Smrg# ----------- 1476eca46af7Smrgm4_defun([_LT_PROG_AR], 1477eca46af7Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1478eca46af7Smrg: ${AR=ar} 1479eca46af7Smrg: ${AR_FLAGS=cru} 1480eca46af7Smrg_LT_DECL([], [AR], [1], [The archiver]) 1481eca46af7Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 148239713583Smrg 1483eca46af7SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1484eca46af7Smrg [lt_cv_ar_at_file=no 1485eca46af7Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1486eca46af7Smrg [echo conftest.$ac_objext > conftest.lst 1487eca46af7Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1488eca46af7Smrg AC_TRY_EVAL([lt_ar_try]) 1489eca46af7Smrg if test 0 -eq "$ac_status"; then 1490eca46af7Smrg # Ensure the archiver fails upon bogus file names. 1491eca46af7Smrg rm -f conftest.$ac_objext libconftest.a 1492eca46af7Smrg AC_TRY_EVAL([lt_ar_try]) 1493eca46af7Smrg if test 0 -ne "$ac_status"; then 1494eca46af7Smrg lt_cv_ar_at_file=@ 1495eca46af7Smrg fi 1496eca46af7Smrg fi 1497eca46af7Smrg rm -f conftest.* libconftest.a 1498eca46af7Smrg ]) 1499eca46af7Smrg ]) 15002378475aSmrg 1501eca46af7Smrgif test no = "$lt_cv_ar_at_file"; then 1502eca46af7Smrg archiver_list_spec= 1503eca46af7Smrgelse 1504eca46af7Smrg archiver_list_spec=$lt_cv_ar_at_file 1505eca46af7Smrgfi 1506eca46af7Smrg_LT_DECL([], [archiver_list_spec], [1], 1507eca46af7Smrg [How to feed a file listing to the archiver]) 1508eca46af7Smrg])# _LT_PROG_AR 150995b296d0Smrg 151095b296d0Smrg 1511eca46af7Smrg# _LT_CMD_OLD_ARCHIVE 1512eca46af7Smrg# ------------------- 1513eca46af7Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1514eca46af7Smrg[_LT_PROG_AR 151595b296d0Smrg 1516eca46af7SmrgAC_CHECK_TOOL(STRIP, strip, :) 1517eca46af7Smrgtest -z "$STRIP" && STRIP=: 1518eca46af7Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 151995b296d0Smrg 1520eca46af7SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1521eca46af7Smrgtest -z "$RANLIB" && RANLIB=: 1522eca46af7Smrg_LT_DECL([], [RANLIB], [1], 1523eca46af7Smrg [Commands used to install an old-style archive]) 152495b296d0Smrg 1525eca46af7Smrg# Determine commands to create old-style static archives. 1526eca46af7Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1527eca46af7Smrgold_postinstall_cmds='chmod 644 $oldlib' 1528eca46af7Smrgold_postuninstall_cmds= 152995b296d0Smrg 1530eca46af7Smrgif test -n "$RANLIB"; then 1531eca46af7Smrg case $host_os in 1532eca46af7Smrg bitrig* | openbsd*) 1533eca46af7Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1534eca46af7Smrg ;; 1535eca46af7Smrg *) 1536eca46af7Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1537eca46af7Smrg ;; 1538eca46af7Smrg esac 1539eca46af7Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1540eca46af7Smrgfi 154195b296d0Smrg 1542eca46af7Smrgcase $host_os in 1543eca46af7Smrg darwin*) 1544eca46af7Smrg lock_old_archive_extraction=yes ;; 1545eca46af7Smrg *) 1546eca46af7Smrg lock_old_archive_extraction=no ;; 1547eca46af7Smrgesac 1548eca46af7Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1549eca46af7Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1550eca46af7Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1551eca46af7Smrg [Commands used to build an old-style archive]) 1552eca46af7Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1553eca46af7Smrg [Whether to use a lock for old archive extraction]) 1554eca46af7Smrg])# _LT_CMD_OLD_ARCHIVE 155595b296d0Smrg 155695b296d0Smrg 1557eca46af7Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1558eca46af7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1559eca46af7Smrg# ---------------------------------------------------------------- 1560eca46af7Smrg# Check whether the given compiler option works 1561eca46af7SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1562eca46af7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1563eca46af7Smrgm4_require([_LT_DECL_SED])dnl 1564eca46af7SmrgAC_CACHE_CHECK([$1], [$2], 1565eca46af7Smrg [$2=no 1566eca46af7Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1567eca46af7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1568eca46af7Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1569eca46af7Smrg # Insert the option either (1) after the last *FLAGS variable, or 1570eca46af7Smrg # (2) before a word containing "conftest.", or (3) at the end. 1571eca46af7Smrg # Note that $ac_compile itself does not contain backslashes and begins 1572eca46af7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1573eca46af7Smrg # The option is referenced via a variable to avoid confusing sed. 1574eca46af7Smrg lt_compile=`echo "$ac_compile" | $SED \ 1575eca46af7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1576eca46af7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1577eca46af7Smrg -e 's:$: $lt_compiler_flag:'` 1578eca46af7Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1579eca46af7Smrg (eval "$lt_compile" 2>conftest.err) 1580eca46af7Smrg ac_status=$? 1581eca46af7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1582eca46af7Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1583eca46af7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1584eca46af7Smrg # The compiler can only warn and ignore the option if not recognized 1585eca46af7Smrg # So say no if there are warnings other than the usual output. 1586eca46af7Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1587eca46af7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1588eca46af7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1589eca46af7Smrg $2=yes 1590eca46af7Smrg fi 1591eca46af7Smrg fi 1592eca46af7Smrg $RM conftest* 1593eca46af7Smrg]) 159495b296d0Smrg 1595eca46af7Smrgif test yes = "[$]$2"; then 1596eca46af7Smrg m4_if([$5], , :, [$5]) 1597eca46af7Smrgelse 1598eca46af7Smrg m4_if([$6], , :, [$6]) 1599eca46af7Smrgfi 1600eca46af7Smrg])# _LT_COMPILER_OPTION 160195b296d0Smrg 1602eca46af7Smrg# Old name: 1603eca46af7SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1604eca46af7Smrgdnl aclocal-1.4 backwards compatibility: 1605eca46af7Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 160695b296d0Smrg 160795b296d0Smrg 1608eca46af7Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1609eca46af7Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1610eca46af7Smrg# ---------------------------------------------------- 1611eca46af7Smrg# Check whether the given linker option works 1612eca46af7SmrgAC_DEFUN([_LT_LINKER_OPTION], 1613eca46af7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1614eca46af7Smrgm4_require([_LT_DECL_SED])dnl 1615eca46af7SmrgAC_CACHE_CHECK([$1], [$2], 1616eca46af7Smrg [$2=no 1617eca46af7Smrg save_LDFLAGS=$LDFLAGS 1618eca46af7Smrg LDFLAGS="$LDFLAGS $3" 1619eca46af7Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1620eca46af7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1621eca46af7Smrg # The linker can only warn and ignore the option if not recognized 1622eca46af7Smrg # So say no if there are warnings 1623eca46af7Smrg if test -s conftest.err; then 1624eca46af7Smrg # Append any errors to the config.log. 1625eca46af7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1626eca46af7Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1627eca46af7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1628eca46af7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 1629eca46af7Smrg $2=yes 1630eca46af7Smrg fi 1631eca46af7Smrg else 1632eca46af7Smrg $2=yes 1633eca46af7Smrg fi 1634eca46af7Smrg fi 1635eca46af7Smrg $RM -r conftest* 1636eca46af7Smrg LDFLAGS=$save_LDFLAGS 163714330f12Smrg]) 163895b296d0Smrg 1639eca46af7Smrgif test yes = "[$]$2"; then 1640eca46af7Smrg m4_if([$4], , :, [$4]) 1641eca46af7Smrgelse 1642eca46af7Smrg m4_if([$5], , :, [$5]) 1643eca46af7Smrgfi 1644eca46af7Smrg])# _LT_LINKER_OPTION 164595b296d0Smrg 1646eca46af7Smrg# Old name: 1647eca46af7SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1648eca46af7Smrgdnl aclocal-1.4 backwards compatibility: 1649eca46af7Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 165095b296d0Smrg 165195b296d0Smrg 1652eca46af7Smrg# LT_CMD_MAX_LEN 1653eca46af7Smrg#--------------- 1654eca46af7SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1655eca46af7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1656eca46af7Smrg# find the maximum length of command line arguments 1657eca46af7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1658eca46af7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1659eca46af7Smrg i=0 1660eca46af7Smrg teststring=ABCD 166195b296d0Smrg 1662eca46af7Smrg case $build_os in 1663eca46af7Smrg msdosdjgpp*) 1664eca46af7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1665eca46af7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1666eca46af7Smrg # during glob expansion). Even if it were fixed, the result of this 1667eca46af7Smrg # check would be larger than it should be. 1668eca46af7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1669eca46af7Smrg ;; 167095b296d0Smrg 1671eca46af7Smrg gnu*) 1672eca46af7Smrg # Under GNU Hurd, this test is not required because there is 1673eca46af7Smrg # no limit to the length of command line arguments. 1674eca46af7Smrg # Libtool will interpret -1 as no limit whatsoever 1675eca46af7Smrg lt_cv_sys_max_cmd_len=-1; 1676eca46af7Smrg ;; 167795b296d0Smrg 1678eca46af7Smrg cygwin* | mingw* | cegcc*) 1679eca46af7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1680eca46af7Smrg # about 5 minutes as the teststring grows exponentially. 1681eca46af7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 1682eca46af7Smrg # you end up with a "frozen" computer, even though with patience 1683eca46af7Smrg # the test eventually succeeds (with a max line length of 256k). 1684eca46af7Smrg # Instead, let's just punt: use the minimum linelength reported by 1685eca46af7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 1686eca46af7Smrg lt_cv_sys_max_cmd_len=8192; 1687eca46af7Smrg ;; 168895b296d0Smrg 1689eca46af7Smrg mint*) 1690eca46af7Smrg # On MiNT this can take a long time and run out of memory. 1691eca46af7Smrg lt_cv_sys_max_cmd_len=8192; 1692eca46af7Smrg ;; 169395b296d0Smrg 1694eca46af7Smrg amigaos*) 1695eca46af7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 1696eca46af7Smrg # So we just punt and use a minimum line length of 8192. 1697eca46af7Smrg lt_cv_sys_max_cmd_len=8192; 1698eca46af7Smrg ;; 169995b296d0Smrg 1700eca46af7Smrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1701eca46af7Smrg # This has been around since 386BSD, at least. Likely further. 1702eca46af7Smrg if test -x /sbin/sysctl; then 1703eca46af7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1704eca46af7Smrg elif test -x /usr/sbin/sysctl; then 1705eca46af7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1706eca46af7Smrg else 1707eca46af7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1708eca46af7Smrg fi 1709eca46af7Smrg # And add a safety zone 1710eca46af7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1711eca46af7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1712eca46af7Smrg ;; 171395b296d0Smrg 1714eca46af7Smrg interix*) 1715eca46af7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1716eca46af7Smrg lt_cv_sys_max_cmd_len=196608 1717eca46af7Smrg ;; 171895b296d0Smrg 1719eca46af7Smrg os2*) 1720eca46af7Smrg # The test takes a long time on OS/2. 1721eca46af7Smrg lt_cv_sys_max_cmd_len=8192 1722eca46af7Smrg ;; 172395b296d0Smrg 1724eca46af7Smrg osf*) 1725eca46af7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1726eca46af7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1727eca46af7Smrg # nice to cause kernel panics so lets avoid the loop below. 1728eca46af7Smrg # First set a reasonable default. 1729eca46af7Smrg lt_cv_sys_max_cmd_len=16384 1730eca46af7Smrg # 1731eca46af7Smrg if test -x /sbin/sysconfig; then 1732eca46af7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1733eca46af7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1734eca46af7Smrg esac 1735eca46af7Smrg fi 1736eca46af7Smrg ;; 1737eca46af7Smrg sco3.2v5*) 1738eca46af7Smrg lt_cv_sys_max_cmd_len=102400 1739eca46af7Smrg ;; 1740eca46af7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 1741eca46af7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1742eca46af7Smrg if test -n "$kargmax"; then 1743eca46af7Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1744eca46af7Smrg else 1745eca46af7Smrg lt_cv_sys_max_cmd_len=32768 1746eca46af7Smrg fi 1747eca46af7Smrg ;; 1748eca46af7Smrg *) 1749eca46af7Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1750eca46af7Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1751eca46af7Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1752eca46af7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1753eca46af7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1754eca46af7Smrg else 1755eca46af7Smrg # Make teststring a little bigger before we do anything with it. 1756eca46af7Smrg # a 1K string should be a reasonable start. 1757eca46af7Smrg for i in 1 2 3 4 5 6 7 8; do 1758eca46af7Smrg teststring=$teststring$teststring 1759eca46af7Smrg done 1760eca46af7Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1761eca46af7Smrg # If test is not a shell built-in, we'll probably end up computing a 1762eca46af7Smrg # maximum length that is only half of the actual maximum length, but 1763eca46af7Smrg # we can't tell. 1764eca46af7Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1765eca46af7Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1766eca46af7Smrg test 17 != "$i" # 1/2 MB should be enough 1767eca46af7Smrg do 1768eca46af7Smrg i=`expr $i + 1` 1769eca46af7Smrg teststring=$teststring$teststring 1770eca46af7Smrg done 1771eca46af7Smrg # Only check the string length outside the loop. 1772eca46af7Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1773eca46af7Smrg teststring= 1774eca46af7Smrg # Add a significant safety factor because C++ compilers can tack on 1775eca46af7Smrg # massive amounts of additional arguments before passing them to the 1776eca46af7Smrg # linker. It appears as though 1/2 is a usable value. 1777eca46af7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1778eca46af7Smrg fi 1779eca46af7Smrg ;; 1780eca46af7Smrg esac 1781eca46af7Smrg]) 1782eca46af7Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 1783eca46af7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1784eca46af7Smrgelse 1785eca46af7Smrg AC_MSG_RESULT(none) 178614330f12Smrgfi 1787eca46af7Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1788eca46af7Smrg_LT_DECL([], [max_cmd_len], [0], 1789eca46af7Smrg [What is the maximum length of a command?]) 1790eca46af7Smrg])# LT_CMD_MAX_LEN 179195b296d0Smrg 1792eca46af7Smrg# Old name: 1793eca46af7SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1794eca46af7Smrgdnl aclocal-1.4 backwards compatibility: 1795eca46af7Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 179695b296d0Smrg 179795b296d0Smrg 1798eca46af7Smrg# _LT_HEADER_DLFCN 1799eca46af7Smrg# ---------------- 1800eca46af7Smrgm4_defun([_LT_HEADER_DLFCN], 1801eca46af7Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1802eca46af7Smrg])# _LT_HEADER_DLFCN 180395b296d0Smrg 180495b296d0Smrg 1805eca46af7Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1806eca46af7Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1807eca46af7Smrg# ---------------------------------------------------------------- 1808eca46af7Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1809eca46af7Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1810eca46af7Smrgif test yes = "$cross_compiling"; then : 1811eca46af7Smrg [$4] 1812eca46af7Smrgelse 1813eca46af7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1814eca46af7Smrg lt_status=$lt_dlunknown 1815eca46af7Smrg cat > conftest.$ac_ext <<_LT_EOF 1816eca46af7Smrg[#line $LINENO "configure" 1817eca46af7Smrg#include "confdefs.h" 181895b296d0Smrg 1819eca46af7Smrg#if HAVE_DLFCN_H 1820eca46af7Smrg#include <dlfcn.h> 1821eca46af7Smrg#endif 182214330f12Smrg 1823eca46af7Smrg#include <stdio.h> 182414330f12Smrg 1825eca46af7Smrg#ifdef RTLD_GLOBAL 1826eca46af7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1827eca46af7Smrg#else 1828eca46af7Smrg# ifdef DL_GLOBAL 1829eca46af7Smrg# define LT_DLGLOBAL DL_GLOBAL 1830eca46af7Smrg# else 1831eca46af7Smrg# define LT_DLGLOBAL 0 1832eca46af7Smrg# endif 1833eca46af7Smrg#endif 183414330f12Smrg 1835eca46af7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1836eca46af7Smrg find out it does not work in some platform. */ 1837eca46af7Smrg#ifndef LT_DLLAZY_OR_NOW 1838eca46af7Smrg# ifdef RTLD_LAZY 1839eca46af7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1840eca46af7Smrg# else 1841eca46af7Smrg# ifdef DL_LAZY 1842eca46af7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1843eca46af7Smrg# else 1844eca46af7Smrg# ifdef RTLD_NOW 1845eca46af7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1846eca46af7Smrg# else 1847eca46af7Smrg# ifdef DL_NOW 1848eca46af7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1849eca46af7Smrg# else 1850eca46af7Smrg# define LT_DLLAZY_OR_NOW 0 1851eca46af7Smrg# endif 1852eca46af7Smrg# endif 1853eca46af7Smrg# endif 1854eca46af7Smrg# endif 1855eca46af7Smrg#endif 185614330f12Smrg 1857eca46af7Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 1858eca46af7Smrg correspondingly for the symbols needed. */ 1859eca46af7Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1860eca46af7Smrgint fnord () __attribute__((visibility("default"))); 1861eca46af7Smrg#endif 186295b296d0Smrg 1863eca46af7Smrgint fnord () { return 42; } 1864eca46af7Smrgint main () 1865eca46af7Smrg{ 1866eca46af7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1867eca46af7Smrg int status = $lt_dlunknown; 186895b296d0Smrg 1869eca46af7Smrg if (self) 1870eca46af7Smrg { 1871eca46af7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1872eca46af7Smrg else 1873eca46af7Smrg { 1874eca46af7Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1875eca46af7Smrg else puts (dlerror ()); 1876eca46af7Smrg } 1877eca46af7Smrg /* dlclose (self); */ 1878eca46af7Smrg } 1879eca46af7Smrg else 1880eca46af7Smrg puts (dlerror ()); 188195b296d0Smrg 1882eca46af7Smrg return status; 1883eca46af7Smrg}] 1884eca46af7Smrg_LT_EOF 1885eca46af7Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1886eca46af7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1887eca46af7Smrg lt_status=$? 1888eca46af7Smrg case x$lt_status in 1889eca46af7Smrg x$lt_dlno_uscore) $1 ;; 1890eca46af7Smrg x$lt_dlneed_uscore) $2 ;; 1891eca46af7Smrg x$lt_dlunknown|x*) $3 ;; 1892eca46af7Smrg esac 1893eca46af7Smrg else : 1894eca46af7Smrg # compilation failed 1895eca46af7Smrg $3 1896eca46af7Smrg fi 1897eca46af7Smrgfi 1898eca46af7Smrgrm -fr conftest* 1899eca46af7Smrg])# _LT_TRY_DLOPEN_SELF 19002378475aSmrg 19012378475aSmrg 1902eca46af7Smrg# LT_SYS_DLOPEN_SELF 1903eca46af7Smrg# ------------------ 1904eca46af7SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1905eca46af7Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1906eca46af7Smrgif test yes != "$enable_dlopen"; then 1907eca46af7Smrg enable_dlopen=unknown 1908eca46af7Smrg enable_dlopen_self=unknown 1909eca46af7Smrg enable_dlopen_self_static=unknown 1910eca46af7Smrgelse 1911eca46af7Smrg lt_cv_dlopen=no 1912eca46af7Smrg lt_cv_dlopen_libs= 191395b296d0Smrg 1914eca46af7Smrg case $host_os in 1915eca46af7Smrg beos*) 1916eca46af7Smrg lt_cv_dlopen=load_add_on 1917eca46af7Smrg lt_cv_dlopen_libs= 1918eca46af7Smrg lt_cv_dlopen_self=yes 1919eca46af7Smrg ;; 192095b296d0Smrg 1921eca46af7Smrg mingw* | pw32* | cegcc*) 1922eca46af7Smrg lt_cv_dlopen=LoadLibrary 1923eca46af7Smrg lt_cv_dlopen_libs= 1924eca46af7Smrg ;; 192595b296d0Smrg 1926eca46af7Smrg cygwin*) 1927eca46af7Smrg lt_cv_dlopen=dlopen 1928eca46af7Smrg lt_cv_dlopen_libs= 1929eca46af7Smrg ;; 193095b296d0Smrg 1931eca46af7Smrg darwin*) 1932eca46af7Smrg # if libdl is installed we need to link against it 1933eca46af7Smrg AC_CHECK_LIB([dl], [dlopen], 1934eca46af7Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1935eca46af7Smrg lt_cv_dlopen=dyld 1936eca46af7Smrg lt_cv_dlopen_libs= 1937eca46af7Smrg lt_cv_dlopen_self=yes 1938eca46af7Smrg ]) 1939eca46af7Smrg ;; 194095b296d0Smrg 1941eca46af7Smrg tpf*) 1942eca46af7Smrg # Don't try to run any link tests for TPF. We know it's impossible 1943eca46af7Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 1944eca46af7Smrg lt_cv_dlopen=dlopen 1945eca46af7Smrg lt_cv_dlopen_libs= 1946eca46af7Smrg lt_cv_dlopen_self=no 1947eca46af7Smrg ;; 194895b296d0Smrg 1949eca46af7Smrg *) 1950eca46af7Smrg AC_CHECK_FUNC([shl_load], 1951eca46af7Smrg [lt_cv_dlopen=shl_load], 1952eca46af7Smrg [AC_CHECK_LIB([dld], [shl_load], 1953eca46af7Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1954eca46af7Smrg [AC_CHECK_FUNC([dlopen], 1955eca46af7Smrg [lt_cv_dlopen=dlopen], 1956eca46af7Smrg [AC_CHECK_LIB([dl], [dlopen], 1957eca46af7Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1958eca46af7Smrg [AC_CHECK_LIB([svld], [dlopen], 1959eca46af7Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1960eca46af7Smrg [AC_CHECK_LIB([dld], [dld_link], 1961eca46af7Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1962eca46af7Smrg ]) 1963eca46af7Smrg ]) 1964eca46af7Smrg ]) 1965eca46af7Smrg ]) 1966eca46af7Smrg ]) 1967eca46af7Smrg ;; 1968eca46af7Smrg esac 196995b296d0Smrg 1970eca46af7Smrg if test no = "$lt_cv_dlopen"; then 1971eca46af7Smrg enable_dlopen=no 1972eca46af7Smrg else 1973eca46af7Smrg enable_dlopen=yes 1974eca46af7Smrg fi 197595b296d0Smrg 1976eca46af7Smrg case $lt_cv_dlopen in 1977eca46af7Smrg dlopen) 1978eca46af7Smrg save_CPPFLAGS=$CPPFLAGS 1979eca46af7Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 198095b296d0Smrg 1981eca46af7Smrg save_LDFLAGS=$LDFLAGS 1982eca46af7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1983ff89ac2bSmrg 1984eca46af7Smrg save_LIBS=$LIBS 1985eca46af7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 198695b296d0Smrg 1987eca46af7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 1988eca46af7Smrg lt_cv_dlopen_self, [dnl 1989eca46af7Smrg _LT_TRY_DLOPEN_SELF( 1990eca46af7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1991eca46af7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1992eca46af7Smrg ]) 199395b296d0Smrg 1994eca46af7Smrg if test yes = "$lt_cv_dlopen_self"; then 1995eca46af7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1996eca46af7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1997eca46af7Smrg lt_cv_dlopen_self_static, [dnl 1998eca46af7Smrg _LT_TRY_DLOPEN_SELF( 1999eca46af7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2000eca46af7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2001eca46af7Smrg ]) 2002eca46af7Smrg fi 200395b296d0Smrg 2004eca46af7Smrg CPPFLAGS=$save_CPPFLAGS 2005eca46af7Smrg LDFLAGS=$save_LDFLAGS 2006eca46af7Smrg LIBS=$save_LIBS 2007eca46af7Smrg ;; 2008eca46af7Smrg esac 200995b296d0Smrg 2010eca46af7Smrg case $lt_cv_dlopen_self in 2011eca46af7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2012eca46af7Smrg *) enable_dlopen_self=unknown ;; 2013eca46af7Smrg esac 201495b296d0Smrg 2015eca46af7Smrg case $lt_cv_dlopen_self_static in 2016eca46af7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2017eca46af7Smrg *) enable_dlopen_self_static=unknown ;; 2018eca46af7Smrg esac 2019eca46af7Smrgfi 2020eca46af7Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2021eca46af7Smrg [Whether dlopen is supported]) 2022eca46af7Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2023eca46af7Smrg [Whether dlopen of programs is supported]) 2024eca46af7Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2025eca46af7Smrg [Whether dlopen of statically linked programs is supported]) 2026eca46af7Smrg])# LT_SYS_DLOPEN_SELF 202795b296d0Smrg 2028eca46af7Smrg# Old name: 2029eca46af7SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 203014330f12Smrgdnl aclocal-1.4 backwards compatibility: 2031eca46af7Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 20322378475aSmrg 203395b296d0Smrg 2034eca46af7Smrg# _LT_COMPILER_C_O([TAGNAME]) 2035eca46af7Smrg# --------------------------- 2036eca46af7Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 2037eca46af7Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2038eca46af7Smrgm4_defun([_LT_COMPILER_C_O], 2039eca46af7Smrg[m4_require([_LT_DECL_SED])dnl 2040eca46af7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2041eca46af7Smrgm4_require([_LT_TAG_COMPILER])dnl 2042eca46af7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2043eca46af7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2044eca46af7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2045eca46af7Smrg $RM -r conftest 2>/dev/null 2046eca46af7Smrg mkdir conftest 2047eca46af7Smrg cd conftest 2048eca46af7Smrg mkdir out 2049eca46af7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 205095b296d0Smrg 2051eca46af7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2052eca46af7Smrg # Insert the option either (1) after the last *FLAGS variable, or 2053eca46af7Smrg # (2) before a word containing "conftest.", or (3) at the end. 2054eca46af7Smrg # Note that $ac_compile itself does not contain backslashes and begins 2055eca46af7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2056eca46af7Smrg lt_compile=`echo "$ac_compile" | $SED \ 2057eca46af7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2058eca46af7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2059eca46af7Smrg -e 's:$: $lt_compiler_flag:'` 2060eca46af7Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2061eca46af7Smrg (eval "$lt_compile" 2>out/conftest.err) 2062eca46af7Smrg ac_status=$? 2063eca46af7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2064eca46af7Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2065eca46af7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2066eca46af7Smrg then 2067eca46af7Smrg # The compiler can only warn and ignore the option if not recognized 2068eca46af7Smrg # So say no if there are warnings 2069eca46af7Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2070eca46af7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2071eca46af7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2072eca46af7Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2073eca46af7Smrg fi 2074eca46af7Smrg fi 2075eca46af7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2076eca46af7Smrg $RM conftest* 2077eca46af7Smrg # SGI C++ compiler will create directory out/ii_files/ for 2078eca46af7Smrg # template instantiation 2079eca46af7Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2080eca46af7Smrg $RM out/* && rmdir out 2081eca46af7Smrg cd .. 2082eca46af7Smrg $RM -r conftest 2083eca46af7Smrg $RM conftest* 2084eca46af7Smrg]) 2085eca46af7Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2086eca46af7Smrg [Does compiler simultaneously support -c and -o options?]) 2087eca46af7Smrg])# _LT_COMPILER_C_O 208895b296d0Smrg 208939713583Smrg 2090eca46af7Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2091eca46af7Smrg# ---------------------------------- 2092eca46af7Smrg# Check to see if we can do hard links to lock some files if needed 2093eca46af7Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2094eca46af7Smrg[m4_require([_LT_ENABLE_LOCK])dnl 2095eca46af7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2096eca46af7Smrg_LT_COMPILER_C_O([$1]) 20972378475aSmrg 2098eca46af7Smrghard_links=nottested 2099eca46af7Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2100eca46af7Smrg # do not overwrite the value of need_locks provided by the user 2101eca46af7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 2102eca46af7Smrg hard_links=yes 2103eca46af7Smrg $RM conftest* 2104eca46af7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2105eca46af7Smrg touch conftest.a 2106eca46af7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 2107eca46af7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2108eca46af7Smrg AC_MSG_RESULT([$hard_links]) 2109eca46af7Smrg if test no = "$hard_links"; then 2110eca46af7Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2111eca46af7Smrg need_locks=warn 2112eca46af7Smrg fi 2113eca46af7Smrgelse 2114eca46af7Smrg need_locks=no 2115eca46af7Smrgfi 2116eca46af7Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2117eca46af7Smrg])# _LT_COMPILER_FILE_LOCKS 211895b296d0Smrg 21192378475aSmrg 2120eca46af7Smrg# _LT_CHECK_OBJDIR 2121eca46af7Smrg# ---------------- 2122eca46af7Smrgm4_defun([_LT_CHECK_OBJDIR], 2123eca46af7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2124eca46af7Smrg[rm -f .libs 2>/dev/null 2125eca46af7Smrgmkdir .libs 2>/dev/null 2126eca46af7Smrgif test -d .libs; then 2127eca46af7Smrg lt_cv_objdir=.libs 2128eca46af7Smrgelse 2129eca46af7Smrg # MS-DOS does not allow filenames that begin with a dot. 2130eca46af7Smrg lt_cv_objdir=_libs 2131eca46af7Smrgfi 2132eca46af7Smrgrmdir .libs 2>/dev/null]) 2133eca46af7Smrgobjdir=$lt_cv_objdir 2134eca46af7Smrg_LT_DECL([], [objdir], [0], 2135eca46af7Smrg [The name of the directory that contains temporary libtool files])dnl 2136eca46af7Smrgm4_pattern_allow([LT_OBJDIR])dnl 2137eca46af7SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2138eca46af7Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2139eca46af7Smrg])# _LT_CHECK_OBJDIR 21402378475aSmrg 214114330f12Smrg 2142eca46af7Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2143eca46af7Smrg# -------------------------------------- 2144eca46af7Smrg# Check hardcoding attributes. 2145eca46af7Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2146eca46af7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2147eca46af7Smrg_LT_TAGVAR(hardcode_action, $1)= 2148eca46af7Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2149eca46af7Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2150eca46af7Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 215114330f12Smrg 2152eca46af7Smrg # We can hardcode non-existent directories. 2153eca46af7Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2154eca46af7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2155eca46af7Smrg # have to relink, otherwise we might link with an installed library 2156eca46af7Smrg # when we should be linking with a yet-to-be-installed one 2157eca46af7Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2158eca46af7Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2159eca46af7Smrg # Linking always hardcodes the temporary library directory. 2160eca46af7Smrg _LT_TAGVAR(hardcode_action, $1)=relink 216114330f12Smrg else 2162eca46af7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2163eca46af7Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 216414330f12Smrg fi 216595b296d0Smrgelse 2166eca46af7Smrg # We cannot hardcode anything, or else we can only hardcode existing 2167eca46af7Smrg # directories. 2168eca46af7Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 216995b296d0Smrgfi 2170eca46af7SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 21712378475aSmrg 2172eca46af7Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2173eca46af7Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2174eca46af7Smrg # Fast installation is not supported 2175eca46af7Smrg enable_fast_install=no 2176eca46af7Smrgelif test yes = "$shlibpath_overrides_runpath" || 2177eca46af7Smrg test no = "$enable_shared"; then 2178eca46af7Smrg # Fast installation is not necessary 2179eca46af7Smrg enable_fast_install=needless 2180eca46af7Smrgfi 2181eca46af7Smrg_LT_TAGDECL([], [hardcode_action], [0], 2182eca46af7Smrg [How to hardcode a shared library path into an executable]) 2183eca46af7Smrg])# _LT_LINKER_HARDCODE_LIBPATH 218495b296d0Smrg 218514330f12Smrg 2186eca46af7Smrg# _LT_CMD_STRIPLIB 2187eca46af7Smrg# ---------------- 2188eca46af7Smrgm4_defun([_LT_CMD_STRIPLIB], 2189eca46af7Smrg[m4_require([_LT_DECL_EGREP]) 2190eca46af7Smrgstriplib= 2191eca46af7Smrgold_striplib= 2192eca46af7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2193eca46af7Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2194eca46af7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2195eca46af7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2196eca46af7Smrg AC_MSG_RESULT([yes]) 219714330f12Smrgelse 2198eca46af7Smrg# FIXME - insert some real tests, host_os isn't really good enough 2199eca46af7Smrg case $host_os in 2200eca46af7Smrg darwin*) 2201eca46af7Smrg if test -n "$STRIP"; then 2202eca46af7Smrg striplib="$STRIP -x" 2203eca46af7Smrg old_striplib="$STRIP -S" 2204eca46af7Smrg AC_MSG_RESULT([yes]) 2205eca46af7Smrg else 2206eca46af7Smrg AC_MSG_RESULT([no]) 2207eca46af7Smrg fi 2208eca46af7Smrg ;; 2209eca46af7Smrg *) 2210eca46af7Smrg AC_MSG_RESULT([no]) 2211eca46af7Smrg ;; 2212eca46af7Smrg esac 221314330f12Smrgfi 2214eca46af7Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2215eca46af7Smrg_LT_DECL([], [striplib], [1]) 2216eca46af7Smrg])# _LT_CMD_STRIPLIB 221795b296d0Smrg 221895b296d0Smrg 2219eca46af7Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2220eca46af7Smrg# ----------------------------- 2221eca46af7Smrg# PORTME Fill in your ld.so characteristics 2222eca46af7Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2223eca46af7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2224eca46af7Smrgm4_require([_LT_DECL_EGREP])dnl 2225eca46af7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2226eca46af7Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2227eca46af7Smrgm4_require([_LT_DECL_SED])dnl 2228eca46af7Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2229eca46af7SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2230eca46af7Smrgm4_if([$1], 2231eca46af7Smrg [], [ 2232eca46af7Smrgif test yes = "$GCC"; then 2233eca46af7Smrg case $host_os in 2234eca46af7Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2235eca46af7Smrg *) lt_awk_arg='/^libraries:/' ;; 2236eca46af7Smrg esac 2237eca46af7Smrg case $host_os in 2238eca46af7Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2239eca46af7Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2240eca46af7Smrg esac 2241eca46af7Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2242eca46af7Smrg case $lt_search_path_spec in 2243eca46af7Smrg *\;*) 2244eca46af7Smrg # if the path contains ";" then we assume it to be the separator 2245eca46af7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 2246eca46af7Smrg # assumed that no part of a normal pathname contains ";" but that should 2247eca46af7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2248eca46af7Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2249eca46af7Smrg ;; 2250eca46af7Smrg *) 2251eca46af7Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2252eca46af7Smrg ;; 2253eca46af7Smrg esac 2254eca46af7Smrg # Ok, now we have the path, separated by spaces, we can step through it 2255eca46af7Smrg # and add multilib dir if necessary... 2256eca46af7Smrg lt_tmp_lt_search_path_spec= 2257eca46af7Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2258eca46af7Smrg # ...but if some path component already ends with the multilib dir we assume 2259eca46af7Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2260eca46af7Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2261eca46af7Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2262eca46af7Smrg lt_multi_os_dir= 2263eca46af7Smrg ;; 2264eca46af7Smrg esac 2265eca46af7Smrg for lt_sys_path in $lt_search_path_spec; do 2266eca46af7Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2267eca46af7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2268eca46af7Smrg elif test -n "$lt_multi_os_dir"; then 2269eca46af7Smrg test -d "$lt_sys_path" && \ 2270eca46af7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2271eca46af7Smrg fi 2272eca46af7Smrg done 2273eca46af7Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2274eca46af7SmrgBEGIN {RS = " "; FS = "/|\n";} { 2275eca46af7Smrg lt_foo = ""; 2276eca46af7Smrg lt_count = 0; 2277eca46af7Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 2278eca46af7Smrg if ($lt_i != "" && $lt_i != ".") { 2279eca46af7Smrg if ($lt_i == "..") { 2280eca46af7Smrg lt_count++; 2281eca46af7Smrg } else { 2282eca46af7Smrg if (lt_count == 0) { 2283eca46af7Smrg lt_foo = "/" $lt_i lt_foo; 2284eca46af7Smrg } else { 2285eca46af7Smrg lt_count--; 2286eca46af7Smrg } 2287eca46af7Smrg } 2288eca46af7Smrg } 2289eca46af7Smrg } 2290eca46af7Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2291eca46af7Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2292eca46af7Smrg}'` 2293eca46af7Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2294eca46af7Smrg # for these hosts. 2295eca46af7Smrg case $host_os in 2296eca46af7Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2297eca46af7Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2298eca46af7Smrg esac 2299eca46af7Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2300eca46af7Smrgelse 2301eca46af7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2302eca46af7Smrgfi]) 2303eca46af7Smrglibrary_names_spec= 2304eca46af7Smrglibname_spec='lib$name' 2305eca46af7Smrgsoname_spec= 2306eca46af7Smrgshrext_cmds=.so 2307eca46af7Smrgpostinstall_cmds= 2308eca46af7Smrgpostuninstall_cmds= 2309eca46af7Smrgfinish_cmds= 2310eca46af7Smrgfinish_eval= 2311eca46af7Smrgshlibpath_var= 2312eca46af7Smrgshlibpath_overrides_runpath=unknown 2313eca46af7Smrgversion_type=none 2314eca46af7Smrgdynamic_linker="$host_os ld.so" 2315eca46af7Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2316eca46af7Smrgneed_lib_prefix=unknown 2317eca46af7Smrghardcode_into_libs=no 231895b296d0Smrg 2319eca46af7Smrg# when you set need_version to no, make sure it does not cause -set_version 2320eca46af7Smrg# flags to be left without arguments 2321eca46af7Smrgneed_version=unknown 232295b296d0Smrg 2323eca46af7Smrgcase $host_os in 2324eca46af7Smrgaix3*) 2325eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2326eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2327eca46af7Smrg shlibpath_var=LIBPATH 232895b296d0Smrg 2329eca46af7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2330eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2331eca46af7Smrg ;; 233214330f12Smrg 2333eca46af7Smrgaix[[4-9]]*) 2334eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2335eca46af7Smrg need_lib_prefix=no 2336eca46af7Smrg need_version=no 2337eca46af7Smrg hardcode_into_libs=yes 2338eca46af7Smrg if test ia64 = "$host_cpu"; then 2339eca46af7Smrg # AIX 5 supports IA64 2340eca46af7Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2341eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2342eca46af7Smrg else 2343eca46af7Smrg # With GCC up to 2.95.x, collect2 would create an import file 2344eca46af7Smrg # for dependence libraries. The import file would start with 2345eca46af7Smrg # the line '#! .'. This would cause the generated library to 2346eca46af7Smrg # depend on '.', always an invalid library. This was fixed in 2347eca46af7Smrg # development snapshots of GCC prior to 3.0. 2348eca46af7Smrg case $host_os in 2349eca46af7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2350eca46af7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2351eca46af7Smrg echo ' yes ' 2352eca46af7Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2353eca46af7Smrg : 2354eca46af7Smrg else 2355eca46af7Smrg can_build_shared=no 2356eca46af7Smrg fi 2357eca46af7Smrg ;; 2358eca46af7Smrg esac 2359eca46af7Smrg # Using Import Files as archive members, it is possible to support 2360eca46af7Smrg # filename-based versioning of shared library archives on AIX. While 2361eca46af7Smrg # this would work for both with and without runtime linking, it will 2362eca46af7Smrg # prevent static linking of such archives. So we do filename-based 2363eca46af7Smrg # shared library versioning with .so extension only, which is used 2364eca46af7Smrg # when both runtime linking and shared linking is enabled. 2365eca46af7Smrg # Unfortunately, runtime linking may impact performance, so we do 2366eca46af7Smrg # not want this to be the default eventually. Also, we use the 2367eca46af7Smrg # versioned .so libs for executables only if there is the -brtl 2368eca46af7Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2369eca46af7Smrg # To allow for filename-based versioning support, we need to create 2370eca46af7Smrg # libNAME.so.V as an archive file, containing: 2371eca46af7Smrg # *) an Import File, referring to the versioned filename of the 2372eca46af7Smrg # archive as well as the shared archive member, telling the 2373eca46af7Smrg # bitwidth (32 or 64) of that shared object, and providing the 2374eca46af7Smrg # list of exported symbols of that shared object, eventually 2375eca46af7Smrg # decorated with the 'weak' keyword 2376eca46af7Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2377eca46af7Smrg # it being seen by the linker. 2378eca46af7Smrg # At run time we better use the real file rather than another symlink, 2379eca46af7Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2380eca46af7Smrg 2381eca46af7Smrg case $with_aix_soname,$aix_use_runtimelinking in 2382eca46af7Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2383eca46af7Smrg # soname into executable. Probably we can add versioning support to 2384eca46af7Smrg # collect2, so additional links can be useful in future. 2385eca46af7Smrg aix,yes) # traditional libtool 2386eca46af7Smrg dynamic_linker='AIX unversionable lib.so' 2387eca46af7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2388eca46af7Smrg # instead of lib<name>.a to let people know that these are not 2389eca46af7Smrg # typical AIX shared libraries. 2390eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2391eca46af7Smrg ;; 2392eca46af7Smrg aix,no) # traditional AIX only 2393eca46af7Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2394eca46af7Smrg # We preserve .a as extension for shared libraries through AIX4.2 2395eca46af7Smrg # and later when we are not doing run time linking. 2396eca46af7Smrg library_names_spec='$libname$release.a $libname.a' 2397eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2398eca46af7Smrg ;; 2399eca46af7Smrg svr4,*) # full svr4 only 2400eca46af7Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2401eca46af7Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2402eca46af7Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2403eca46af7Smrg shlibpath_overrides_runpath=yes 2404eca46af7Smrg ;; 2405eca46af7Smrg *,yes) # both, prefer svr4 2406eca46af7Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2407eca46af7Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2408eca46af7Smrg # unpreferred sharedlib libNAME.a needs extra handling 2409eca46af7Smrg 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"' 2410eca46af7Smrg 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"' 2411eca46af7Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2412eca46af7Smrg shlibpath_overrides_runpath=yes 2413eca46af7Smrg ;; 2414eca46af7Smrg *,no) # both, prefer aix 2415eca46af7Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2416eca46af7Smrg library_names_spec='$libname$release.a $libname.a' 2417eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2418eca46af7Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2419eca46af7Smrg 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)' 2420eca46af7Smrg 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"' 2421eca46af7Smrg ;; 2422eca46af7Smrg esac 2423eca46af7Smrg shlibpath_var=LIBPATH 2424eca46af7Smrg fi 2425eca46af7Smrg ;; 242695b296d0Smrg 2427eca46af7Smrgamigaos*) 2428eca46af7Smrg case $host_cpu in 2429eca46af7Smrg powerpc) 2430eca46af7Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2431eca46af7Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2432eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2433eca46af7Smrg ;; 2434eca46af7Smrg m68k) 2435eca46af7Smrg library_names_spec='$libname.ixlibrary $libname.a' 2436eca46af7Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2437eca46af7Smrg 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' 2438eca46af7Smrg ;; 2439eca46af7Smrg esac 2440eca46af7Smrg ;; 244195b296d0Smrg 2442eca46af7Smrgbeos*) 2443eca46af7Smrg library_names_spec='$libname$shared_ext' 2444eca46af7Smrg dynamic_linker="$host_os ld.so" 2445eca46af7Smrg shlibpath_var=LIBRARY_PATH 2446eca46af7Smrg ;; 244795b296d0Smrg 2448eca46af7Smrgbsdi[[45]]*) 2449eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2450eca46af7Smrg need_version=no 2451eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2452eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2453eca46af7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2454eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2455eca46af7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2456eca46af7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2457eca46af7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 2458eca46af7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2459eca46af7Smrg # libtool to hard-code these into programs 24602378475aSmrg ;; 24612378475aSmrg 2462eca46af7Smrgcygwin* | mingw* | pw32* | cegcc*) 2463eca46af7Smrg version_type=windows 2464eca46af7Smrg shrext_cmds=.dll 2465eca46af7Smrg need_version=no 2466eca46af7Smrg need_lib_prefix=no 246795b296d0Smrg 2468eca46af7Smrg case $GCC,$cc_basename in 2469eca46af7Smrg yes,*) 2470eca46af7Smrg # gcc 2471eca46af7Smrg library_names_spec='$libname.dll.a' 2472eca46af7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2473eca46af7Smrg postinstall_cmds='base_file=`basename \$file`~ 2474eca46af7Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2475eca46af7Smrg dldir=$destdir/`dirname \$dlpath`~ 2476eca46af7Smrg test -d \$dldir || mkdir -p \$dldir~ 2477eca46af7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2478eca46af7Smrg chmod a+x \$dldir/$dlname~ 2479eca46af7Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2480eca46af7Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2481eca46af7Smrg fi' 2482eca46af7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2483eca46af7Smrg dlpath=$dir/\$dldll~ 2484eca46af7Smrg $RM \$dlpath' 2485eca46af7Smrg shlibpath_overrides_runpath=yes 2486eca46af7Smrg 2487eca46af7Smrg case $host_os in 2488eca46af7Smrg cygwin*) 2489eca46af7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2490eca46af7Smrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2491eca46af7Smrgm4_if([$1], [],[ 2492eca46af7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2493eca46af7Smrg ;; 2494eca46af7Smrg mingw* | cegcc*) 2495eca46af7Smrg # MinGW DLLs use traditional 'lib' prefix 2496eca46af7Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2497eca46af7Smrg ;; 2498eca46af7Smrg pw32*) 2499eca46af7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2500eca46af7Smrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 250195b296d0Smrg ;; 250295b296d0Smrg esac 2503eca46af7Smrg dynamic_linker='Win32 ld.exe' 2504eca46af7Smrg ;; 250595b296d0Smrg 2506eca46af7Smrg *,cl*) 2507eca46af7Smrg # Native MSVC 2508eca46af7Smrg libname_spec='$name' 2509eca46af7Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2510eca46af7Smrg library_names_spec='$libname.dll.lib' 251114330f12Smrg 2512eca46af7Smrg case $build_os in 2513eca46af7Smrg mingw*) 2514eca46af7Smrg sys_lib_search_path_spec= 2515eca46af7Smrg lt_save_ifs=$IFS 2516eca46af7Smrg IFS=';' 2517eca46af7Smrg for lt_path in $LIB 2518eca46af7Smrg do 2519eca46af7Smrg IFS=$lt_save_ifs 2520eca46af7Smrg # Let DOS variable expansion print the short 8.3 style file name. 2521eca46af7Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2522eca46af7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2523eca46af7Smrg done 2524eca46af7Smrg IFS=$lt_save_ifs 2525eca46af7Smrg # Convert to MSYS style. 2526eca46af7Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2527eca46af7Smrg ;; 2528eca46af7Smrg cygwin*) 2529eca46af7Smrg # Convert to unix form, then to dos form, then back to unix form 2530eca46af7Smrg # but this time dos style (no spaces!) so that the unix form looks 2531eca46af7Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2532eca46af7Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2533eca46af7Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2534eca46af7Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2535eca46af7Smrg ;; 2536eca46af7Smrg *) 2537eca46af7Smrg sys_lib_search_path_spec=$LIB 2538eca46af7Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2539eca46af7Smrg # It is most probably a Windows format PATH. 2540eca46af7Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2541eca46af7Smrg else 2542eca46af7Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 254314330f12Smrg fi 2544eca46af7Smrg # FIXME: find the short name or the path components, as spaces are 2545eca46af7Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2546eca46af7Smrg ;; 2547eca46af7Smrg esac 254895b296d0Smrg 2549eca46af7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2550eca46af7Smrg postinstall_cmds='base_file=`basename \$file`~ 2551eca46af7Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2552eca46af7Smrg dldir=$destdir/`dirname \$dlpath`~ 2553eca46af7Smrg test -d \$dldir || mkdir -p \$dldir~ 2554eca46af7Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2555eca46af7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2556eca46af7Smrg dlpath=$dir/\$dldll~ 2557eca46af7Smrg $RM \$dlpath' 2558eca46af7Smrg shlibpath_overrides_runpath=yes 2559eca46af7Smrg dynamic_linker='Win32 link.exe' 256014330f12Smrg ;; 2561eca46af7Smrg 256214330f12Smrg *) 2563eca46af7Smrg # Assume MSVC wrapper 2564eca46af7Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2565eca46af7Smrg dynamic_linker='Win32 ld.exe' 256614330f12Smrg ;; 256714330f12Smrg esac 2568eca46af7Smrg # FIXME: first we should search . and the directory the executable is in 2569eca46af7Smrg shlibpath_var=PATH 2570eca46af7Smrg ;; 257195b296d0Smrg 2572eca46af7Smrgdarwin* | rhapsody*) 2573eca46af7Smrg dynamic_linker="$host_os dyld" 2574eca46af7Smrg version_type=darwin 2575eca46af7Smrg need_lib_prefix=no 2576eca46af7Smrg need_version=no 2577eca46af7Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2578eca46af7Smrg soname_spec='$libname$release$major$shared_ext' 2579eca46af7Smrg shlibpath_overrides_runpath=yes 2580eca46af7Smrg shlibpath_var=DYLD_LIBRARY_PATH 2581eca46af7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2582eca46af7Smrgm4_if([$1], [],[ 2583eca46af7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2584eca46af7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2585eca46af7Smrg ;; 258695b296d0Smrg 2587eca46af7Smrgdgux*) 2588eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2589eca46af7Smrg need_lib_prefix=no 2590eca46af7Smrg need_version=no 2591eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2592eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2593eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2594eca46af7Smrg ;; 259595b296d0Smrg 2596eca46af7Smrgfreebsd* | dragonfly*) 2597eca46af7Smrg # DragonFly does not have aout. When/if they implement a new 2598eca46af7Smrg # versioning mechanism, adjust this. 2599eca46af7Smrg if test -x /usr/bin/objformat; then 2600eca46af7Smrg objformat=`/usr/bin/objformat` 2601eca46af7Smrg else 2602eca46af7Smrg case $host_os in 2603eca46af7Smrg freebsd[[23]].*) objformat=aout ;; 2604eca46af7Smrg *) objformat=elf ;; 2605eca46af7Smrg esac 2606eca46af7Smrg fi 2607eca46af7Smrg # Handle Gentoo/FreeBSD as it was Linux 2608eca46af7Smrg case $host_vendor in 2609eca46af7Smrg gentoo) 2610eca46af7Smrg version_type=linux ;; 2611eca46af7Smrg *) 2612eca46af7Smrg version_type=freebsd-$objformat ;; 2613eca46af7Smrg esac 261495b296d0Smrg 2615eca46af7Smrg case $version_type in 2616eca46af7Smrg freebsd-elf*) 2617eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2618eca46af7Smrg need_version=no 2619eca46af7Smrg need_lib_prefix=no 2620eca46af7Smrg ;; 2621eca46af7Smrg freebsd-*) 2622eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2623eca46af7Smrg need_version=yes 2624eca46af7Smrg ;; 2625eca46af7Smrg linux) 2626eca46af7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2627eca46af7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2628eca46af7Smrg need_lib_prefix=no 2629eca46af7Smrg need_version=no 2630eca46af7Smrg ;; 2631eca46af7Smrg esac 2632eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2633eca46af7Smrg case $host_os in 2634eca46af7Smrg freebsd2.*) 2635eca46af7Smrg shlibpath_overrides_runpath=yes 263614330f12Smrg ;; 2637eca46af7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2638eca46af7Smrg shlibpath_overrides_runpath=yes 2639eca46af7Smrg hardcode_into_libs=yes 264014330f12Smrg ;; 2641eca46af7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2642eca46af7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2643eca46af7Smrg shlibpath_overrides_runpath=no 2644eca46af7Smrg hardcode_into_libs=yes 264514330f12Smrg ;; 2646eca46af7Smrg *) # from 4.6 on, and DragonFly 2647eca46af7Smrg shlibpath_overrides_runpath=yes 2648eca46af7Smrg hardcode_into_libs=yes 264914330f12Smrg ;; 2650eca46af7Smrg esac 2651eca46af7Smrg ;; 265295b296d0Smrg 2653eca46af7Smrghaiku*) 2654eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2655eca46af7Smrg need_lib_prefix=no 2656eca46af7Smrg need_version=no 2657eca46af7Smrg dynamic_linker="$host_os runtime_loader" 2658eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2659eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2660eca46af7Smrg shlibpath_var=LIBRARY_PATH 2661eca46af7Smrg shlibpath_overrides_runpath=no 2662eca46af7Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2663eca46af7Smrg hardcode_into_libs=yes 2664eca46af7Smrg ;; 266595b296d0Smrg 2666eca46af7Smrghpux9* | hpux10* | hpux11*) 2667eca46af7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 2668eca46af7Smrg # link against other versions. 2669eca46af7Smrg version_type=sunos 2670eca46af7Smrg need_lib_prefix=no 2671eca46af7Smrg need_version=no 2672eca46af7Smrg case $host_cpu in 2673eca46af7Smrg ia64*) 2674eca46af7Smrg shrext_cmds='.so' 2675eca46af7Smrg hardcode_into_libs=yes 2676eca46af7Smrg dynamic_linker="$host_os dld.so" 2677eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2678eca46af7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2679eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2680eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2681eca46af7Smrg if test 32 = "$HPUX_IA64_MODE"; then 2682eca46af7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 268314330f12Smrg else 2684eca46af7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 268514330f12Smrg fi 2686eca46af7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 268714330f12Smrg ;; 2688eca46af7Smrg hppa*64*) 2689eca46af7Smrg shrext_cmds='.sl' 2690eca46af7Smrg hardcode_into_libs=yes 2691eca46af7Smrg dynamic_linker="$host_os dld.sl" 2692eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2693eca46af7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2694eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2695eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2696eca46af7Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2697eca46af7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 269814330f12Smrg ;; 269914330f12Smrg *) 2700eca46af7Smrg shrext_cmds='.sl' 2701eca46af7Smrg dynamic_linker="$host_os dld.sl" 2702eca46af7Smrg shlibpath_var=SHLIB_PATH 2703eca46af7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2704eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2705eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 270614330f12Smrg ;; 270714330f12Smrg esac 2708eca46af7Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2709eca46af7Smrg postinstall_cmds='chmod 555 $lib' 2710eca46af7Smrg # or fails outright, so override atomically: 2711eca46af7Smrg install_override_mode=555 2712eca46af7Smrg ;; 271395b296d0Smrg 2714eca46af7Smrginterix[[3-9]]*) 2715eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2716eca46af7Smrg need_lib_prefix=no 2717eca46af7Smrg need_version=no 2718eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2719eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2720eca46af7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2721eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2722eca46af7Smrg shlibpath_overrides_runpath=no 2723eca46af7Smrg hardcode_into_libs=yes 2724eca46af7Smrg ;; 272595b296d0Smrg 2726eca46af7Smrgirix5* | irix6* | nonstopux*) 2727eca46af7Smrg case $host_os in 2728eca46af7Smrg nonstopux*) version_type=nonstopux ;; 2729eca46af7Smrg *) 2730eca46af7Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 2731eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2732eca46af7Smrg else 2733eca46af7Smrg version_type=irix 2734eca46af7Smrg fi ;; 2735eca46af7Smrg esac 2736eca46af7Smrg need_lib_prefix=no 2737eca46af7Smrg need_version=no 2738eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2739eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2740eca46af7Smrg case $host_os in 2741eca46af7Smrg irix5* | nonstopux*) 2742eca46af7Smrg libsuff= shlibsuff= 2743eca46af7Smrg ;; 2744eca46af7Smrg *) 2745eca46af7Smrg case $LD in # libtool.m4 will add one of these switches to LD 2746eca46af7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2747eca46af7Smrg libsuff= shlibsuff= libmagic=32-bit;; 2748eca46af7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2749eca46af7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2750eca46af7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2751eca46af7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2752eca46af7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 2753eca46af7Smrg esac 2754eca46af7Smrg ;; 2755eca46af7Smrg esac 2756eca46af7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2757eca46af7Smrg shlibpath_overrides_runpath=no 2758eca46af7Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2759eca46af7Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2760eca46af7Smrg hardcode_into_libs=yes 2761eca46af7Smrg ;; 276295b296d0Smrg 2763eca46af7Smrg# No shared lib support for Linux oldld, aout, or coff. 2764eca46af7Smrglinux*oldld* | linux*aout* | linux*coff*) 2765eca46af7Smrg dynamic_linker=no 2766eca46af7Smrg ;; 276795b296d0Smrg 2768eca46af7Smrglinux*android*) 2769eca46af7Smrg version_type=none # Android doesn't support versioned libraries. 2770eca46af7Smrg need_lib_prefix=no 2771eca46af7Smrg need_version=no 2772eca46af7Smrg library_names_spec='$libname$release$shared_ext' 2773eca46af7Smrg soname_spec='$libname$release$shared_ext' 2774eca46af7Smrg finish_cmds= 2775eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2776eca46af7Smrg shlibpath_overrides_runpath=yes 277795b296d0Smrg 2778eca46af7Smrg # This implies no fast_install, which is unacceptable. 2779eca46af7Smrg # Some rework will be needed to allow for fast_install 2780eca46af7Smrg # before this can be enabled. 2781eca46af7Smrg hardcode_into_libs=yes 278295b296d0Smrg 2783eca46af7Smrg dynamic_linker='Android linker' 2784eca46af7Smrg # Don't embed -rpath directories since the linker doesn't support them. 2785eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2786eca46af7Smrg ;; 2787e6f085baSmrg 2788eca46af7Smrg# This must be glibc/ELF. 2789eca46af7Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2790eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2791eca46af7Smrg need_lib_prefix=no 2792eca46af7Smrg need_version=no 2793eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2794eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2795eca46af7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2796eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2797eca46af7Smrg shlibpath_overrides_runpath=no 2798e6f085baSmrg 2799eca46af7Smrg # Some binutils ld are patched to set DT_RUNPATH 2800eca46af7Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2801eca46af7Smrg [lt_cv_shlibpath_overrides_runpath=no 2802eca46af7Smrg save_LDFLAGS=$LDFLAGS 2803eca46af7Smrg save_libdir=$libdir 2804eca46af7Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2805eca46af7Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2806eca46af7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2807eca46af7Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2808eca46af7Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2809eca46af7Smrg LDFLAGS=$save_LDFLAGS 2810eca46af7Smrg libdir=$save_libdir 2811eca46af7Smrg ]) 2812eca46af7Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2813e6f085baSmrg 2814eca46af7Smrg # This implies no fast_install, which is unacceptable. 2815eca46af7Smrg # Some rework will be needed to allow for fast_install 2816eca46af7Smrg # before this can be enabled. 2817eca46af7Smrg hardcode_into_libs=yes 2818e6f085baSmrg 2819eca46af7Smrg # Append ld.so.conf contents to the search path 2820eca46af7Smrg if test -f /etc/ld.so.conf; then 2821eca46af7Smrg 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' ' '` 2822eca46af7Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2823eca46af7Smrg fi 2824e6f085baSmrg 2825eca46af7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2826eca46af7Smrg # powerpc, because MkLinux only supported shared libraries with the 2827eca46af7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 2828eca46af7Smrg # most powerpc-linux boxes support dynamic linking these days and 2829eca46af7Smrg # people can always --disable-shared, the test was removed, and we 2830eca46af7Smrg # assume the GNU/Linux dynamic linker is in use. 2831eca46af7Smrg dynamic_linker='GNU/Linux ld.so' 2832eca46af7Smrg ;; 2833e6f085baSmrg 2834eca46af7Smrgnetbsd*) 2835eca46af7Smrg version_type=sunos 2836eca46af7Smrg need_lib_prefix=no 2837eca46af7Smrg need_version=no 2838eca46af7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2839eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2840eca46af7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2841eca46af7Smrg dynamic_linker='NetBSD (a.out) ld.so' 284295b296d0Smrg else 2843eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2844eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2845eca46af7Smrg dynamic_linker='NetBSD ld.elf_so' 28462378475aSmrg fi 2847eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2848eca46af7Smrg shlibpath_overrides_runpath=yes 2849eca46af7Smrg hardcode_into_libs=yes 2850eca46af7Smrg ;; 285114330f12Smrg 2852eca46af7Smrgnewsos6) 2853eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2854eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2855eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2856eca46af7Smrg shlibpath_overrides_runpath=yes 2857eca46af7Smrg ;; 285814330f12Smrg 2859eca46af7Smrg*nto* | *qnx*) 2860eca46af7Smrg version_type=qnx 2861eca46af7Smrg need_lib_prefix=no 2862eca46af7Smrg need_version=no 2863eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2864eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2865eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2866eca46af7Smrg shlibpath_overrides_runpath=no 2867eca46af7Smrg hardcode_into_libs=yes 2868eca46af7Smrg dynamic_linker='ldqnx.so' 2869eca46af7Smrg ;; 287095b296d0Smrg 2871eca46af7Smrgopenbsd* | bitrig*) 2872eca46af7Smrg version_type=sunos 2873eca46af7Smrg sys_lib_dlsearch_path_spec=/usr/lib 2874eca46af7Smrg need_lib_prefix=no 2875eca46af7Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2876eca46af7Smrg need_version=no 2877eca46af7Smrg else 2878eca46af7Smrg need_version=yes 2879eca46af7Smrg fi 2880eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2881eca46af7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2882eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2883eca46af7Smrg shlibpath_overrides_runpath=yes 2884eca46af7Smrg ;; 288595b296d0Smrg 2886eca46af7Smrgos2*) 2887eca46af7Smrg libname_spec='$name' 2888eca46af7Smrg version_type=windows 2889eca46af7Smrg shrext_cmds=.dll 2890eca46af7Smrg need_version=no 2891eca46af7Smrg need_lib_prefix=no 2892eca46af7Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2893eca46af7Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2894eca46af7Smrg v=$($ECHO $release$versuffix | tr -d .-); 2895eca46af7Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2896eca46af7Smrg $ECHO $n$v`$shared_ext' 2897eca46af7Smrg library_names_spec='${libname}_dll.$libext' 2898eca46af7Smrg dynamic_linker='OS/2 ld.exe' 2899eca46af7Smrg shlibpath_var=BEGINLIBPATH 2900eca46af7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2901eca46af7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2902eca46af7Smrg postinstall_cmds='base_file=`basename \$file`~ 2903eca46af7Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2904eca46af7Smrg dldir=$destdir/`dirname \$dlpath`~ 2905eca46af7Smrg test -d \$dldir || mkdir -p \$dldir~ 2906eca46af7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2907eca46af7Smrg chmod a+x \$dldir/$dlname~ 2908eca46af7Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2909eca46af7Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2910eca46af7Smrg fi' 2911eca46af7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2912eca46af7Smrg dlpath=$dir/\$dldll~ 2913eca46af7Smrg $RM \$dlpath' 2914eca46af7Smrg ;; 291595b296d0Smrg 2916eca46af7Smrgosf3* | osf4* | osf5*) 2917eca46af7Smrg version_type=osf 2918eca46af7Smrg need_lib_prefix=no 2919eca46af7Smrg need_version=no 2920eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2921eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2922eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2923eca46af7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2924eca46af7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2925eca46af7Smrg ;; 292695b296d0Smrg 2927eca46af7Smrgrdos*) 2928eca46af7Smrg dynamic_linker=no 2929eca46af7Smrg ;; 2930e6f085baSmrg 2931eca46af7Smrgsolaris*) 2932eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2933eca46af7Smrg need_lib_prefix=no 2934eca46af7Smrg need_version=no 2935eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2936eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2937eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2938eca46af7Smrg shlibpath_overrides_runpath=yes 2939eca46af7Smrg hardcode_into_libs=yes 2940eca46af7Smrg # ldd complains unless libraries are executable 2941eca46af7Smrg postinstall_cmds='chmod +x $lib' 2942eca46af7Smrg ;; 294395b296d0Smrg 2944eca46af7Smrgsunos4*) 2945eca46af7Smrg version_type=sunos 2946eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2947eca46af7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2948eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2949eca46af7Smrg shlibpath_overrides_runpath=yes 2950eca46af7Smrg if test yes = "$with_gnu_ld"; then 2951eca46af7Smrg need_lib_prefix=no 295214330f12Smrg fi 2953eca46af7Smrg need_version=yes 2954eca46af7Smrg ;; 295595b296d0Smrg 2956eca46af7Smrgsysv4 | sysv4.3*) 2957eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2958eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2959eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2960eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2961eca46af7Smrg case $host_vendor in 2962eca46af7Smrg sni) 2963eca46af7Smrg shlibpath_overrides_runpath=no 2964eca46af7Smrg need_lib_prefix=no 2965eca46af7Smrg runpath_var=LD_RUN_PATH 2966eca46af7Smrg ;; 2967eca46af7Smrg siemens) 2968eca46af7Smrg need_lib_prefix=no 2969eca46af7Smrg ;; 2970eca46af7Smrg motorola) 2971eca46af7Smrg need_lib_prefix=no 2972eca46af7Smrg need_version=no 2973eca46af7Smrg shlibpath_overrides_runpath=no 2974eca46af7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2975eca46af7Smrg ;; 2976eca46af7Smrg esac 2977eca46af7Smrg ;; 297814330f12Smrg 2979eca46af7Smrgsysv4*MP*) 2980eca46af7Smrg if test -d /usr/nec; then 2981eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 2982eca46af7Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 2983eca46af7Smrg soname_spec='$libname$shared_ext.$major' 2984eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2985eca46af7Smrg fi 2986eca46af7Smrg ;; 298714330f12Smrg 2988eca46af7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2989eca46af7Smrg version_type=sco 2990eca46af7Smrg need_lib_prefix=no 2991eca46af7Smrg need_version=no 2992eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 2993eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 2994eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 2995eca46af7Smrg shlibpath_overrides_runpath=yes 2996eca46af7Smrg hardcode_into_libs=yes 2997eca46af7Smrg if test yes = "$with_gnu_ld"; then 2998eca46af7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2999eca46af7Smrg else 3000eca46af7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3001eca46af7Smrg case $host_os in 3002eca46af7Smrg sco3.2v5*) 3003eca46af7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3004eca46af7Smrg ;; 3005eca46af7Smrg esac 3006eca46af7Smrg fi 3007eca46af7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 3008eca46af7Smrg ;; 300914330f12Smrg 3010eca46af7Smrgtpf*) 3011eca46af7Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3012eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 3013eca46af7Smrg need_lib_prefix=no 3014eca46af7Smrg need_version=no 3015eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3016eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 3017eca46af7Smrg shlibpath_overrides_runpath=no 3018eca46af7Smrg hardcode_into_libs=yes 3019eca46af7Smrg ;; 302014330f12Smrg 3021eca46af7Smrguts4*) 3022eca46af7Smrg version_type=linux # correct to gnu/linux during the next big refactor 3023eca46af7Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3024eca46af7Smrg soname_spec='$libname$release$shared_ext$major' 3025eca46af7Smrg shlibpath_var=LD_LIBRARY_PATH 3026eca46af7Smrg ;; 302714330f12Smrg 3028eca46af7Smrg*) 3029eca46af7Smrg dynamic_linker=no 3030eca46af7Smrg ;; 3031eca46af7Smrgesac 3032eca46af7SmrgAC_MSG_RESULT([$dynamic_linker]) 3033eca46af7Smrgtest no = "$dynamic_linker" && can_build_shared=no 303414330f12Smrg 3035eca46af7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3036eca46af7Smrgif test yes = "$GCC"; then 3037eca46af7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3038eca46af7Smrgfi 303914330f12Smrg 3040eca46af7Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3041eca46af7Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3042eca46af7Smrgfi 3043eca46af7Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3044eca46af7Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 304514330f12Smrgfi 304614330f12Smrg 3047eca46af7Smrg_LT_DECL([], [variables_saved_for_relink], [1], 3048eca46af7Smrg [Variables whose values should be saved in libtool wrapper scripts and 3049eca46af7Smrg restored at link time]) 3050eca46af7Smrg_LT_DECL([], [need_lib_prefix], [0], 3051eca46af7Smrg [Do we need the "lib" prefix for modules?]) 3052eca46af7Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3053eca46af7Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3054eca46af7Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3055eca46af7Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3056eca46af7Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3057eca46af7Smrg [Is shlibpath searched before the hard-coded library search path?]) 3058eca46af7Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3059eca46af7Smrg_LT_DECL([], [library_names_spec], [1], 3060eca46af7Smrg [[List of archive names. First name is the real one, the rest are links. 3061eca46af7Smrg The last name is the one that the linker finds with -lNAME]]) 3062eca46af7Smrg_LT_DECL([], [soname_spec], [1], 3063eca46af7Smrg [[The coded name of the library, if different from the real name]]) 3064eca46af7Smrg_LT_DECL([], [install_override_mode], [1], 3065eca46af7Smrg [Permission mode override for installation of shared libraries]) 3066eca46af7Smrg_LT_DECL([], [postinstall_cmds], [2], 3067eca46af7Smrg [Command to use after installation of a shared archive]) 3068eca46af7Smrg_LT_DECL([], [postuninstall_cmds], [2], 3069eca46af7Smrg [Command to use after uninstallation of a shared archive]) 3070eca46af7Smrg_LT_DECL([], [finish_cmds], [2], 3071eca46af7Smrg [Commands used to finish a libtool library installation in a directory]) 3072eca46af7Smrg_LT_DECL([], [finish_eval], [1], 3073eca46af7Smrg [[As "finish_cmds", except a single script fragment to be evaled but 3074eca46af7Smrg not shown]]) 3075eca46af7Smrg_LT_DECL([], [hardcode_into_libs], [0], 3076eca46af7Smrg [Whether we should hardcode library paths into libraries]) 3077eca46af7Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3078eca46af7Smrg [Compile-time system search path for libraries]) 3079eca46af7Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 3080eca46af7Smrg [Run-time system search path for libraries]) 3081eca46af7Smrg])# _LT_SYS_DYNAMIC_LINKER 308214330f12Smrg 308314330f12Smrg 3084eca46af7Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 3085eca46af7Smrg# -------------------------- 3086eca46af7Smrg# find a file program that can recognize shared library 3087eca46af7SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3088eca46af7Smrg[m4_require([_LT_DECL_EGREP])dnl 3089eca46af7SmrgAC_MSG_CHECKING([for $1]) 3090eca46af7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3091eca46af7Smrg[case $MAGIC_CMD in 3092eca46af7Smrg[[\\/*] | ?:[\\/]*]) 3093eca46af7Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3094eca46af7Smrg ;; 3095eca46af7Smrg*) 3096eca46af7Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 3097eca46af7Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3098eca46af7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3099eca46af7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3100eca46af7Smrgdnl not every word. This closes a longstanding sh security hole. 3101eca46af7Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3102eca46af7Smrg for ac_dir in $ac_dummy; do 3103eca46af7Smrg IFS=$lt_save_ifs 3104eca46af7Smrg test -z "$ac_dir" && ac_dir=. 3105eca46af7Smrg if test -f "$ac_dir/$1"; then 3106eca46af7Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3107eca46af7Smrg if test -n "$file_magic_test_file"; then 3108eca46af7Smrg case $deplibs_check_method in 3109eca46af7Smrg "file_magic "*) 3110eca46af7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3111eca46af7Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3112eca46af7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3113eca46af7Smrg $EGREP "$file_magic_regex" > /dev/null; then 3114eca46af7Smrg : 3115eca46af7Smrg else 3116eca46af7Smrg cat <<_LT_EOF 1>&2 311714330f12Smrg 3118eca46af7Smrg*** Warning: the command libtool uses to detect shared libraries, 3119eca46af7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3120eca46af7Smrg*** The result is that libtool may fail to recognize shared libraries 3121eca46af7Smrg*** as such. This will affect the creation of libtool libraries that 3122eca46af7Smrg*** depend on shared libraries, but programs linked with such libtool 3123eca46af7Smrg*** libraries will work regardless of this problem. Nevertheless, you 3124eca46af7Smrg*** may want to report the problem to your system manager and/or to 3125eca46af7Smrg*** bug-libtool@gnu.org 312614330f12Smrg 3127eca46af7Smrg_LT_EOF 3128eca46af7Smrg fi ;; 3129eca46af7Smrg esac 3130eca46af7Smrg fi 3131eca46af7Smrg break 3132eca46af7Smrg fi 3133eca46af7Smrg done 3134eca46af7Smrg IFS=$lt_save_ifs 3135eca46af7Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 3136eca46af7Smrg ;; 3137eca46af7Smrgesac]) 3138eca46af7SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3139eca46af7Smrgif test -n "$MAGIC_CMD"; then 3140eca46af7Smrg AC_MSG_RESULT($MAGIC_CMD) 314114330f12Smrgelse 3142eca46af7Smrg AC_MSG_RESULT(no) 314314330f12Smrgfi 3144eca46af7Smrg_LT_DECL([], [MAGIC_CMD], [0], 3145eca46af7Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3146eca46af7Smrg])# _LT_PATH_TOOL_PREFIX 314714330f12Smrg 3148eca46af7Smrg# Old name: 3149eca46af7SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3150eca46af7Smrgdnl aclocal-1.4 backwards compatibility: 3151eca46af7Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 315214330f12Smrg 315314330f12Smrg 3154eca46af7Smrg# _LT_PATH_MAGIC 3155eca46af7Smrg# -------------- 3156eca46af7Smrg# find a file program that can recognize a shared library 3157eca46af7Smrgm4_defun([_LT_PATH_MAGIC], 3158eca46af7Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3159eca46af7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3160eca46af7Smrg if test -n "$ac_tool_prefix"; then 3161eca46af7Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 316214330f12Smrg else 3163eca46af7Smrg MAGIC_CMD=: 316414330f12Smrg fi 316514330f12Smrgfi 3166eca46af7Smrg])# _LT_PATH_MAGIC 316714330f12Smrg 316814330f12Smrg 3169eca46af7Smrg# LT_PATH_LD 3170eca46af7Smrg# ---------- 3171eca46af7Smrg# find the pathname to the GNU or non-GNU linker 3172eca46af7SmrgAC_DEFUN([LT_PATH_LD], 3173eca46af7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3174eca46af7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3175eca46af7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3176eca46af7Smrgm4_require([_LT_DECL_SED])dnl 3177eca46af7Smrgm4_require([_LT_DECL_EGREP])dnl 3178eca46af7Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 317914330f12Smrg 3180eca46af7SmrgAC_ARG_WITH([gnu-ld], 3181eca46af7Smrg [AS_HELP_STRING([--with-gnu-ld], 3182eca46af7Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3183eca46af7Smrg [test no = "$withval" || with_gnu_ld=yes], 3184eca46af7Smrg [with_gnu_ld=no])dnl 3185eca46af7Smrg 3186eca46af7Smrgac_prog=ld 3187eca46af7Smrgif test yes = "$GCC"; then 3188eca46af7Smrg # Check if gcc -print-prog-name=ld gives a path. 3189eca46af7Smrg AC_MSG_CHECKING([for ld used by $CC]) 3190eca46af7Smrg case $host in 3191eca46af7Smrg *-*-mingw*) 3192eca46af7Smrg # gcc leaves a trailing carriage return, which upsets mingw 3193eca46af7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3194eca46af7Smrg *) 3195eca46af7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3196eca46af7Smrg esac 3197eca46af7Smrg case $ac_prog in 3198eca46af7Smrg # Accept absolute paths. 3199eca46af7Smrg [[\\/]]* | ?:[[\\/]]*) 3200eca46af7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 3201eca46af7Smrg # Canonicalize the pathname of ld 3202eca46af7Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3203eca46af7Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3204eca46af7Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3205eca46af7Smrg done 3206eca46af7Smrg test -z "$LD" && LD=$ac_prog 3207eca46af7Smrg ;; 3208eca46af7Smrg "") 3209eca46af7Smrg # If it fails, then pretend we aren't using GCC. 3210eca46af7Smrg ac_prog=ld 321114330f12Smrg ;; 321214330f12Smrg *) 3213eca46af7Smrg # If it is relative, then search for the first ld in PATH. 3214eca46af7Smrg with_gnu_ld=unknown 321514330f12Smrg ;; 321614330f12Smrg esac 3217eca46af7Smrgelif test yes = "$with_gnu_ld"; then 3218eca46af7Smrg AC_MSG_CHECKING([for GNU ld]) 3219eca46af7Smrgelse 3220eca46af7Smrg AC_MSG_CHECKING([for non-GNU ld]) 322114330f12Smrgfi 3222eca46af7SmrgAC_CACHE_VAL(lt_cv_path_LD, 3223eca46af7Smrg[if test -z "$LD"; then 3224eca46af7Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3225eca46af7Smrg for ac_dir in $PATH; do 3226eca46af7Smrg IFS=$lt_save_ifs 3227eca46af7Smrg test -z "$ac_dir" && ac_dir=. 3228eca46af7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3229eca46af7Smrg lt_cv_path_LD=$ac_dir/$ac_prog 3230eca46af7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 3231eca46af7Smrg # but apparently some variants of GNU ld only accept -v. 3232eca46af7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 3233eca46af7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3234eca46af7Smrg *GNU* | *'with BFD'*) 3235eca46af7Smrg test no != "$with_gnu_ld" && break 3236eca46af7Smrg ;; 3237eca46af7Smrg *) 3238eca46af7Smrg test yes != "$with_gnu_ld" && break 3239eca46af7Smrg ;; 3240eca46af7Smrg esac 3241eca46af7Smrg fi 3242eca46af7Smrg done 3243eca46af7Smrg IFS=$lt_save_ifs 3244eca46af7Smrgelse 3245eca46af7Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 3246eca46af7Smrgfi]) 3247eca46af7SmrgLD=$lt_cv_path_LD 3248eca46af7Smrgif test -n "$LD"; then 3249eca46af7Smrg AC_MSG_RESULT($LD) 3250eca46af7Smrgelse 3251eca46af7Smrg AC_MSG_RESULT(no) 3252eca46af7Smrgfi 3253eca46af7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3254eca46af7Smrg_LT_PATH_LD_GNU 3255eca46af7SmrgAC_SUBST([LD]) 325614330f12Smrg 3257eca46af7Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3258eca46af7Smrg])# LT_PATH_LD 325914330f12Smrg 3260eca46af7Smrg# Old names: 3261eca46af7SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3262eca46af7SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3263eca46af7Smrgdnl aclocal-1.4 backwards compatibility: 3264eca46af7Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3265eca46af7Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3266eca46af7Smrg 3267eca46af7Smrg 3268eca46af7Smrg# _LT_PATH_LD_GNU 3269eca46af7Smrg#- -------------- 3270eca46af7Smrgm4_defun([_LT_PATH_LD_GNU], 3271eca46af7Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3272eca46af7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3273eca46af7Smrgcase `$LD -v 2>&1 </dev/null` in 3274eca46af7Smrg*GNU* | *'with BFD'*) 3275eca46af7Smrg lt_cv_prog_gnu_ld=yes 3276eca46af7Smrg ;; 3277eca46af7Smrg*) 3278eca46af7Smrg lt_cv_prog_gnu_ld=no 3279eca46af7Smrg ;; 3280eca46af7Smrgesac]) 3281eca46af7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3282eca46af7Smrg])# _LT_PATH_LD_GNU 3283eca46af7Smrg 3284eca46af7Smrg 3285eca46af7Smrg# _LT_CMD_RELOAD 3286eca46af7Smrg# -------------- 3287eca46af7Smrg# find reload flag for linker 3288eca46af7Smrg# -- PORTME Some linkers may need a different reload flag. 3289eca46af7Smrgm4_defun([_LT_CMD_RELOAD], 3290eca46af7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 3291eca46af7Smrg lt_cv_ld_reload_flag, 3292eca46af7Smrg [lt_cv_ld_reload_flag='-r']) 3293eca46af7Smrgreload_flag=$lt_cv_ld_reload_flag 3294eca46af7Smrgcase $reload_flag in 3295eca46af7Smrg"" | " "*) ;; 3296eca46af7Smrg*) reload_flag=" $reload_flag" ;; 3297eca46af7Smrgesac 3298eca46af7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3299eca46af7Smrgcase $host_os in 3300eca46af7Smrg cygwin* | mingw* | pw32* | cegcc*) 3301eca46af7Smrg if test yes != "$GCC"; then 3302eca46af7Smrg reload_cmds=false 3303eca46af7Smrg fi 330414330f12Smrg ;; 3305eca46af7Smrg darwin*) 3306eca46af7Smrg if test yes = "$GCC"; then 3307eca46af7Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 330814330f12Smrg else 3309eca46af7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 331014330f12Smrg fi 3311eca46af7Smrg ;; 3312eca46af7Smrgesac 3313eca46af7Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3314eca46af7Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3315eca46af7Smrg])# _LT_CMD_RELOAD 3316eca46af7Smrg 3317eca46af7Smrg 3318eca46af7Smrg# _LT_PATH_DD 3319eca46af7Smrg# ----------- 3320eca46af7Smrg# find a working dd 3321eca46af7Smrgm4_defun([_LT_PATH_DD], 3322eca46af7Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3323eca46af7Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3324eca46af7Smrgcat conftest.i conftest.i >conftest2.i 3325eca46af7Smrg: ${lt_DD:=$DD} 3326eca46af7SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3327eca46af7Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3328eca46af7Smrg cmp -s conftest.i conftest.out \ 3329eca46af7Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 333014330f12Smrgfi]) 3331eca46af7Smrgrm -f conftest.i conftest2.i conftest.out]) 3332eca46af7Smrg])# _LT_PATH_DD 333314330f12Smrg 3334eca46af7Smrg 3335eca46af7Smrg# _LT_CMD_TRUNCATE 3336eca46af7Smrg# ---------------- 3337eca46af7Smrg# find command to truncate a binary pipe 3338eca46af7Smrgm4_defun([_LT_CMD_TRUNCATE], 3339eca46af7Smrg[m4_require([_LT_PATH_DD]) 3340eca46af7SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3341eca46af7Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3342eca46af7Smrgcat conftest.i conftest.i >conftest2.i 3343eca46af7Smrglt_cv_truncate_bin= 3344eca46af7Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3345eca46af7Smrg cmp -s conftest.i conftest.out \ 3346eca46af7Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3347eca46af7Smrgfi 3348eca46af7Smrgrm -f conftest.i conftest2.i conftest.out 3349eca46af7Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3350eca46af7Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3351eca46af7Smrg [Command to truncate a binary pipe]) 3352eca46af7Smrg])# _LT_CMD_TRUNCATE 3353eca46af7Smrg 3354eca46af7Smrg 3355eca46af7Smrg# _LT_CHECK_MAGIC_METHOD 3356eca46af7Smrg# ---------------------- 3357eca46af7Smrg# how to check for library dependencies 3358eca46af7Smrg# -- PORTME fill in with the dynamic library characteristics 3359eca46af7Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3360eca46af7Smrg[m4_require([_LT_DECL_EGREP]) 3361eca46af7Smrgm4_require([_LT_DECL_OBJDUMP]) 3362eca46af7SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3363eca46af7Smrglt_cv_deplibs_check_method, 3364eca46af7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3365eca46af7Smrglt_cv_file_magic_test_file= 3366eca46af7Smrglt_cv_deplibs_check_method='unknown' 3367eca46af7Smrg# Need to set the preceding variable on all platforms that support 3368eca46af7Smrg# interlibrary dependencies. 3369eca46af7Smrg# 'none' -- dependencies not supported. 3370eca46af7Smrg# 'unknown' -- same as none, but documents that we really don't know. 3371eca46af7Smrg# 'pass_all' -- all dependencies passed with no checks. 3372eca46af7Smrg# 'test_compile' -- check by making test program. 3373eca46af7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 3374eca46af7Smrg# that responds to the $file_magic_cmd with a given extended regex. 3375eca46af7Smrg# If you have 'file' or equivalent on your system and you're not sure 3376eca46af7Smrg# whether 'pass_all' will *always* work, you probably want this one. 337714330f12Smrg 337814330f12Smrgcase $host_os in 3379eca46af7Smrgaix[[4-9]]*) 3380eca46af7Smrg lt_cv_deplibs_check_method=pass_all 3381eca46af7Smrg ;; 338214330f12Smrg 3383eca46af7Smrgbeos*) 3384eca46af7Smrg lt_cv_deplibs_check_method=pass_all 338514330f12Smrg ;; 338614330f12Smrg 3387eca46af7Smrgbsdi[[45]]*) 3388eca46af7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3389eca46af7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3390eca46af7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 3391eca46af7Smrg ;; 3392eca46af7Smrg 3393eca46af7Smrgcygwin*) 3394eca46af7Smrg # func_win32_libid is a shell function defined in ltmain.sh 3395eca46af7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3396eca46af7Smrg lt_cv_file_magic_cmd='func_win32_libid' 3397eca46af7Smrg ;; 3398eca46af7Smrg 3399eca46af7Smrgmingw* | pw32*) 3400eca46af7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 3401eca46af7Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3402eca46af7Smrg # unless we find 'file', for example because we are cross-compiling. 3403eca46af7Smrg if ( file / ) >/dev/null 2>&1; then 3404eca46af7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3405eca46af7Smrg lt_cv_file_magic_cmd='func_win32_libid' 340614330f12Smrg else 3407eca46af7Smrg # Keep this pattern in sync with the one in func_win32_libid. 3408eca46af7Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3409eca46af7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3410eca46af7Smrg fi 3411eca46af7Smrg ;; 3412eca46af7Smrg 3413eca46af7Smrgcegcc*) 3414eca46af7Smrg # use the weaker test based on 'objdump'. See mingw*. 3415eca46af7Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3416eca46af7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3417eca46af7Smrg ;; 3418eca46af7Smrg 3419eca46af7Smrgdarwin* | rhapsody*) 3420eca46af7Smrg lt_cv_deplibs_check_method=pass_all 3421eca46af7Smrg ;; 3422eca46af7Smrg 3423eca46af7Smrgfreebsd* | dragonfly*) 3424eca46af7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3425eca46af7Smrg case $host_cpu in 3426eca46af7Smrg i*86 ) 3427eca46af7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 3428eca46af7Smrg # Let's accept both of them until this is cleared up. 3429eca46af7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3430eca46af7Smrg lt_cv_file_magic_cmd=/usr/bin/file 3431eca46af7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 34322378475aSmrg ;; 343314330f12Smrg esac 3434eca46af7Smrg else 3435eca46af7Smrg lt_cv_deplibs_check_method=pass_all 343614330f12Smrg fi 343714330f12Smrg ;; 343814330f12Smrg 3439eca46af7Smrghaiku*) 3440eca46af7Smrg lt_cv_deplibs_check_method=pass_all 3441eca46af7Smrg ;; 3442eca46af7Smrg 3443eca46af7Smrghpux10.20* | hpux11*) 3444eca46af7Smrg lt_cv_file_magic_cmd=/usr/bin/file 344514330f12Smrg case $host_cpu in 3446eca46af7Smrg ia64*) 3447eca46af7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3448eca46af7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 344914330f12Smrg ;; 3450eca46af7Smrg hppa*64*) 3451eca46af7Smrg [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]'] 3452eca46af7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3453eca46af7Smrg ;; 3454eca46af7Smrg *) 3455eca46af7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3456eca46af7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 345714330f12Smrg ;; 345814330f12Smrg esac 345914330f12Smrg ;; 346014330f12Smrg 3461eca46af7Smrginterix[[3-9]]*) 3462eca46af7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3463eca46af7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 346414330f12Smrg ;; 346514330f12Smrg 3466eca46af7Smrgirix5* | irix6* | nonstopux*) 3467eca46af7Smrg case $LD in 3468eca46af7Smrg *-32|*"-32 ") libmagic=32-bit;; 3469eca46af7Smrg *-n32|*"-n32 ") libmagic=N32;; 3470eca46af7Smrg *-64|*"-64 ") libmagic=64-bit;; 3471eca46af7Smrg *) libmagic=never-match;; 3472eca46af7Smrg esac 3473eca46af7Smrg lt_cv_deplibs_check_method=pass_all 3474eca46af7Smrg ;; 347514330f12Smrg 3476eca46af7Smrg# This must be glibc/ELF. 3477eca46af7Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3478eca46af7Smrg lt_cv_deplibs_check_method=pass_all 3479eca46af7Smrg ;; 348014330f12Smrg 3481eca46af7Smrgnetbsd*) 3482eca46af7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3483eca46af7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3484eca46af7Smrg else 3485eca46af7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3486eca46af7Smrg fi 3487eca46af7Smrg ;; 348814330f12Smrg 3489eca46af7Smrgnewos6*) 3490eca46af7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3491eca46af7Smrg lt_cv_file_magic_cmd=/usr/bin/file 3492eca46af7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3493eca46af7Smrg ;; 349414330f12Smrg 3495eca46af7Smrg*nto* | *qnx*) 3496eca46af7Smrg lt_cv_deplibs_check_method=pass_all 3497eca46af7Smrg ;; 349814330f12Smrg 3499eca46af7Smrgopenbsd* | bitrig*) 3500eca46af7Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3501eca46af7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3502eca46af7Smrg else 3503eca46af7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3504eca46af7Smrg fi 3505eca46af7Smrg ;; 350614330f12Smrg 3507eca46af7Smrgosf3* | osf4* | osf5*) 3508eca46af7Smrg lt_cv_deplibs_check_method=pass_all 350914330f12Smrg ;; 351014330f12Smrg 3511eca46af7Smrgrdos*) 3512eca46af7Smrg lt_cv_deplibs_check_method=pass_all 351314330f12Smrg ;; 351414330f12Smrg 3515eca46af7Smrgsolaris*) 3516eca46af7Smrg lt_cv_deplibs_check_method=pass_all 351714330f12Smrg ;; 351814330f12Smrg 3519eca46af7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3520eca46af7Smrg lt_cv_deplibs_check_method=pass_all 352114330f12Smrg ;; 352214330f12Smrg 3523eca46af7Smrgsysv4 | sysv4.3*) 3524eca46af7Smrg case $host_vendor in 3525eca46af7Smrg motorola) 3526eca46af7Smrg 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]]' 3527eca46af7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 352814330f12Smrg ;; 3529eca46af7Smrg ncr) 3530eca46af7Smrg lt_cv_deplibs_check_method=pass_all 353114330f12Smrg ;; 3532eca46af7Smrg sequent) 3533eca46af7Smrg lt_cv_file_magic_cmd='/bin/file' 3534eca46af7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 353514330f12Smrg ;; 3536eca46af7Smrg sni) 3537eca46af7Smrg lt_cv_file_magic_cmd='/bin/file' 3538eca46af7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3539eca46af7Smrg lt_cv_file_magic_test_file=/lib/libc.so 3540eca46af7Smrg ;; 3541eca46af7Smrg siemens) 3542eca46af7Smrg lt_cv_deplibs_check_method=pass_all 3543eca46af7Smrg ;; 3544eca46af7Smrg pc) 3545eca46af7Smrg lt_cv_deplibs_check_method=pass_all 354614330f12Smrg ;; 354714330f12Smrg esac 354814330f12Smrg ;; 354914330f12Smrg 3550eca46af7Smrgtpf*) 3551eca46af7Smrg lt_cv_deplibs_check_method=pass_all 355214330f12Smrg ;; 3553eca46af7Smrgos2*) 3554eca46af7Smrg lt_cv_deplibs_check_method=pass_all 355514330f12Smrg ;; 3556eca46af7Smrgesac 3557eca46af7Smrg]) 355814330f12Smrg 3559eca46af7Smrgfile_magic_glob= 3560eca46af7Smrgwant_nocaseglob=no 3561eca46af7Smrgif test "$build" = "$host"; then 3562eca46af7Smrg case $host_os in 3563eca46af7Smrg mingw* | pw32*) 3564eca46af7Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3565eca46af7Smrg want_nocaseglob=yes 356614330f12Smrg else 3567eca46af7Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 356814330f12Smrg fi 356914330f12Smrg ;; 357014330f12Smrg esac 3571eca46af7Smrgfi 357214330f12Smrg 3573eca46af7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 3574eca46af7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 3575eca46af7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 357614330f12Smrg 3577eca46af7Smrg_LT_DECL([], [deplibs_check_method], [1], 3578eca46af7Smrg [Method to check whether dependent libraries are shared objects]) 3579eca46af7Smrg_LT_DECL([], [file_magic_cmd], [1], 3580eca46af7Smrg [Command to use when deplibs_check_method = "file_magic"]) 3581eca46af7Smrg_LT_DECL([], [file_magic_glob], [1], 3582eca46af7Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3583eca46af7Smrg_LT_DECL([], [want_nocaseglob], [1], 3584eca46af7Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3585eca46af7Smrg])# _LT_CHECK_MAGIC_METHOD 3586eca46af7Smrg 3587eca46af7Smrg 3588eca46af7Smrg# LT_PATH_NM 3589eca46af7Smrg# ---------- 3590eca46af7Smrg# find the pathname to a BSD- or MS-compatible name lister 3591eca46af7SmrgAC_DEFUN([LT_PATH_NM], 3592eca46af7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3593eca46af7SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3594eca46af7Smrg[if test -n "$NM"; then 3595eca46af7Smrg # Let the user override the test. 3596eca46af7Smrg lt_cv_path_NM=$NM 3597eca46af7Smrgelse 3598eca46af7Smrg lt_nm_to_check=${ac_tool_prefix}nm 3599eca46af7Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3600eca46af7Smrg lt_nm_to_check="$lt_nm_to_check nm" 3601eca46af7Smrg fi 3602eca46af7Smrg for lt_tmp_nm in $lt_nm_to_check; do 3603eca46af7Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3604eca46af7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3605eca46af7Smrg IFS=$lt_save_ifs 3606eca46af7Smrg test -z "$ac_dir" && ac_dir=. 3607eca46af7Smrg tmp_nm=$ac_dir/$lt_tmp_nm 3608eca46af7Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3609eca46af7Smrg # Check to see if the nm accepts a BSD-compat flag. 3610eca46af7Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3611eca46af7Smrg # nm: unknown option "B" ignored 3612eca46af7Smrg # Tru64's nm complains that /dev/null is an invalid object file 3613eca46af7Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3614eca46af7Smrg case $build_os in 3615eca46af7Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3616eca46af7Smrg *) lt_bad_file=/dev/null ;; 3617eca46af7Smrg esac 3618eca46af7Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3619eca46af7Smrg *$lt_bad_file* | *'Invalid file or object type'*) 3620eca46af7Smrg lt_cv_path_NM="$tmp_nm -B" 3621eca46af7Smrg break 2 3622eca46af7Smrg ;; 3623eca46af7Smrg *) 3624eca46af7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3625eca46af7Smrg */dev/null*) 3626eca46af7Smrg lt_cv_path_NM="$tmp_nm -p" 3627eca46af7Smrg break 2 3628eca46af7Smrg ;; 3629eca46af7Smrg *) 3630eca46af7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3631eca46af7Smrg continue # so that we can try to find one that supports BSD flags 3632eca46af7Smrg ;; 3633eca46af7Smrg esac 3634eca46af7Smrg ;; 3635eca46af7Smrg esac 3636eca46af7Smrg fi 3637eca46af7Smrg done 3638eca46af7Smrg IFS=$lt_save_ifs 3639eca46af7Smrg done 3640eca46af7Smrg : ${lt_cv_path_NM=no} 3641eca46af7Smrgfi]) 3642eca46af7Smrgif test no != "$lt_cv_path_NM"; then 3643eca46af7Smrg NM=$lt_cv_path_NM 3644eca46af7Smrgelse 3645eca46af7Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3646eca46af7Smrg if test -n "$DUMPBIN"; then : 3647eca46af7Smrg # Let the user override the test. 3648eca46af7Smrg else 3649eca46af7Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3650eca46af7Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3651eca46af7Smrg *COFF*) 3652eca46af7Smrg DUMPBIN="$DUMPBIN -symbols -headers" 3653eca46af7Smrg ;; 36542378475aSmrg *) 3655eca46af7Smrg DUMPBIN=: 3656eca46af7Smrg ;; 3657eca46af7Smrg esac 3658eca46af7Smrg fi 3659eca46af7Smrg AC_SUBST([DUMPBIN]) 3660eca46af7Smrg if test : != "$DUMPBIN"; then 3661eca46af7Smrg NM=$DUMPBIN 3662eca46af7Smrg fi 3663eca46af7Smrgfi 3664eca46af7Smrgtest -z "$NM" && NM=nm 3665eca46af7SmrgAC_SUBST([NM]) 3666eca46af7Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3667eca46af7Smrg 3668eca46af7SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3669eca46af7Smrg [lt_cv_nm_interface="BSD nm" 3670eca46af7Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3671eca46af7Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3672eca46af7Smrg (eval "$ac_compile" 2>conftest.err) 3673eca46af7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3674eca46af7Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3675eca46af7Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3676eca46af7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3677eca46af7Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3678eca46af7Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3679eca46af7Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3680eca46af7Smrg lt_cv_nm_interface="MS dumpbin" 3681eca46af7Smrg fi 3682eca46af7Smrg rm -f conftest*]) 3683eca46af7Smrg])# LT_PATH_NM 3684eca46af7Smrg 3685eca46af7Smrg# Old names: 3686eca46af7SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3687eca46af7SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3688eca46af7Smrgdnl aclocal-1.4 backwards compatibility: 3689eca46af7Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3690eca46af7Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3691eca46af7Smrg 3692eca46af7Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3693eca46af7Smrg# -------------------------------- 3694eca46af7Smrg# how to determine the name of the shared library 3695eca46af7Smrg# associated with a specific link library. 3696eca46af7Smrg# -- PORTME fill in with the dynamic library characteristics 3697eca46af7Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3698eca46af7Smrg[m4_require([_LT_DECL_EGREP]) 3699eca46af7Smrgm4_require([_LT_DECL_OBJDUMP]) 3700eca46af7Smrgm4_require([_LT_DECL_DLLTOOL]) 3701eca46af7SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3702eca46af7Smrglt_cv_sharedlib_from_linklib_cmd, 3703eca46af7Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3704eca46af7Smrg 3705eca46af7Smrgcase $host_os in 3706eca46af7Smrgcygwin* | mingw* | pw32* | cegcc*) 3707eca46af7Smrg # two different shell functions defined in ltmain.sh; 3708eca46af7Smrg # decide which one to use based on capabilities of $DLLTOOL 3709eca46af7Smrg case `$DLLTOOL --help 2>&1` in 3710eca46af7Smrg *--identify-strict*) 3711eca46af7Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 371214330f12Smrg ;; 371314330f12Smrg *) 3714eca46af7Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 371514330f12Smrg ;; 371614330f12Smrg esac 371714330f12Smrg ;; 3718eca46af7Smrg*) 3719eca46af7Smrg # fallback: assume linklib IS sharedlib 3720eca46af7Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 372114330f12Smrg ;; 3722eca46af7Smrgesac 3723eca46af7Smrg]) 3724eca46af7Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3725eca46af7Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 372614330f12Smrg 3727eca46af7Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3728eca46af7Smrg [Command to associate shared and link libraries]) 3729eca46af7Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 373014330f12Smrg 373114330f12Smrg 3732eca46af7Smrg# _LT_PATH_MANIFEST_TOOL 3733eca46af7Smrg# ---------------------- 3734eca46af7Smrg# locate the manifest tool 3735eca46af7Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3736eca46af7Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3737eca46af7Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3738eca46af7SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3739eca46af7Smrg [lt_cv_path_mainfest_tool=no 3740eca46af7Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3741eca46af7Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3742eca46af7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3743eca46af7Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3744eca46af7Smrg lt_cv_path_mainfest_tool=yes 374514330f12Smrg fi 3746eca46af7Smrg rm -f conftest*]) 3747eca46af7Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 3748eca46af7Smrg MANIFEST_TOOL=: 3749eca46af7Smrgfi 3750eca46af7Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3751eca46af7Smrg])# _LT_PATH_MANIFEST_TOOL 375214330f12Smrg 375314330f12Smrg 3754eca46af7Smrg# _LT_DLL_DEF_P([FILE]) 3755eca46af7Smrg# --------------------- 3756eca46af7Smrg# True iff FILE is a Windows DLL '.def' file. 3757eca46af7Smrg# Keep in sync with func_dll_def_p in the libtool script 3758eca46af7SmrgAC_DEFUN([_LT_DLL_DEF_P], 3759eca46af7Smrg[dnl 3760eca46af7Smrg test DEF = "`$SED -n dnl 3761eca46af7Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3762eca46af7Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3763eca46af7Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3764eca46af7Smrg -e q dnl Only consider the first "real" line 3765eca46af7Smrg $1`" dnl 3766eca46af7Smrg])# _LT_DLL_DEF_P 376714330f12Smrg 376814330f12Smrg 3769eca46af7Smrg# LT_LIB_M 3770eca46af7Smrg# -------- 3771eca46af7Smrg# check for math library 3772eca46af7SmrgAC_DEFUN([LT_LIB_M], 3773eca46af7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3774eca46af7SmrgLIBM= 3775eca46af7Smrgcase $host in 3776eca46af7Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3777eca46af7Smrg # These system don't have libm, or don't need it 377814330f12Smrg ;; 3779eca46af7Smrg*-ncr-sysv4.3*) 3780eca46af7Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3781eca46af7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 378214330f12Smrg ;; 3783eca46af7Smrg*) 3784eca46af7Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 378514330f12Smrg ;; 3786eca46af7Smrgesac 3787eca46af7SmrgAC_SUBST([LIBM]) 3788eca46af7Smrg])# LT_LIB_M 37892378475aSmrg 3790eca46af7Smrg# Old name: 3791eca46af7SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3792eca46af7Smrgdnl aclocal-1.4 backwards compatibility: 3793eca46af7Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 379414330f12Smrg 379514330f12Smrg 3796eca46af7Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3797eca46af7Smrg# ------------------------------- 3798eca46af7Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3799eca46af7Smrg[m4_require([_LT_TAG_COMPILER])dnl 380014330f12Smrg 3801eca46af7Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 380214330f12Smrg 3803eca46af7Smrgif test yes = "$GCC"; then 3804eca46af7Smrg case $cc_basename in 3805eca46af7Smrg nvcc*) 3806eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3807eca46af7Smrg *) 3808eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 380914330f12Smrg esac 381014330f12Smrg 3811eca46af7Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3812eca46af7Smrg lt_cv_prog_compiler_rtti_exceptions, 3813eca46af7Smrg [-fno-rtti -fno-exceptions], [], 3814eca46af7Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3815eca46af7Smrgfi 3816eca46af7Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3817eca46af7Smrg [Compiler flag to turn off builtin functions]) 3818eca46af7Smrg])# _LT_COMPILER_NO_RTTI 381914330f12Smrg 3820eca46af7Smrg 3821eca46af7Smrg# _LT_CMD_GLOBAL_SYMBOLS 3822eca46af7Smrg# ---------------------- 3823eca46af7Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3824eca46af7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3825eca46af7SmrgAC_REQUIRE([AC_PROG_CC])dnl 3826eca46af7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3827eca46af7SmrgAC_REQUIRE([LT_PATH_NM])dnl 3828eca46af7SmrgAC_REQUIRE([LT_PATH_LD])dnl 3829eca46af7Smrgm4_require([_LT_DECL_SED])dnl 3830eca46af7Smrgm4_require([_LT_DECL_EGREP])dnl 3831eca46af7Smrgm4_require([_LT_TAG_COMPILER])dnl 3832eca46af7Smrg 3833eca46af7Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3834eca46af7SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3835eca46af7SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3836eca46af7Smrg[ 3837eca46af7Smrg# These are sane defaults that work on at least a few old systems. 3838eca46af7Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3839eca46af7Smrg 3840eca46af7Smrg# Character class describing NM global symbol codes. 3841eca46af7Smrgsymcode='[[BCDEGRST]]' 3842eca46af7Smrg 3843eca46af7Smrg# Regexp to match symbols that can be accessed directly from C. 3844eca46af7Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3845eca46af7Smrg 3846eca46af7Smrg# Define system-specific variables. 3847eca46af7Smrgcase $host_os in 3848eca46af7Smrgaix*) 3849eca46af7Smrg symcode='[[BCDT]]' 3850eca46af7Smrg ;; 3851eca46af7Smrgcygwin* | mingw* | pw32* | cegcc*) 3852eca46af7Smrg symcode='[[ABCDGISTW]]' 3853eca46af7Smrg ;; 3854eca46af7Smrghpux*) 3855eca46af7Smrg if test ia64 = "$host_cpu"; then 3856eca46af7Smrg symcode='[[ABCDEGRST]]' 385714330f12Smrg fi 385814330f12Smrg ;; 3859eca46af7Smrgirix* | nonstopux*) 3860eca46af7Smrg symcode='[[BCDEGRST]]' 386114330f12Smrg ;; 3862eca46af7Smrgosf*) 3863eca46af7Smrg symcode='[[BCDEGQRST]]' 386414330f12Smrg ;; 3865eca46af7Smrgsolaris*) 3866eca46af7Smrg symcode='[[BDRT]]' 3867eca46af7Smrg ;; 3868eca46af7Smrgsco3.2v5*) 3869eca46af7Smrg symcode='[[DT]]' 3870eca46af7Smrg ;; 3871eca46af7Smrgsysv4.2uw2*) 3872eca46af7Smrg symcode='[[DT]]' 3873eca46af7Smrg ;; 3874eca46af7Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3875eca46af7Smrg symcode='[[ABDT]]' 3876eca46af7Smrg ;; 3877eca46af7Smrgsysv4) 3878eca46af7Smrg symcode='[[DFNSTU]]' 387914330f12Smrg ;; 388014330f12Smrgesac 38812378475aSmrg 3882eca46af7Smrg# If we're using GNU nm, then use its standard symbol codes. 3883eca46af7Smrgcase `$NM -V 2>&1` in 3884eca46af7Smrg*GNU* | *'with BFD'*) 3885eca46af7Smrg symcode='[[ABCDGIRSTW]]' ;; 3886eca46af7Smrgesac 38872378475aSmrg 3888eca46af7Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3889eca46af7Smrg # Gets list of data symbols to import. 3890eca46af7Smrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3891eca46af7Smrg # Adjust the below global symbol transforms to fixup imported variables. 3892eca46af7Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3893eca46af7Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3894eca46af7Smrg lt_c_name_lib_hook="\ 3895eca46af7Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3896eca46af7Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3897eca46af7Smrgelse 3898eca46af7Smrg # Disable hooks by default. 3899eca46af7Smrg lt_cv_sys_global_symbol_to_import= 3900eca46af7Smrg lt_cdecl_hook= 3901eca46af7Smrg lt_c_name_hook= 3902eca46af7Smrg lt_c_name_lib_hook= 390314330f12Smrgfi 39042378475aSmrg 3905eca46af7Smrg# Transform an extracted symbol line into a proper C declaration. 3906eca46af7Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3907eca46af7Smrg# so use this general approach. 3908eca46af7Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 3909eca46af7Smrg$lt_cdecl_hook\ 3910eca46af7Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3911eca46af7Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 39122378475aSmrg 3913eca46af7Smrg# Transform an extracted symbol line into symbol name and symbol address 3914eca46af7Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 3915eca46af7Smrg$lt_c_name_hook\ 3916eca46af7Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 3917eca46af7Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 3918eca46af7Smrg 3919eca46af7Smrg# Transform an extracted symbol line into symbol name with lib prefix and 3920eca46af7Smrg# symbol address. 3921eca46af7Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 3922eca46af7Smrg$lt_c_name_lib_hook\ 3923eca46af7Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 3924eca46af7Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 3925eca46af7Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 39262378475aSmrg 3927eca46af7Smrg# Handle CRLF in mingw tool chain 3928eca46af7Smrgopt_cr= 3929eca46af7Smrgcase $build_os in 3930eca46af7Smrgmingw*) 3931eca46af7Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 393214330f12Smrg ;; 3933eca46af7Smrgesac 39342378475aSmrg 3935eca46af7Smrg# Try without a prefix underscore, then with it. 3936eca46af7Smrgfor ac_symprfx in "" "_"; do 393714330f12Smrg 3938eca46af7Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3939eca46af7Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 394014330f12Smrg 3941eca46af7Smrg # Write the raw and C identifiers. 3942eca46af7Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3943eca46af7Smrg # Fake it for dumpbin and say T for any non-static function, 3944eca46af7Smrg # D for any global variable and I for any imported variable. 3945eca46af7Smrg # Also find C++ and __fastcall symbols from MSVC++, 3946eca46af7Smrg # which start with @ or ?. 3947eca46af7Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3948eca46af7Smrg" {last_section=section; section=\$ 3};"\ 3949eca46af7Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3950eca46af7Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3951eca46af7Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 3952eca46af7Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 3953eca46af7Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 3954eca46af7Smrg" \$ 0!~/External *\|/{next};"\ 3955eca46af7Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3956eca46af7Smrg" {if(hide[section]) next};"\ 3957eca46af7Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 3958eca46af7Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 3959eca46af7Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 3960eca46af7Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 3961eca46af7Smrg" ' prfx=^$ac_symprfx]" 39622378475aSmrg else 3963eca46af7Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 396414330f12Smrg fi 3965eca46af7Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 39662378475aSmrg 3967eca46af7Smrg # Check to see that the pipe works correctly. 3968eca46af7Smrg pipe_works=no 39692378475aSmrg 3970eca46af7Smrg rm -f conftest* 3971eca46af7Smrg cat > conftest.$ac_ext <<_LT_EOF 3972eca46af7Smrg#ifdef __cplusplus 3973eca46af7Smrgextern "C" { 3974eca46af7Smrg#endif 3975eca46af7Smrgchar nm_test_var; 3976eca46af7Smrgvoid nm_test_func(void); 3977eca46af7Smrgvoid nm_test_func(void){} 3978eca46af7Smrg#ifdef __cplusplus 3979eca46af7Smrg} 3980eca46af7Smrg#endif 3981eca46af7Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3982eca46af7Smrg_LT_EOF 398314330f12Smrg 3984eca46af7Smrg if AC_TRY_EVAL(ac_compile); then 3985eca46af7Smrg # Now try to grab the symbols. 3986eca46af7Smrg nlist=conftest.nm 3987eca46af7Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3988eca46af7Smrg # Try sorting and uniquifying the output. 3989eca46af7Smrg if sort "$nlist" | uniq > "$nlist"T; then 3990eca46af7Smrg mv -f "$nlist"T "$nlist" 3991eca46af7Smrg else 3992eca46af7Smrg rm -f "$nlist"T 3993eca46af7Smrg fi 399414330f12Smrg 3995eca46af7Smrg # Make sure that we snagged all the symbols we need. 3996eca46af7Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3997eca46af7Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3998eca46af7Smrg cat <<_LT_EOF > conftest.$ac_ext 3999eca46af7Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4000eca46af7Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4001eca46af7Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 4002eca46af7Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4003eca46af7Smrg# define LT@&t@_DLSYM_CONST 4004eca46af7Smrg#elif defined __osf__ 4005eca46af7Smrg/* This system does not cope well with relocations in const data. */ 4006eca46af7Smrg# define LT@&t@_DLSYM_CONST 4007eca46af7Smrg#else 4008eca46af7Smrg# define LT@&t@_DLSYM_CONST const 4009eca46af7Smrg#endif 4010ff89ac2bSmrg 4011eca46af7Smrg#ifdef __cplusplus 4012eca46af7Smrgextern "C" { 4013eca46af7Smrg#endif 4014ff89ac2bSmrg 4015eca46af7Smrg_LT_EOF 4016eca46af7Smrg # Now generate the symbol file. 4017eca46af7Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 401895b296d0Smrg 4019eca46af7Smrg cat <<_LT_EOF >> conftest.$ac_ext 402095b296d0Smrg 4021eca46af7Smrg/* The mapping between symbol names and symbols. */ 4022eca46af7SmrgLT@&t@_DLSYM_CONST struct { 4023eca46af7Smrg const char *name; 4024eca46af7Smrg void *address; 4025eca46af7Smrg} 4026eca46af7Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4027eca46af7Smrg{ 4028eca46af7Smrg { "@PROGRAM@", (void *) 0 }, 4029eca46af7Smrg_LT_EOF 4030eca46af7Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4031eca46af7Smrg cat <<\_LT_EOF >> conftest.$ac_ext 4032eca46af7Smrg {0, (void *) 0} 4033eca46af7Smrg}; 403495b296d0Smrg 4035eca46af7Smrg/* This works around a problem in FreeBSD linker */ 4036eca46af7Smrg#ifdef FREEBSD_WORKAROUND 4037eca46af7Smrgstatic const void *lt_preloaded_setup() { 4038eca46af7Smrg return lt__PROGRAM__LTX_preloaded_symbols; 4039eca46af7Smrg} 4040eca46af7Smrg#endif 404195b296d0Smrg 4042eca46af7Smrg#ifdef __cplusplus 4043eca46af7Smrg} 4044eca46af7Smrg#endif 4045eca46af7Smrg_LT_EOF 4046eca46af7Smrg # Now try linking the two files. 4047eca46af7Smrg mv conftest.$ac_objext conftstm.$ac_objext 4048eca46af7Smrg lt_globsym_save_LIBS=$LIBS 4049eca46af7Smrg lt_globsym_save_CFLAGS=$CFLAGS 4050eca46af7Smrg LIBS=conftstm.$ac_objext 4051eca46af7Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4052eca46af7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4053eca46af7Smrg pipe_works=yes 4054eca46af7Smrg fi 4055eca46af7Smrg LIBS=$lt_globsym_save_LIBS 4056eca46af7Smrg CFLAGS=$lt_globsym_save_CFLAGS 4057eca46af7Smrg else 4058eca46af7Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4059eca46af7Smrg fi 4060eca46af7Smrg else 4061eca46af7Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4062eca46af7Smrg fi 4063eca46af7Smrg else 4064eca46af7Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 406514330f12Smrg fi 406614330f12Smrg else 4067eca46af7Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4068eca46af7Smrg cat conftest.$ac_ext >&5 40692378475aSmrg fi 4070eca46af7Smrg rm -rf conftest* conftst* 407114330f12Smrg 4072eca46af7Smrg # Do not use the global_symbol_pipe unless it works. 4073eca46af7Smrg if test yes = "$pipe_works"; then 4074eca46af7Smrg break 407514330f12Smrg else 4076eca46af7Smrg lt_cv_sys_global_symbol_pipe= 407714330f12Smrg fi 4078eca46af7Smrgdone 4079eca46af7Smrg]) 4080eca46af7Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4081eca46af7Smrg lt_cv_sys_global_symbol_to_cdecl= 4082eca46af7Smrgfi 4083eca46af7Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4084eca46af7Smrg AC_MSG_RESULT(failed) 4085eca46af7Smrgelse 4086eca46af7Smrg AC_MSG_RESULT(ok) 4087eca46af7Smrgfi 408895b296d0Smrg 4089eca46af7Smrg# Response file support. 4090eca46af7Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4091eca46af7Smrg nm_file_list_spec='@' 4092eca46af7Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4093eca46af7Smrg nm_file_list_spec='@' 4094eca46af7Smrgfi 409595b296d0Smrg 4096eca46af7Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4097eca46af7Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 4098eca46af7Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4099eca46af7Smrg [Transform the output of nm in a proper C declaration]) 4100eca46af7Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4101eca46af7Smrg [Transform the output of nm into a list of symbols to manually relocate]) 4102eca46af7Smrg_LT_DECL([global_symbol_to_c_name_address], 4103eca46af7Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4104eca46af7Smrg [Transform the output of nm in a C name address pair]) 4105eca46af7Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4106eca46af7Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4107eca46af7Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4108eca46af7Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4109eca46af7Smrg [The name lister interface]) 4110eca46af7Smrg_LT_DECL([], [nm_file_list_spec], [1], 4111eca46af7Smrg [Specify filename containing input files for $NM]) 4112eca46af7Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 411395b296d0Smrg 411495b296d0Smrg 4115eca46af7Smrg# _LT_COMPILER_PIC([TAGNAME]) 4116eca46af7Smrg# --------------------------- 4117eca46af7Smrgm4_defun([_LT_COMPILER_PIC], 4118eca46af7Smrg[m4_require([_LT_TAG_COMPILER])dnl 4119eca46af7Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4120eca46af7Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4121eca46af7Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 412295b296d0Smrg 4123eca46af7Smrgm4_if([$1], [CXX], [ 4124eca46af7Smrg # C++ specific cases for pic, static, wl, etc. 4125eca46af7Smrg if test yes = "$GXX"; then 4126eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4127eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 412895b296d0Smrg 4129eca46af7Smrg case $host_os in 4130eca46af7Smrg aix*) 4131eca46af7Smrg # All AIX code is PIC. 4132eca46af7Smrg if test ia64 = "$host_cpu"; then 4133eca46af7Smrg # AIX 5 now supports IA64 processor 4134eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4135eca46af7Smrg fi 4136eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4137eca46af7Smrg ;; 413895b296d0Smrg 4139eca46af7Smrg amigaos*) 4140eca46af7Smrg case $host_cpu in 4141eca46af7Smrg powerpc) 4142eca46af7Smrg # see comment about AmigaOS4 .so support 4143eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4144eca46af7Smrg ;; 4145eca46af7Smrg m68k) 4146eca46af7Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4147eca46af7Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4148eca46af7Smrg # like '-m68040'. 4149eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4150eca46af7Smrg ;; 4151eca46af7Smrg esac 4152eca46af7Smrg ;; 415314330f12Smrg 415414330f12Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 415514330f12Smrg # PIC is the default for these OSes. 415614330f12Smrg ;; 415714330f12Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 415814330f12Smrg # This hack is so that the source file can tell whether it is being 415914330f12Smrg # built for inclusion in a dll (and should export symbols for example). 416014330f12Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 416114330f12Smrg # (--disable-auto-import) libraries 416214330f12Smrg m4_if([$1], [GCJ], [], 416314330f12Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4164eca46af7Smrg case $host_os in 4165eca46af7Smrg os2*) 4166eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4167eca46af7Smrg ;; 4168eca46af7Smrg esac 416914330f12Smrg ;; 417014330f12Smrg darwin* | rhapsody*) 417114330f12Smrg # PIC is the default on this platform 417214330f12Smrg # Common symbols not allowed in MH_DYLIB files 417314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 417414330f12Smrg ;; 417514330f12Smrg *djgpp*) 417614330f12Smrg # DJGPP does not support shared libraries at all 417714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 417814330f12Smrg ;; 417914330f12Smrg haiku*) 418014330f12Smrg # PIC is the default for Haiku. 418114330f12Smrg # The "-static" flag exists, but is broken. 418214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 418314330f12Smrg ;; 418414330f12Smrg interix[[3-9]]*) 418514330f12Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 418614330f12Smrg # Instead, we relocate shared libraries at runtime. 41872378475aSmrg ;; 41882378475aSmrg sysv4*MP*) 41892378475aSmrg if test -d /usr/nec; then 419014330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 41912378475aSmrg fi 41922378475aSmrg ;; 419314330f12Smrg hpux*) 419414330f12Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 419514330f12Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 419614330f12Smrg # sets the default TLS model and affects inlining. 419714330f12Smrg case $host_cpu in 419814330f12Smrg hppa*64*) 419914330f12Smrg ;; 420014330f12Smrg *) 420114330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 420214330f12Smrg ;; 420314330f12Smrg esac 42042378475aSmrg ;; 420514330f12Smrg *qnx* | *nto*) 420614330f12Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 420714330f12Smrg # it will coredump. 420814330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 420914330f12Smrg ;; 421014330f12Smrg *) 421114330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 421214330f12Smrg ;; 421314330f12Smrg esac 421414330f12Smrg else 421514330f12Smrg case $host_os in 421614330f12Smrg aix[[4-9]]*) 421714330f12Smrg # All AIX code is PIC. 4218eca46af7Smrg if test ia64 = "$host_cpu"; then 421914330f12Smrg # AIX 5 now supports IA64 processor 422014330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 422114330f12Smrg else 422214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 422314330f12Smrg fi 422414330f12Smrg ;; 422514330f12Smrg chorus*) 422614330f12Smrg case $cc_basename in 422714330f12Smrg cxch68*) 422814330f12Smrg # Green Hills C++ Compiler 422914330f12Smrg # _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" 423014330f12Smrg ;; 423114330f12Smrg esac 423214330f12Smrg ;; 423314330f12Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 423414330f12Smrg # This hack is so that the source file can tell whether it is being 423514330f12Smrg # built for inclusion in a dll (and should export symbols for example). 423614330f12Smrg m4_if([$1], [GCJ], [], 423714330f12Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 423814330f12Smrg ;; 423914330f12Smrg dgux*) 424014330f12Smrg case $cc_basename in 424114330f12Smrg ec++*) 424214330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 424314330f12Smrg ;; 424414330f12Smrg ghcx*) 424514330f12Smrg # Green Hills C++ Compiler 424614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 424714330f12Smrg ;; 424814330f12Smrg *) 424914330f12Smrg ;; 425014330f12Smrg esac 425114330f12Smrg ;; 425214330f12Smrg freebsd* | dragonfly*) 425314330f12Smrg # FreeBSD uses GNU C++ 425414330f12Smrg ;; 425514330f12Smrg hpux9* | hpux10* | hpux11*) 425614330f12Smrg case $cc_basename in 425714330f12Smrg CC*) 425814330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4259eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4260eca46af7Smrg if test ia64 != "$host_cpu"; then 426114330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 426214330f12Smrg fi 426314330f12Smrg ;; 426414330f12Smrg aCC*) 426514330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4266eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 426714330f12Smrg case $host_cpu in 426814330f12Smrg hppa*64*|ia64*) 426914330f12Smrg # +Z the default 427014330f12Smrg ;; 427114330f12Smrg *) 427214330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 427314330f12Smrg ;; 427414330f12Smrg esac 427514330f12Smrg ;; 427614330f12Smrg *) 427714330f12Smrg ;; 427814330f12Smrg esac 427914330f12Smrg ;; 428014330f12Smrg interix*) 428114330f12Smrg # This is c89, which is MS Visual C++ (no shared libs) 428214330f12Smrg # Anyone wants to do a port? 428314330f12Smrg ;; 428414330f12Smrg irix5* | irix6* | nonstopux*) 428514330f12Smrg case $cc_basename in 428614330f12Smrg CC*) 428714330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 428814330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 428914330f12Smrg # CC pic flag -KPIC is the default. 429014330f12Smrg ;; 429114330f12Smrg *) 429214330f12Smrg ;; 429314330f12Smrg esac 429414330f12Smrg ;; 4295eca46af7Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 429614330f12Smrg case $cc_basename in 429714330f12Smrg KCC*) 429814330f12Smrg # KAI C++ Compiler 429914330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 430014330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 430114330f12Smrg ;; 430214330f12Smrg ecpc* ) 4303eca46af7Smrg # old Intel C++ for x86_64, which still supported -KPIC. 430414330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 430514330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 430614330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 430714330f12Smrg ;; 430814330f12Smrg icpc* ) 430914330f12Smrg # Intel C++, used to be incompatible with GCC. 431014330f12Smrg # ICC 10 doesn't accept -KPIC any more. 431114330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 431214330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 431314330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 431414330f12Smrg ;; 431514330f12Smrg pgCC* | pgcpp*) 431614330f12Smrg # Portland Group C++ compiler 431714330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 431814330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 431914330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 432014330f12Smrg ;; 432114330f12Smrg cxx*) 432214330f12Smrg # Compaq C++ 432314330f12Smrg # Make sure the PIC flag is empty. It appears that all Alpha 432414330f12Smrg # Linux and Compaq Tru64 Unix objects are PIC. 432514330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 432614330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 432714330f12Smrg ;; 432814330f12Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 432914330f12Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 433014330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 433114330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 433214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 433314330f12Smrg ;; 433414330f12Smrg *) 433514330f12Smrg case `$CC -V 2>&1 | sed 5q` in 433614330f12Smrg *Sun\ C*) 433714330f12Smrg # Sun C++ 5.9 433814330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 433914330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 434014330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 434114330f12Smrg ;; 434214330f12Smrg esac 434314330f12Smrg ;; 434414330f12Smrg esac 434514330f12Smrg ;; 434614330f12Smrg lynxos*) 434714330f12Smrg ;; 434814330f12Smrg m88k*) 434914330f12Smrg ;; 435014330f12Smrg mvs*) 435114330f12Smrg case $cc_basename in 435214330f12Smrg cxx*) 435314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 435414330f12Smrg ;; 435514330f12Smrg *) 435614330f12Smrg ;; 435714330f12Smrg esac 435814330f12Smrg ;; 435914330f12Smrg netbsd*) 436014330f12Smrg ;; 436114330f12Smrg *qnx* | *nto*) 436214330f12Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 436314330f12Smrg # it will coredump. 436414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 436514330f12Smrg ;; 436614330f12Smrg osf3* | osf4* | osf5*) 436714330f12Smrg case $cc_basename in 436814330f12Smrg KCC*) 436914330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 437014330f12Smrg ;; 437114330f12Smrg RCC*) 437214330f12Smrg # Rational C++ 2.4.1 437314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 437414330f12Smrg ;; 437514330f12Smrg cxx*) 437614330f12Smrg # Digital/Compaq C++ 437714330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 437814330f12Smrg # Make sure the PIC flag is empty. It appears that all Alpha 437914330f12Smrg # Linux and Compaq Tru64 Unix objects are PIC. 438014330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 438114330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 438214330f12Smrg ;; 438314330f12Smrg *) 438414330f12Smrg ;; 438514330f12Smrg esac 438614330f12Smrg ;; 438714330f12Smrg psos*) 438814330f12Smrg ;; 438914330f12Smrg solaris*) 439014330f12Smrg case $cc_basename in 439114330f12Smrg CC* | sunCC*) 439214330f12Smrg # Sun C++ 4.2, 5.x and Centerline C++ 439314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 439414330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 439514330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 439614330f12Smrg ;; 439714330f12Smrg gcx*) 439814330f12Smrg # Green Hills C++ Compiler 439914330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 440014330f12Smrg ;; 440114330f12Smrg *) 440214330f12Smrg ;; 440314330f12Smrg esac 440414330f12Smrg ;; 440514330f12Smrg sunos4*) 440614330f12Smrg case $cc_basename in 440714330f12Smrg CC*) 440814330f12Smrg # Sun C++ 4.x 440914330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 441014330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 441114330f12Smrg ;; 441214330f12Smrg lcc*) 441314330f12Smrg # Lucid 441414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 441514330f12Smrg ;; 441614330f12Smrg *) 441714330f12Smrg ;; 441814330f12Smrg esac 441914330f12Smrg ;; 442014330f12Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 442114330f12Smrg case $cc_basename in 442214330f12Smrg CC*) 442314330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 442514330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 442614330f12Smrg ;; 442714330f12Smrg esac 442814330f12Smrg ;; 442914330f12Smrg tandem*) 443014330f12Smrg case $cc_basename in 443114330f12Smrg NCC*) 443214330f12Smrg # NonStop-UX NCC 3.20 443314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 443414330f12Smrg ;; 443514330f12Smrg *) 443614330f12Smrg ;; 443714330f12Smrg esac 443814330f12Smrg ;; 443914330f12Smrg vxworks*) 444014330f12Smrg ;; 444114330f12Smrg *) 444214330f12Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 444314330f12Smrg ;; 444414330f12Smrg esac 444514330f12Smrg fi 444614330f12Smrg], 444714330f12Smrg[ 4448eca46af7Smrg if test yes = "$GCC"; then 444914330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 445014330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 445195b296d0Smrg 445214330f12Smrg case $host_os in 445314330f12Smrg aix*) 445414330f12Smrg # All AIX code is PIC. 4455eca46af7Smrg if test ia64 = "$host_cpu"; then 445614330f12Smrg # AIX 5 now supports IA64 processor 445714330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44582378475aSmrg fi 4459eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44602378475aSmrg ;; 446195b296d0Smrg 446214330f12Smrg amigaos*) 446314330f12Smrg case $host_cpu in 446414330f12Smrg powerpc) 446514330f12Smrg # see comment about AmigaOS4 .so support 446614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 446714330f12Smrg ;; 446814330f12Smrg m68k) 446914330f12Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4470eca46af7Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4471eca46af7Smrg # like '-m68040'. 447214330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 447314330f12Smrg ;; 447414330f12Smrg esac 44752378475aSmrg ;; 447695b296d0Smrg 447714330f12Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 447814330f12Smrg # PIC is the default for these OSes. 44792378475aSmrg ;; 448095b296d0Smrg 448114330f12Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 448214330f12Smrg # This hack is so that the source file can tell whether it is being 448314330f12Smrg # built for inclusion in a dll (and should export symbols for example). 448414330f12Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 448514330f12Smrg # (--disable-auto-import) libraries 448614330f12Smrg m4_if([$1], [GCJ], [], 448714330f12Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4488eca46af7Smrg case $host_os in 4489eca46af7Smrg os2*) 4490eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4491eca46af7Smrg ;; 4492eca46af7Smrg esac 44932378475aSmrg ;; 449495b296d0Smrg 449514330f12Smrg darwin* | rhapsody*) 449614330f12Smrg # PIC is the default on this platform 449714330f12Smrg # Common symbols not allowed in MH_DYLIB files 449814330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 449914330f12Smrg ;; 45002378475aSmrg 450114330f12Smrg haiku*) 450214330f12Smrg # PIC is the default for Haiku. 450314330f12Smrg # The "-static" flag exists, but is broken. 450414330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 450514330f12Smrg ;; 45062378475aSmrg 450714330f12Smrg hpux*) 450814330f12Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 450914330f12Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 451014330f12Smrg # sets the default TLS model and affects inlining. 451114330f12Smrg case $host_cpu in 451214330f12Smrg hppa*64*) 451314330f12Smrg # +Z the default 451414330f12Smrg ;; 451514330f12Smrg *) 451614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 451714330f12Smrg ;; 451814330f12Smrg esac 451914330f12Smrg ;; 45202378475aSmrg 452114330f12Smrg interix[[3-9]]*) 452214330f12Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 452314330f12Smrg # Instead, we relocate shared libraries at runtime. 452414330f12Smrg ;; 452595b296d0Smrg 452614330f12Smrg msdosdjgpp*) 452714330f12Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 452814330f12Smrg # on systems that don't support them. 452914330f12Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 453014330f12Smrg enable_shared=no 453114330f12Smrg ;; 453295b296d0Smrg 453314330f12Smrg *nto* | *qnx*) 453414330f12Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 453514330f12Smrg # it will coredump. 453614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 453714330f12Smrg ;; 453895b296d0Smrg 453914330f12Smrg sysv4*MP*) 454014330f12Smrg if test -d /usr/nec; then 454114330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 454214330f12Smrg fi 454314330f12Smrg ;; 454495b296d0Smrg 454514330f12Smrg *) 454614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 454714330f12Smrg ;; 454814330f12Smrg esac 454995b296d0Smrg 455014330f12Smrg case $cc_basename in 455114330f12Smrg nvcc*) # Cuda Compiler Driver 2.2 455214330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4553eca46af7Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4554eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4555eca46af7Smrg fi 455614330f12Smrg ;; 455714330f12Smrg esac 455814330f12Smrg else 455914330f12Smrg # PORTME Check for flag to pass linker flags through the system compiler. 456014330f12Smrg case $host_os in 456114330f12Smrg aix*) 456214330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4563eca46af7Smrg if test ia64 = "$host_cpu"; then 456414330f12Smrg # AIX 5 now supports IA64 processor 456514330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 456614330f12Smrg else 456714330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 456814330f12Smrg fi 456914330f12Smrg ;; 4570ff89ac2bSmrg 4571eca46af7Smrg darwin* | rhapsody*) 4572eca46af7Smrg # PIC is the default on this platform 4573eca46af7Smrg # Common symbols not allowed in MH_DYLIB files 4574eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4575eca46af7Smrg case $cc_basename in 4576eca46af7Smrg nagfor*) 4577eca46af7Smrg # NAG Fortran compiler 4578eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4579eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4580eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4581eca46af7Smrg ;; 4582eca46af7Smrg esac 4583eca46af7Smrg ;; 4584eca46af7Smrg 458514330f12Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 458614330f12Smrg # This hack is so that the source file can tell whether it is being 458714330f12Smrg # built for inclusion in a dll (and should export symbols for example). 458814330f12Smrg m4_if([$1], [GCJ], [], 458914330f12Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4590eca46af7Smrg case $host_os in 4591eca46af7Smrg os2*) 4592eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4593eca46af7Smrg ;; 4594eca46af7Smrg esac 459514330f12Smrg ;; 459695b296d0Smrg 459714330f12Smrg hpux9* | hpux10* | hpux11*) 459814330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 459914330f12Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 460014330f12Smrg # not for PA HP-UX. 460114330f12Smrg case $host_cpu in 460214330f12Smrg hppa*64*|ia64*) 460314330f12Smrg # +Z the default 460414330f12Smrg ;; 460514330f12Smrg *) 460614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 460714330f12Smrg ;; 460814330f12Smrg esac 460914330f12Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4610eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 461114330f12Smrg ;; 461295b296d0Smrg 461314330f12Smrg irix5* | irix6* | nonstopux*) 461414330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 461514330f12Smrg # PIC (with -KPIC) is the default. 461614330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 461714330f12Smrg ;; 46182378475aSmrg 4619eca46af7Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 462014330f12Smrg case $cc_basename in 4621eca46af7Smrg # old Intel for x86_64, which still supported -KPIC. 462214330f12Smrg ecc*) 462314330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 462414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 462514330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 462614330f12Smrg ;; 462714330f12Smrg # icc used to be incompatible with GCC. 462814330f12Smrg # ICC 10 doesn't accept -KPIC any more. 462914330f12Smrg icc* | ifort*) 463014330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 463114330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 463214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 463314330f12Smrg ;; 463414330f12Smrg # Lahey Fortran 8.1. 463514330f12Smrg lf95*) 463614330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 463714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 463814330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 463914330f12Smrg ;; 464014330f12Smrg nagfor*) 464114330f12Smrg # NAG Fortran compiler 464214330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 464314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 464414330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 464514330f12Smrg ;; 4646eca46af7Smrg tcc*) 4647eca46af7Smrg # Fabrice Bellard et al's Tiny C Compiler 4648eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4649eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4650eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4651eca46af7Smrg ;; 465214330f12Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 465314330f12Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 465414330f12Smrg # which looks to be a dead project) 465514330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 465614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 465714330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 465814330f12Smrg ;; 465914330f12Smrg ccc*) 466014330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 466114330f12Smrg # All Alpha code is PIC. 466214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 466314330f12Smrg ;; 466414330f12Smrg xl* | bgxl* | bgf* | mpixl*) 466514330f12Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 466614330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 466714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 466814330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 466914330f12Smrg ;; 467014330f12Smrg *) 467114330f12Smrg case `$CC -V 2>&1 | sed 5q` in 4672eca46af7Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 467314330f12Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 467414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 467514330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 467614330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 467714330f12Smrg ;; 4678eca46af7Smrg *Sun\ F* | *Sun*Fortran*) 4679eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4680eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4681eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4682eca46af7Smrg ;; 468314330f12Smrg *Sun\ C*) 468414330f12Smrg # Sun C 5.9 468514330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 468614330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 468714330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 468814330f12Smrg ;; 4689eca46af7Smrg *Intel*\ [[CF]]*Compiler*) 4690eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4691eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4692eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4693eca46af7Smrg ;; 4694eca46af7Smrg *Portland\ Group*) 4695eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4696eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4697eca46af7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4698eca46af7Smrg ;; 469914330f12Smrg esac 470014330f12Smrg ;; 470114330f12Smrg esac 470214330f12Smrg ;; 470395b296d0Smrg 470414330f12Smrg newsos6) 470514330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 470614330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 470714330f12Smrg ;; 470895b296d0Smrg 470914330f12Smrg *nto* | *qnx*) 471014330f12Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 471114330f12Smrg # it will coredump. 471214330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 471314330f12Smrg ;; 47142378475aSmrg 471514330f12Smrg osf3* | osf4* | osf5*) 471614330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 471714330f12Smrg # All OSF/1 code is PIC. 471814330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 471914330f12Smrg ;; 47202378475aSmrg 472114330f12Smrg rdos*) 472214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 472314330f12Smrg ;; 47242378475aSmrg 472514330f12Smrg solaris*) 472614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 472714330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 472814330f12Smrg case $cc_basename in 472914330f12Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 473014330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 473114330f12Smrg *) 473214330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 473314330f12Smrg esac 473414330f12Smrg ;; 47352378475aSmrg 473614330f12Smrg sunos4*) 473714330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 473814330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 473914330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 474014330f12Smrg ;; 47412378475aSmrg 474214330f12Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 474314330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 474414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 474514330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 474614330f12Smrg ;; 474795b296d0Smrg 474814330f12Smrg sysv4*MP*) 4749eca46af7Smrg if test -d /usr/nec; then 475014330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 475114330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 475214330f12Smrg fi 475314330f12Smrg ;; 475495b296d0Smrg 475514330f12Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 475614330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 475714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 475814330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 475914330f12Smrg ;; 476095b296d0Smrg 476114330f12Smrg unicos*) 476214330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 476314330f12Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 476414330f12Smrg ;; 476595b296d0Smrg 476614330f12Smrg uts4*) 476714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 476814330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 476914330f12Smrg ;; 477095b296d0Smrg 477114330f12Smrg *) 477214330f12Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 477314330f12Smrg ;; 477414330f12Smrg esac 477514330f12Smrg fi 477614330f12Smrg]) 477714330f12Smrgcase $host_os in 4778eca46af7Smrg # For platforms that do not support PIC, -DPIC is meaningless: 477914330f12Smrg *djgpp*) 478014330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 478114330f12Smrg ;; 478214330f12Smrg *) 478314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 478414330f12Smrg ;; 478514330f12Smrgesac 478695b296d0Smrg 478714330f12SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 478814330f12Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 478914330f12Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 479014330f12Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 479195b296d0Smrg 479214330f12Smrg# 479314330f12Smrg# Check to make sure the PIC flag actually works. 479414330f12Smrg# 479514330f12Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 479614330f12Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 479714330f12Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 479814330f12Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 479914330f12Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 480014330f12Smrg "" | " "*) ;; 480114330f12Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 480214330f12Smrg esac], 480314330f12Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 480414330f12Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 480514330f12Smrgfi 480614330f12Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 480714330f12Smrg [Additional compiler flags for building library objects]) 48082378475aSmrg 480914330f12Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 481014330f12Smrg [How to pass a linker flag through the compiler]) 481114330f12Smrg# 481214330f12Smrg# Check to make sure the static flag actually works. 481314330f12Smrg# 481414330f12Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 481514330f12Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 481614330f12Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 481714330f12Smrg $lt_tmp_static_flag, 481814330f12Smrg [], 481914330f12Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 482014330f12Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 482114330f12Smrg [Compiler flag to prevent dynamic linking]) 482214330f12Smrg])# _LT_COMPILER_PIC 482395b296d0Smrg 482495b296d0Smrg 482514330f12Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 482614330f12Smrg# ---------------------------- 482714330f12Smrg# See if the linker supports building shared libraries. 482814330f12Smrgm4_defun([_LT_LINKER_SHLIBS], 482914330f12Smrg[AC_REQUIRE([LT_PATH_LD])dnl 483014330f12SmrgAC_REQUIRE([LT_PATH_NM])dnl 483114330f12Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 483214330f12Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 483314330f12Smrgm4_require([_LT_DECL_EGREP])dnl 483414330f12Smrgm4_require([_LT_DECL_SED])dnl 483514330f12Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 483614330f12Smrgm4_require([_LT_TAG_COMPILER])dnl 483714330f12SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 483814330f12Smrgm4_if([$1], [CXX], [ 483914330f12Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 484014330f12Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 484114330f12Smrg case $host_os in 484214330f12Smrg aix[[4-9]]*) 484314330f12Smrg # If we're using GNU nm, then we don't want the "-C" option. 4844eca46af7Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4845eca46af7Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4846eca46af7Smrg # weak defined symbols like other global defined symbols, whereas 4847eca46af7Smrg # GNU nm marks them as "W". 4848eca46af7Smrg # While the 'weak' keyword is ignored in the Export File, we need 4849eca46af7Smrg # it in the Import File for the 'aix-soname' feature, so we have 4850eca46af7Smrg # to replace the "-B" option with "-P" for AIX nm. 485114330f12Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4852eca46af7Smrg _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' 48532378475aSmrg else 4854eca46af7Smrg _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' 48552378475aSmrg fi 485614330f12Smrg ;; 485714330f12Smrg pw32*) 4858eca46af7Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 485914330f12Smrg ;; 486014330f12Smrg cygwin* | mingw* | cegcc*) 486114330f12Smrg case $cc_basename in 4862eca46af7Smrg cl*) 4863eca46af7Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4864eca46af7Smrg ;; 486514330f12Smrg *) 486614330f12Smrg _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' 486714330f12Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 486814330f12Smrg ;; 486914330f12Smrg esac 487014330f12Smrg ;; 487114330f12Smrg *) 487214330f12Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 487314330f12Smrg ;; 487414330f12Smrg esac 487514330f12Smrg], [ 487614330f12Smrg runpath_var= 487714330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 487814330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=no 487914330f12Smrg _LT_TAGVAR(archive_cmds, $1)= 488014330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 488114330f12Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 488214330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 488314330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 488414330f12Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 488514330f12Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 488614330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 488714330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 488814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 488914330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 489014330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 489114330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 489214330f12Smrg _LT_TAGVAR(inherit_rpath, $1)=no 489314330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 489414330f12Smrg _LT_TAGVAR(module_cmds, $1)= 489514330f12Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 489614330f12Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 489714330f12Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 489814330f12Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 489914330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 490014330f12Smrg # include_expsyms should be a list of space-separated symbols to be *always* 490114330f12Smrg # included in the symbol list 490214330f12Smrg _LT_TAGVAR(include_expsyms, $1)= 490314330f12Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4904eca46af7Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 4905eca46af7Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4906eca46af7Smrg # as well as any symbol that contains 'd'. 490714330f12Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 490814330f12Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 490914330f12Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 491014330f12Smrg # the symbol is explicitly referenced. Since portable code cannot 491114330f12Smrg # rely on this symbol name, it's probably fine to never include it in 491214330f12Smrg # preloaded symbol tables. 491314330f12Smrg # Exclude shared library initialization/finalization symbols. 491414330f12Smrgdnl Note also adjust exclude_expsyms for C++ above. 491514330f12Smrg extract_expsyms_cmds= 491695b296d0Smrg 491714330f12Smrg case $host_os in 491814330f12Smrg cygwin* | mingw* | pw32* | cegcc*) 491914330f12Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 492014330f12Smrg # When not using gcc, we currently assume that we are using 492114330f12Smrg # Microsoft Visual C++. 4922eca46af7Smrg if test yes != "$GCC"; then 492314330f12Smrg with_gnu_ld=no 492414330f12Smrg fi 492514330f12Smrg ;; 492614330f12Smrg interix*) 492714330f12Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 492814330f12Smrg with_gnu_ld=yes 492914330f12Smrg ;; 4930eca46af7Smrg openbsd* | bitrig*) 493114330f12Smrg with_gnu_ld=no 493214330f12Smrg ;; 493314330f12Smrg esac 49342378475aSmrg 493514330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 493614330f12Smrg 493714330f12Smrg # On some targets, GNU ld is compatible enough with the native linker 493814330f12Smrg # that we're better off using the native interface for both. 493914330f12Smrg lt_use_gnu_ld_interface=no 4940eca46af7Smrg if test yes = "$with_gnu_ld"; then 494114330f12Smrg case $host_os in 494214330f12Smrg aix*) 494314330f12Smrg # The AIX port of GNU ld has always aspired to compatibility 494414330f12Smrg # with the native linker. However, as the warning in the GNU ld 494514330f12Smrg # block says, versions before 2.19.5* couldn't really create working 494614330f12Smrg # shared libraries, regardless of the interface used. 494714330f12Smrg case `$LD -v 2>&1` in 494814330f12Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 494914330f12Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 495014330f12Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 495114330f12Smrg *) 495214330f12Smrg lt_use_gnu_ld_interface=yes 49532378475aSmrg ;; 495414330f12Smrg esac 495514330f12Smrg ;; 495614330f12Smrg *) 495714330f12Smrg lt_use_gnu_ld_interface=yes 495814330f12Smrg ;; 495914330f12Smrg esac 496014330f12Smrg fi 496195b296d0Smrg 4962eca46af7Smrg if test yes = "$lt_use_gnu_ld_interface"; then 496314330f12Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4964eca46af7Smrg wlarc='$wl' 496595b296d0Smrg 496614330f12Smrg # Set some defaults for GNU ld with shared library support. These 496714330f12Smrg # are reset later if shared libraries are not supported. Putting them 496814330f12Smrg # here allows them to be overridden if necessary. 496914330f12Smrg runpath_var=LD_RUN_PATH 4970eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 4971eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 497214330f12Smrg # ancient GNU ld didn't support --whole-archive et. al. 497314330f12Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4974eca46af7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 497514330f12Smrg else 497614330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 497714330f12Smrg fi 497814330f12Smrg supports_anon_versioning=no 4979eca46af7Smrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 498014330f12Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 498114330f12Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 498214330f12Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 498314330f12Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 498414330f12Smrg *\ 2.11.*) ;; # other 2.11 versions 498514330f12Smrg *) supports_anon_versioning=yes ;; 498614330f12Smrg esac 49872378475aSmrg 498814330f12Smrg # See if GNU ld supports shared libraries. 498914330f12Smrg case $host_os in 499014330f12Smrg aix[[3-9]]*) 499114330f12Smrg # On AIX/PPC, the GNU linker is very broken 4992eca46af7Smrg if test ia64 != "$host_cpu"; then 499314330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 499414330f12Smrg cat <<_LT_EOF 1>&2 49952378475aSmrg 499614330f12Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 499714330f12Smrg*** to be unable to reliably create shared libraries on AIX. 499814330f12Smrg*** Therefore, libtool is disabling shared libraries support. If you 499914330f12Smrg*** really care for shared libraries, you may want to install binutils 500014330f12Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 500114330f12Smrg*** You will then need to restart the configuration process. 500295b296d0Smrg 500314330f12Smrg_LT_EOF 500414330f12Smrg fi 500514330f12Smrg ;; 50062378475aSmrg 500714330f12Smrg amigaos*) 500814330f12Smrg case $host_cpu in 500914330f12Smrg powerpc) 501014330f12Smrg # see comment about AmigaOS4 .so support 5011eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 501214330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 501314330f12Smrg ;; 501414330f12Smrg m68k) 501514330f12Smrg _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)' 501614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 501714330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50182378475aSmrg ;; 501914330f12Smrg esac 502014330f12Smrg ;; 502195b296d0Smrg 502214330f12Smrg beos*) 502314330f12Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 502414330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 502514330f12Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 502614330f12Smrg # support --undefined. This deserves some investigation. FIXME 5027eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 502814330f12Smrg else 502914330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 503014330f12Smrg fi 503114330f12Smrg ;; 503214330f12Smrg 503314330f12Smrg cygwin* | mingw* | pw32* | cegcc*) 503414330f12Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 503514330f12Smrg # as there is no search path for DLLs. 503614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5037eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 503814330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 503914330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=no 504014330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 504114330f12Smrg _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' 504214330f12Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 504314330f12Smrg 504414330f12Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5045eca46af7Smrg _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' 5046eca46af7Smrg # If the export-symbols file already is a .def file, use it as 5047eca46af7Smrg # is; otherwise, prepend EXPORTS... 5048eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5049eca46af7Smrg cp $export_symbols $output_objdir/$soname.def; 5050eca46af7Smrg else 5051eca46af7Smrg echo EXPORTS > $output_objdir/$soname.def; 5052eca46af7Smrg cat $export_symbols >> $output_objdir/$soname.def; 5053eca46af7Smrg fi~ 5054eca46af7Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 505514330f12Smrg else 505614330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 505714330f12Smrg fi 505814330f12Smrg ;; 505995b296d0Smrg 506014330f12Smrg haiku*) 5061eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 506214330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 506314330f12Smrg ;; 506495b296d0Smrg 5065eca46af7Smrg os2*) 5066eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5067eca46af7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5068eca46af7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5069eca46af7Smrg shrext_cmds=.dll 5070eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5071eca46af7Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5072eca46af7Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5073eca46af7Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5074eca46af7Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5075eca46af7Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5076eca46af7Smrg emximp -o $lib $output_objdir/$libname.def' 5077eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5078eca46af7Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5079eca46af7Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5080eca46af7Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5081eca46af7Smrg prefix_cmds="$SED"~ 5082eca46af7Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5083eca46af7Smrg prefix_cmds="$prefix_cmds -e 1d"; 5084eca46af7Smrg fi~ 5085eca46af7Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5086eca46af7Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5087eca46af7Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5088eca46af7Smrg emximp -o $lib $output_objdir/$libname.def' 5089eca46af7Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5090eca46af7Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5091eca46af7Smrg ;; 5092eca46af7Smrg 509314330f12Smrg interix[[3-9]]*) 509414330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 509514330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5096eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5097eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 509814330f12Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 509914330f12Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 510014330f12Smrg # default) and relocated if they conflict, which is a slow very memory 510114330f12Smrg # consuming and fragmenting process. To avoid this, we pick a random, 510214330f12Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 510314330f12Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5104eca46af7Smrg _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' 5105eca46af7Smrg _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' 510614330f12Smrg ;; 510714330f12Smrg 510814330f12Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 510914330f12Smrg tmp_diet=no 5110eca46af7Smrg if test linux-dietlibc = "$host_os"; then 511114330f12Smrg case $cc_basename in 511214330f12Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 511314330f12Smrg esac 511414330f12Smrg fi 511514330f12Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5116eca46af7Smrg && test no = "$tmp_diet" 511714330f12Smrg then 511814330f12Smrg tmp_addflag=' $pic_flag' 511914330f12Smrg tmp_sharedflag='-shared' 512014330f12Smrg case $cc_basename,$host_cpu in 512114330f12Smrg pgcc*) # Portland Group C compiler 5122eca46af7Smrg _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' 512314330f12Smrg tmp_addflag=' $pic_flag' 512414330f12Smrg ;; 512514330f12Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 512614330f12Smrg # Portland Group f77 and f90 compilers 5127eca46af7Smrg _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' 512814330f12Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 512914330f12Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 513014330f12Smrg tmp_addflag=' -i_dynamic' ;; 513114330f12Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 513214330f12Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 513314330f12Smrg ifc* | ifort*) # Intel Fortran compiler 513414330f12Smrg tmp_addflag=' -nofor_main' ;; 513514330f12Smrg lf95*) # Lahey Fortran 8.1 513614330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 513714330f12Smrg tmp_sharedflag='--shared' ;; 5138eca46af7Smrg nagfor*) # NAGFOR 5.3 5139eca46af7Smrg tmp_sharedflag='-Wl,-shared' ;; 514014330f12Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 514114330f12Smrg tmp_sharedflag='-qmkshrobj' 514214330f12Smrg tmp_addflag= ;; 514314330f12Smrg nvcc*) # Cuda Compiler Driver 2.2 5144eca46af7Smrg _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' 514514330f12Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 514614330f12Smrg ;; 514714330f12Smrg esac 514814330f12Smrg case `$CC -V 2>&1 | sed 5q` in 514914330f12Smrg *Sun\ C*) # Sun C 5.9 5150eca46af7Smrg _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' 515114330f12Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 515214330f12Smrg tmp_sharedflag='-G' ;; 515314330f12Smrg *Sun\ F*) # Sun Fortran 8.3 515414330f12Smrg tmp_sharedflag='-G' ;; 515514330f12Smrg esac 5156eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 515795b296d0Smrg 5158eca46af7Smrg if test yes = "$supports_anon_versioning"; then 515914330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5160eca46af7Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5161eca46af7Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5162eca46af7Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 516314330f12Smrg fi 516495b296d0Smrg 516514330f12Smrg case $cc_basename in 5166eca46af7Smrg tcc*) 5167eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5168eca46af7Smrg ;; 516914330f12Smrg xlf* | bgf* | bgxlf* | mpixlf*) 517014330f12Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 517114330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5172eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 517314330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5174eca46af7Smrg if test yes = "$supports_anon_versioning"; then 517514330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5176eca46af7Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5177eca46af7Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5178eca46af7Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 517914330f12Smrg fi 518014330f12Smrg ;; 518114330f12Smrg esac 518214330f12Smrg else 51832378475aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 518414330f12Smrg fi 518514330f12Smrg ;; 518695b296d0Smrg 518714330f12Smrg netbsd*) 518814330f12Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 518914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 519014330f12Smrg wlarc= 519114330f12Smrg else 5192eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5193eca46af7Smrg _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' 519414330f12Smrg fi 519514330f12Smrg ;; 519695b296d0Smrg 519714330f12Smrg solaris*) 519814330f12Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 519914330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 520014330f12Smrg cat <<_LT_EOF 1>&2 520195b296d0Smrg 520214330f12Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 520314330f12Smrg*** create shared libraries on Solaris systems. Therefore, libtool 520414330f12Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 520514330f12Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 520614330f12Smrg*** your PATH or compiler configuration so that the native linker is 520714330f12Smrg*** used, and then restart. 52082378475aSmrg 520914330f12Smrg_LT_EOF 521014330f12Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5211eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5212eca46af7Smrg _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' 521314330f12Smrg else 521414330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 521514330f12Smrg fi 521614330f12Smrg ;; 521795b296d0Smrg 521814330f12Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 521914330f12Smrg case `$LD -v 2>&1` in 522014330f12Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 522114330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 522214330f12Smrg cat <<_LT_EOF 1>&2 52232378475aSmrg 5224eca46af7Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 522514330f12Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 522614330f12Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 522714330f12Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 522814330f12Smrg*** your PATH or compiler configuration so that the native linker is 522914330f12Smrg*** used, and then restart. 52302378475aSmrg 523114330f12Smrg_LT_EOF 523214330f12Smrg ;; 523314330f12Smrg *) 523414330f12Smrg # For security reasons, it is highly recommended that you always 523514330f12Smrg # use absolute paths for naming shared libraries, and exclude the 523614330f12Smrg # DT_RUNPATH tag from executables and libraries. But doing so 523714330f12Smrg # requires that you compile everything twice, which is a pain. 523814330f12Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5239eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5240eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5241eca46af7Smrg _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' 524214330f12Smrg else 52432378475aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 524414330f12Smrg fi 52452378475aSmrg ;; 524614330f12Smrg esac 524714330f12Smrg ;; 524814330f12Smrg 524914330f12Smrg sunos4*) 525014330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 525114330f12Smrg wlarc= 525214330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 525314330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 525414330f12Smrg ;; 525514330f12Smrg 525614330f12Smrg *) 525714330f12Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5258eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5259eca46af7Smrg _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' 526014330f12Smrg else 526114330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 526214330f12Smrg fi 526314330f12Smrg ;; 526414330f12Smrg esac 526514330f12Smrg 5266eca46af7Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 526714330f12Smrg runpath_var= 526814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 526914330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 527014330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 527114330f12Smrg fi 527214330f12Smrg else 527314330f12Smrg # PORTME fill in a description of your system's linker (not GNU ld) 527414330f12Smrg case $host_os in 527514330f12Smrg aix3*) 527614330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 527714330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 527814330f12Smrg _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' 527914330f12Smrg # Note: this linker hardcodes the directories in LIBPATH if there 528014330f12Smrg # are no directories specified by -L. 528114330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5282eca46af7Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 528314330f12Smrg # Neither direct hardcoding nor static linking is supported with a 528414330f12Smrg # broken collect2. 528514330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 528614330f12Smrg fi 528714330f12Smrg ;; 52882378475aSmrg 528914330f12Smrg aix[[4-9]]*) 5290eca46af7Smrg if test ia64 = "$host_cpu"; then 529114330f12Smrg # On IA64, the linker does run time linking by default, so we don't 529214330f12Smrg # have to do anything special. 529314330f12Smrg aix_use_runtimelinking=no 529414330f12Smrg exp_sym_flag='-Bexport' 5295eca46af7Smrg no_entry_flag= 529614330f12Smrg else 529714330f12Smrg # If we're using GNU nm, then we don't want the "-C" option. 5298eca46af7Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5299eca46af7Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5300eca46af7Smrg # weak defined symbols like other global defined symbols, whereas 5301eca46af7Smrg # GNU nm marks them as "W". 5302eca46af7Smrg # While the 'weak' keyword is ignored in the Export File, we need 5303eca46af7Smrg # it in the Import File for the 'aix-soname' feature, so we have 5304eca46af7Smrg # to replace the "-B" option with "-P" for AIX nm. 530514330f12Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5306eca46af7Smrg _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' 530714330f12Smrg else 5308eca46af7Smrg _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' 530914330f12Smrg fi 531014330f12Smrg aix_use_runtimelinking=no 531195b296d0Smrg 531214330f12Smrg # Test if we are trying to use run time linking or normal 531314330f12Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5314eca46af7Smrg # have runtime linking enabled, and use it for executables. 5315eca46af7Smrg # For shared libraries, we enable/disable runtime linking 5316eca46af7Smrg # depending on the kind of the shared library created - 5317eca46af7Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 5318eca46af7Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5319eca46af7Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 5320eca46af7Smrg # lib.a static archive 5321eca46af7Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5322eca46af7Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 5323eca46af7Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5324eca46af7Smrg # lib.a(lib.so.V) shared, rtl:no 5325eca46af7Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5326eca46af7Smrg # lib.a static archive 532714330f12Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 532814330f12Smrg for ld_flag in $LDFLAGS; do 5329eca46af7Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 533014330f12Smrg aix_use_runtimelinking=yes 533114330f12Smrg break 533214330f12Smrg fi 533314330f12Smrg done 5334eca46af7Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5335eca46af7Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5336eca46af7Smrg # so we don't have lib.a shared libs to link our executables. 5337eca46af7Smrg # We have to force runtime linking in this case. 5338eca46af7Smrg aix_use_runtimelinking=yes 5339eca46af7Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5340eca46af7Smrg fi 534114330f12Smrg ;; 534214330f12Smrg esac 53432378475aSmrg 534414330f12Smrg exp_sym_flag='-bexport' 534514330f12Smrg no_entry_flag='-bnoentry' 534614330f12Smrg fi 53472378475aSmrg 534814330f12Smrg # When large executables or shared objects are built, AIX ld can 534914330f12Smrg # have problems creating the table of contents. If linking a library 535014330f12Smrg # or program results in "error TOC overflow" add -mminimal-toc to 535114330f12Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 535214330f12Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 53532378475aSmrg 535414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='' 535514330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 535614330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 535714330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 535814330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5359eca46af7Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5360eca46af7Smrg case $with_aix_soname,$aix_use_runtimelinking in 5361eca46af7Smrg aix,*) ;; # traditional, no import file 5362eca46af7Smrg svr4,* | *,yes) # use import file 5363eca46af7Smrg # The Import File defines what to hardcode. 5364eca46af7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5365eca46af7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5366eca46af7Smrg ;; 5367eca46af7Smrg esac 536895b296d0Smrg 5369eca46af7Smrg if test yes = "$GCC"; then 537014330f12Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 537114330f12Smrg # We only want to do this on AIX 4.2 and lower, the check 537214330f12Smrg # below for broken collect2 doesn't work under 4.3+ 5373eca46af7Smrg collect2name=`$CC -print-prog-name=collect2` 537414330f12Smrg if test -f "$collect2name" && 537514330f12Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 537614330f12Smrg then 537714330f12Smrg # We have reworked collect2 537814330f12Smrg : 537914330f12Smrg else 538014330f12Smrg # We have old collect2 538114330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 538214330f12Smrg # It fails to find uninstalled libraries when the uninstalled 538314330f12Smrg # path is not listed in the libpath. Setting hardcode_minus_L 538414330f12Smrg # to unsupported forces relinking 538514330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 538614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 538714330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 538814330f12Smrg fi 538914330f12Smrg ;; 539014330f12Smrg esac 539114330f12Smrg shared_flag='-shared' 5392eca46af7Smrg if test yes = "$aix_use_runtimelinking"; then 5393eca46af7Smrg shared_flag="$shared_flag "'$wl-G' 539414330f12Smrg fi 5395eca46af7Smrg # Need to ensure runtime linking is disabled for the traditional 5396eca46af7Smrg # shared library, or the linker may eventually find shared libraries 5397eca46af7Smrg # /with/ Import File - we do not want to mix them. 5398eca46af7Smrg shared_flag_aix='-shared' 5399eca46af7Smrg shared_flag_svr4='-shared $wl-G' 540014330f12Smrg else 540114330f12Smrg # not using gcc 5402eca46af7Smrg if test ia64 = "$host_cpu"; then 540314330f12Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 540414330f12Smrg # chokes on -Wl,-G. The following line is correct: 540514330f12Smrg shared_flag='-G' 540614330f12Smrg else 5407eca46af7Smrg if test yes = "$aix_use_runtimelinking"; then 5408eca46af7Smrg shared_flag='$wl-G' 540914330f12Smrg else 5410eca46af7Smrg shared_flag='$wl-bM:SRE' 541114330f12Smrg fi 5412eca46af7Smrg shared_flag_aix='$wl-bM:SRE' 5413eca46af7Smrg shared_flag_svr4='$wl-G' 541414330f12Smrg fi 541514330f12Smrg fi 541695b296d0Smrg 5417eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 541814330f12Smrg # It seems that -bexpall does not export symbols beginning with 541914330f12Smrg # underscore (_), so it is better to generate a list of symbols to export. 542014330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5421eca46af7Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 542214330f12Smrg # Warning - without using the other runtime loading flags (-brtl), 542314330f12Smrg # -berok will link without error, but may produce a broken library. 542414330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 542514330f12Smrg # Determine the default libpath from the value encoded in an 542614330f12Smrg # empty executable. 542714330f12Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5428eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5429eca46af7Smrg _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 543014330f12Smrg else 5431eca46af7Smrg if test ia64 = "$host_cpu"; then 5432eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 543314330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5434eca46af7Smrg _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" 543514330f12Smrg else 543614330f12Smrg # Determine the default libpath from the value encoded in an 543714330f12Smrg # empty executable. 543814330f12Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5439eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 544014330f12Smrg # Warning - without using the other run time loading flags, 544114330f12Smrg # -berok will link without error, but may produce a broken library. 5442eca46af7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5443eca46af7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5444eca46af7Smrg if test yes = "$with_gnu_ld"; then 544514330f12Smrg # We only use this code for GNU lds that support --whole-archive. 5446eca46af7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 544714330f12Smrg else 544814330f12Smrg # Exported symbols can be pulled into shared objects from archives 544914330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 545014330f12Smrg fi 545114330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5452eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5453eca46af7Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5454eca46af7Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5455eca46af7Smrg if test svr4 != "$with_aix_soname"; then 5456eca46af7Smrg # This is similar to how AIX traditionally builds its shared libraries. 5457eca46af7Smrg _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' 5458eca46af7Smrg fi 5459eca46af7Smrg if test aix != "$with_aix_soname"; then 5460eca46af7Smrg _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' 5461eca46af7Smrg else 5462eca46af7Smrg # used by -dlpreopen to get the symbols 5463eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5464eca46af7Smrg fi 5465eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 546614330f12Smrg fi 546714330f12Smrg fi 546814330f12Smrg ;; 546995b296d0Smrg 547014330f12Smrg amigaos*) 547114330f12Smrg case $host_cpu in 547214330f12Smrg powerpc) 547314330f12Smrg # see comment about AmigaOS4 .so support 5474eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 547514330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 547614330f12Smrg ;; 547714330f12Smrg m68k) 547814330f12Smrg _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)' 547914330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 548014330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 548114330f12Smrg ;; 548214330f12Smrg esac 548314330f12Smrg ;; 54842378475aSmrg 548514330f12Smrg bsdi[[45]]*) 548614330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 548714330f12Smrg ;; 54882378475aSmrg 548914330f12Smrg cygwin* | mingw* | pw32* | cegcc*) 549014330f12Smrg # When not using gcc, we currently assume that we are using 549114330f12Smrg # Microsoft Visual C++. 549214330f12Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 549314330f12Smrg # no search path for DLLs. 549414330f12Smrg case $cc_basename in 549514330f12Smrg cl*) 549614330f12Smrg # Native MSVC 549714330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 549814330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 549914330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 550014330f12Smrg _LT_TAGVAR(file_list_spec, $1)='@' 550114330f12Smrg # Tell ltmain to make .lib files, not .a files. 550214330f12Smrg libext=lib 550314330f12Smrg # Tell ltmain to make .dll files, not .so files. 5504eca46af7Smrg shrext_cmds=.dll 550514330f12Smrg # FIXME: Setting linknames here is a bad hack. 5506eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5507eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5508eca46af7Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 5509eca46af7Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5510eca46af7Smrg else 5511eca46af7Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5512eca46af7Smrg fi~ 5513eca46af7Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5514eca46af7Smrg linknames=' 551514330f12Smrg # The linker will not automatically build a static lib if we build a DLL. 551614330f12Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 551714330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5518eca46af7Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 551914330f12Smrg _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' 552014330f12Smrg # Don't use ranlib 552114330f12Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 552214330f12Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5523eca46af7Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5524eca46af7Smrg case $lt_outputfile in 5525eca46af7Smrg *.exe|*.EXE) ;; 5526eca46af7Smrg *) 5527eca46af7Smrg lt_outputfile=$lt_outputfile.exe 5528eca46af7Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 5529eca46af7Smrg ;; 5530eca46af7Smrg esac~ 5531eca46af7Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5532eca46af7Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5533eca46af7Smrg $RM "$lt_outputfile.manifest"; 5534eca46af7Smrg fi' 55352378475aSmrg ;; 553614330f12Smrg *) 553714330f12Smrg # Assume MSVC wrapper 553814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 553914330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 554014330f12Smrg # Tell ltmain to make .lib files, not .a files. 554114330f12Smrg libext=lib 554214330f12Smrg # Tell ltmain to make .dll files, not .so files. 5543eca46af7Smrg shrext_cmds=.dll 554414330f12Smrg # FIXME: Setting linknames here is a bad hack. 554514330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 554614330f12Smrg # The linker will automatically build a .lib file if we build a DLL. 554714330f12Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 554814330f12Smrg # FIXME: Should let the user specify the lib program. 554914330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 555014330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 55512378475aSmrg ;; 555214330f12Smrg esac 555314330f12Smrg ;; 555495b296d0Smrg 555514330f12Smrg darwin* | rhapsody*) 555614330f12Smrg _LT_DARWIN_LINKER_FEATURES($1) 555714330f12Smrg ;; 555895b296d0Smrg 555914330f12Smrg dgux*) 556014330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 556114330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 556214330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 556314330f12Smrg ;; 556495b296d0Smrg 556514330f12Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 556614330f12Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 556714330f12Smrg # does not break anything, and helps significantly (at the cost of a little 556814330f12Smrg # extra space). 556914330f12Smrg freebsd2.2*) 557014330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 557114330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 557214330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 557314330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 557414330f12Smrg ;; 557595b296d0Smrg 557614330f12Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5577eca46af7Smrg freebsd2.*) 557814330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 557914330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 558014330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 558114330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 558214330f12Smrg ;; 558395b296d0Smrg 558414330f12Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 558514330f12Smrg freebsd* | dragonfly*) 558614330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 558714330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 558814330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 558914330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 559014330f12Smrg ;; 55912378475aSmrg 559214330f12Smrg hpux9*) 5593eca46af7Smrg if test yes = "$GCC"; then 5594eca46af7Smrg _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' 559514330f12Smrg else 5596eca46af7Smrg _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' 559714330f12Smrg fi 5598eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 559914330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 560014330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56012378475aSmrg 560214330f12Smrg # hardcode_minus_L: Not really in the search PATH, 560314330f12Smrg # but as the default location of the library. 560414330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5605eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 560614330f12Smrg ;; 56072378475aSmrg 560814330f12Smrg hpux10*) 5609eca46af7Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5610eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 561114330f12Smrg else 561214330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 561314330f12Smrg fi 5614eca46af7Smrg if test no = "$with_gnu_ld"; then 5615eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 561614330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 561714330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 561814330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5619eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 562014330f12Smrg # hardcode_minus_L: Not really in the search PATH, 562114330f12Smrg # but as the default location of the library. 562214330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 562314330f12Smrg fi 562414330f12Smrg ;; 562595b296d0Smrg 562614330f12Smrg hpux11*) 5627eca46af7Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 562814330f12Smrg case $host_cpu in 562914330f12Smrg hppa*64*) 5630eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 563114330f12Smrg ;; 563214330f12Smrg ia64*) 5633eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 563414330f12Smrg ;; 563514330f12Smrg *) 5636eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 563714330f12Smrg ;; 563814330f12Smrg esac 563914330f12Smrg else 564014330f12Smrg case $host_cpu in 564114330f12Smrg hppa*64*) 5642eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 564314330f12Smrg ;; 564414330f12Smrg ia64*) 5645eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 564614330f12Smrg ;; 564714330f12Smrg *) 564814330f12Smrg m4_if($1, [], [ 564914330f12Smrg # Older versions of the 11.00 compiler do not understand -b yet 565014330f12Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 565114330f12Smrg _LT_LINKER_OPTION([if $CC understands -b], 565214330f12Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5653eca46af7Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 565414330f12Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5655eca46af7Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 565614330f12Smrg ;; 565714330f12Smrg esac 565814330f12Smrg fi 5659eca46af7Smrg if test no = "$with_gnu_ld"; then 5660eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 566114330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 566295b296d0Smrg 566314330f12Smrg case $host_cpu in 566414330f12Smrg hppa*64*|ia64*) 566514330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 566614330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 566714330f12Smrg ;; 566814330f12Smrg *) 566914330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 567014330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5671eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 56722378475aSmrg 567314330f12Smrg # hardcode_minus_L: Not really in the search PATH, 567414330f12Smrg # but as the default location of the library. 567514330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 567614330f12Smrg ;; 567714330f12Smrg esac 567814330f12Smrg fi 567914330f12Smrg ;; 56802378475aSmrg 568114330f12Smrg irix5* | irix6* | nonstopux*) 5682eca46af7Smrg if test yes = "$GCC"; then 5683eca46af7Smrg _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' 568414330f12Smrg # Try to use the -exported_symbol ld option, if it does not 568514330f12Smrg # work, assume that -exports_file does not work either and 568614330f12Smrg # implicitly export all symbols. 568714330f12Smrg # This should be the same for all languages, so no per-tag cache variable. 568814330f12Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 568914330f12Smrg [lt_cv_irix_exported_symbol], 5690eca46af7Smrg [save_LDFLAGS=$LDFLAGS 5691eca46af7Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 569214330f12Smrg AC_LINK_IFELSE( 569314330f12Smrg [AC_LANG_SOURCE( 569414330f12Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 569514330f12Smrg [C++], [[int foo (void) { return 0; }]], 569614330f12Smrg [Fortran 77], [[ 569714330f12Smrg subroutine foo 569814330f12Smrg end]], 569914330f12Smrg [Fortran], [[ 570014330f12Smrg subroutine foo 570114330f12Smrg end]])])], 570214330f12Smrg [lt_cv_irix_exported_symbol=yes], 570314330f12Smrg [lt_cv_irix_exported_symbol=no]) 5704eca46af7Smrg LDFLAGS=$save_LDFLAGS]) 5705eca46af7Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 5706eca46af7Smrg _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' 570714330f12Smrg fi 570814330f12Smrg else 5709eca46af7Smrg _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' 5710eca46af7Smrg _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' 571114330f12Smrg fi 571214330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5713eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 571414330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 571514330f12Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 571614330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 571714330f12Smrg ;; 57182378475aSmrg 5719eca46af7Smrg linux*) 5720eca46af7Smrg case $cc_basename in 5721eca46af7Smrg tcc*) 5722eca46af7Smrg # Fabrice Bellard et al's Tiny C Compiler 5723eca46af7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5724eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5725eca46af7Smrg ;; 5726eca46af7Smrg esac 5727eca46af7Smrg ;; 5728eca46af7Smrg 572914330f12Smrg netbsd*) 573014330f12Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 573114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 573214330f12Smrg else 573314330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 573414330f12Smrg fi 573514330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 573614330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 573714330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 573814330f12Smrg ;; 573995b296d0Smrg 574014330f12Smrg newsos6) 574114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 574214330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5743eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 574414330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 574514330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 574614330f12Smrg ;; 574795b296d0Smrg 574814330f12Smrg *nto* | *qnx*) 574914330f12Smrg ;; 575095b296d0Smrg 5751eca46af7Smrg openbsd* | bitrig*) 575214330f12Smrg if test -f /usr/libexec/ld.so; then 575314330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 575414330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 575514330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5756eca46af7Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 575714330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5758eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5759eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5760eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 576114330f12Smrg else 5762eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5763eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 576414330f12Smrg fi 576514330f12Smrg else 576614330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 576714330f12Smrg fi 576814330f12Smrg ;; 57692378475aSmrg 577014330f12Smrg os2*) 577114330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 577214330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 577314330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5774eca46af7Smrg shrext_cmds=.dll 5775eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5776eca46af7Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5777eca46af7Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5778eca46af7Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5779eca46af7Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5780eca46af7Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5781eca46af7Smrg emximp -o $lib $output_objdir/$libname.def' 5782eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5783eca46af7Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5784eca46af7Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5785eca46af7Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5786eca46af7Smrg prefix_cmds="$SED"~ 5787eca46af7Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5788eca46af7Smrg prefix_cmds="$prefix_cmds -e 1d"; 5789eca46af7Smrg fi~ 5790eca46af7Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5791eca46af7Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5792eca46af7Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5793eca46af7Smrg emximp -o $lib $output_objdir/$libname.def' 5794eca46af7Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5795eca46af7Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 579614330f12Smrg ;; 579795b296d0Smrg 579814330f12Smrg osf3*) 5799eca46af7Smrg if test yes = "$GCC"; then 5800eca46af7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5801eca46af7Smrg _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' 580214330f12Smrg else 580314330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5804eca46af7Smrg _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' 580514330f12Smrg fi 580614330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5807eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 580814330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 580914330f12Smrg ;; 581095b296d0Smrg 581114330f12Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5812eca46af7Smrg if test yes = "$GCC"; then 5813eca46af7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5814eca46af7Smrg _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' 5815eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 581614330f12Smrg else 581714330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5818eca46af7Smrg _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' 581914330f12Smrg _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~ 5820eca46af7Smrg $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' 582195b296d0Smrg 582214330f12Smrg # Both c and cxx compiler support -rpath directly 582314330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 582414330f12Smrg fi 582514330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 582614330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 582714330f12Smrg ;; 58282378475aSmrg 582914330f12Smrg solaris*) 583014330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5831eca46af7Smrg if test yes = "$GCC"; then 5832eca46af7Smrg wlarc='$wl' 5833eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 583414330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5835eca46af7Smrg $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' 583614330f12Smrg else 583714330f12Smrg case `$CC -V 2>&1` in 583814330f12Smrg *"Compilers 5.0"*) 583914330f12Smrg wlarc='' 5840eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 584114330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5842eca46af7Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 584314330f12Smrg ;; 584414330f12Smrg *) 5845eca46af7Smrg wlarc='$wl' 5846eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 584714330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5848eca46af7Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 584914330f12Smrg ;; 585014330f12Smrg esac 585114330f12Smrg fi 585214330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 585314330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 585414330f12Smrg case $host_os in 585514330f12Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 585614330f12Smrg *) 585714330f12Smrg # The compiler driver will combine and reorder linker options, 5858eca46af7Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 585914330f12Smrg # but is careful enough not to reorder. 586014330f12Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5861eca46af7Smrg if test yes = "$GCC"; then 5862eca46af7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 586314330f12Smrg else 586414330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 586514330f12Smrg fi 586614330f12Smrg ;; 586714330f12Smrg esac 586814330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 586914330f12Smrg ;; 58702378475aSmrg 587114330f12Smrg sunos4*) 5872eca46af7Smrg if test sequent = "$host_vendor"; then 587314330f12Smrg # Use $CC to link under sequent, because it throws in some extra .o 587414330f12Smrg # files that make .init and .fini sections work. 5875eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 587614330f12Smrg else 587714330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 587814330f12Smrg fi 587914330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 588014330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 588114330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 588214330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 588314330f12Smrg ;; 58842378475aSmrg 588514330f12Smrg sysv4) 588614330f12Smrg case $host_vendor in 588714330f12Smrg sni) 588814330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 588914330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 589014330f12Smrg ;; 589114330f12Smrg siemens) 589214330f12Smrg ## LD is ld it makes a PLAMLIB 589314330f12Smrg ## CC just makes a GrossModule. 589414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 589514330f12Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 589614330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 58972378475aSmrg ;; 589814330f12Smrg motorola) 589914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 590014330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 590114330f12Smrg ;; 590214330f12Smrg esac 590314330f12Smrg runpath_var='LD_RUN_PATH' 590414330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 590514330f12Smrg ;; 590614330f12Smrg 590714330f12Smrg sysv4.3*) 590814330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 590914330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 591014330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 591114330f12Smrg ;; 591214330f12Smrg 591314330f12Smrg sysv4*MP*) 591414330f12Smrg if test -d /usr/nec; then 591514330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 591614330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 591714330f12Smrg runpath_var=LD_RUN_PATH 591814330f12Smrg hardcode_runpath_var=yes 591914330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 592014330f12Smrg fi 592114330f12Smrg ;; 592295b296d0Smrg 59232378475aSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5924eca46af7Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 59252378475aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 59262378475aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59272378475aSmrg runpath_var='LD_RUN_PATH' 592895b296d0Smrg 5929eca46af7Smrg if test yes = "$GCC"; then 5930eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5931eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 593214330f12Smrg else 5933eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5934eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 593514330f12Smrg fi 59362378475aSmrg ;; 593795b296d0Smrg 593814330f12Smrg sysv5* | sco3.2v5* | sco5v6*) 5939eca46af7Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 594014330f12Smrg # link with -lc, and that would cause any symbols used from libc to 594114330f12Smrg # always be unresolved, which means just about no library would 594214330f12Smrg # ever link correctly. If we're not using GNU ld we use -z text 594314330f12Smrg # though, which does catch some bad symbols but isn't as heavy-handed 594414330f12Smrg # as -z defs. 5945eca46af7Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 5946eca46af7Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 594714330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 594814330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5949eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 595014330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 595114330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5952eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 595314330f12Smrg runpath_var='LD_RUN_PATH' 595495b296d0Smrg 5955eca46af7Smrg if test yes = "$GCC"; then 5956eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5957eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 595814330f12Smrg else 5959eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5960eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 596114330f12Smrg fi 59622378475aSmrg ;; 596395b296d0Smrg 596414330f12Smrg uts4*) 596514330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 596614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 596714330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 596814330f12Smrg ;; 596995b296d0Smrg 597014330f12Smrg *) 597114330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 597214330f12Smrg ;; 59732378475aSmrg esac 597495b296d0Smrg 5975eca46af7Smrg if test sni = "$host_vendor"; then 597614330f12Smrg case $host in 597714330f12Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5978eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 597914330f12Smrg ;; 598014330f12Smrg esac 598114330f12Smrg fi 598214330f12Smrg fi 598314330f12Smrg]) 598414330f12SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5985eca46af7Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 598695b296d0Smrg 598714330f12Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 598895b296d0Smrg 598914330f12Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 599014330f12Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 599114330f12Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 599214330f12Smrg [The commands to extract the exported symbol list from a shared archive]) 599339713583Smrg 599414330f12Smrg# 599514330f12Smrg# Do we need to explicitly link libc? 599614330f12Smrg# 599714330f12Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 599814330f12Smrgx|xyes) 599914330f12Smrg # Assume -lc should be added 600014330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 600139713583Smrg 6002eca46af7Smrg if test yes,yes = "$GCC,$enable_shared"; then 600314330f12Smrg case $_LT_TAGVAR(archive_cmds, $1) in 600414330f12Smrg *'~'*) 600514330f12Smrg # FIXME: we may have to deal with multi-command sequences. 600614330f12Smrg ;; 600714330f12Smrg '$CC '*) 600814330f12Smrg # Test whether the compiler implicitly links with -lc since on some 600914330f12Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 601014330f12Smrg # to ld, don't add -lc before -lgcc. 601114330f12Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 601214330f12Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 601314330f12Smrg [$RM conftest* 601414330f12Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 601514330f12Smrg 601614330f12Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 601714330f12Smrg soname=conftest 601814330f12Smrg lib=conftest 601914330f12Smrg libobjs=conftest.$ac_objext 602014330f12Smrg deplibs= 602114330f12Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 602214330f12Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 602314330f12Smrg compiler_flags=-v 602414330f12Smrg linker_flags=-v 602514330f12Smrg verstring= 602614330f12Smrg output_objdir=. 602714330f12Smrg libname=conftest 602814330f12Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 602914330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 603014330f12Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 603114330f12Smrg then 603214330f12Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 603314330f12Smrg else 603414330f12Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 603514330f12Smrg fi 603614330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 603714330f12Smrg else 603814330f12Smrg cat conftest.err 1>&5 603914330f12Smrg fi 604014330f12Smrg $RM conftest* 604114330f12Smrg ]) 604214330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 604314330f12Smrg ;; 604414330f12Smrg esac 604514330f12Smrg fi 604614330f12Smrg ;; 604714330f12Smrgesac 604839713583Smrg 604914330f12Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 605014330f12Smrg [Whether or not to add -lc for building shared libraries]) 605114330f12Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 605214330f12Smrg [enable_shared_with_static_runtimes], [0], 605314330f12Smrg [Whether or not to disallow shared libs when runtime libs are static]) 605414330f12Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 605514330f12Smrg [Compiler flag to allow reflexive dlopens]) 605614330f12Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 605714330f12Smrg [Compiler flag to generate shared objects directly from archives]) 605814330f12Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 605914330f12Smrg [Whether the compiler copes with passing no objects directly]) 606014330f12Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 606114330f12Smrg [Create an old-style archive from a shared archive]) 606214330f12Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 606314330f12Smrg [Create a temporary old-style archive to link instead of a shared archive]) 606414330f12Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 606514330f12Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 606614330f12Smrg_LT_TAGDECL([], [module_cmds], [2], 606714330f12Smrg [Commands used to build a loadable module if different from building 606814330f12Smrg a shared archive.]) 606914330f12Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 607014330f12Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 607114330f12Smrg [Whether we are building with GNU ld or not]) 607214330f12Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 607314330f12Smrg [Flag that allows shared libraries with undefined symbols to be built]) 607414330f12Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 607514330f12Smrg [Flag that enforces no undefined symbols]) 607614330f12Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 607714330f12Smrg [Flag to hardcode $libdir into a binary during linking. 607814330f12Smrg This must work even if $libdir does not exist]) 607914330f12Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 608014330f12Smrg [Whether we need a single "-rpath" flag with a separated argument]) 608114330f12Smrg_LT_TAGDECL([], [hardcode_direct], [0], 6082eca46af7Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 608314330f12Smrg DIR into the resulting binary]) 608414330f12Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6085eca46af7Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 608614330f12Smrg DIR into the resulting binary and the resulting library dependency is 6087eca46af7Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 608814330f12Smrg library is relocated]) 608914330f12Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 609014330f12Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 609114330f12Smrg into the resulting binary]) 609214330f12Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 609314330f12Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 609414330f12Smrg into the resulting binary]) 609514330f12Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 609614330f12Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 609714330f12Smrg into the library and all subsequent libraries and executables linked 609814330f12Smrg against it]) 609914330f12Smrg_LT_TAGDECL([], [inherit_rpath], [0], 610014330f12Smrg [Set to yes if linker adds runtime paths of dependent libraries 610114330f12Smrg to runtime path list]) 610214330f12Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 610314330f12Smrg [Whether libtool must link a program against all its dependency libraries]) 610414330f12Smrg_LT_TAGDECL([], [always_export_symbols], [0], 610514330f12Smrg [Set to "yes" if exported symbols are required]) 610614330f12Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 610714330f12Smrg [The commands to list exported symbols]) 610814330f12Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 610914330f12Smrg [Symbols that should not be listed in the preloaded symbols]) 611014330f12Smrg_LT_TAGDECL([], [include_expsyms], [1], 611114330f12Smrg [Symbols that must always be exported]) 611214330f12Smrg_LT_TAGDECL([], [prelink_cmds], [2], 611314330f12Smrg [Commands necessary for linking programs (against libraries) with templates]) 611414330f12Smrg_LT_TAGDECL([], [postlink_cmds], [2], 611514330f12Smrg [Commands necessary for finishing linking programs]) 611614330f12Smrg_LT_TAGDECL([], [file_list_spec], [1], 611714330f12Smrg [Specify filename containing input files]) 611814330f12Smrgdnl FIXME: Not yet implemented 611914330f12Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 612014330f12Smrgdnl [Compiler flag to generate thread safe objects]) 612114330f12Smrg])# _LT_LINKER_SHLIBS 612239713583Smrg 612339713583Smrg 612414330f12Smrg# _LT_LANG_C_CONFIG([TAG]) 612514330f12Smrg# ------------------------ 612614330f12Smrg# Ensure that the configuration variables for a C compiler are suitably 612714330f12Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6128eca46af7Smrg# the compiler configuration to 'libtool'. 612914330f12Smrgm4_defun([_LT_LANG_C_CONFIG], 613014330f12Smrg[m4_require([_LT_DECL_EGREP])dnl 6131eca46af7Smrglt_save_CC=$CC 613214330f12SmrgAC_LANG_PUSH(C) 613339713583Smrg 613414330f12Smrg# Source file extension for C test sources. 613514330f12Smrgac_ext=c 613639713583Smrg 613714330f12Smrg# Object file extension for compiled C test sources. 613814330f12Smrgobjext=o 613914330f12Smrg_LT_TAGVAR(objext, $1)=$objext 614095b296d0Smrg 614114330f12Smrg# Code to be used in simple compile tests 614214330f12Smrglt_simple_compile_test_code="int some_variable = 0;" 614395b296d0Smrg 614414330f12Smrg# Code to be used in simple link tests 614514330f12Smrglt_simple_link_test_code='int main(){return(0);}' 614639713583Smrg 614714330f12Smrg_LT_TAG_COMPILER 614814330f12Smrg# Save the default compiler, since it gets overwritten when the other 614914330f12Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 615014330f12Smrgcompiler_DEFAULT=$CC 615139713583Smrg 615214330f12Smrg# save warnings/boilerplate of simple test code 615314330f12Smrg_LT_COMPILER_BOILERPLATE 615414330f12Smrg_LT_LINKER_BOILERPLATE 615539713583Smrg 615614330f12Smrgif test -n "$compiler"; then 615714330f12Smrg _LT_COMPILER_NO_RTTI($1) 615814330f12Smrg _LT_COMPILER_PIC($1) 615914330f12Smrg _LT_COMPILER_C_O($1) 616014330f12Smrg _LT_COMPILER_FILE_LOCKS($1) 616114330f12Smrg _LT_LINKER_SHLIBS($1) 616214330f12Smrg _LT_SYS_DYNAMIC_LINKER($1) 616314330f12Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 616414330f12Smrg LT_SYS_DLOPEN_SELF 616514330f12Smrg _LT_CMD_STRIPLIB 616639713583Smrg 6167eca46af7Smrg # Report what library types will actually be built 616814330f12Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 616914330f12Smrg AC_MSG_RESULT([$can_build_shared]) 617039713583Smrg 617114330f12Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6172eca46af7Smrg test no = "$can_build_shared" && enable_shared=no 617339713583Smrg 617414330f12Smrg # On AIX, shared libraries and static libraries use the same namespace, and 617514330f12Smrg # are all built from PIC. 617614330f12Smrg case $host_os in 617714330f12Smrg aix3*) 6178eca46af7Smrg test yes = "$enable_shared" && enable_static=no 617914330f12Smrg if test -n "$RANLIB"; then 618014330f12Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 618114330f12Smrg postinstall_cmds='$RANLIB $lib' 61822378475aSmrg fi 61832378475aSmrg ;; 618439713583Smrg 618514330f12Smrg aix[[4-9]]*) 6186eca46af7Smrg if test ia64 != "$host_cpu"; then 6187eca46af7Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6188eca46af7Smrg yes,aix,yes) ;; # shared object as lib.so file only 6189eca46af7Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 6190eca46af7Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6191eca46af7Smrg esac 61922378475aSmrg fi 61932378475aSmrg ;; 61942378475aSmrg esac 619514330f12Smrg AC_MSG_RESULT([$enable_shared]) 61962378475aSmrg 619714330f12Smrg AC_MSG_CHECKING([whether to build static libraries]) 619814330f12Smrg # Make sure either enable_shared or enable_static is yes. 6199eca46af7Smrg test yes = "$enable_shared" || enable_static=yes 620014330f12Smrg AC_MSG_RESULT([$enable_static]) 62012378475aSmrg 620214330f12Smrg _LT_CONFIG($1) 62032378475aSmrgfi 620414330f12SmrgAC_LANG_POP 6205eca46af7SmrgCC=$lt_save_CC 620614330f12Smrg])# _LT_LANG_C_CONFIG 620739713583Smrg 620839713583Smrg 620914330f12Smrg# _LT_LANG_CXX_CONFIG([TAG]) 62102378475aSmrg# -------------------------- 621114330f12Smrg# Ensure that the configuration variables for a C++ compiler are suitably 621214330f12Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6213eca46af7Smrg# the compiler configuration to 'libtool'. 621414330f12Smrgm4_defun([_LT_LANG_CXX_CONFIG], 621514330f12Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 621614330f12Smrgm4_require([_LT_DECL_EGREP])dnl 621714330f12Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6218eca46af7Smrgif test -n "$CXX" && ( test no != "$CXX" && 6219eca46af7Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6220eca46af7Smrg (test g++ != "$CXX"))); then 622114330f12Smrg AC_PROG_CXXCPP 622214330f12Smrgelse 622314330f12Smrg _lt_caught_CXX_error=yes 622414330f12Smrgfi 622595b296d0Smrg 622614330f12SmrgAC_LANG_PUSH(C++) 62272378475aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 62282378475aSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 62292378475aSmrg_LT_TAGVAR(always_export_symbols, $1)=no 62302378475aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 623114330f12Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 62322378475aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 62332378475aSmrg_LT_TAGVAR(hardcode_direct, $1)=no 62342378475aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 62352378475aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 62362378475aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 62372378475aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 623814330f12Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 62392378475aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 62402378475aSmrg_LT_TAGVAR(inherit_rpath, $1)=no 62412378475aSmrg_LT_TAGVAR(module_cmds, $1)= 62422378475aSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 62432378475aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 62442378475aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 624514330f12Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 624614330f12Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 62472378475aSmrg_LT_TAGVAR(no_undefined_flag, $1)= 62482378475aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 62492378475aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 625039713583Smrg 625114330f12Smrg# Source file extension for C++ test sources. 625214330f12Smrgac_ext=cpp 625339713583Smrg 625414330f12Smrg# Object file extension for compiled C++ test sources. 62552378475aSmrgobjext=o 62562378475aSmrg_LT_TAGVAR(objext, $1)=$objext 62572378475aSmrg 62582378475aSmrg# No sense in running all these tests if we already determined that 625914330f12Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 62602378475aSmrg# are currently assumed to apply to all compilers on this platform, 62612378475aSmrg# and will be corrupted by setting them based on a non-working compiler. 6262eca46af7Smrgif test yes != "$_lt_caught_CXX_error"; then 62632378475aSmrg # Code to be used in simple compile tests 626414330f12Smrg lt_simple_compile_test_code="int some_variable = 0;" 626539713583Smrg 62662378475aSmrg # Code to be used in simple link tests 626714330f12Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 626839713583Smrg 62692378475aSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 62702378475aSmrg _LT_TAG_COMPILER 627139713583Smrg 62722378475aSmrg # save warnings/boilerplate of simple test code 62732378475aSmrg _LT_COMPILER_BOILERPLATE 62742378475aSmrg _LT_LINKER_BOILERPLATE 627539713583Smrg 62762378475aSmrg # Allow CC to be a program name with arguments. 627714330f12Smrg lt_save_CC=$CC 627814330f12Smrg lt_save_CFLAGS=$CFLAGS 627914330f12Smrg lt_save_LD=$LD 62802378475aSmrg lt_save_GCC=$GCC 628114330f12Smrg GCC=$GXX 628214330f12Smrg lt_save_with_gnu_ld=$with_gnu_ld 628314330f12Smrg lt_save_path_LD=$lt_cv_path_LD 628414330f12Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 628514330f12Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 628614330f12Smrg else 628714330f12Smrg $as_unset lt_cv_prog_gnu_ld 628814330f12Smrg fi 628914330f12Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 629014330f12Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 629114330f12Smrg else 629214330f12Smrg $as_unset lt_cv_path_LD 629314330f12Smrg fi 629414330f12Smrg test -z "${LDCXX+set}" || LD=$LDCXX 629514330f12Smrg CC=${CXX-"c++"} 629614330f12Smrg CFLAGS=$CXXFLAGS 62972378475aSmrg compiler=$CC 62982378475aSmrg _LT_TAGVAR(compiler, $1)=$CC 62992378475aSmrg _LT_CC_BASENAME([$compiler]) 630095b296d0Smrg 630114330f12Smrg if test -n "$compiler"; then 630214330f12Smrg # We don't want -fno-exception when compiling C++ code, so set the 630314330f12Smrg # no_builtin_flag separately 6304eca46af7Smrg if test yes = "$GXX"; then 630514330f12Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 630614330f12Smrg else 630714330f12Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 630814330f12Smrg fi 63092378475aSmrg 6310eca46af7Smrg if test yes = "$GXX"; then 631114330f12Smrg # Set up default GNU C++ configuration 63122378475aSmrg 631314330f12Smrg LT_PATH_LD 631495b296d0Smrg 631514330f12Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 631614330f12Smrg # archiving commands below assume that GNU ld is being used. 6317eca46af7Smrg if test yes = "$with_gnu_ld"; then 6318eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6319eca46af7Smrg _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' 632095b296d0Smrg 6321eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6322eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 632395b296d0Smrg 632414330f12Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 632514330f12Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 632614330f12Smrg # investigate it a little bit more. (MM) 6327eca46af7Smrg wlarc='$wl' 63282378475aSmrg 632914330f12Smrg # ancient GNU ld didn't support --whole-archive et. al. 633014330f12Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 633114330f12Smrg $GREP 'no-whole-archive' > /dev/null; then 6332eca46af7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 633314330f12Smrg else 633414330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 633514330f12Smrg fi 633614330f12Smrg else 633714330f12Smrg with_gnu_ld=no 633814330f12Smrg wlarc= 63392378475aSmrg 634014330f12Smrg # A generic and very simple default shared library creation 634114330f12Smrg # command for GNU C++ for the case where it uses the native 634214330f12Smrg # linker, instead of GNU ld. If possible, this setting should 634314330f12Smrg # overridden to take advantage of the native linker features on 634414330f12Smrg # the platform it is being used on. 634514330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 634614330f12Smrg fi 63472378475aSmrg 634814330f12Smrg # Commands to make compiler produce verbose output that lists 634914330f12Smrg # what "hidden" libraries, object files and flags are used when 635014330f12Smrg # linking a shared library. 635114330f12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 63522378475aSmrg 635314330f12Smrg else 635414330f12Smrg GXX=no 635514330f12Smrg with_gnu_ld=no 635614330f12Smrg wlarc= 635714330f12Smrg fi 63582378475aSmrg 635914330f12Smrg # PORTME: fill in a description of your system's C++ link characteristics 636014330f12Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 636114330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 636214330f12Smrg case $host_os in 636314330f12Smrg aix3*) 636414330f12Smrg # FIXME: insert proper C++ library support 636514330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 636614330f12Smrg ;; 636714330f12Smrg aix[[4-9]]*) 6368eca46af7Smrg if test ia64 = "$host_cpu"; then 636914330f12Smrg # On IA64, the linker does run time linking by default, so we don't 637014330f12Smrg # have to do anything special. 637114330f12Smrg aix_use_runtimelinking=no 637214330f12Smrg exp_sym_flag='-Bexport' 6373eca46af7Smrg no_entry_flag= 637414330f12Smrg else 637514330f12Smrg aix_use_runtimelinking=no 63762378475aSmrg 637714330f12Smrg # Test if we are trying to use run time linking or normal 637814330f12Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6379eca46af7Smrg # have runtime linking enabled, and use it for executables. 6380eca46af7Smrg # For shared libraries, we enable/disable runtime linking 6381eca46af7Smrg # depending on the kind of the shared library created - 6382eca46af7Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 6383eca46af7Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6384eca46af7Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 6385eca46af7Smrg # lib.a static archive 6386eca46af7Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6387eca46af7Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 6388eca46af7Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6389eca46af7Smrg # lib.a(lib.so.V) shared, rtl:no 6390eca46af7Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6391eca46af7Smrg # lib.a static archive 639214330f12Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 639314330f12Smrg for ld_flag in $LDFLAGS; do 639414330f12Smrg case $ld_flag in 639514330f12Smrg *-brtl*) 639614330f12Smrg aix_use_runtimelinking=yes 639714330f12Smrg break 639814330f12Smrg ;; 639914330f12Smrg esac 640014330f12Smrg done 6401eca46af7Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6402eca46af7Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6403eca46af7Smrg # so we don't have lib.a shared libs to link our executables. 6404eca46af7Smrg # We have to force runtime linking in this case. 6405eca46af7Smrg aix_use_runtimelinking=yes 6406eca46af7Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6407eca46af7Smrg fi 640814330f12Smrg ;; 640914330f12Smrg esac 641095b296d0Smrg 641114330f12Smrg exp_sym_flag='-bexport' 641214330f12Smrg no_entry_flag='-bnoentry' 641314330f12Smrg fi 64142378475aSmrg 641514330f12Smrg # When large executables or shared objects are built, AIX ld can 641614330f12Smrg # have problems creating the table of contents. If linking a library 641714330f12Smrg # or program results in "error TOC overflow" add -mminimal-toc to 641814330f12Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 641914330f12Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 64202378475aSmrg 642114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='' 642214330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 642314330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 642414330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 642514330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6426eca46af7Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6427eca46af7Smrg case $with_aix_soname,$aix_use_runtimelinking in 6428eca46af7Smrg aix,*) ;; # no import file 6429eca46af7Smrg svr4,* | *,yes) # use import file 6430eca46af7Smrg # The Import File defines what to hardcode. 6431eca46af7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6432eca46af7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6433eca46af7Smrg ;; 6434eca46af7Smrg esac 64352378475aSmrg 6436eca46af7Smrg if test yes = "$GXX"; then 643714330f12Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 643814330f12Smrg # We only want to do this on AIX 4.2 and lower, the check 643914330f12Smrg # below for broken collect2 doesn't work under 4.3+ 6440eca46af7Smrg collect2name=`$CC -print-prog-name=collect2` 644114330f12Smrg if test -f "$collect2name" && 644214330f12Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 644314330f12Smrg then 644414330f12Smrg # We have reworked collect2 644514330f12Smrg : 644614330f12Smrg else 644714330f12Smrg # We have old collect2 644814330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 644914330f12Smrg # It fails to find uninstalled libraries when the uninstalled 645014330f12Smrg # path is not listed in the libpath. Setting hardcode_minus_L 645114330f12Smrg # to unsupported forces relinking 645214330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 645314330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 645414330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 645514330f12Smrg fi 645614330f12Smrg esac 645714330f12Smrg shared_flag='-shared' 6458eca46af7Smrg if test yes = "$aix_use_runtimelinking"; then 6459eca46af7Smrg shared_flag=$shared_flag' $wl-G' 646014330f12Smrg fi 6461eca46af7Smrg # Need to ensure runtime linking is disabled for the traditional 6462eca46af7Smrg # shared library, or the linker may eventually find shared libraries 6463eca46af7Smrg # /with/ Import File - we do not want to mix them. 6464eca46af7Smrg shared_flag_aix='-shared' 6465eca46af7Smrg shared_flag_svr4='-shared $wl-G' 646614330f12Smrg else 646714330f12Smrg # not using gcc 6468eca46af7Smrg if test ia64 = "$host_cpu"; then 646914330f12Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 647014330f12Smrg # chokes on -Wl,-G. The following line is correct: 647114330f12Smrg shared_flag='-G' 647214330f12Smrg else 6473eca46af7Smrg if test yes = "$aix_use_runtimelinking"; then 6474eca46af7Smrg shared_flag='$wl-G' 647514330f12Smrg else 6476eca46af7Smrg shared_flag='$wl-bM:SRE' 647714330f12Smrg fi 6478eca46af7Smrg shared_flag_aix='$wl-bM:SRE' 6479eca46af7Smrg shared_flag_svr4='$wl-G' 648014330f12Smrg fi 648114330f12Smrg fi 64822378475aSmrg 6483eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 648414330f12Smrg # It seems that -bexpall does not export symbols beginning with 648514330f12Smrg # underscore (_), so it is better to generate a list of symbols to 648614330f12Smrg # export. 648714330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6488eca46af7Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 648914330f12Smrg # Warning - without using the other runtime loading flags (-brtl), 649014330f12Smrg # -berok will link without error, but may produce a broken library. 6491eca46af7Smrg # The "-G" linker flag allows undefined symbols. 6492eca46af7Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 649314330f12Smrg # Determine the default libpath from the value encoded in an empty 649414330f12Smrg # executable. 649514330f12Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6496eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 64972378475aSmrg 6498eca46af7Smrg _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 649914330f12Smrg else 6500eca46af7Smrg if test ia64 = "$host_cpu"; then 6501eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 650214330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6503eca46af7Smrg _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" 650414330f12Smrg else 650514330f12Smrg # Determine the default libpath from the value encoded in an 650614330f12Smrg # empty executable. 650714330f12Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6508eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 650914330f12Smrg # Warning - without using the other run time loading flags, 651014330f12Smrg # -berok will link without error, but may produce a broken library. 6511eca46af7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6512eca46af7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6513eca46af7Smrg if test yes = "$with_gnu_ld"; then 651414330f12Smrg # We only use this code for GNU lds that support --whole-archive. 6515eca46af7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 651614330f12Smrg else 651714330f12Smrg # Exported symbols can be pulled into shared objects from archives 651814330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 651914330f12Smrg fi 652014330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6521eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6522eca46af7Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6523eca46af7Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6524eca46af7Smrg if test svr4 != "$with_aix_soname"; then 6525eca46af7Smrg # This is similar to how AIX traditionally builds its shared 6526eca46af7Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6527eca46af7Smrg _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' 6528eca46af7Smrg fi 6529eca46af7Smrg if test aix != "$with_aix_soname"; then 6530eca46af7Smrg _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' 6531eca46af7Smrg else 6532eca46af7Smrg # used by -dlpreopen to get the symbols 6533eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6534eca46af7Smrg fi 6535eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 653614330f12Smrg fi 65372378475aSmrg fi 65382378475aSmrg ;; 65392378475aSmrg 654014330f12Smrg beos*) 654114330f12Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 654214330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 654314330f12Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 654414330f12Smrg # support --undefined. This deserves some investigation. FIXME 6545eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 654614330f12Smrg else 654714330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 654814330f12Smrg fi 654914330f12Smrg ;; 65502378475aSmrg 655114330f12Smrg chorus*) 655214330f12Smrg case $cc_basename in 655314330f12Smrg *) 655414330f12Smrg # FIXME: insert proper C++ library support 655514330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 655614330f12Smrg ;; 655714330f12Smrg esac 655814330f12Smrg ;; 65592378475aSmrg 656014330f12Smrg cygwin* | mingw* | pw32* | cegcc*) 656114330f12Smrg case $GXX,$cc_basename in 656214330f12Smrg ,cl* | no,cl*) 656314330f12Smrg # Native MSVC 656414330f12Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 656514330f12Smrg # no search path for DLLs. 656614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 656714330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 656814330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 656914330f12Smrg _LT_TAGVAR(file_list_spec, $1)='@' 657014330f12Smrg # Tell ltmain to make .lib files, not .a files. 657114330f12Smrg libext=lib 657214330f12Smrg # Tell ltmain to make .dll files, not .so files. 6573eca46af7Smrg shrext_cmds=.dll 657414330f12Smrg # FIXME: Setting linknames here is a bad hack. 6575eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6576eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6577eca46af7Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 6578eca46af7Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6579eca46af7Smrg else 6580eca46af7Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6581eca46af7Smrg fi~ 6582eca46af7Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6583eca46af7Smrg linknames=' 658414330f12Smrg # The linker will not automatically build a static lib if we build a DLL. 658514330f12Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 658614330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 658714330f12Smrg # Don't use ranlib 658814330f12Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 658914330f12Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6590eca46af7Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6591eca46af7Smrg case $lt_outputfile in 6592eca46af7Smrg *.exe|*.EXE) ;; 6593eca46af7Smrg *) 6594eca46af7Smrg lt_outputfile=$lt_outputfile.exe 6595eca46af7Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 6596eca46af7Smrg ;; 6597eca46af7Smrg esac~ 6598eca46af7Smrg func_to_tool_file "$lt_outputfile"~ 6599eca46af7Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6600eca46af7Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6601eca46af7Smrg $RM "$lt_outputfile.manifest"; 6602eca46af7Smrg fi' 660314330f12Smrg ;; 660414330f12Smrg *) 660514330f12Smrg # g++ 660614330f12Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 660714330f12Smrg # as there is no search path for DLLs. 660814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6609eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 661014330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 661114330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=no 661214330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 661314330f12Smrg 661414330f12Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6615eca46af7Smrg _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' 6616eca46af7Smrg # If the export-symbols file already is a .def file, use it as 6617eca46af7Smrg # is; otherwise, prepend EXPORTS... 6618eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6619eca46af7Smrg cp $export_symbols $output_objdir/$soname.def; 6620eca46af7Smrg else 6621eca46af7Smrg echo EXPORTS > $output_objdir/$soname.def; 6622eca46af7Smrg cat $export_symbols >> $output_objdir/$soname.def; 6623eca46af7Smrg fi~ 6624eca46af7Smrg $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' 662514330f12Smrg else 662614330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 662714330f12Smrg fi 662814330f12Smrg ;; 662914330f12Smrg esac 663014330f12Smrg ;; 663114330f12Smrg darwin* | rhapsody*) 663214330f12Smrg _LT_DARWIN_LINKER_FEATURES($1) 663314330f12Smrg ;; 66342378475aSmrg 6635eca46af7Smrg os2*) 6636eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6637eca46af7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6638eca46af7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6639eca46af7Smrg shrext_cmds=.dll 6640eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6641eca46af7Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6642eca46af7Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6643eca46af7Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6644eca46af7Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6645eca46af7Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6646eca46af7Smrg emximp -o $lib $output_objdir/$libname.def' 6647eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6648eca46af7Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6649eca46af7Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6650eca46af7Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6651eca46af7Smrg prefix_cmds="$SED"~ 6652eca46af7Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6653eca46af7Smrg prefix_cmds="$prefix_cmds -e 1d"; 6654eca46af7Smrg fi~ 6655eca46af7Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6656eca46af7Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6657eca46af7Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6658eca46af7Smrg emximp -o $lib $output_objdir/$libname.def' 6659eca46af7Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6660eca46af7Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6661eca46af7Smrg ;; 6662eca46af7Smrg 666314330f12Smrg dgux*) 666414330f12Smrg case $cc_basename in 666514330f12Smrg ec++*) 666614330f12Smrg # FIXME: insert proper C++ library support 666714330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 666814330f12Smrg ;; 666914330f12Smrg ghcx*) 667014330f12Smrg # Green Hills C++ Compiler 667114330f12Smrg # FIXME: insert proper C++ library support 667214330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 667314330f12Smrg ;; 667414330f12Smrg *) 667514330f12Smrg # FIXME: insert proper C++ library support 667614330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 667714330f12Smrg ;; 667814330f12Smrg esac 667914330f12Smrg ;; 668039713583Smrg 6681eca46af7Smrg freebsd2.*) 668214330f12Smrg # C++ shared libraries reported to be fairly broken before 668314330f12Smrg # switch to ELF 668414330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 668514330f12Smrg ;; 668639713583Smrg 668714330f12Smrg freebsd-elf*) 668814330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 668914330f12Smrg ;; 669039713583Smrg 669114330f12Smrg freebsd* | dragonfly*) 669214330f12Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 669314330f12Smrg # conventions 669414330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 669514330f12Smrg ;; 669639713583Smrg 669714330f12Smrg haiku*) 6698eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 669914330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 670014330f12Smrg ;; 670139713583Smrg 670214330f12Smrg hpux9*) 6703eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 670414330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6705eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 670614330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 670714330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 670814330f12Smrg # but as the default 670914330f12Smrg # location of the library. 671039713583Smrg 671114330f12Smrg case $cc_basename in 671214330f12Smrg CC*) 671314330f12Smrg # FIXME: insert proper C++ library support 671414330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 671514330f12Smrg ;; 671614330f12Smrg aCC*) 6717eca46af7Smrg _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' 671814330f12Smrg # Commands to make compiler produce verbose output that lists 671914330f12Smrg # what "hidden" libraries, object files and flags are used when 672014330f12Smrg # linking a shared library. 672114330f12Smrg # 672214330f12Smrg # There doesn't appear to be a way to prevent this compiler from 672314330f12Smrg # explicitly linking system object files so we need to strip them 672414330f12Smrg # from the output so that they don't get included in the library 672514330f12Smrg # dependencies. 6726eca46af7Smrg 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"' 672714330f12Smrg ;; 672814330f12Smrg *) 6729eca46af7Smrg if test yes = "$GXX"; then 6730eca46af7Smrg _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' 673114330f12Smrg else 673214330f12Smrg # FIXME: insert proper C++ library support 673314330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 673414330f12Smrg fi 673514330f12Smrg ;; 673614330f12Smrg esac 673714330f12Smrg ;; 673839713583Smrg 673914330f12Smrg hpux10*|hpux11*) 6740eca46af7Smrg if test no = "$with_gnu_ld"; then 6741eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 674214330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 674339713583Smrg 674414330f12Smrg case $host_cpu in 674514330f12Smrg hppa*64*|ia64*) 674614330f12Smrg ;; 674714330f12Smrg *) 6748eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 674914330f12Smrg ;; 675014330f12Smrg esac 675114330f12Smrg fi 675214330f12Smrg case $host_cpu in 675314330f12Smrg hppa*64*|ia64*) 675414330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 675514330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 675614330f12Smrg ;; 675714330f12Smrg *) 675814330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 675914330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 676014330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 676114330f12Smrg # but as the default 676214330f12Smrg # location of the library. 676314330f12Smrg ;; 676414330f12Smrg esac 676595b296d0Smrg 676614330f12Smrg case $cc_basename in 676714330f12Smrg CC*) 676814330f12Smrg # FIXME: insert proper C++ library support 676914330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 677014330f12Smrg ;; 677114330f12Smrg aCC*) 677214330f12Smrg case $host_cpu in 677314330f12Smrg hppa*64*) 6774eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 677514330f12Smrg ;; 677614330f12Smrg ia64*) 6777eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 677814330f12Smrg ;; 677914330f12Smrg *) 6780eca46af7Smrg _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' 678114330f12Smrg ;; 678214330f12Smrg esac 678314330f12Smrg # Commands to make compiler produce verbose output that lists 678414330f12Smrg # what "hidden" libraries, object files and flags are used when 678514330f12Smrg # linking a shared library. 678614330f12Smrg # 678714330f12Smrg # There doesn't appear to be a way to prevent this compiler from 678814330f12Smrg # explicitly linking system object files so we need to strip them 678914330f12Smrg # from the output so that they don't get included in the library 679014330f12Smrg # dependencies. 6791eca46af7Smrg 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"' 679214330f12Smrg ;; 679314330f12Smrg *) 6794eca46af7Smrg if test yes = "$GXX"; then 6795eca46af7Smrg if test no = "$with_gnu_ld"; then 679614330f12Smrg case $host_cpu in 679714330f12Smrg hppa*64*) 6798eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 679914330f12Smrg ;; 680014330f12Smrg ia64*) 6801eca46af7Smrg _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' 680214330f12Smrg ;; 680314330f12Smrg *) 6804eca46af7Smrg _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' 680514330f12Smrg ;; 680614330f12Smrg esac 680714330f12Smrg fi 680814330f12Smrg else 680914330f12Smrg # FIXME: insert proper C++ library support 681014330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 681114330f12Smrg fi 681214330f12Smrg ;; 681314330f12Smrg esac 681414330f12Smrg ;; 681595b296d0Smrg 681614330f12Smrg interix[[3-9]]*) 681714330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 681814330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6819eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6820eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 682114330f12Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 682214330f12Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 682314330f12Smrg # default) and relocated if they conflict, which is a slow very memory 682414330f12Smrg # consuming and fragmenting process. To avoid this, we pick a random, 682514330f12Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 682614330f12Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6827eca46af7Smrg _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' 6828eca46af7Smrg _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' 682914330f12Smrg ;; 683014330f12Smrg irix5* | irix6*) 683114330f12Smrg case $cc_basename in 683214330f12Smrg CC*) 683314330f12Smrg # SGI C++ 6834eca46af7Smrg _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' 683595b296d0Smrg 683614330f12Smrg # Archives containing C++ object files must be created using 683714330f12Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 683814330f12Smrg # necessary to make sure instantiated templates are included 683914330f12Smrg # in the archive. 684014330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 684114330f12Smrg ;; 684214330f12Smrg *) 6843eca46af7Smrg if test yes = "$GXX"; then 6844eca46af7Smrg if test no = "$with_gnu_ld"; then 6845eca46af7Smrg _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' 684614330f12Smrg else 6847eca46af7Smrg _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' 684814330f12Smrg fi 684914330f12Smrg fi 685014330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 685114330f12Smrg ;; 685214330f12Smrg esac 6853eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 685414330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 685514330f12Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 685614330f12Smrg ;; 685795b296d0Smrg 6858eca46af7Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 685914330f12Smrg case $cc_basename in 686014330f12Smrg KCC*) 686114330f12Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 686295b296d0Smrg 686314330f12Smrg # KCC will only create a shared library if the output file 686414330f12Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 686514330f12Smrg # to its proper name (with version) after linking. 6866eca46af7Smrg _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' 6867eca46af7Smrg _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' 686814330f12Smrg # Commands to make compiler produce verbose output that lists 686914330f12Smrg # what "hidden" libraries, object files and flags are used when 687014330f12Smrg # linking a shared library. 687114330f12Smrg # 687214330f12Smrg # There doesn't appear to be a way to prevent this compiler from 687314330f12Smrg # explicitly linking system object files so we need to strip them 687414330f12Smrg # from the output so that they don't get included in the library 687514330f12Smrg # dependencies. 6876eca46af7Smrg 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"' 687795b296d0Smrg 6878eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6879eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 688095b296d0Smrg 688114330f12Smrg # Archives containing C++ object files must be created using 688214330f12Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 688314330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 688414330f12Smrg ;; 688514330f12Smrg icpc* | ecpc* ) 688614330f12Smrg # Intel C++ 688714330f12Smrg with_gnu_ld=yes 688814330f12Smrg # version 8.0 and above of icpc choke on multiply defined symbols 688914330f12Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 689014330f12Smrg # earlier do not add the objects themselves. 689114330f12Smrg case `$CC -V 2>&1` in 689214330f12Smrg *"Version 7."*) 6893eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6894eca46af7Smrg _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' 689514330f12Smrg ;; 689614330f12Smrg *) # Version 8.0 or newer 689714330f12Smrg tmp_idyn= 689814330f12Smrg case $host_cpu in 689914330f12Smrg ia64*) tmp_idyn=' -i_dynamic';; 690014330f12Smrg esac 6901eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6902eca46af7Smrg _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' 690314330f12Smrg ;; 690414330f12Smrg esac 690514330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6906eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6907eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6908eca46af7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 690914330f12Smrg ;; 691014330f12Smrg pgCC* | pgcpp*) 691114330f12Smrg # Portland Group C++ compiler 691214330f12Smrg case `$CC -V` in 691314330f12Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 691414330f12Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6915eca46af7Smrg rm -rf $tpldir~ 6916eca46af7Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6917eca46af7Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 691814330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6919eca46af7Smrg rm -rf $tpldir~ 6920eca46af7Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6921eca46af7Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6922eca46af7Smrg $RANLIB $oldlib' 692314330f12Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6924eca46af7Smrg rm -rf $tpldir~ 6925eca46af7Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6926eca46af7Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 692714330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6928eca46af7Smrg rm -rf $tpldir~ 6929eca46af7Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6930eca46af7Smrg $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' 693114330f12Smrg ;; 693214330f12Smrg *) # Version 6 and above use weak symbols 6933eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6934eca46af7Smrg _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' 693514330f12Smrg ;; 693614330f12Smrg esac 693795b296d0Smrg 6938eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 6939eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6940eca46af7Smrg _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' 694114330f12Smrg ;; 694214330f12Smrg cxx*) 694314330f12Smrg # Compaq C++ 6944eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6945eca46af7Smrg _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' 6946ff89ac2bSmrg 694714330f12Smrg runpath_var=LD_RUN_PATH 694814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 694914330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69502378475aSmrg 695114330f12Smrg # Commands to make compiler produce verbose output that lists 695214330f12Smrg # what "hidden" libraries, object files and flags are used when 695314330f12Smrg # linking a shared library. 695414330f12Smrg # 695514330f12Smrg # There doesn't appear to be a way to prevent this compiler from 695614330f12Smrg # explicitly linking system object files so we need to strip them 695714330f12Smrg # from the output so that they don't get included in the library 695814330f12Smrg # dependencies. 6959eca46af7Smrg 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' 696014330f12Smrg ;; 696114330f12Smrg xl* | mpixl* | bgxl*) 696214330f12Smrg # IBM XL 8.0 on PPC, with GNU ld 6963eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6964eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6965eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6966eca46af7Smrg if test yes = "$supports_anon_versioning"; then 696714330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6968eca46af7Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6969eca46af7Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6970eca46af7Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 697114330f12Smrg fi 697214330f12Smrg ;; 697314330f12Smrg *) 697414330f12Smrg case `$CC -V 2>&1 | sed 5q` in 697514330f12Smrg *Sun\ C*) 697614330f12Smrg # Sun C++ 5.9 697714330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6978eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6979eca46af7Smrg _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' 698014330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6981eca46af7Smrg _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' 698214330f12Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 69832378475aSmrg 698414330f12Smrg # Not sure whether something based on 698514330f12Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 698614330f12Smrg # would be better. 698714330f12Smrg output_verbose_link_cmd='func_echo_all' 69882378475aSmrg 698914330f12Smrg # Archives containing C++ object files must be created using 699014330f12Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 699114330f12Smrg # necessary to make sure instantiated templates are included 699214330f12Smrg # in the archive. 699314330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 699414330f12Smrg ;; 699514330f12Smrg esac 699614330f12Smrg ;; 699714330f12Smrg esac 699814330f12Smrg ;; 69992378475aSmrg 700014330f12Smrg lynxos*) 700114330f12Smrg # FIXME: insert proper C++ library support 700214330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 700314330f12Smrg ;; 70042378475aSmrg 700514330f12Smrg m88k*) 700614330f12Smrg # FIXME: insert proper C++ library support 700714330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 700814330f12Smrg ;; 70092378475aSmrg 701014330f12Smrg mvs*) 701114330f12Smrg case $cc_basename in 701214330f12Smrg cxx*) 701314330f12Smrg # FIXME: insert proper C++ library support 701414330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 701514330f12Smrg ;; 701614330f12Smrg *) 701714330f12Smrg # FIXME: insert proper C++ library support 701814330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 701914330f12Smrg ;; 702014330f12Smrg esac 702114330f12Smrg ;; 70222378475aSmrg 702314330f12Smrg netbsd*) 702414330f12Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 702514330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 702614330f12Smrg wlarc= 702714330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 702814330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 702914330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 703014330f12Smrg fi 703114330f12Smrg # Workaround some broken pre-1.5 toolchains 703214330f12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 703314330f12Smrg ;; 70342378475aSmrg 703514330f12Smrg *nto* | *qnx*) 703614330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 703714330f12Smrg ;; 70382378475aSmrg 7039eca46af7Smrg openbsd* | bitrig*) 704014330f12Smrg if test -f /usr/libexec/ld.so; then 704114330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 704214330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 704314330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 704414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7045eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7046eca46af7Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7047eca46af7Smrg _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' 7048eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7049eca46af7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 705014330f12Smrg fi 705114330f12Smrg output_verbose_link_cmd=func_echo_all 705214330f12Smrg else 705314330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 705414330f12Smrg fi 705514330f12Smrg ;; 70562378475aSmrg 705714330f12Smrg osf3* | osf4* | osf5*) 705814330f12Smrg case $cc_basename in 705914330f12Smrg KCC*) 706014330f12Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 70612378475aSmrg 706214330f12Smrg # KCC will only create a shared library if the output file 706314330f12Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 706414330f12Smrg # to its proper name (with version) after linking. 7065eca46af7Smrg _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' 70662378475aSmrg 7067eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 706814330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 70692378475aSmrg 707014330f12Smrg # Archives containing C++ object files must be created using 707114330f12Smrg # the KAI C++ compiler. 707214330f12Smrg case $host in 707314330f12Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 707414330f12Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 707514330f12Smrg esac 707614330f12Smrg ;; 707714330f12Smrg RCC*) 707814330f12Smrg # Rational C++ 2.4.1 707914330f12Smrg # FIXME: insert proper C++ library support 708014330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 708114330f12Smrg ;; 708214330f12Smrg cxx*) 708314330f12Smrg case $host in 708414330f12Smrg osf3*) 7085eca46af7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7086eca46af7Smrg _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' 7087eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 708814330f12Smrg ;; 708914330f12Smrg *) 709014330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7091eca46af7Smrg _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' 709214330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7093eca46af7Smrg echo "-hidden">> $lib.exp~ 7094eca46af7Smrg $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~ 7095eca46af7Smrg $RM $lib.exp' 709614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 709714330f12Smrg ;; 709814330f12Smrg esac 70992378475aSmrg 710014330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71012378475aSmrg 710214330f12Smrg # Commands to make compiler produce verbose output that lists 710314330f12Smrg # what "hidden" libraries, object files and flags are used when 710414330f12Smrg # linking a shared library. 710514330f12Smrg # 710614330f12Smrg # There doesn't appear to be a way to prevent this compiler from 710714330f12Smrg # explicitly linking system object files so we need to strip them 710814330f12Smrg # from the output so that they don't get included in the library 710914330f12Smrg # dependencies. 7110eca46af7Smrg 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"' 711114330f12Smrg ;; 711214330f12Smrg *) 7113eca46af7Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7114eca46af7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 711514330f12Smrg case $host in 711614330f12Smrg osf3*) 7117eca46af7Smrg _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' 711814330f12Smrg ;; 711914330f12Smrg *) 7120eca46af7Smrg _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' 712114330f12Smrg ;; 712214330f12Smrg esac 71232378475aSmrg 7124eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 712514330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71262378475aSmrg 712714330f12Smrg # Commands to make compiler produce verbose output that lists 712814330f12Smrg # what "hidden" libraries, object files and flags are used when 712914330f12Smrg # linking a shared library. 713014330f12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 71312378475aSmrg 713214330f12Smrg else 713314330f12Smrg # FIXME: insert proper C++ library support 713414330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 713514330f12Smrg fi 713614330f12Smrg ;; 713714330f12Smrg esac 713814330f12Smrg ;; 71392378475aSmrg 714014330f12Smrg psos*) 714114330f12Smrg # FIXME: insert proper C++ library support 714214330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 714314330f12Smrg ;; 71442378475aSmrg 714514330f12Smrg sunos4*) 714614330f12Smrg case $cc_basename in 714714330f12Smrg CC*) 714814330f12Smrg # Sun C++ 4.x 714914330f12Smrg # FIXME: insert proper C++ library support 715014330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 715114330f12Smrg ;; 715214330f12Smrg lcc*) 715314330f12Smrg # Lucid 715414330f12Smrg # FIXME: insert proper C++ library support 715514330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 715614330f12Smrg ;; 715714330f12Smrg *) 715814330f12Smrg # FIXME: insert proper C++ library support 715914330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 716014330f12Smrg ;; 716114330f12Smrg esac 716214330f12Smrg ;; 71632378475aSmrg 716414330f12Smrg solaris*) 716514330f12Smrg case $cc_basename in 716614330f12Smrg CC* | sunCC*) 716714330f12Smrg # Sun C++ 4.2, 5.x and Centerline C++ 716814330f12Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 716914330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7170eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 717114330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7172eca46af7Smrg $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' 71732378475aSmrg 717414330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 717514330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 717614330f12Smrg case $host_os in 717714330f12Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 717814330f12Smrg *) 717914330f12Smrg # The compiler driver will combine and reorder linker options, 7180eca46af7Smrg # but understands '-z linker_flag'. 718114330f12Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 718214330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 718314330f12Smrg ;; 718414330f12Smrg esac 718514330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 71862378475aSmrg 718714330f12Smrg output_verbose_link_cmd='func_echo_all' 71882378475aSmrg 718914330f12Smrg # Archives containing C++ object files must be created using 719014330f12Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 719114330f12Smrg # necessary to make sure instantiated templates are included 719214330f12Smrg # in the archive. 719314330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 719414330f12Smrg ;; 719514330f12Smrg gcx*) 719614330f12Smrg # Green Hills C++ Compiler 7197eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 71982378475aSmrg 719914330f12Smrg # The C++ compiler must be used to create the archive. 720014330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 720114330f12Smrg ;; 720214330f12Smrg *) 720314330f12Smrg # GNU C++ compiler with Solaris linker 7204eca46af7Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7205eca46af7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 720614330f12Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7207eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 720814330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7209eca46af7Smrg $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' 72102378475aSmrg 721114330f12Smrg # Commands to make compiler produce verbose output that lists 721214330f12Smrg # what "hidden" libraries, object files and flags are used when 721314330f12Smrg # linking a shared library. 721414330f12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 721514330f12Smrg else 7216eca46af7Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 721714330f12Smrg # platform. 7218eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 721914330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7220eca46af7Smrg $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' 72212378475aSmrg 722214330f12Smrg # Commands to make compiler produce verbose output that lists 722314330f12Smrg # what "hidden" libraries, object files and flags are used when 722414330f12Smrg # linking a shared library. 722514330f12Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 722614330f12Smrg fi 72272378475aSmrg 7228eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 722914330f12Smrg case $host_os in 723014330f12Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 723114330f12Smrg *) 7232eca46af7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 723314330f12Smrg ;; 723414330f12Smrg esac 723514330f12Smrg fi 723614330f12Smrg ;; 723714330f12Smrg esac 723814330f12Smrg ;; 72392378475aSmrg 724014330f12Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7241eca46af7Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 724214330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 724314330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 724414330f12Smrg runpath_var='LD_RUN_PATH' 72452378475aSmrg 724614330f12Smrg case $cc_basename in 724714330f12Smrg CC*) 7248eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7249eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 725014330f12Smrg ;; 725114330f12Smrg *) 7252eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7253eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 725414330f12Smrg ;; 725514330f12Smrg esac 725614330f12Smrg ;; 72572378475aSmrg 725814330f12Smrg sysv5* | sco3.2v5* | sco5v6*) 7259eca46af7Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 726014330f12Smrg # link with -lc, and that would cause any symbols used from libc to 726114330f12Smrg # always be unresolved, which means just about no library would 726214330f12Smrg # ever link correctly. If we're not using GNU ld we use -z text 726314330f12Smrg # though, which does catch some bad symbols but isn't as heavy-handed 726414330f12Smrg # as -z defs. 7265eca46af7Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7266eca46af7Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 726714330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 726814330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7269eca46af7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 727014330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 727114330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7272eca46af7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 727314330f12Smrg runpath_var='LD_RUN_PATH' 727495b296d0Smrg 727514330f12Smrg case $cc_basename in 727614330f12Smrg CC*) 7277eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7278eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 727914330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7280eca46af7Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 728114330f12Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7282eca46af7Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 728314330f12Smrg ;; 728414330f12Smrg *) 7285eca46af7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7286eca46af7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 728714330f12Smrg ;; 728814330f12Smrg esac 728914330f12Smrg ;; 729095b296d0Smrg 729114330f12Smrg tandem*) 729214330f12Smrg case $cc_basename in 729314330f12Smrg NCC*) 729414330f12Smrg # NonStop-UX NCC 3.20 729514330f12Smrg # FIXME: insert proper C++ library support 729614330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 729714330f12Smrg ;; 729814330f12Smrg *) 729914330f12Smrg # FIXME: insert proper C++ library support 730014330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 730114330f12Smrg ;; 730214330f12Smrg esac 730314330f12Smrg ;; 730495b296d0Smrg 730514330f12Smrg vxworks*) 730614330f12Smrg # FIXME: insert proper C++ library support 730714330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 730814330f12Smrg ;; 730995b296d0Smrg 731014330f12Smrg *) 731114330f12Smrg # FIXME: insert proper C++ library support 731214330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 731314330f12Smrg ;; 731414330f12Smrg esac 731595b296d0Smrg 731614330f12Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7317eca46af7Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 731895b296d0Smrg 7319eca46af7Smrg _LT_TAGVAR(GCC, $1)=$GXX 7320eca46af7Smrg _LT_TAGVAR(LD, $1)=$LD 732195b296d0Smrg 732214330f12Smrg ## CAVEAT EMPTOR: 732314330f12Smrg ## There is no encapsulation within the following macros, do not change 732414330f12Smrg ## the running order or otherwise move them around unless you know exactly 732514330f12Smrg ## what you are doing... 732614330f12Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 732714330f12Smrg _LT_COMPILER_PIC($1) 732814330f12Smrg _LT_COMPILER_C_O($1) 732914330f12Smrg _LT_COMPILER_FILE_LOCKS($1) 733014330f12Smrg _LT_LINKER_SHLIBS($1) 733114330f12Smrg _LT_SYS_DYNAMIC_LINKER($1) 733214330f12Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 733395b296d0Smrg 733414330f12Smrg _LT_CONFIG($1) 733514330f12Smrg fi # test -n "$compiler" 733695b296d0Smrg 733714330f12Smrg CC=$lt_save_CC 733814330f12Smrg CFLAGS=$lt_save_CFLAGS 733914330f12Smrg LDCXX=$LD 734014330f12Smrg LD=$lt_save_LD 734114330f12Smrg GCC=$lt_save_GCC 734214330f12Smrg with_gnu_ld=$lt_save_with_gnu_ld 734314330f12Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 734414330f12Smrg lt_cv_path_LD=$lt_save_path_LD 734514330f12Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 734614330f12Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7347eca46af7Smrgfi # test yes != "$_lt_caught_CXX_error" 734839713583Smrg 734914330f12SmrgAC_LANG_POP 735014330f12Smrg])# _LT_LANG_CXX_CONFIG 735139713583Smrg 73522378475aSmrg 735314330f12Smrg# _LT_FUNC_STRIPNAME_CNF 735414330f12Smrg# ---------------------- 735514330f12Smrg# func_stripname_cnf prefix suffix name 73562378475aSmrg# strip PREFIX and SUFFIX off of NAME. 73572378475aSmrg# PREFIX and SUFFIX must not contain globbing or regex special 73582378475aSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 73592378475aSmrg# dot (in which case that matches only a dot). 736014330f12Smrg# 736114330f12Smrg# This function is identical to the (non-XSI) version of func_stripname, 736214330f12Smrg# except this one can be used by m4 code that may be executed by configure, 736314330f12Smrg# rather than the libtool script. 736414330f12Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 736514330f12SmrgAC_REQUIRE([_LT_DECL_SED]) 736614330f12SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 736714330f12Smrgfunc_stripname_cnf () 73682378475aSmrg{ 7369eca46af7Smrg case @S|@2 in 7370eca46af7Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7371eca46af7Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 737295b296d0Smrg esac 737314330f12Smrg} # func_stripname_cnf 737414330f12Smrg])# _LT_FUNC_STRIPNAME_CNF 737595b296d0Smrg 737614330f12Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 737714330f12Smrg# --------------------------------- 737814330f12Smrg# Figure out "hidden" library dependencies from verbose 737914330f12Smrg# compiler output when linking a shared library. 738014330f12Smrg# Parse the compiler output and extract the necessary 738114330f12Smrg# objects, libraries and library flags. 738214330f12Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 738314330f12Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 738414330f12SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 738514330f12Smrg# Dependencies to place before and after the object being linked: 738614330f12Smrg_LT_TAGVAR(predep_objects, $1)= 738714330f12Smrg_LT_TAGVAR(postdep_objects, $1)= 738814330f12Smrg_LT_TAGVAR(predeps, $1)= 738914330f12Smrg_LT_TAGVAR(postdeps, $1)= 739014330f12Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 739195b296d0Smrg 739214330f12Smrgdnl we can't use the lt_simple_compile_test_code here, 739314330f12Smrgdnl because it contains code intended for an executable, 739414330f12Smrgdnl not a library. It's possible we should let each 739514330f12Smrgdnl tag define a new lt_????_link_test_code variable, 739614330f12Smrgdnl but it's only used here... 739714330f12Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 739814330f12Smrgint a; 739914330f12Smrgvoid foo (void) { a = 0; } 74002378475aSmrg_LT_EOF 740114330f12Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 740214330f12Smrgclass Foo 74032378475aSmrg{ 740414330f12Smrgpublic: 740514330f12Smrg Foo (void) { a = 0; } 740614330f12Smrgprivate: 740714330f12Smrg int a; 740814330f12Smrg}; 74092378475aSmrg_LT_EOF 741014330f12Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 741114330f12Smrg subroutine foo 741214330f12Smrg implicit none 741314330f12Smrg integer*4 a 741414330f12Smrg a=0 741514330f12Smrg return 741614330f12Smrg end 741714330f12Smrg_LT_EOF 741814330f12Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 741914330f12Smrg subroutine foo 742014330f12Smrg implicit none 742114330f12Smrg integer a 742214330f12Smrg a=0 742314330f12Smrg return 742414330f12Smrg end 742514330f12Smrg_LT_EOF 742614330f12Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 742714330f12Smrgpublic class foo { 742814330f12Smrg private int a; 742914330f12Smrg public void bar (void) { 743014330f12Smrg a = 0; 743114330f12Smrg } 743214330f12Smrg}; 74332378475aSmrg_LT_EOF 7434eca46af7Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7435eca46af7Smrgpackage foo 7436eca46af7Smrgfunc foo() { 7437eca46af7Smrg} 7438eca46af7Smrg_LT_EOF 74392378475aSmrg]) 744095b296d0Smrg 744114330f12Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 744214330f12Smrgcase "$CC $CFLAGS " in #( 744314330f12Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 744414330f12Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7445eca46af7Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 744614330f12Smrgesac 744795b296d0Smrg 744814330f12Smrgdnl Parse the compiler output and extract the necessary 744914330f12Smrgdnl objects, libraries and library flags. 745014330f12Smrgif AC_TRY_EVAL(ac_compile); then 745114330f12Smrg # Parse the compiler output and extract the necessary 745214330f12Smrg # objects, libraries and library flags. 745395b296d0Smrg 745414330f12Smrg # Sentinel used to keep track of whether or not we are before 745514330f12Smrg # the conftest object file. 745614330f12Smrg pre_test_object_deps_done=no 745795b296d0Smrg 745814330f12Smrg for p in `eval "$output_verbose_link_cmd"`; do 7459eca46af7Smrg case $prev$p in 74602378475aSmrg 746114330f12Smrg -L* | -R* | -l*) 746214330f12Smrg # Some compilers place space between "-{L,R}" and the path. 746314330f12Smrg # Remove the space. 7464eca46af7Smrg if test x-L = "$p" || 7465eca46af7Smrg test x-R = "$p"; then 746614330f12Smrg prev=$p 746714330f12Smrg continue 746814330f12Smrg fi 74692378475aSmrg 747014330f12Smrg # Expand the sysroot to ease extracting the directories later. 747114330f12Smrg if test -z "$prev"; then 747214330f12Smrg case $p in 747314330f12Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 747414330f12Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 747514330f12Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 747614330f12Smrg esac 747714330f12Smrg fi 747814330f12Smrg case $p in 747914330f12Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 748014330f12Smrg esac 7481eca46af7Smrg if test no = "$pre_test_object_deps_done"; then 7482eca46af7Smrg case $prev in 748314330f12Smrg -L | -R) 748414330f12Smrg # Internal compiler library paths should come after those 748514330f12Smrg # provided the user. The postdeps already come after the 748614330f12Smrg # user supplied libs so there is no need to process them. 748714330f12Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7488eca46af7Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 748914330f12Smrg else 7490eca46af7Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 749114330f12Smrg fi 749214330f12Smrg ;; 749314330f12Smrg # The "-l" case would never come before the object being 749414330f12Smrg # linked, so don't bother handling this case. 749514330f12Smrg esac 749614330f12Smrg else 749714330f12Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7498eca46af7Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 749914330f12Smrg else 7500eca46af7Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 750114330f12Smrg fi 750214330f12Smrg fi 750314330f12Smrg prev= 750414330f12Smrg ;; 75052378475aSmrg 750614330f12Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 750714330f12Smrg *.$objext) 750814330f12Smrg # This assumes that the test object file only shows up 750914330f12Smrg # once in the compiler output. 751014330f12Smrg if test "$p" = "conftest.$objext"; then 751114330f12Smrg pre_test_object_deps_done=yes 751214330f12Smrg continue 751314330f12Smrg fi 75142378475aSmrg 7515eca46af7Smrg if test no = "$pre_test_object_deps_done"; then 751614330f12Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7517eca46af7Smrg _LT_TAGVAR(predep_objects, $1)=$p 751814330f12Smrg else 751914330f12Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 752014330f12Smrg fi 752114330f12Smrg else 752214330f12Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7523eca46af7Smrg _LT_TAGVAR(postdep_objects, $1)=$p 752414330f12Smrg else 752514330f12Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 752614330f12Smrg fi 752714330f12Smrg fi 752814330f12Smrg ;; 75292378475aSmrg 753014330f12Smrg *) ;; # Ignore the rest. 753195b296d0Smrg 753214330f12Smrg esac 753314330f12Smrg done 75342378475aSmrg 753514330f12Smrg # Clean up. 753614330f12Smrg rm -f a.out a.exe 753714330f12Smrgelse 753814330f12Smrg echo "libtool.m4: error: problem compiling $1 test program" 753914330f12Smrgfi 754095b296d0Smrg 754114330f12Smrg$RM -f confest.$objext 754214330f12SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 754395b296d0Smrg 754414330f12Smrg# PORTME: override above test on systems where it is broken 754514330f12Smrgm4_if([$1], [CXX], 754614330f12Smrg[case $host_os in 754714330f12Smrginterix[[3-9]]*) 754814330f12Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 754914330f12Smrg # hack all around it, let's just trust "g++" to DTRT. 755014330f12Smrg _LT_TAGVAR(predep_objects,$1)= 755114330f12Smrg _LT_TAGVAR(postdep_objects,$1)= 755214330f12Smrg _LT_TAGVAR(postdeps,$1)= 755314330f12Smrg ;; 755495b296d0Smrg 755514330f12Smrglinux*) 755614330f12Smrg case `$CC -V 2>&1 | sed 5q` in 755714330f12Smrg *Sun\ C*) 755814330f12Smrg # Sun C++ 5.9 755995b296d0Smrg 756014330f12Smrg # The more standards-conforming stlport4 library is 756114330f12Smrg # incompatible with the Cstd library. Avoid specifying 756214330f12Smrg # it if it's in CXXFLAGS. Ignore libCrun as 756314330f12Smrg # -library=stlport4 depends on it. 756414330f12Smrg case " $CXX $CXXFLAGS " in 756514330f12Smrg *" -library=stlport4 "*) 756614330f12Smrg solaris_use_stlport4=yes 756714330f12Smrg ;; 756814330f12Smrg esac 756995b296d0Smrg 7570eca46af7Smrg if test yes != "$solaris_use_stlport4"; then 757114330f12Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 757214330f12Smrg fi 757314330f12Smrg ;; 757414330f12Smrg esac 757514330f12Smrg ;; 757639713583Smrg 757714330f12Smrgsolaris*) 757814330f12Smrg case $cc_basename in 757914330f12Smrg CC* | sunCC*) 758014330f12Smrg # The more standards-conforming stlport4 library is 758114330f12Smrg # incompatible with the Cstd library. Avoid specifying 758214330f12Smrg # it if it's in CXXFLAGS. Ignore libCrun as 758314330f12Smrg # -library=stlport4 depends on it. 758414330f12Smrg case " $CXX $CXXFLAGS " in 758514330f12Smrg *" -library=stlport4 "*) 758614330f12Smrg solaris_use_stlport4=yes 758714330f12Smrg ;; 758814330f12Smrg esac 758939713583Smrg 759014330f12Smrg # Adding this requires a known-good setup of shared libraries for 759114330f12Smrg # Sun compiler versions before 5.6, else PIC objects from an old 759214330f12Smrg # archive will be linked into the output, leading to subtle bugs. 7593eca46af7Smrg if test yes != "$solaris_use_stlport4"; then 759414330f12Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 759514330f12Smrg fi 759614330f12Smrg ;; 759714330f12Smrg esac 759814330f12Smrg ;; 759914330f12Smrgesac 76002378475aSmrg]) 760139713583Smrg 760214330f12Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 760314330f12Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 760414330f12Smrgesac 760514330f12Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 760614330f12Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7607eca46af7Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 760814330f12Smrgfi 760914330f12Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 761014330f12Smrg [The directories searched by this compiler when creating a shared library]) 761114330f12Smrg_LT_TAGDECL([], [predep_objects], [1], 761214330f12Smrg [Dependencies to place before and after the objects being linked to 761314330f12Smrg create a shared library]) 761414330f12Smrg_LT_TAGDECL([], [postdep_objects], [1]) 761514330f12Smrg_LT_TAGDECL([], [predeps], [1]) 761614330f12Smrg_LT_TAGDECL([], [postdeps], [1]) 761714330f12Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 761814330f12Smrg [The library search path used internally by the compiler when linking 761914330f12Smrg a shared library]) 762014330f12Smrg])# _LT_SYS_HIDDEN_LIBDEPS 762139713583Smrg 762295b296d0Smrg 762314330f12Smrg# _LT_LANG_F77_CONFIG([TAG]) 762414330f12Smrg# -------------------------- 762514330f12Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 762614330f12Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7627eca46af7Smrg# to write the compiler configuration to 'libtool'. 762814330f12Smrgm4_defun([_LT_LANG_F77_CONFIG], 762914330f12Smrg[AC_LANG_PUSH(Fortran 77) 7630eca46af7Smrgif test -z "$F77" || test no = "$F77"; then 763114330f12Smrg _lt_disable_F77=yes 763214330f12Smrgfi 763395b296d0Smrg 763414330f12Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 763514330f12Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 763614330f12Smrg_LT_TAGVAR(always_export_symbols, $1)=no 763714330f12Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 763814330f12Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 763914330f12Smrg_LT_TAGVAR(hardcode_direct, $1)=no 764014330f12Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 764114330f12Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 764214330f12Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 764314330f12Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 764414330f12Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 764514330f12Smrg_LT_TAGVAR(inherit_rpath, $1)=no 764614330f12Smrg_LT_TAGVAR(module_cmds, $1)= 764714330f12Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 764814330f12Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 764914330f12Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 765014330f12Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 765114330f12Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 765214330f12Smrg_LT_TAGVAR(no_undefined_flag, $1)= 765314330f12Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 765414330f12Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 765595b296d0Smrg 765614330f12Smrg# Source file extension for f77 test sources. 765714330f12Smrgac_ext=f 765895b296d0Smrg 765914330f12Smrg# Object file extension for compiled f77 test sources. 766014330f12Smrgobjext=o 766114330f12Smrg_LT_TAGVAR(objext, $1)=$objext 766295b296d0Smrg 766314330f12Smrg# No sense in running all these tests if we already determined that 766414330f12Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 766514330f12Smrg# are currently assumed to apply to all compilers on this platform, 766614330f12Smrg# and will be corrupted by setting them based on a non-working compiler. 7667eca46af7Smrgif test yes != "$_lt_disable_F77"; then 766814330f12Smrg # Code to be used in simple compile tests 766914330f12Smrg lt_simple_compile_test_code="\ 767014330f12Smrg subroutine t 767114330f12Smrg return 767214330f12Smrg end 767314330f12Smrg" 767495b296d0Smrg 767514330f12Smrg # Code to be used in simple link tests 767614330f12Smrg lt_simple_link_test_code="\ 767714330f12Smrg program t 767814330f12Smrg end 767914330f12Smrg" 768095b296d0Smrg 768114330f12Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 768214330f12Smrg _LT_TAG_COMPILER 768395b296d0Smrg 768414330f12Smrg # save warnings/boilerplate of simple test code 768514330f12Smrg _LT_COMPILER_BOILERPLATE 768614330f12Smrg _LT_LINKER_BOILERPLATE 768795b296d0Smrg 768814330f12Smrg # Allow CC to be a program name with arguments. 7689eca46af7Smrg lt_save_CC=$CC 769014330f12Smrg lt_save_GCC=$GCC 769114330f12Smrg lt_save_CFLAGS=$CFLAGS 769214330f12Smrg CC=${F77-"f77"} 769314330f12Smrg CFLAGS=$FFLAGS 769414330f12Smrg compiler=$CC 769514330f12Smrg _LT_TAGVAR(compiler, $1)=$CC 769614330f12Smrg _LT_CC_BASENAME([$compiler]) 769714330f12Smrg GCC=$G77 769814330f12Smrg if test -n "$compiler"; then 769914330f12Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 770014330f12Smrg AC_MSG_RESULT([$can_build_shared]) 77012378475aSmrg 770214330f12Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7703eca46af7Smrg test no = "$can_build_shared" && enable_shared=no 770414330f12Smrg 770514330f12Smrg # On AIX, shared libraries and static libraries use the same namespace, and 770614330f12Smrg # are all built from PIC. 770714330f12Smrg case $host_os in 770814330f12Smrg aix3*) 7709eca46af7Smrg test yes = "$enable_shared" && enable_static=no 771014330f12Smrg if test -n "$RANLIB"; then 771114330f12Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 771214330f12Smrg postinstall_cmds='$RANLIB $lib' 771314330f12Smrg fi 771414330f12Smrg ;; 771514330f12Smrg aix[[4-9]]*) 7716eca46af7Smrg if test ia64 != "$host_cpu"; then 7717eca46af7Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7718eca46af7Smrg yes,aix,yes) ;; # shared object as lib.so file only 7719eca46af7Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7720eca46af7Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7721eca46af7Smrg esac 77222378475aSmrg fi 772314330f12Smrg ;; 772414330f12Smrg esac 772514330f12Smrg AC_MSG_RESULT([$enable_shared]) 772695b296d0Smrg 772714330f12Smrg AC_MSG_CHECKING([whether to build static libraries]) 772814330f12Smrg # Make sure either enable_shared or enable_static is yes. 7729eca46af7Smrg test yes = "$enable_shared" || enable_static=yes 773014330f12Smrg AC_MSG_RESULT([$enable_static]) 773195b296d0Smrg 7732eca46af7Smrg _LT_TAGVAR(GCC, $1)=$G77 7733eca46af7Smrg _LT_TAGVAR(LD, $1)=$LD 773495b296d0Smrg 773514330f12Smrg ## CAVEAT EMPTOR: 773614330f12Smrg ## There is no encapsulation within the following macros, do not change 773714330f12Smrg ## the running order or otherwise move them around unless you know exactly 773814330f12Smrg ## what you are doing... 773914330f12Smrg _LT_COMPILER_PIC($1) 774014330f12Smrg _LT_COMPILER_C_O($1) 774114330f12Smrg _LT_COMPILER_FILE_LOCKS($1) 774214330f12Smrg _LT_LINKER_SHLIBS($1) 774314330f12Smrg _LT_SYS_DYNAMIC_LINKER($1) 774414330f12Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 774514330f12Smrg 774614330f12Smrg _LT_CONFIG($1) 774714330f12Smrg fi # test -n "$compiler" 774814330f12Smrg 774914330f12Smrg GCC=$lt_save_GCC 7750eca46af7Smrg CC=$lt_save_CC 7751eca46af7Smrg CFLAGS=$lt_save_CFLAGS 7752eca46af7Smrgfi # test yes != "$_lt_disable_F77" 775314330f12Smrg 775414330f12SmrgAC_LANG_POP 775514330f12Smrg])# _LT_LANG_F77_CONFIG 77562378475aSmrg 775795b296d0Smrg 775814330f12Smrg# _LT_LANG_FC_CONFIG([TAG]) 775914330f12Smrg# ------------------------- 776014330f12Smrg# Ensure that the configuration variables for a Fortran compiler are 776114330f12Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7762eca46af7Smrg# to write the compiler configuration to 'libtool'. 776314330f12Smrgm4_defun([_LT_LANG_FC_CONFIG], 776414330f12Smrg[AC_LANG_PUSH(Fortran) 776595b296d0Smrg 7766eca46af7Smrgif test -z "$FC" || test no = "$FC"; then 776714330f12Smrg _lt_disable_FC=yes 776814330f12Smrgfi 776995b296d0Smrg 777014330f12Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 777114330f12Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 777214330f12Smrg_LT_TAGVAR(always_export_symbols, $1)=no 777314330f12Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 777414330f12Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 777514330f12Smrg_LT_TAGVAR(hardcode_direct, $1)=no 777614330f12Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 777714330f12Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 777814330f12Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 777914330f12Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 778014330f12Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 778114330f12Smrg_LT_TAGVAR(inherit_rpath, $1)=no 778214330f12Smrg_LT_TAGVAR(module_cmds, $1)= 778314330f12Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 778414330f12Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 778514330f12Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 778614330f12Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 778714330f12Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 778814330f12Smrg_LT_TAGVAR(no_undefined_flag, $1)= 778914330f12Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 779014330f12Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 779195b296d0Smrg 779214330f12Smrg# Source file extension for fc test sources. 779314330f12Smrgac_ext=${ac_fc_srcext-f} 779495b296d0Smrg 779514330f12Smrg# Object file extension for compiled fc test sources. 779614330f12Smrgobjext=o 779714330f12Smrg_LT_TAGVAR(objext, $1)=$objext 779895b296d0Smrg 779914330f12Smrg# No sense in running all these tests if we already determined that 780014330f12Smrg# the FC compiler isn't working. Some variables (like enable_shared) 780114330f12Smrg# are currently assumed to apply to all compilers on this platform, 780214330f12Smrg# and will be corrupted by setting them based on a non-working compiler. 7803eca46af7Smrgif test yes != "$_lt_disable_FC"; then 780414330f12Smrg # Code to be used in simple compile tests 780514330f12Smrg lt_simple_compile_test_code="\ 780614330f12Smrg subroutine t 780714330f12Smrg return 780814330f12Smrg end 780914330f12Smrg" 781095b296d0Smrg 781114330f12Smrg # Code to be used in simple link tests 781214330f12Smrg lt_simple_link_test_code="\ 781314330f12Smrg program t 781414330f12Smrg end 781514330f12Smrg" 781695b296d0Smrg 781714330f12Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 781814330f12Smrg _LT_TAG_COMPILER 781995b296d0Smrg 782014330f12Smrg # save warnings/boilerplate of simple test code 782114330f12Smrg _LT_COMPILER_BOILERPLATE 782214330f12Smrg _LT_LINKER_BOILERPLATE 782395b296d0Smrg 782414330f12Smrg # Allow CC to be a program name with arguments. 7825eca46af7Smrg lt_save_CC=$CC 782614330f12Smrg lt_save_GCC=$GCC 782714330f12Smrg lt_save_CFLAGS=$CFLAGS 782814330f12Smrg CC=${FC-"f95"} 782914330f12Smrg CFLAGS=$FCFLAGS 783014330f12Smrg compiler=$CC 783114330f12Smrg GCC=$ac_cv_fc_compiler_gnu 783295b296d0Smrg 783314330f12Smrg _LT_TAGVAR(compiler, $1)=$CC 783414330f12Smrg _LT_CC_BASENAME([$compiler]) 783595b296d0Smrg 783614330f12Smrg if test -n "$compiler"; then 783714330f12Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 783814330f12Smrg AC_MSG_RESULT([$can_build_shared]) 783995b296d0Smrg 784014330f12Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7841eca46af7Smrg test no = "$can_build_shared" && enable_shared=no 784239713583Smrg 784314330f12Smrg # On AIX, shared libraries and static libraries use the same namespace, and 784414330f12Smrg # are all built from PIC. 784514330f12Smrg case $host_os in 784614330f12Smrg aix3*) 7847eca46af7Smrg test yes = "$enable_shared" && enable_static=no 784814330f12Smrg if test -n "$RANLIB"; then 784914330f12Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 785014330f12Smrg postinstall_cmds='$RANLIB $lib' 785114330f12Smrg fi 785214330f12Smrg ;; 785314330f12Smrg aix[[4-9]]*) 7854eca46af7Smrg if test ia64 != "$host_cpu"; then 7855eca46af7Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7856eca46af7Smrg yes,aix,yes) ;; # shared object as lib.so file only 7857eca46af7Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7858eca46af7Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7859eca46af7Smrg esac 7860ff89ac2bSmrg fi 786114330f12Smrg ;; 786214330f12Smrg esac 786314330f12Smrg AC_MSG_RESULT([$enable_shared]) 786495b296d0Smrg 786514330f12Smrg AC_MSG_CHECKING([whether to build static libraries]) 786614330f12Smrg # Make sure either enable_shared or enable_static is yes. 7867eca46af7Smrg test yes = "$enable_shared" || enable_static=yes 786814330f12Smrg AC_MSG_RESULT([$enable_static]) 786995b296d0Smrg 7870eca46af7Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7871eca46af7Smrg _LT_TAGVAR(LD, $1)=$LD 787295b296d0Smrg 787314330f12Smrg ## CAVEAT EMPTOR: 787414330f12Smrg ## There is no encapsulation within the following macros, do not change 787514330f12Smrg ## the running order or otherwise move them around unless you know exactly 787614330f12Smrg ## what you are doing... 787714330f12Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 787814330f12Smrg _LT_COMPILER_PIC($1) 787914330f12Smrg _LT_COMPILER_C_O($1) 788014330f12Smrg _LT_COMPILER_FILE_LOCKS($1) 788114330f12Smrg _LT_LINKER_SHLIBS($1) 788214330f12Smrg _LT_SYS_DYNAMIC_LINKER($1) 788314330f12Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 788495b296d0Smrg 788514330f12Smrg _LT_CONFIG($1) 788614330f12Smrg fi # test -n "$compiler" 788795b296d0Smrg 788814330f12Smrg GCC=$lt_save_GCC 788914330f12Smrg CC=$lt_save_CC 789014330f12Smrg CFLAGS=$lt_save_CFLAGS 7891eca46af7Smrgfi # test yes != "$_lt_disable_FC" 789295b296d0Smrg 789314330f12SmrgAC_LANG_POP 789414330f12Smrg])# _LT_LANG_FC_CONFIG 789595b296d0Smrg 789695b296d0Smrg 789714330f12Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 789814330f12Smrg# -------------------------- 789914330f12Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 790014330f12Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7901eca46af7Smrg# to write the compiler configuration to 'libtool'. 790214330f12Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 790314330f12Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 790414330f12SmrgAC_LANG_SAVE 790595b296d0Smrg 790614330f12Smrg# Source file extension for Java test sources. 790714330f12Smrgac_ext=java 790839713583Smrg 790914330f12Smrg# Object file extension for compiled Java test sources. 791014330f12Smrgobjext=o 791114330f12Smrg_LT_TAGVAR(objext, $1)=$objext 79122378475aSmrg 791314330f12Smrg# Code to be used in simple compile tests 791414330f12Smrglt_simple_compile_test_code="class foo {}" 791595b296d0Smrg 791614330f12Smrg# Code to be used in simple link tests 791714330f12Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 791814330f12Smrg 791914330f12Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 792014330f12Smrg_LT_TAG_COMPILER 79212378475aSmrg 792214330f12Smrg# save warnings/boilerplate of simple test code 792314330f12Smrg_LT_COMPILER_BOILERPLATE 792414330f12Smrg_LT_LINKER_BOILERPLATE 79252378475aSmrg 792614330f12Smrg# Allow CC to be a program name with arguments. 792714330f12Smrglt_save_CC=$CC 792814330f12Smrglt_save_CFLAGS=$CFLAGS 792914330f12Smrglt_save_GCC=$GCC 793014330f12SmrgGCC=yes 793114330f12SmrgCC=${GCJ-"gcj"} 793214330f12SmrgCFLAGS=$GCJFLAGS 793314330f12Smrgcompiler=$CC 793414330f12Smrg_LT_TAGVAR(compiler, $1)=$CC 7935eca46af7Smrg_LT_TAGVAR(LD, $1)=$LD 793614330f12Smrg_LT_CC_BASENAME([$compiler]) 79372378475aSmrg 793814330f12Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 793914330f12Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 79402378475aSmrg 794114330f12Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 794214330f12Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 794314330f12Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 794495b296d0Smrg 794514330f12Smrgif test -n "$compiler"; then 794614330f12Smrg _LT_COMPILER_NO_RTTI($1) 794714330f12Smrg _LT_COMPILER_PIC($1) 794814330f12Smrg _LT_COMPILER_C_O($1) 794914330f12Smrg _LT_COMPILER_FILE_LOCKS($1) 795014330f12Smrg _LT_LINKER_SHLIBS($1) 795114330f12Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 795295b296d0Smrg 795314330f12Smrg _LT_CONFIG($1) 795414330f12Smrgfi 795595b296d0Smrg 795614330f12SmrgAC_LANG_RESTORE 795795b296d0Smrg 795814330f12SmrgGCC=$lt_save_GCC 795914330f12SmrgCC=$lt_save_CC 796014330f12SmrgCFLAGS=$lt_save_CFLAGS 796114330f12Smrg])# _LT_LANG_GCJ_CONFIG 79622378475aSmrg 79632378475aSmrg 7964eca46af7Smrg# _LT_LANG_GO_CONFIG([TAG]) 7965eca46af7Smrg# -------------------------- 7966eca46af7Smrg# Ensure that the configuration variables for the GNU Go compiler 7967eca46af7Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7968eca46af7Smrg# to write the compiler configuration to 'libtool'. 7969eca46af7Smrgm4_defun([_LT_LANG_GO_CONFIG], 7970eca46af7Smrg[AC_REQUIRE([LT_PROG_GO])dnl 7971eca46af7SmrgAC_LANG_SAVE 7972eca46af7Smrg 7973eca46af7Smrg# Source file extension for Go test sources. 7974eca46af7Smrgac_ext=go 7975eca46af7Smrg 7976eca46af7Smrg# Object file extension for compiled Go test sources. 7977eca46af7Smrgobjext=o 7978eca46af7Smrg_LT_TAGVAR(objext, $1)=$objext 7979eca46af7Smrg 7980eca46af7Smrg# Code to be used in simple compile tests 7981eca46af7Smrglt_simple_compile_test_code="package main; func main() { }" 7982eca46af7Smrg 7983eca46af7Smrg# Code to be used in simple link tests 7984eca46af7Smrglt_simple_link_test_code='package main; func main() { }' 7985eca46af7Smrg 7986eca46af7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7987eca46af7Smrg_LT_TAG_COMPILER 7988eca46af7Smrg 7989eca46af7Smrg# save warnings/boilerplate of simple test code 7990eca46af7Smrg_LT_COMPILER_BOILERPLATE 7991eca46af7Smrg_LT_LINKER_BOILERPLATE 7992eca46af7Smrg 7993eca46af7Smrg# Allow CC to be a program name with arguments. 7994eca46af7Smrglt_save_CC=$CC 7995eca46af7Smrglt_save_CFLAGS=$CFLAGS 7996eca46af7Smrglt_save_GCC=$GCC 7997eca46af7SmrgGCC=yes 7998eca46af7SmrgCC=${GOC-"gccgo"} 7999eca46af7SmrgCFLAGS=$GOFLAGS 8000eca46af7Smrgcompiler=$CC 8001eca46af7Smrg_LT_TAGVAR(compiler, $1)=$CC 8002eca46af7Smrg_LT_TAGVAR(LD, $1)=$LD 8003eca46af7Smrg_LT_CC_BASENAME([$compiler]) 8004eca46af7Smrg 8005eca46af7Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 8006eca46af7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8007eca46af7Smrg 8008eca46af7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8009eca46af7Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8010eca46af7Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8011eca46af7Smrg 8012eca46af7Smrgif test -n "$compiler"; then 8013eca46af7Smrg _LT_COMPILER_NO_RTTI($1) 8014eca46af7Smrg _LT_COMPILER_PIC($1) 8015eca46af7Smrg _LT_COMPILER_C_O($1) 8016eca46af7Smrg _LT_COMPILER_FILE_LOCKS($1) 8017eca46af7Smrg _LT_LINKER_SHLIBS($1) 8018eca46af7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8019eca46af7Smrg 8020eca46af7Smrg _LT_CONFIG($1) 8021eca46af7Smrgfi 8022eca46af7Smrg 8023eca46af7SmrgAC_LANG_RESTORE 8024eca46af7Smrg 8025eca46af7SmrgGCC=$lt_save_GCC 8026eca46af7SmrgCC=$lt_save_CC 8027eca46af7SmrgCFLAGS=$lt_save_CFLAGS 8028eca46af7Smrg])# _LT_LANG_GO_CONFIG 8029eca46af7Smrg 8030eca46af7Smrg 803114330f12Smrg# _LT_LANG_RC_CONFIG([TAG]) 803214330f12Smrg# ------------------------- 803314330f12Smrg# Ensure that the configuration variables for the Windows resource compiler 803414330f12Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8035eca46af7Smrg# to write the compiler configuration to 'libtool'. 803614330f12Smrgm4_defun([_LT_LANG_RC_CONFIG], 803714330f12Smrg[AC_REQUIRE([LT_PROG_RC])dnl 803814330f12SmrgAC_LANG_SAVE 80392378475aSmrg 804014330f12Smrg# Source file extension for RC test sources. 804114330f12Smrgac_ext=rc 80422378475aSmrg 804314330f12Smrg# Object file extension for compiled RC test sources. 804414330f12Smrgobjext=o 804514330f12Smrg_LT_TAGVAR(objext, $1)=$objext 80462378475aSmrg 804714330f12Smrg# Code to be used in simple compile tests 804814330f12Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 80492378475aSmrg 805014330f12Smrg# Code to be used in simple link tests 8051eca46af7Smrglt_simple_link_test_code=$lt_simple_compile_test_code 80522378475aSmrg 805314330f12Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 805414330f12Smrg_LT_TAG_COMPILER 80552378475aSmrg 805614330f12Smrg# save warnings/boilerplate of simple test code 805714330f12Smrg_LT_COMPILER_BOILERPLATE 805814330f12Smrg_LT_LINKER_BOILERPLATE 80592378475aSmrg 806014330f12Smrg# Allow CC to be a program name with arguments. 8061eca46af7Smrglt_save_CC=$CC 806214330f12Smrglt_save_CFLAGS=$CFLAGS 806314330f12Smrglt_save_GCC=$GCC 806414330f12SmrgGCC= 806514330f12SmrgCC=${RC-"windres"} 806614330f12SmrgCFLAGS= 806714330f12Smrgcompiler=$CC 806814330f12Smrg_LT_TAGVAR(compiler, $1)=$CC 806914330f12Smrg_LT_CC_BASENAME([$compiler]) 807014330f12Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 80712378475aSmrg 807214330f12Smrgif test -n "$compiler"; then 807314330f12Smrg : 807414330f12Smrg _LT_CONFIG($1) 807514330f12Smrgfi 80762378475aSmrg 807714330f12SmrgGCC=$lt_save_GCC 807814330f12SmrgAC_LANG_RESTORE 807914330f12SmrgCC=$lt_save_CC 808014330f12SmrgCFLAGS=$lt_save_CFLAGS 808114330f12Smrg])# _LT_LANG_RC_CONFIG 808295b296d0Smrg 808395b296d0Smrg 808414330f12Smrg# LT_PROG_GCJ 808514330f12Smrg# ----------- 808614330f12SmrgAC_DEFUN([LT_PROG_GCJ], 808714330f12Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 808814330f12Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 808914330f12Smrg [AC_CHECK_TOOL(GCJ, gcj,) 8090eca46af7Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 809114330f12Smrg AC_SUBST(GCJFLAGS)])])[]dnl 809214330f12Smrg]) 809395b296d0Smrg 809414330f12Smrg# Old name: 809514330f12SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 809614330f12Smrgdnl aclocal-1.4 backwards compatibility: 809714330f12Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 809895b296d0Smrg 80992378475aSmrg 8100eca46af7Smrg# LT_PROG_GO 8101eca46af7Smrg# ---------- 8102eca46af7SmrgAC_DEFUN([LT_PROG_GO], 8103eca46af7Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8104eca46af7Smrg]) 8105eca46af7Smrg 8106eca46af7Smrg 810714330f12Smrg# LT_PROG_RC 810814330f12Smrg# ---------- 810914330f12SmrgAC_DEFUN([LT_PROG_RC], 811014330f12Smrg[AC_CHECK_TOOL(RC, windres,) 811114330f12Smrg]) 811295b296d0Smrg 811314330f12Smrg# Old name: 811414330f12SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 811514330f12Smrgdnl aclocal-1.4 backwards compatibility: 811614330f12Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 81172378475aSmrg 81182378475aSmrg 811914330f12Smrg# _LT_DECL_EGREP 812014330f12Smrg# -------------- 812114330f12Smrg# If we don't have a new enough Autoconf to choose the best grep 812214330f12Smrg# available, choose the one first in the user's PATH. 812314330f12Smrgm4_defun([_LT_DECL_EGREP], 812414330f12Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 812514330f12SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 812614330f12Smrgtest -z "$GREP" && GREP=grep 812714330f12Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 812814330f12Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 812914330f12Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 813014330f12Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 813114330f12SmrgAC_SUBST([GREP]) 813295b296d0Smrg]) 813395b296d0Smrg 8134ff89ac2bSmrg 813514330f12Smrg# _LT_DECL_OBJDUMP 813614330f12Smrg# -------------- 813714330f12Smrg# If we don't have a new enough Autoconf to choose the best objdump 813814330f12Smrg# available, choose the one first in the user's PATH. 813914330f12Smrgm4_defun([_LT_DECL_OBJDUMP], 814014330f12Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 814114330f12Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 814214330f12Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 814314330f12SmrgAC_SUBST([OBJDUMP]) 814414330f12Smrg]) 814514330f12Smrg 814614330f12Smrg# _LT_DECL_DLLTOOL 814714330f12Smrg# ---------------- 814814330f12Smrg# Ensure DLLTOOL variable is set. 814914330f12Smrgm4_defun([_LT_DECL_DLLTOOL], 815014330f12Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 815114330f12Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 815214330f12Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 815314330f12SmrgAC_SUBST([DLLTOOL]) 815414330f12Smrg]) 8155ff89ac2bSmrg 815614330f12Smrg# _LT_DECL_SED 815714330f12Smrg# ------------ 815814330f12Smrg# Check for a fully-functional sed program, that truncates 815914330f12Smrg# as few characters as possible. Prefer GNU sed if found. 816014330f12Smrgm4_defun([_LT_DECL_SED], 816114330f12Smrg[AC_PROG_SED 816214330f12Smrgtest -z "$SED" && SED=sed 816314330f12SmrgXsed="$SED -e 1s/^X//" 816414330f12Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 816514330f12Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 816614330f12Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 816714330f12Smrg])# _LT_DECL_SED 8168ff89ac2bSmrg 816914330f12Smrgm4_ifndef([AC_PROG_SED], [ 817014330f12Smrg# NOTE: This macro has been submitted for inclusion into # 817114330f12Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 817214330f12Smrg# a released version of Autoconf we should remove this # 817314330f12Smrg# macro and use it instead. # 8174ff89ac2bSmrg 817514330f12Smrgm4_defun([AC_PROG_SED], 817614330f12Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 817714330f12SmrgAC_CACHE_VAL(lt_cv_path_SED, 817814330f12Smrg[# Loop through the user's path and test for sed and gsed. 817914330f12Smrg# Then use that list of sed's as ones to test for truncation. 818014330f12Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 818114330f12Smrgfor as_dir in $PATH 818214330f12Smrgdo 818314330f12Smrg IFS=$as_save_IFS 818414330f12Smrg test -z "$as_dir" && as_dir=. 818514330f12Smrg for lt_ac_prog in sed gsed; do 818614330f12Smrg for ac_exec_ext in '' $ac_executable_extensions; do 818714330f12Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 818814330f12Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 818914330f12Smrg fi 819014330f12Smrg done 819114330f12Smrg done 819214330f12Smrgdone 819314330f12SmrgIFS=$as_save_IFS 819414330f12Smrglt_ac_max=0 819514330f12Smrglt_ac_count=0 819614330f12Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 819714330f12Smrg# along with /bin/sed that truncates output. 819814330f12Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8199eca46af7Smrg test ! -f "$lt_ac_sed" && continue 820014330f12Smrg cat /dev/null > conftest.in 820114330f12Smrg lt_ac_count=0 820214330f12Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 820314330f12Smrg # Check for GNU sed and select it if it is found. 820414330f12Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 820514330f12Smrg lt_cv_path_SED=$lt_ac_sed 820614330f12Smrg break 820714330f12Smrg fi 820814330f12Smrg while true; do 820914330f12Smrg cat conftest.in conftest.in >conftest.tmp 821014330f12Smrg mv conftest.tmp conftest.in 821114330f12Smrg cp conftest.in conftest.nl 821214330f12Smrg echo >>conftest.nl 821314330f12Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 821414330f12Smrg cmp -s conftest.out conftest.nl || break 821514330f12Smrg # 10000 chars as input seems more than enough 8216eca46af7Smrg test 10 -lt "$lt_ac_count" && break 821714330f12Smrg lt_ac_count=`expr $lt_ac_count + 1` 8218eca46af7Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 821914330f12Smrg lt_ac_max=$lt_ac_count 822014330f12Smrg lt_cv_path_SED=$lt_ac_sed 822114330f12Smrg fi 822214330f12Smrg done 822314330f12Smrgdone 822495b296d0Smrg]) 822514330f12SmrgSED=$lt_cv_path_SED 822614330f12SmrgAC_SUBST([SED]) 822714330f12SmrgAC_MSG_RESULT([$SED]) 822814330f12Smrg])#AC_PROG_SED 822914330f12Smrg])#m4_ifndef 823039713583Smrg 823114330f12Smrg# Old name: 823214330f12SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 823314330f12Smrgdnl aclocal-1.4 backwards compatibility: 823414330f12Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 82352378475aSmrg 82362378475aSmrg 823714330f12Smrg# _LT_CHECK_SHELL_FEATURES 823814330f12Smrg# ------------------------ 823914330f12Smrg# Find out whether the shell is Bourne or XSI compatible, 824014330f12Smrg# or has some other useful features. 824114330f12Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8242eca46af7Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 824314330f12Smrg lt_unset=unset 824414330f12Smrgelse 824514330f12Smrg lt_unset=false 824614330f12Smrgfi 824714330f12Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 82482378475aSmrg 824914330f12Smrg# test EBCDIC or ASCII 825014330f12Smrgcase `echo X|tr X '\101'` in 825114330f12Smrg A) # ASCII based system 825214330f12Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 825314330f12Smrg lt_SP2NL='tr \040 \012' 825414330f12Smrg lt_NL2SP='tr \015\012 \040\040' 825514330f12Smrg ;; 825614330f12Smrg *) # EBCDIC based system 825714330f12Smrg lt_SP2NL='tr \100 \n' 825814330f12Smrg lt_NL2SP='tr \r\n \100\100' 825914330f12Smrg ;; 8260eca46af7Smrgesac 8261eca46af7Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8262eca46af7Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8263eca46af7Smrg])# _LT_CHECK_SHELL_FEATURES 826495b296d0Smrg 826595b296d0Smrg 826614330f12Smrg# _LT_PATH_CONVERSION_FUNCTIONS 826714330f12Smrg# ----------------------------- 8268eca46af7Smrg# Determine what file name conversion functions should be used by 826914330f12Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 827014330f12Smrg# for certain cross-compile configurations and native mingw. 827114330f12Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 827214330f12Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 827314330f12SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 827414330f12SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 827514330f12SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 827614330f12Smrg[case $host in 827714330f12Smrg *-*-mingw* ) 827814330f12Smrg case $build in 827914330f12Smrg *-*-mingw* ) # actually msys 828014330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 828114330f12Smrg ;; 828214330f12Smrg *-*-cygwin* ) 828314330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 828414330f12Smrg ;; 828514330f12Smrg * ) # otherwise, assume *nix 828614330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 828714330f12Smrg ;; 828814330f12Smrg esac 828914330f12Smrg ;; 829014330f12Smrg *-*-cygwin* ) 829114330f12Smrg case $build in 829214330f12Smrg *-*-mingw* ) # actually msys 829314330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 829414330f12Smrg ;; 829514330f12Smrg *-*-cygwin* ) 829614330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 829714330f12Smrg ;; 829814330f12Smrg * ) # otherwise, assume *nix 829914330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 830014330f12Smrg ;; 830114330f12Smrg esac 830214330f12Smrg ;; 830314330f12Smrg * ) # unhandled hosts (and "normal" native builds) 830414330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 830514330f12Smrg ;; 830614330f12Smrgesac 830714330f12Smrg]) 830814330f12Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 830914330f12SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 831014330f12Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 831114330f12Smrg [0], [convert $build file names to $host format])dnl 831214330f12Smrg 831314330f12SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 831414330f12SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 831514330f12Smrg[#assume ordinary cross tools, or native build. 831614330f12Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 831714330f12Smrgcase $host in 831814330f12Smrg *-*-mingw* ) 831914330f12Smrg case $build in 832014330f12Smrg *-*-mingw* ) # actually msys 832114330f12Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 832214330f12Smrg ;; 832314330f12Smrg esac 832414330f12Smrg ;; 832514330f12Smrgesac 832614330f12Smrg]) 832714330f12Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 832814330f12SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 832914330f12Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 833014330f12Smrg [0], [convert $build files to toolchain format])dnl 833114330f12Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 833214330f12Smrg 833314330f12Smrg# Helper functions for option handling. -*- Autoconf -*- 833495b296d0Smrg# 8335eca46af7Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2014 Free Software 8336eca46af7Smrg# Foundation, Inc. 833714330f12Smrg# Written by Gary V. Vaughan, 2004 833895b296d0Smrg# 833914330f12Smrg# This file is free software; the Free Software Foundation gives 834014330f12Smrg# unlimited permission to copy and/or distribute it, with or without 834114330f12Smrg# modifications, as long as this notice is preserved. 834295b296d0Smrg 8343eca46af7Smrg# serial 8 ltoptions.m4 834495b296d0Smrg 834514330f12Smrg# This is to help aclocal find these macros, as it can't see m4_define. 834614330f12SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 834795b296d0Smrg 834895b296d0Smrg 834914330f12Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 835014330f12Smrg# ------------------------------------------ 835114330f12Smrgm4_define([_LT_MANGLE_OPTION], 835214330f12Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 835395b296d0Smrg 835495b296d0Smrg 835514330f12Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 835614330f12Smrg# --------------------------------------- 835714330f12Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 835814330f12Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 835914330f12Smrg# saved as a flag. 836014330f12Smrgm4_define([_LT_SET_OPTION], 836114330f12Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 836214330f12Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 836314330f12Smrg _LT_MANGLE_DEFUN([$1], [$2]), 8364eca46af7Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 836514330f12Smrg]) 836695b296d0Smrg 836795b296d0Smrg 836814330f12Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 836914330f12Smrg# ------------------------------------------------------------ 837014330f12Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 837114330f12Smrgm4_define([_LT_IF_OPTION], 837214330f12Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 837395b296d0Smrg 837495b296d0Smrg 837514330f12Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 837614330f12Smrg# ------------------------------------------------------- 837714330f12Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 837814330f12Smrg# are set. 837914330f12Smrgm4_define([_LT_UNLESS_OPTIONS], 838014330f12Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 838114330f12Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 838214330f12Smrg [m4_define([$0_found])])])[]dnl 838314330f12Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 838414330f12Smrg])[]dnl 838514330f12Smrg]) 838695b296d0Smrg 838795b296d0Smrg 838814330f12Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 838914330f12Smrg# ---------------------------------------- 839014330f12Smrg# OPTION-LIST is a space-separated list of Libtool options associated 839114330f12Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 839214330f12Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 839314330f12Smrg# the unknown option and exit. 839414330f12Smrgm4_defun([_LT_SET_OPTIONS], 839514330f12Smrg[# Set options 839614330f12Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 839714330f12Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 839895b296d0Smrg 839914330f12Smrgm4_if([$1],[LT_INIT],[ 840014330f12Smrg dnl 840114330f12Smrg dnl Simply set some default values (i.e off) if boolean options were not 840214330f12Smrg dnl specified: 840314330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 840414330f12Smrg ]) 840514330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 840614330f12Smrg ]) 840714330f12Smrg dnl 840814330f12Smrg dnl If no reference was made to various pairs of opposing options, then 840914330f12Smrg dnl we run the default mode handler for the pair. For example, if neither 8410eca46af7Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 841114330f12Smrg dnl archives by default: 841214330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 841314330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 841414330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 841514330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8416eca46af7Smrg [_LT_ENABLE_FAST_INSTALL]) 8417eca46af7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8418eca46af7Smrg [_LT_WITH_AIX_SONAME([aix])]) 841914330f12Smrg ]) 842014330f12Smrg])# _LT_SET_OPTIONS 842195b296d0Smrg 842295b296d0Smrg 842395b296d0Smrg 842414330f12Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 842514330f12Smrg# ----------------------------------------- 842614330f12Smrgm4_define([_LT_MANGLE_DEFUN], 842714330f12Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 842895b296d0Smrg 842995b296d0Smrg 843014330f12Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 843114330f12Smrg# ----------------------------------------------- 843214330f12Smrgm4_define([LT_OPTION_DEFINE], 843314330f12Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 843414330f12Smrg])# LT_OPTION_DEFINE 843595b296d0Smrg 843695b296d0Smrg 843714330f12Smrg# dlopen 843814330f12Smrg# ------ 843914330f12SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 844014330f12Smrg]) 844195b296d0Smrg 844214330f12SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 844314330f12Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 844414330f12SmrgAC_DIAGNOSE([obsolete], 844514330f12Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8446eca46af7Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 844714330f12Smrg]) 844895b296d0Smrg 844914330f12Smrgdnl aclocal-1.4 backwards compatibility: 845014330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 845195b296d0Smrg 845295b296d0Smrg 845314330f12Smrg# win32-dll 845414330f12Smrg# --------- 845514330f12Smrg# Declare package support for building win32 dll's. 845614330f12SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 845714330f12Smrg[enable_win32_dll=yes 845895b296d0Smrg 845914330f12Smrgcase $host in 846014330f12Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 846114330f12Smrg AC_CHECK_TOOL(AS, as, false) 846214330f12Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 846314330f12Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 846414330f12Smrg ;; 846514330f12Smrgesac 84662378475aSmrg 846714330f12Smrgtest -z "$AS" && AS=as 846814330f12Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 84692378475aSmrg 847014330f12Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 847114330f12Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 847295b296d0Smrg 847314330f12Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 847414330f12Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 847514330f12Smrg])# win32-dll 84762378475aSmrg 847714330f12SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 847814330f12Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 847914330f12Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 848014330f12SmrgAC_DIAGNOSE([obsolete], 848114330f12Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8482eca46af7Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 848314330f12Smrg]) 84842378475aSmrg 848514330f12Smrgdnl aclocal-1.4 backwards compatibility: 848614330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 84872378475aSmrg 848895b296d0Smrg 848914330f12Smrg# _LT_ENABLE_SHARED([DEFAULT]) 849014330f12Smrg# ---------------------------- 8491eca46af7Smrg# implement the --enable-shared flag, and supports the 'shared' and 8492eca46af7Smrg# 'disable-shared' LT_INIT options. 8493eca46af7Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 849414330f12Smrgm4_define([_LT_ENABLE_SHARED], 849514330f12Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 849614330f12SmrgAC_ARG_ENABLE([shared], 849714330f12Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 849814330f12Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 849914330f12Smrg [p=${PACKAGE-default} 850014330f12Smrg case $enableval in 850114330f12Smrg yes) enable_shared=yes ;; 850214330f12Smrg no) enable_shared=no ;; 850314330f12Smrg *) 850414330f12Smrg enable_shared=no 850514330f12Smrg # Look at the argument we got. We use all the common list separators. 8506eca46af7Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 850714330f12Smrg for pkg in $enableval; do 8508eca46af7Smrg IFS=$lt_save_ifs 850914330f12Smrg if test "X$pkg" = "X$p"; then 851014330f12Smrg enable_shared=yes 851114330f12Smrg fi 851214330f12Smrg done 8513eca46af7Smrg IFS=$lt_save_ifs 851414330f12Smrg ;; 851514330f12Smrg esac], 851614330f12Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 851795b296d0Smrg 851814330f12Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 851914330f12Smrg [Whether or not to build shared libraries]) 852014330f12Smrg])# _LT_ENABLE_SHARED 852195b296d0Smrg 852214330f12SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 852314330f12SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 852495b296d0Smrg 852514330f12Smrg# Old names: 852614330f12SmrgAC_DEFUN([AC_ENABLE_SHARED], 852714330f12Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 852814330f12Smrg]) 852995b296d0Smrg 853014330f12SmrgAC_DEFUN([AC_DISABLE_SHARED], 853114330f12Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 853214330f12Smrg]) 853395b296d0Smrg 853414330f12SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 853514330f12SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 853695b296d0Smrg 853714330f12Smrgdnl aclocal-1.4 backwards compatibility: 853814330f12Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 853914330f12Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 854095b296d0Smrg 854195b296d0Smrg 854295b296d0Smrg 854314330f12Smrg# _LT_ENABLE_STATIC([DEFAULT]) 854414330f12Smrg# ---------------------------- 8545eca46af7Smrg# implement the --enable-static flag, and support the 'static' and 8546eca46af7Smrg# 'disable-static' LT_INIT options. 8547eca46af7Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 854814330f12Smrgm4_define([_LT_ENABLE_STATIC], 854914330f12Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 855014330f12SmrgAC_ARG_ENABLE([static], 855114330f12Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 855214330f12Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 855314330f12Smrg [p=${PACKAGE-default} 855414330f12Smrg case $enableval in 855514330f12Smrg yes) enable_static=yes ;; 855614330f12Smrg no) enable_static=no ;; 855714330f12Smrg *) 855814330f12Smrg enable_static=no 855914330f12Smrg # Look at the argument we got. We use all the common list separators. 8560eca46af7Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 856114330f12Smrg for pkg in $enableval; do 8562eca46af7Smrg IFS=$lt_save_ifs 856314330f12Smrg if test "X$pkg" = "X$p"; then 856414330f12Smrg enable_static=yes 856514330f12Smrg fi 856614330f12Smrg done 8567eca46af7Smrg IFS=$lt_save_ifs 856814330f12Smrg ;; 856914330f12Smrg esac], 857014330f12Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 857114330f12Smrg 857214330f12Smrg _LT_DECL([build_old_libs], [enable_static], [0], 857314330f12Smrg [Whether or not to build static libraries]) 857414330f12Smrg])# _LT_ENABLE_STATIC 857514330f12Smrg 857614330f12SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 857714330f12SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 857895b296d0Smrg 857914330f12Smrg# Old names: 858014330f12SmrgAC_DEFUN([AC_ENABLE_STATIC], 858114330f12Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 858214330f12Smrg]) 858395b296d0Smrg 858414330f12SmrgAC_DEFUN([AC_DISABLE_STATIC], 858514330f12Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 858614330f12Smrg]) 85872378475aSmrg 858814330f12SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 858914330f12SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8590ff89ac2bSmrg 859114330f12Smrgdnl aclocal-1.4 backwards compatibility: 859214330f12Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 859314330f12Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8594ff89ac2bSmrg 8595ff89ac2bSmrg 8596ff89ac2bSmrg 859714330f12Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 859814330f12Smrg# ---------------------------------- 8599eca46af7Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 8600eca46af7Smrg# and 'disable-fast-install' LT_INIT options. 8601eca46af7Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 860214330f12Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 860314330f12Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 860414330f12SmrgAC_ARG_ENABLE([fast-install], 860514330f12Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 860614330f12Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 860714330f12Smrg [p=${PACKAGE-default} 860814330f12Smrg case $enableval in 860914330f12Smrg yes) enable_fast_install=yes ;; 861014330f12Smrg no) enable_fast_install=no ;; 861114330f12Smrg *) 861214330f12Smrg enable_fast_install=no 861314330f12Smrg # Look at the argument we got. We use all the common list separators. 8614eca46af7Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 861514330f12Smrg for pkg in $enableval; do 8616eca46af7Smrg IFS=$lt_save_ifs 861714330f12Smrg if test "X$pkg" = "X$p"; then 861814330f12Smrg enable_fast_install=yes 861914330f12Smrg fi 862014330f12Smrg done 8621eca46af7Smrg IFS=$lt_save_ifs 862214330f12Smrg ;; 862314330f12Smrg esac], 862414330f12Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8625ff89ac2bSmrg 862614330f12Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 862714330f12Smrg [Whether or not to optimize for fast installation])dnl 862814330f12Smrg])# _LT_ENABLE_FAST_INSTALL 8629ff89ac2bSmrg 863014330f12SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 863114330f12SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8632ff89ac2bSmrg 863314330f12Smrg# Old names: 863414330f12SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 863514330f12Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 863614330f12SmrgAC_DIAGNOSE([obsolete], 863714330f12Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8638eca46af7Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 863914330f12Smrg]) 8640ff89ac2bSmrg 864114330f12SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 864214330f12Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 864314330f12SmrgAC_DIAGNOSE([obsolete], 864414330f12Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8645eca46af7Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 864614330f12Smrg]) 86472378475aSmrg 864814330f12Smrgdnl aclocal-1.4 backwards compatibility: 864914330f12Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 865014330f12Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 86512378475aSmrg 86522378475aSmrg 8653eca46af7Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 8654eca46af7Smrg# ---------------------------------- 8655eca46af7Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8656eca46af7Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8657eca46af7Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8658eca46af7Smrgm4_define([_LT_WITH_AIX_SONAME], 8659eca46af7Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8660eca46af7Smrgshared_archive_member_spec= 8661eca46af7Smrgcase $host,$enable_shared in 8662eca46af7Smrgpower*-*-aix[[5-9]]*,yes) 8663eca46af7Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8664eca46af7Smrg AC_ARG_WITH([aix-soname], 8665eca46af7Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8666eca46af7Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8667eca46af7Smrg [case $withval in 8668eca46af7Smrg aix|svr4|both) 8669eca46af7Smrg ;; 8670eca46af7Smrg *) 8671eca46af7Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8672eca46af7Smrg ;; 8673eca46af7Smrg esac 8674eca46af7Smrg lt_cv_with_aix_soname=$with_aix_soname], 8675eca46af7Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 8676eca46af7Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8677eca46af7Smrg with_aix_soname=$lt_cv_with_aix_soname]) 8678eca46af7Smrg AC_MSG_RESULT([$with_aix_soname]) 8679eca46af7Smrg if test aix != "$with_aix_soname"; then 8680eca46af7Smrg # For the AIX way of multilib, we name the shared archive member 8681eca46af7Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8682eca46af7Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8683eca46af7Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8684eca46af7Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 8685eca46af7Smrg if test 64 = "${OBJECT_MODE-32}"; then 8686eca46af7Smrg shared_archive_member_spec=shr_64 8687eca46af7Smrg else 8688eca46af7Smrg shared_archive_member_spec=shr 8689eca46af7Smrg fi 8690eca46af7Smrg fi 8691eca46af7Smrg ;; 8692eca46af7Smrg*) 8693eca46af7Smrg with_aix_soname=aix 8694eca46af7Smrg ;; 8695eca46af7Smrgesac 8696eca46af7Smrg 8697eca46af7Smrg_LT_DECL([], [shared_archive_member_spec], [0], 8698eca46af7Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8699eca46af7Smrg])# _LT_WITH_AIX_SONAME 8700eca46af7Smrg 8701eca46af7SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8702eca46af7SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8703eca46af7SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8704eca46af7Smrg 8705eca46af7Smrg 870614330f12Smrg# _LT_WITH_PIC([MODE]) 870714330f12Smrg# -------------------- 8708eca46af7Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 870914330f12Smrg# LT_INIT options. 8710eca46af7Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 871114330f12Smrgm4_define([_LT_WITH_PIC], 871214330f12Smrg[AC_ARG_WITH([pic], 8713eca46af7Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 871414330f12Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8715eca46af7Smrg [lt_p=${PACKAGE-default} 8716eca46af7Smrg case $withval in 8717eca46af7Smrg yes|no) pic_mode=$withval ;; 8718eca46af7Smrg *) 8719eca46af7Smrg pic_mode=default 8720eca46af7Smrg # Look at the argument we got. We use all the common list separators. 8721eca46af7Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8722eca46af7Smrg for lt_pkg in $withval; do 8723eca46af7Smrg IFS=$lt_save_ifs 8724eca46af7Smrg if test "X$lt_pkg" = "X$lt_p"; then 8725eca46af7Smrg pic_mode=yes 8726eca46af7Smrg fi 8727eca46af7Smrg done 8728eca46af7Smrg IFS=$lt_save_ifs 8729eca46af7Smrg ;; 8730eca46af7Smrg esac], 8731eca46af7Smrg [pic_mode=m4_default([$1], [default])]) 87322378475aSmrg 873314330f12Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 873414330f12Smrg])# _LT_WITH_PIC 87352378475aSmrg 873614330f12SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 873714330f12SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 87382378475aSmrg 873914330f12Smrg# Old name: 874014330f12SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 874114330f12Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 874214330f12SmrgAC_DIAGNOSE([obsolete], 874314330f12Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8744eca46af7Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 874514330f12Smrg]) 87462378475aSmrg 874714330f12Smrgdnl aclocal-1.4 backwards compatibility: 874814330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 87492378475aSmrg 87502378475aSmrg 875114330f12Smrgm4_define([_LTDL_MODE], []) 875214330f12SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 875314330f12Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 875414330f12SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 875514330f12Smrg [m4_define([_LTDL_MODE], [recursive])]) 875614330f12SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 875714330f12Smrg [m4_define([_LTDL_MODE], [subproject])]) 87582378475aSmrg 875914330f12Smrgm4_define([_LTDL_TYPE], []) 876014330f12SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 876114330f12Smrg [m4_define([_LTDL_TYPE], [installable])]) 876214330f12SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 876314330f12Smrg [m4_define([_LTDL_TYPE], [convenience])]) 87642378475aSmrg 876514330f12Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 87662378475aSmrg# 8767eca46af7Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2014 Free Software 8768eca46af7Smrg# Foundation, Inc. 876914330f12Smrg# Written by Gary V. Vaughan, 2004 87702378475aSmrg# 877114330f12Smrg# This file is free software; the Free Software Foundation gives 877214330f12Smrg# unlimited permission to copy and/or distribute it, with or without 877314330f12Smrg# modifications, as long as this notice is preserved. 87742378475aSmrg 877514330f12Smrg# serial 6 ltsugar.m4 87762378475aSmrg 877714330f12Smrg# This is to help aclocal find these macros, as it can't see m4_define. 877814330f12SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 87792378475aSmrg 878095b296d0Smrg 878114330f12Smrg# lt_join(SEP, ARG1, [ARG2...]) 878214330f12Smrg# ----------------------------- 878314330f12Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 878414330f12Smrg# associated separator. 878514330f12Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 878614330f12Smrg# versions in m4sugar had bugs. 878714330f12Smrgm4_define([lt_join], 878814330f12Smrg[m4_if([$#], [1], [], 878914330f12Smrg [$#], [2], [[$2]], 879014330f12Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 879114330f12Smrgm4_define([_lt_join], 879214330f12Smrg[m4_if([$#$2], [2], [], 879314330f12Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 879495b296d0Smrg 879595b296d0Smrg 879614330f12Smrg# lt_car(LIST) 879714330f12Smrg# lt_cdr(LIST) 879814330f12Smrg# ------------ 879914330f12Smrg# Manipulate m4 lists. 880014330f12Smrg# These macros are necessary as long as will still need to support 8801eca46af7Smrg# Autoconf-2.59, which quotes differently. 880214330f12Smrgm4_define([lt_car], [[$1]]) 880314330f12Smrgm4_define([lt_cdr], 880414330f12Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 880514330f12Smrg [$#], 1, [], 880614330f12Smrg [m4_dquote(m4_shift($@))])]) 880714330f12Smrgm4_define([lt_unquote], $1) 880895b296d0Smrg 880914330f12Smrg 881014330f12Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 881114330f12Smrg# ------------------------------------------ 8812eca46af7Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 881314330f12Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 881414330f12Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 881514330f12Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 881614330f12Smrg# than defined and empty). 881795b296d0Smrg# 881814330f12Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 881914330f12Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 882014330f12Smrgm4_define([lt_append], 882114330f12Smrg[m4_define([$1], 882214330f12Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 882395b296d0Smrg 88242378475aSmrg 88252378475aSmrg 882614330f12Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 882714330f12Smrg# ---------------------------------------------------------- 882814330f12Smrg# Produce a SEP delimited list of all paired combinations of elements of 882914330f12Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 883014330f12Smrg# has the form PREFIXmINFIXSUFFIXn. 883114330f12Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 883214330f12Smrgm4_define([lt_combine], 883314330f12Smrg[m4_if(m4_eval([$# > 3]), [1], 883414330f12Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 883514330f12Smrg[[m4_foreach([_Lt_prefix], [$2], 883614330f12Smrg [m4_foreach([_Lt_suffix], 883714330f12Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 883814330f12Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 883914330f12Smrg 884014330f12Smrg 884114330f12Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 884214330f12Smrg# ----------------------------------------------------------------------- 884314330f12Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 884414330f12Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 884514330f12Smrgm4_define([lt_if_append_uniq], 884614330f12Smrg[m4_ifdef([$1], 884714330f12Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 884814330f12Smrg [lt_append([$1], [$2], [$3])$4], 884914330f12Smrg [$5])], 885014330f12Smrg [lt_append([$1], [$2], [$3])$4])]) 885114330f12Smrg 885214330f12Smrg 885314330f12Smrg# lt_dict_add(DICT, KEY, VALUE) 885414330f12Smrg# ----------------------------- 885514330f12Smrgm4_define([lt_dict_add], 885614330f12Smrg[m4_define([$1($2)], [$3])]) 885714330f12Smrg 885814330f12Smrg 885914330f12Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 886014330f12Smrg# -------------------------------------------- 886114330f12Smrgm4_define([lt_dict_add_subkey], 886214330f12Smrg[m4_define([$1($2:$3)], [$4])]) 886314330f12Smrg 886414330f12Smrg 886514330f12Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 886614330f12Smrg# ---------------------------------- 886714330f12Smrgm4_define([lt_dict_fetch], 886814330f12Smrg[m4_ifval([$3], 886914330f12Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 887014330f12Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 887114330f12Smrg 88722378475aSmrg 887314330f12Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 887414330f12Smrg# ----------------------------------------------------------------- 887514330f12Smrgm4_define([lt_if_dict_fetch], 887614330f12Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 887714330f12Smrg [$5], 887814330f12Smrg [$6])]) 887995b296d0Smrg 888095b296d0Smrg 888114330f12Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 888214330f12Smrg# -------------------------------------------------------------- 888314330f12Smrgm4_define([lt_dict_filter], 888414330f12Smrg[m4_if([$5], [], [], 888514330f12Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 888614330f12Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 888714330f12Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 888814330f12Smrg]) 888995b296d0Smrg 889014330f12Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 889195b296d0Smrg# 8892eca46af7Smrg# Copyright (C) 2004, 2011-2014 Free Software Foundation, Inc. 889314330f12Smrg# Written by Scott James Remnant, 2004 88942378475aSmrg# 889514330f12Smrg# This file is free software; the Free Software Foundation gives 889614330f12Smrg# unlimited permission to copy and/or distribute it, with or without 889714330f12Smrg# modifications, as long as this notice is preserved. 889895b296d0Smrg 889914330f12Smrg# @configure_input@ 89002378475aSmrg 8901eca46af7Smrg# serial 4151 ltversion.m4 890214330f12Smrg# This file is part of GNU Libtool 89032378475aSmrg 8904eca46af7Smrgm4_define([LT_PACKAGE_VERSION], [2.4.4]) 8905eca46af7Smrgm4_define([LT_PACKAGE_REVISION], [2.4.4]) 890695b296d0Smrg 890714330f12SmrgAC_DEFUN([LTVERSION_VERSION], 8908eca46af7Smrg[macro_version='2.4.4' 8909eca46af7Smrgmacro_revision='2.4.4' 891014330f12Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 891114330f12Smrg_LT_DECL(, macro_revision, 0) 891214330f12Smrg]) 891395b296d0Smrg 891414330f12Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 891539713583Smrg# 8916eca46af7Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2014 Free Software 8917eca46af7Smrg# Foundation, Inc. 891814330f12Smrg# Written by Scott James Remnant, 2004. 89192378475aSmrg# 892014330f12Smrg# This file is free software; the Free Software Foundation gives 892114330f12Smrg# unlimited permission to copy and/or distribute it, with or without 892214330f12Smrg# modifications, as long as this notice is preserved. 89232378475aSmrg 8924eca46af7Smrg# serial 5 lt~obsolete.m4 8925eca46af7Smrg 8926eca46af7Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8927eca46af7Smrg# 8928eca46af7Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8929eca46af7Smrg# which have later been changed to m4_define as they aren't part of the 8930eca46af7Smrg# exported API, or moved to Autoconf or Automake where they belong. 8931eca46af7Smrg# 8932eca46af7Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8933eca46af7Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8934eca46af7Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 8935eca46af7Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8936eca46af7Smrg# and doesn't know about Autoconf macros at all.) 8937eca46af7Smrg# 8938eca46af7Smrg# So we provide this file, which has a silly filename so it's always 8939eca46af7Smrg# included after everything else. This provides aclocal with the 8940eca46af7Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8941eca46af7Smrg# because those macros already exist, or will be overwritten later. 8942eca46af7Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8943eca46af7Smrg# 8944eca46af7Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8945eca46af7Smrg# Yes, that means every name once taken will need to remain here until 8946eca46af7Smrg# we give up compatibility with versions before 1.7, at which point 8947eca46af7Smrg# we need to keep only those names which we still refer to. 8948eca46af7Smrg 8949eca46af7Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8950eca46af7SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8951eca46af7Smrg 8952eca46af7Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8953eca46af7Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8954eca46af7Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8955eca46af7Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8956eca46af7Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8957eca46af7Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8958eca46af7Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8959eca46af7Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8960eca46af7Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8961eca46af7Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8962eca46af7Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8963eca46af7Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8964eca46af7Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8965eca46af7Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8966eca46af7Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8967eca46af7Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8968eca46af7Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8969eca46af7Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8970eca46af7Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8971eca46af7Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8972eca46af7Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8973eca46af7Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8974eca46af7Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8975eca46af7Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8976eca46af7Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8977eca46af7Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8978eca46af7Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8979eca46af7Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8980eca46af7Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8981eca46af7Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8982eca46af7Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8983eca46af7Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8984eca46af7Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8985eca46af7Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8986eca46af7Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8987eca46af7Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8988eca46af7Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8989eca46af7Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8990eca46af7Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8991eca46af7Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8992eca46af7Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8993eca46af7Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8994eca46af7Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8995eca46af7Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8996eca46af7Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8997eca46af7Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8998eca46af7Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8999eca46af7Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9000eca46af7Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9001eca46af7Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9002eca46af7Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9003eca46af7Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9004eca46af7Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9005eca46af7Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9006eca46af7Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9007eca46af7Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9008eca46af7Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9009eca46af7Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9010eca46af7Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9011eca46af7Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9012eca46af7Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9013eca46af7Smrg 9014eca46af7Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9015eca46af7Smrg# serial 1 (pkg-config-0.24) 9016eca46af7Smrg# 9017eca46af7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9018eca46af7Smrg# 9019eca46af7Smrg# This program is free software; you can redistribute it and/or modify 9020eca46af7Smrg# it under the terms of the GNU General Public License as published by 9021eca46af7Smrg# the Free Software Foundation; either version 2 of the License, or 9022eca46af7Smrg# (at your option) any later version. 9023eca46af7Smrg# 9024eca46af7Smrg# This program is distributed in the hope that it will be useful, but 9025eca46af7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9026eca46af7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9027eca46af7Smrg# General Public License for more details. 9028eca46af7Smrg# 9029eca46af7Smrg# You should have received a copy of the GNU General Public License 9030eca46af7Smrg# along with this program; if not, write to the Free Software 9031eca46af7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9032eca46af7Smrg# 9033eca46af7Smrg# As a special exception to the GNU General Public License, if you 9034eca46af7Smrg# distribute this file as part of a program that contains a 9035eca46af7Smrg# configuration script generated by Autoconf, you may include it under 9036eca46af7Smrg# the same distribution terms that you use for the rest of that program. 9037eca46af7Smrg 9038eca46af7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9039eca46af7Smrg# ---------------------------------- 9040eca46af7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9041eca46af7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9042eca46af7Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9043eca46af7Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9044eca46af7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9045eca46af7SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9046eca46af7SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9047eca46af7Smrg 9048eca46af7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9049eca46af7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9050eca46af7Smrgfi 9051eca46af7Smrgif test -n "$PKG_CONFIG"; then 9052eca46af7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 9053eca46af7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9054eca46af7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9055eca46af7Smrg AC_MSG_RESULT([yes]) 9056eca46af7Smrg else 9057eca46af7Smrg AC_MSG_RESULT([no]) 9058eca46af7Smrg PKG_CONFIG="" 9059eca46af7Smrg fi 9060eca46af7Smrgfi[]dnl 9061eca46af7Smrg])# PKG_PROG_PKG_CONFIG 9062eca46af7Smrg 9063eca46af7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9064eca46af7Smrg# 9065eca46af7Smrg# Check to see whether a particular set of modules exists. Similar 9066eca46af7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9067eca46af7Smrg# 9068eca46af7Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9069eca46af7Smrg# only at the first occurence in configure.ac, so if the first place 9070eca46af7Smrg# it's called might be skipped (such as if it is within an "if", you 9071eca46af7Smrg# have to call PKG_CHECK_EXISTS manually 9072eca46af7Smrg# -------------------------------------------------------------- 9073eca46af7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 9074eca46af7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9075eca46af7Smrgif test -n "$PKG_CONFIG" && \ 9076eca46af7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9077eca46af7Smrg m4_default([$2], [:]) 9078eca46af7Smrgm4_ifvaln([$3], [else 9079eca46af7Smrg $3])dnl 9080eca46af7Smrgfi]) 9081eca46af7Smrg 9082eca46af7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9083eca46af7Smrg# --------------------------------------------- 9084eca46af7Smrgm4_define([_PKG_CONFIG], 9085eca46af7Smrg[if test -n "$$1"; then 9086eca46af7Smrg pkg_cv_[]$1="$$1" 9087eca46af7Smrg elif test -n "$PKG_CONFIG"; then 9088eca46af7Smrg PKG_CHECK_EXISTS([$3], 9089eca46af7Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9090eca46af7Smrg test "x$?" != "x0" && pkg_failed=yes ], 9091eca46af7Smrg [pkg_failed=yes]) 9092eca46af7Smrg else 9093eca46af7Smrg pkg_failed=untried 9094eca46af7Smrgfi[]dnl 9095eca46af7Smrg])# _PKG_CONFIG 9096eca46af7Smrg 9097eca46af7Smrg# _PKG_SHORT_ERRORS_SUPPORTED 9098eca46af7Smrg# ----------------------------- 9099eca46af7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9100eca46af7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9101eca46af7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9102eca46af7Smrg _pkg_short_errors_supported=yes 9103eca46af7Smrgelse 9104eca46af7Smrg _pkg_short_errors_supported=no 9105eca46af7Smrgfi[]dnl 9106eca46af7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 9107eca46af7Smrg 9108eca46af7Smrg 9109eca46af7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9110eca46af7Smrg# [ACTION-IF-NOT-FOUND]) 9111eca46af7Smrg# 9112eca46af7Smrg# 9113eca46af7Smrg# Note that if there is a possibility the first call to 9114eca46af7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 9115eca46af7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9116eca46af7Smrg# 9117eca46af7Smrg# 9118eca46af7Smrg# -------------------------------------------------------------- 9119eca46af7SmrgAC_DEFUN([PKG_CHECK_MODULES], 9120eca46af7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9121eca46af7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9122eca46af7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9123eca46af7Smrg 9124eca46af7Smrgpkg_failed=no 9125eca46af7SmrgAC_MSG_CHECKING([for $1]) 9126eca46af7Smrg 9127eca46af7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9128eca46af7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9129eca46af7Smrg 9130eca46af7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9131eca46af7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 9132eca46af7SmrgSee the pkg-config man page for more details.]) 9133eca46af7Smrg 9134eca46af7Smrgif test $pkg_failed = yes; then 9135eca46af7Smrg AC_MSG_RESULT([no]) 9136eca46af7Smrg _PKG_SHORT_ERRORS_SUPPORTED 9137eca46af7Smrg if test $_pkg_short_errors_supported = yes; then 9138eca46af7Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9139eca46af7Smrg else 9140eca46af7Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9141eca46af7Smrg fi 9142eca46af7Smrg # Put the nasty error message in config.log where it belongs 9143eca46af7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9144eca46af7Smrg 9145eca46af7Smrg m4_default([$4], [AC_MSG_ERROR( 9146eca46af7Smrg[Package requirements ($2) were not met: 9147eca46af7Smrg 9148eca46af7Smrg$$1_PKG_ERRORS 9149eca46af7Smrg 9150eca46af7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9151eca46af7Smrginstalled software in a non-standard prefix. 9152eca46af7Smrg 9153eca46af7Smrg_PKG_TEXT])[]dnl 9154eca46af7Smrg ]) 9155eca46af7Smrgelif test $pkg_failed = untried; then 9156eca46af7Smrg AC_MSG_RESULT([no]) 9157eca46af7Smrg m4_default([$4], [AC_MSG_FAILURE( 9158eca46af7Smrg[The pkg-config script could not be found or is too old. Make sure it 9159eca46af7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 9160eca46af7Smrgpath to pkg-config. 9161eca46af7Smrg 9162eca46af7Smrg_PKG_TEXT 9163eca46af7Smrg 9164eca46af7SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9165eca46af7Smrg ]) 9166eca46af7Smrgelse 9167eca46af7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9168eca46af7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9169eca46af7Smrg AC_MSG_RESULT([yes]) 9170eca46af7Smrg $3 9171eca46af7Smrgfi[]dnl 9172eca46af7Smrg])# PKG_CHECK_MODULES 9173eca46af7Smrg 91742378475aSmrg 9175eca46af7Smrg# PKG_INSTALLDIR(DIRECTORY) 9176eca46af7Smrg# ------------------------- 9177eca46af7Smrg# Substitutes the variable pkgconfigdir as the location where a module 9178eca46af7Smrg# should install pkg-config .pc files. By default the directory is 9179eca46af7Smrg# $libdir/pkgconfig, but the default can be changed by passing 9180eca46af7Smrg# DIRECTORY. The user can override through the --with-pkgconfigdir 9181eca46af7Smrg# parameter. 9182eca46af7SmrgAC_DEFUN([PKG_INSTALLDIR], 9183eca46af7Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9184eca46af7Smrgm4_pushdef([pkg_description], 9185eca46af7Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 9186eca46af7SmrgAC_ARG_WITH([pkgconfigdir], 9187eca46af7Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9188eca46af7Smrg [with_pkgconfigdir=]pkg_default) 9189eca46af7SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9190eca46af7Smrgm4_popdef([pkg_default]) 9191eca46af7Smrgm4_popdef([pkg_description]) 9192eca46af7Smrg]) dnl PKG_INSTALLDIR 9193eca46af7Smrg 9194eca46af7Smrg 9195eca46af7Smrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 9196eca46af7Smrg# ------------------------- 9197eca46af7Smrg# Substitutes the variable noarch_pkgconfigdir as the location where a 9198eca46af7Smrg# module should install arch-independent pkg-config .pc files. By 9199eca46af7Smrg# default the directory is $datadir/pkgconfig, but the default can be 9200eca46af7Smrg# changed by passing DIRECTORY. The user can override through the 9201eca46af7Smrg# --with-noarch-pkgconfigdir parameter. 9202eca46af7SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 9203eca46af7Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9204eca46af7Smrgm4_pushdef([pkg_description], 9205eca46af7Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9206eca46af7SmrgAC_ARG_WITH([noarch-pkgconfigdir], 9207eca46af7Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9208eca46af7Smrg [with_noarch_pkgconfigdir=]pkg_default) 9209eca46af7SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9210eca46af7Smrgm4_popdef([pkg_default]) 9211eca46af7Smrgm4_popdef([pkg_description]) 9212eca46af7Smrg]) dnl PKG_NOARCH_INSTALLDIR 9213eca46af7Smrg 9214eca46af7Smrg 9215eca46af7Smrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9216eca46af7Smrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9217eca46af7Smrg# ------------------------------------------- 9218eca46af7Smrg# Retrieves the value of the pkg-config variable for the given module. 9219eca46af7SmrgAC_DEFUN([PKG_CHECK_VAR], 9220eca46af7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9221eca46af7SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 922295b296d0Smrg 9223eca46af7Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9224eca46af7SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 922514330f12Smrg 9226eca46af7SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 9227eca46af7Smrg])# PKG_CHECK_VAR 922895b296d0Smrg 922914330f12Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 923014330f12Smrgdnl 923114330f12Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9232eca46af7Smrgdnl 923314330f12Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 923414330f12Smrgdnl copy of this software and associated documentation files (the "Software"), 923514330f12Smrgdnl to deal in the Software without restriction, including without limitation 923614330f12Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 923714330f12Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 923814330f12Smrgdnl Software is furnished to do so, subject to the following conditions: 923914330f12Smrgdnl 924014330f12Smrgdnl The above copyright notice and this permission notice (including the next 924114330f12Smrgdnl paragraph) shall be included in all copies or substantial portions of the 924214330f12Smrgdnl Software. 924314330f12Smrgdnl 924414330f12Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 924514330f12Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 924614330f12Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 924714330f12Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 924814330f12Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 924914330f12Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 925014330f12Smrgdnl DEALINGS IN THE SOFTWARE. 925114330f12Smrg 925214330f12Smrg# XORG_MACROS_VERSION(required-version) 925314330f12Smrg# ------------------------------------- 925414330f12Smrg# Minimum version: 1.1.0 925539713583Smrg# 925614330f12Smrg# If you're using a macro added in Version 1.1 or newer, include this in 925714330f12Smrg# your configure.ac with the minimum required version, such as: 925814330f12Smrg# XORG_MACROS_VERSION(1.1) 925939713583Smrg# 926014330f12Smrg# To ensure that this macro is defined, also add: 926114330f12Smrg# m4_ifndef([XORG_MACROS_VERSION], 926214330f12Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 926339713583Smrg# 926414330f12Smrg# 9265eca46af7Smrg# See the "minimum version" comment for each macro you use to see what 9266eca46af7Smrg# version you require. 9267eca46af7Smrgm4_defun([XORG_MACROS_VERSION],[ 9268eca46af7Smrgm4_define([vers_have], [1.18.0]) 9269eca46af7Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9270eca46af7Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9271eca46af7Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9272eca46af7Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9273eca46af7Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9274eca46af7Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9275eca46af7Smrgm4_undefine([vers_have]) 9276eca46af7Smrgm4_undefine([maj_have]) 9277eca46af7Smrgm4_undefine([maj_needed]) 9278eca46af7Smrg]) # XORG_MACROS_VERSION 9279eca46af7Smrg 9280eca46af7Smrg# XORG_PROG_RAWCPP() 9281eca46af7Smrg# ------------------ 9282eca46af7Smrg# Minimum version: 1.0.0 9283eca46af7Smrg# 9284eca46af7Smrg# Find cpp program and necessary flags for use in pre-processing text files 9285eca46af7Smrg# such as man pages and config files 9286eca46af7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9287eca46af7SmrgAC_REQUIRE([AC_PROG_CPP]) 9288eca46af7SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9289eca46af7Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9290eca46af7Smrg 9291eca46af7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9292eca46af7Smrg# which is not the best choice for supporting other OS'es, but covers most 9293eca46af7Smrg# of the ones we need for now. 9294eca46af7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9295eca46af7SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9296eca46af7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9297eca46af7Smrg AC_MSG_RESULT([no]) 9298eca46af7Smrgelse 9299eca46af7Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9300eca46af7Smrg RAWCPPFLAGS=-undef 9301eca46af7Smrg AC_MSG_RESULT([yes]) 9302eca46af7Smrg # under Cygwin unix is still defined even with -undef 9303eca46af7Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9304eca46af7Smrg RAWCPPFLAGS="-undef -ansi" 9305eca46af7Smrg AC_MSG_RESULT([yes, with -ansi]) 9306eca46af7Smrg else 9307eca46af7Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9308eca46af7Smrg fi 9309eca46af7Smrgfi 9310eca46af7Smrgrm -f conftest.$ac_ext 9311eca46af7Smrg 9312eca46af7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9313eca46af7SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9314eca46af7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9315eca46af7Smrg AC_MSG_RESULT([no]) 9316eca46af7Smrgelse 9317eca46af7Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9318eca46af7Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9319eca46af7Smrg AC_MSG_RESULT([yes]) 9320eca46af7Smrg else 9321eca46af7Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9322eca46af7Smrg fi 9323eca46af7Smrgfi 9324eca46af7Smrgrm -f conftest.$ac_ext 9325eca46af7SmrgAC_SUBST(RAWCPPFLAGS) 9326eca46af7Smrg]) # XORG_PROG_RAWCPP 9327eca46af7Smrg 9328eca46af7Smrg# XORG_MANPAGE_SECTIONS() 9329eca46af7Smrg# ----------------------- 9330eca46af7Smrg# Minimum version: 1.0.0 9331eca46af7Smrg# 9332eca46af7Smrg# Determine which sections man pages go in for the different man page types 9333eca46af7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9334eca46af7Smrg# Not sure if there's any better way than just hardcoding by OS name. 9335eca46af7Smrg# Override default settings by setting environment variables 9336eca46af7Smrg# Added MAN_SUBSTS in version 1.8 9337eca46af7Smrg# Added AC_PROG_SED in version 1.8 9338eca46af7Smrg 9339eca46af7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9340eca46af7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9341eca46af7SmrgAC_REQUIRE([AC_PROG_SED]) 9342eca46af7Smrg 9343eca46af7Smrgif test x$APP_MAN_SUFFIX = x ; then 9344eca46af7Smrg APP_MAN_SUFFIX=1 9345eca46af7Smrgfi 9346eca46af7Smrgif test x$APP_MAN_DIR = x ; then 9347eca46af7Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9348eca46af7Smrgfi 9349eca46af7Smrg 9350eca46af7Smrgif test x$LIB_MAN_SUFFIX = x ; then 9351eca46af7Smrg LIB_MAN_SUFFIX=3 9352eca46af7Smrgfi 9353eca46af7Smrgif test x$LIB_MAN_DIR = x ; then 9354eca46af7Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9355eca46af7Smrgfi 9356eca46af7Smrg 9357eca46af7Smrgif test x$FILE_MAN_SUFFIX = x ; then 9358eca46af7Smrg case $host_os in 9359eca46af7Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 9360eca46af7Smrg *) FILE_MAN_SUFFIX=5 ;; 9361eca46af7Smrg esac 9362eca46af7Smrgfi 9363eca46af7Smrgif test x$FILE_MAN_DIR = x ; then 9364eca46af7Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9365eca46af7Smrgfi 9366eca46af7Smrg 9367eca46af7Smrgif test x$MISC_MAN_SUFFIX = x ; then 9368eca46af7Smrg case $host_os in 9369eca46af7Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 9370eca46af7Smrg *) MISC_MAN_SUFFIX=7 ;; 9371eca46af7Smrg esac 9372eca46af7Smrgfi 9373eca46af7Smrgif test x$MISC_MAN_DIR = x ; then 9374eca46af7Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9375eca46af7Smrgfi 9376eca46af7Smrg 9377eca46af7Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 9378eca46af7Smrg case $host_os in 9379eca46af7Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9380eca46af7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 9381eca46af7Smrg esac 9382eca46af7Smrgfi 9383eca46af7Smrgif test x$DRIVER_MAN_DIR = x ; then 9384eca46af7Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9385eca46af7Smrgfi 9386eca46af7Smrg 9387eca46af7Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 9388eca46af7Smrg case $host_os in 9389eca46af7Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9390eca46af7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 9391eca46af7Smrg esac 9392eca46af7Smrgfi 9393eca46af7Smrgif test x$ADMIN_MAN_DIR = x ; then 9394eca46af7Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9395eca46af7Smrgfi 9396eca46af7Smrg 9397eca46af7Smrg 9398eca46af7SmrgAC_SUBST([APP_MAN_SUFFIX]) 9399eca46af7SmrgAC_SUBST([LIB_MAN_SUFFIX]) 9400eca46af7SmrgAC_SUBST([FILE_MAN_SUFFIX]) 9401eca46af7SmrgAC_SUBST([MISC_MAN_SUFFIX]) 9402eca46af7SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9403eca46af7SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9404eca46af7SmrgAC_SUBST([APP_MAN_DIR]) 9405eca46af7SmrgAC_SUBST([LIB_MAN_DIR]) 9406eca46af7SmrgAC_SUBST([FILE_MAN_DIR]) 9407eca46af7SmrgAC_SUBST([MISC_MAN_DIR]) 9408eca46af7SmrgAC_SUBST([DRIVER_MAN_DIR]) 9409eca46af7SmrgAC_SUBST([ADMIN_MAN_DIR]) 9410eca46af7Smrg 9411eca46af7SmrgXORG_MAN_PAGE="X Version 11" 9412eca46af7SmrgAC_SUBST([XORG_MAN_PAGE]) 9413eca46af7SmrgMAN_SUBSTS="\ 9414eca46af7Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9415eca46af7Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9416eca46af7Smrg -e 's|__xservername__|Xorg|g' \ 9417eca46af7Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 9418eca46af7Smrg -e 's|__projectroot__|\$(prefix)|g' \ 9419eca46af7Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9420eca46af7Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9421eca46af7Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9422eca46af7Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9423eca46af7Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9424eca46af7Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9425eca46af7Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9426eca46af7SmrgAC_SUBST([MAN_SUBSTS]) 9427eca46af7Smrg 9428eca46af7Smrg]) # XORG_MANPAGE_SECTIONS 9429eca46af7Smrg 9430eca46af7Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9431eca46af7Smrg# ------------------------ 9432eca46af7Smrg# Minimum version: 1.7.0 9433eca46af7Smrg# 9434eca46af7Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9435eca46af7Smrg# provided by xorg-sgml-doctools, if installed. 9436eca46af7SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9437eca46af7SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9438eca46af7SmrgXORG_SGML_PATH= 9439eca46af7SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9440eca46af7Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9441eca46af7Smrg [m4_ifval([$1],[:], 9442eca46af7Smrg [if test x"$cross_compiling" != x"yes" ; then 9443eca46af7Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9444eca46af7Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 9445eca46af7Smrg fi]) 9446eca46af7Smrg ]) 944739713583Smrg 9448eca46af7Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9449eca46af7Smrg# the path and the name of the doc stylesheet 9450eca46af7Smrgif test "x$XORG_SGML_PATH" != "x" ; then 9451eca46af7Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9452eca46af7Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9453eca46af7Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9454eca46af7Smrgelse 9455eca46af7Smrg AC_MSG_RESULT([no]) 9456eca46af7Smrgfi 9457eca46af7Smrg 9458eca46af7SmrgAC_SUBST(XORG_SGML_PATH) 9459eca46af7SmrgAC_SUBST(STYLESHEET_SRCDIR) 9460eca46af7SmrgAC_SUBST(XSL_STYLESHEET) 9461eca46af7SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9462eca46af7Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9463eca46af7Smrg 9464eca46af7Smrg# XORG_CHECK_LINUXDOC 9465eca46af7Smrg# ------------------- 946614330f12Smrg# Minimum version: 1.0.0 946714330f12Smrg# 9468eca46af7Smrg# Defines the variable MAKE_TEXT if the necessary tools and 9469eca46af7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9470eca46af7Smrg# Whether or not the necessary tools and files are found can be checked 9471eca46af7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9472eca46af7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9473eca46af7SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9474eca46af7SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 94752378475aSmrg 9476eca46af7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9477eca46af7Smrg 9478eca46af7SmrgAC_MSG_CHECKING([whether to build documentation]) 9479eca46af7Smrg 9480eca46af7Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9481eca46af7Smrg BUILDDOC=yes 948214330f12Smrgelse 9483eca46af7Smrg BUILDDOC=no 948414330f12Smrgfi 94852378475aSmrg 9486eca46af7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9487eca46af7Smrg 9488eca46af7SmrgAC_MSG_RESULT([$BUILDDOC]) 9489eca46af7Smrg 9490eca46af7SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9491eca46af7Smrg 9492eca46af7Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9493eca46af7Smrg BUILDPDFDOC=yes 949414330f12Smrgelse 9495eca46af7Smrg BUILDPDFDOC=no 949614330f12Smrgfi 94972378475aSmrg 9498eca46af7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9499eca46af7Smrg 9500eca46af7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9501eca46af7Smrg 9502eca46af7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9503eca46af7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9504eca46af7SmrgMAKE_PDF="$PS2PDF" 9505eca46af7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9506eca46af7Smrg 9507eca46af7SmrgAC_SUBST(MAKE_TEXT) 9508eca46af7SmrgAC_SUBST(MAKE_PS) 9509eca46af7SmrgAC_SUBST(MAKE_PDF) 9510eca46af7SmrgAC_SUBST(MAKE_HTML) 9511eca46af7Smrg]) # XORG_CHECK_LINUXDOC 9512eca46af7Smrg 9513eca46af7Smrg# XORG_CHECK_DOCBOOK 9514eca46af7Smrg# ------------------- 951514330f12Smrg# Minimum version: 1.0.0 951695b296d0Smrg# 9517eca46af7Smrg# Checks for the ability to build output formats from SGML DocBook source. 9518eca46af7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9519eca46af7Smrg# indicates whether the necessary tools and files are found and, if set, 9520eca46af7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9521eca46af7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9522eca46af7SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 952395b296d0Smrg 9524eca46af7SmrgBUILDTXTDOC=no 9525eca46af7SmrgBUILDPDFDOC=no 9526eca46af7SmrgBUILDPSDOC=no 9527eca46af7SmrgBUILDHTMLDOC=no 952895b296d0Smrg 9529eca46af7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9530eca46af7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9531eca46af7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9532eca46af7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9533eca46af7Smrg 9534eca46af7SmrgAC_MSG_CHECKING([whether to build text documentation]) 9535eca46af7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9536eca46af7Smrg test x$BUILD_TXTDOC != xno; then 9537eca46af7Smrg BUILDTXTDOC=yes 953814330f12Smrgfi 9539eca46af7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9540eca46af7SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 954195b296d0Smrg 9542eca46af7SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9543eca46af7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9544eca46af7Smrg test x$BUILD_PDFDOC != xno; then 9545eca46af7Smrg BUILDPDFDOC=yes 954614330f12Smrgfi 9547eca46af7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9548eca46af7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9549eca46af7Smrg 9550eca46af7SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9551eca46af7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9552eca46af7Smrg test x$BUILD_PSDOC != xno; then 9553eca46af7Smrg BUILDPSDOC=yes 955414330f12Smrgfi 9555eca46af7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9556eca46af7SmrgAC_MSG_RESULT([$BUILDPSDOC]) 955795b296d0Smrg 9558eca46af7SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9559eca46af7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9560eca46af7Smrg test x$BUILD_HTMLDOC != xno; then 9561eca46af7Smrg BUILDHTMLDOC=yes 956214330f12Smrgfi 9563eca46af7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9564eca46af7SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9565eca46af7Smrg 9566eca46af7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9567eca46af7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9568eca46af7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9569eca46af7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9570eca46af7Smrg 9571eca46af7SmrgAC_SUBST(MAKE_TEXT) 9572eca46af7SmrgAC_SUBST(MAKE_PS) 9573eca46af7SmrgAC_SUBST(MAKE_PDF) 9574eca46af7SmrgAC_SUBST(MAKE_HTML) 9575eca46af7Smrg]) # XORG_CHECK_DOCBOOK 9576eca46af7Smrg 9577eca46af7Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9578eca46af7Smrg# ---------------- 9579eca46af7Smrg# Minimum version: 1.5.0 9580eca46af7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9581eca46af7Smrg# 9582eca46af7Smrg# Documentation tools are not always available on all platforms and sometimes 9583eca46af7Smrg# not at the appropriate level. This macro enables a module to test for the 9584eca46af7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9585eca46af7Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9586eca46af7Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9587eca46af7Smrg# --with-xmlto assumes 'auto'. 9588eca46af7Smrg# 9589eca46af7Smrg# Interface to module: 9590eca46af7Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9591eca46af7Smrg# XMLTO: returns the path of the xmlto program found 9592eca46af7Smrg# returns the path set by the user in the environment 9593eca46af7Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9594eca46af7Smrg# 'no' user instructs the module not to use xmlto 9595eca46af7Smrg# 9596eca46af7Smrg# Added in version 1.10.0 9597eca46af7Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9598eca46af7Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9599eca46af7Smrg# 9600eca46af7Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9601eca46af7Smrg# 9602eca46af7SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9603eca46af7SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9604eca46af7Smrgm4_define([_defopt], m4_default([$2], [auto])) 9605eca46af7SmrgAC_ARG_WITH(xmlto, 9606eca46af7Smrg AS_HELP_STRING([--with-xmlto], 9607eca46af7Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9608eca46af7Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9609eca46af7Smrgm4_undefine([_defopt]) 9610eca46af7Smrg 9611eca46af7Smrgif test "x$use_xmlto" = x"auto"; then 9612eca46af7Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9613eca46af7Smrg if test "x$XMLTO" = "x"; then 9614eca46af7Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9615eca46af7Smrg have_xmlto=no 9616eca46af7Smrg else 9617eca46af7Smrg have_xmlto=yes 9618eca46af7Smrg fi 9619eca46af7Smrgelif test "x$use_xmlto" = x"yes" ; then 9620eca46af7Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9621eca46af7Smrg if test "x$XMLTO" = "x"; then 9622eca46af7Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9623eca46af7Smrg fi 9624eca46af7Smrg have_xmlto=yes 9625eca46af7Smrgelif test "x$use_xmlto" = x"no" ; then 9626eca46af7Smrg if test "x$XMLTO" != "x"; then 9627eca46af7Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9628eca46af7Smrg fi 9629eca46af7Smrg have_xmlto=no 9630eca46af7Smrgelse 9631eca46af7Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 963214330f12Smrgfi 963395b296d0Smrg 9634eca46af7Smrg# Test for a minimum version of xmlto, if provided. 9635eca46af7Smrgm4_ifval([$1], 9636eca46af7Smrg[if test "$have_xmlto" = yes; then 9637eca46af7Smrg # scrape the xmlto version 9638eca46af7Smrg AC_MSG_CHECKING([the xmlto version]) 9639eca46af7Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9640eca46af7Smrg AC_MSG_RESULT([$xmlto_version]) 9641eca46af7Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9642eca46af7Smrg [if test "x$use_xmlto" = xauto; then 9643eca46af7Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9644eca46af7Smrg have_xmlto=no 9645eca46af7Smrg else 9646eca46af7Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9647eca46af7Smrg fi]) 9648eca46af7Smrgfi]) 964995b296d0Smrg 9650eca46af7Smrg# Test for the ability of xmlto to generate a text target 9651eca46af7Smrghave_xmlto_text=no 9652eca46af7Smrgcat > conftest.xml << "EOF" 9653eca46af7SmrgEOF 9654eca46af7SmrgAS_IF([test "$have_xmlto" = yes], 9655eca46af7Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9656eca46af7Smrg [have_xmlto_text=yes], 9657eca46af7Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9658eca46af7Smrgrm -f conftest.xml 9659eca46af7SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9660eca46af7SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9661eca46af7Smrg]) # XORG_WITH_XMLTO 966295b296d0Smrg 9663eca46af7Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9664eca46af7Smrg# -------------------------------------------- 9665eca46af7Smrg# Minimum version: 1.12.0 9666eca46af7Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9667eca46af7Smrg# 9668eca46af7Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9669eca46af7Smrg# XML-based language used for the transformation of XML documents. 9670eca46af7Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9671eca46af7Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9672eca46af7Smrg# The XSLT processor is often used as a standalone tool for transformations. 9673eca46af7Smrg# It should not be assumed that this tool is used only to work with documnetation. 9674eca46af7Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9675eca46af7Smrg# 9676eca46af7Smrg# Interface to module: 9677eca46af7Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9678eca46af7Smrg# XSLTPROC: returns the path of the xsltproc program found 9679eca46af7Smrg# returns the path set by the user in the environment 9680eca46af7Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9681eca46af7Smrg# 'no' user instructs the module not to use xsltproc 9682eca46af7Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9683eca46af7Smrg# 9684eca46af7Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9685eca46af7Smrg# 9686eca46af7SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9687eca46af7SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9688eca46af7Smrg# Preserves the interface, should it be implemented later 9689eca46af7Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9690eca46af7Smrgm4_define([_defopt], m4_default([$2], [auto])) 9691eca46af7SmrgAC_ARG_WITH(xsltproc, 9692eca46af7Smrg AS_HELP_STRING([--with-xsltproc], 9693eca46af7Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9694eca46af7Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9695eca46af7Smrgm4_undefine([_defopt]) 9696eca46af7Smrg 9697eca46af7Smrgif test "x$use_xsltproc" = x"auto"; then 9698eca46af7Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9699eca46af7Smrg if test "x$XSLTPROC" = "x"; then 9700eca46af7Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9701eca46af7Smrg have_xsltproc=no 9702eca46af7Smrg else 9703eca46af7Smrg have_xsltproc=yes 9704eca46af7Smrg fi 9705eca46af7Smrgelif test "x$use_xsltproc" = x"yes" ; then 9706eca46af7Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9707eca46af7Smrg if test "x$XSLTPROC" = "x"; then 9708eca46af7Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9709eca46af7Smrg fi 9710eca46af7Smrg have_xsltproc=yes 9711eca46af7Smrgelif test "x$use_xsltproc" = x"no" ; then 9712eca46af7Smrg if test "x$XSLTPROC" != "x"; then 9713eca46af7Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9714eca46af7Smrg fi 9715eca46af7Smrg have_xsltproc=no 9716eca46af7Smrgelse 9717eca46af7Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 971895b296d0Smrgfi 971995b296d0Smrg 9720eca46af7SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9721eca46af7Smrg]) # XORG_WITH_XSLTPROC 972295b296d0Smrg 9723eca46af7Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9724eca46af7Smrg# ---------------------------------------- 9725eca46af7Smrg# Minimum version: 1.15.0 9726eca46af7Smrg# 9727eca46af7Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9728eca46af7Smrg# scanning arbitrary text files, extracting information from those text files, 9729eca46af7Smrg# and printing reports based on that information. 9730eca46af7Smrg# 9731eca46af7Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9732eca46af7Smrg# 9733eca46af7Smrg# Interface to module: 9734eca46af7Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9735eca46af7Smrg# PERL: returns the path of the perl program found 9736eca46af7Smrg# returns the path set by the user in the environment 9737eca46af7Smrg# --with-perl: 'yes' user instructs the module to use perl 9738eca46af7Smrg# 'no' user instructs the module not to use perl 9739eca46af7Smrg# have_perl: returns yes if perl found in PATH or no 9740eca46af7Smrg# 9741eca46af7Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9742eca46af7Smrg# 9743eca46af7SmrgAC_DEFUN([XORG_WITH_PERL],[ 9744eca46af7SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9745eca46af7Smrg# Preserves the interface, should it be implemented later 9746eca46af7Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9747eca46af7Smrgm4_define([_defopt], m4_default([$2], [auto])) 9748eca46af7SmrgAC_ARG_WITH(perl, 9749eca46af7Smrg AS_HELP_STRING([--with-perl], 9750eca46af7Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9751eca46af7Smrg [use_perl=$withval], [use_perl=]_defopt) 9752eca46af7Smrgm4_undefine([_defopt]) 975395b296d0Smrg 9754eca46af7Smrgif test "x$use_perl" = x"auto"; then 9755eca46af7Smrg AC_PATH_PROG([PERL], [perl]) 9756eca46af7Smrg if test "x$PERL" = "x"; then 9757eca46af7Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9758eca46af7Smrg have_perl=no 9759eca46af7Smrg else 9760eca46af7Smrg have_perl=yes 9761eca46af7Smrg fi 9762eca46af7Smrgelif test "x$use_perl" = x"yes" ; then 9763eca46af7Smrg AC_PATH_PROG([PERL], [perl]) 9764eca46af7Smrg if test "x$PERL" = "x"; then 9765eca46af7Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9766eca46af7Smrg fi 9767eca46af7Smrg have_perl=yes 9768eca46af7Smrgelif test "x$use_perl" = x"no" ; then 9769eca46af7Smrg if test "x$PERL" != "x"; then 9770eca46af7Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9771eca46af7Smrg fi 9772eca46af7Smrg have_perl=no 9773eca46af7Smrgelse 9774eca46af7Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9775eca46af7Smrgfi 977695b296d0Smrg 9777eca46af7SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9778eca46af7Smrg]) # XORG_WITH_PERL 977995b296d0Smrg 9780eca46af7Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9781eca46af7Smrg# ---------------- 9782eca46af7Smrg# Minimum version: 1.5.0 9783eca46af7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 978495b296d0Smrg# 9785eca46af7Smrg# Documentation tools are not always available on all platforms and sometimes 9786eca46af7Smrg# not at the appropriate level. This macro enables a module to test for the 9787eca46af7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9788eca46af7Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9789eca46af7Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9790eca46af7Smrg# --with-asciidoc assumes 'auto'. 9791eca46af7Smrg# 9792eca46af7Smrg# Interface to module: 9793eca46af7Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9794eca46af7Smrg# ASCIIDOC: returns the path of the asciidoc program found 9795eca46af7Smrg# returns the path set by the user in the environment 9796eca46af7Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9797eca46af7Smrg# 'no' user instructs the module not to use asciidoc 9798eca46af7Smrg# 9799eca46af7Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9800eca46af7Smrg# 9801eca46af7SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9802eca46af7SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9803eca46af7Smrgm4_define([_defopt], m4_default([$2], [auto])) 9804eca46af7SmrgAC_ARG_WITH(asciidoc, 9805eca46af7Smrg AS_HELP_STRING([--with-asciidoc], 9806eca46af7Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9807eca46af7Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9808eca46af7Smrgm4_undefine([_defopt]) 980995b296d0Smrg 9810eca46af7Smrgif test "x$use_asciidoc" = x"auto"; then 9811eca46af7Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9812eca46af7Smrg if test "x$ASCIIDOC" = "x"; then 9813eca46af7Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9814eca46af7Smrg have_asciidoc=no 9815eca46af7Smrg else 9816eca46af7Smrg have_asciidoc=yes 9817eca46af7Smrg fi 9818eca46af7Smrgelif test "x$use_asciidoc" = x"yes" ; then 9819eca46af7Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9820eca46af7Smrg if test "x$ASCIIDOC" = "x"; then 9821eca46af7Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9822eca46af7Smrg fi 9823eca46af7Smrg have_asciidoc=yes 9824eca46af7Smrgelif test "x$use_asciidoc" = x"no" ; then 9825eca46af7Smrg if test "x$ASCIIDOC" != "x"; then 9826eca46af7Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9827eca46af7Smrg fi 9828eca46af7Smrg have_asciidoc=no 982914330f12Smrgelse 9830eca46af7Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 983114330f12Smrgfi 9832eca46af7Smrgm4_ifval([$1], 9833eca46af7Smrg[if test "$have_asciidoc" = yes; then 9834eca46af7Smrg # scrape the asciidoc version 9835eca46af7Smrg AC_MSG_CHECKING([the asciidoc version]) 9836eca46af7Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9837eca46af7Smrg AC_MSG_RESULT([$asciidoc_version]) 9838eca46af7Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9839eca46af7Smrg [if test "x$use_asciidoc" = xauto; then 9840eca46af7Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9841eca46af7Smrg have_asciidoc=no 9842eca46af7Smrg else 9843eca46af7Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9844eca46af7Smrg fi]) 9845eca46af7Smrgfi]) 9846eca46af7SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9847eca46af7Smrg]) # XORG_WITH_ASCIIDOC 9848e6f085baSmrg 9849eca46af7Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9850eca46af7Smrg# ------------------------------------------- 9851eca46af7Smrg# Minimum version: 1.5.0 9852eca46af7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9853eca46af7Smrg# Minimum version for optional DOT checking: 1.18.0 985414330f12Smrg# 9855eca46af7Smrg# Documentation tools are not always available on all platforms and sometimes 9856eca46af7Smrg# not at the appropriate level. This macro enables a module to test for the 9857eca46af7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9858eca46af7Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9859eca46af7Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9860eca46af7Smrg# --with-doxygen assumes 'auto'. 9861eca46af7Smrg# 9862eca46af7Smrg# Interface to module: 9863eca46af7Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9864eca46af7Smrg# DOXYGEN: returns the path of the doxygen program found 9865eca46af7Smrg# returns the path set by the user in the environment 9866eca46af7Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9867eca46af7Smrg# 'no' user instructs the module not to use doxygen 9868eca46af7Smrg# 9869eca46af7Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9870eca46af7Smrg# 9871eca46af7SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9872eca46af7SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9873eca46af7SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 9874eca46af7Smrgm4_define([_defopt], m4_default([$2], [auto])) 9875eca46af7SmrgAC_ARG_WITH(doxygen, 9876eca46af7Smrg AS_HELP_STRING([--with-doxygen], 9877eca46af7Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9878eca46af7Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9879eca46af7Smrgm4_undefine([_defopt]) 988014330f12Smrg 9881eca46af7Smrgif test "x$use_doxygen" = x"auto"; then 9882eca46af7Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9883eca46af7Smrg if test "x$DOXYGEN" = "x"; then 9884eca46af7Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9885eca46af7Smrg have_doxygen=no 9886eca46af7Smrg else 9887eca46af7Smrg have_doxygen=yes 9888eca46af7Smrg fi 9889eca46af7Smrgelif test "x$use_doxygen" = x"yes" ; then 9890eca46af7Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9891eca46af7Smrg if test "x$DOXYGEN" = "x"; then 9892eca46af7Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9893eca46af7Smrg fi 9894eca46af7Smrg have_doxygen=yes 9895eca46af7Smrgelif test "x$use_doxygen" = x"no" ; then 9896eca46af7Smrg if test "x$DOXYGEN" != "x"; then 9897eca46af7Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9898eca46af7Smrg fi 9899eca46af7Smrg have_doxygen=no 990095b296d0Smrgelse 9901eca46af7Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 990295b296d0Smrgfi 9903eca46af7Smrgm4_ifval([$1], 9904eca46af7Smrg[if test "$have_doxygen" = yes; then 9905eca46af7Smrg # scrape the doxygen version 9906eca46af7Smrg AC_MSG_CHECKING([the doxygen version]) 9907eca46af7Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 9908eca46af7Smrg AC_MSG_RESULT([$doxygen_version]) 9909eca46af7Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 9910eca46af7Smrg [if test "x$use_doxygen" = xauto; then 9911eca46af7Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9912eca46af7Smrg have_doxygen=no 9913eca46af7Smrg else 9914eca46af7Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9915eca46af7Smrg fi]) 9916eca46af7Smrgfi]) 991795b296d0Smrg 9918eca46af7Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 9919eca46af7Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 9920eca46af7Smrgdnl HAVE_DOT = @HAVE_DOT@ 9921eca46af7SmrgHAVE_DOT=no 9922eca46af7Smrgif test "x$have_doxygen" = "xyes"; then 9923eca46af7Smrg AC_PATH_PROG([DOT], [dot]) 9924eca46af7Smrg if test "x$DOT" != "x"; then 9925eca46af7Smrg HAVE_DOT=yes 9926eca46af7Smrg fi 992795b296d0Smrgfi 992895b296d0Smrg 9929eca46af7SmrgAC_SUBST([HAVE_DOT]) 9930eca46af7SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 9931eca46af7SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9932eca46af7Smrg]) # XORG_WITH_DOXYGEN 993314330f12Smrg 9934eca46af7Smrg# XORG_WITH_GROFF([DEFAULT]) 9935eca46af7Smrg# ---------------- 9936eca46af7Smrg# Minimum version: 1.6.0 9937eca46af7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 993895b296d0Smrg# 9939eca46af7Smrg# Documentation tools are not always available on all platforms and sometimes 9940eca46af7Smrg# not at the appropriate level. This macro enables a module to test for the 9941eca46af7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9942eca46af7Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 9943eca46af7Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 9944eca46af7Smrg# --with-groff assumes 'auto'. 9945eca46af7Smrg# 9946eca46af7Smrg# Interface to module: 9947eca46af7Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 9948eca46af7Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 9949eca46af7Smrg# HAVE_GROFF_MS: the -ms macros package 9950eca46af7Smrg# GROFF: returns the path of the groff program found 9951eca46af7Smrg# returns the path set by the user in the environment 9952eca46af7Smrg# --with-groff: 'yes' user instructs the module to use groff 9953eca46af7Smrg# 'no' user instructs the module not to use groff 9954eca46af7Smrg# 9955eca46af7Smrg# Added in version 1.9.0: 9956eca46af7Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 9957eca46af7Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 9958eca46af7Smrg# psselect from the psutils package. 9959eca46af7Smrg# the ghostcript package. Refer to the grohtml man pages 9960eca46af7Smrg# 9961eca46af7Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9962eca46af7Smrg# 9963eca46af7Smrg# OS and distros often splits groff in a basic and full package, the former 9964eca46af7Smrg# having the groff program and the later having devices, fonts and macros 9965eca46af7Smrg# Checking for the groff executable is not enough. 9966eca46af7Smrg# 9967eca46af7Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 9968eca46af7Smrg# unset HAVE_GROFF or GROFF env variables. 9969eca46af7Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 9970eca46af7Smrg# 9971eca46af7SmrgAC_DEFUN([XORG_WITH_GROFF],[ 9972eca46af7SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 9973eca46af7Smrgm4_define([_defopt], m4_default([$1], [auto])) 9974eca46af7SmrgAC_ARG_WITH(groff, 9975eca46af7Smrg AS_HELP_STRING([--with-groff], 9976eca46af7Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 9977eca46af7Smrg [use_groff=$withval], [use_groff=]_defopt) 9978eca46af7Smrgm4_undefine([_defopt]) 997995b296d0Smrg 9980eca46af7Smrgif test "x$use_groff" = x"auto"; then 9981eca46af7Smrg AC_PATH_PROG([GROFF], [groff]) 9982eca46af7Smrg if test "x$GROFF" = "x"; then 9983eca46af7Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 9984eca46af7Smrg have_groff=no 9985eca46af7Smrg else 9986eca46af7Smrg have_groff=yes 9987eca46af7Smrg fi 9988eca46af7Smrgelif test "x$use_groff" = x"yes" ; then 9989eca46af7Smrg AC_PATH_PROG([GROFF], [groff]) 9990eca46af7Smrg if test "x$GROFF" = "x"; then 9991eca46af7Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 9992eca46af7Smrg fi 9993eca46af7Smrg have_groff=yes 9994eca46af7Smrgelif test "x$use_groff" = x"no" ; then 9995eca46af7Smrg if test "x$GROFF" != "x"; then 9996eca46af7Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 9997eca46af7Smrg fi 9998eca46af7Smrg have_groff=no 9999eca46af7Smrgelse 10000eca46af7Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10001eca46af7Smrgfi 1000214330f12Smrg 10003eca46af7Smrg# We have groff, test for the presence of the macro packages 10004eca46af7Smrgif test "x$have_groff" = x"yes"; then 10005eca46af7Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10006eca46af7Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10007eca46af7Smrg groff_ms_works=yes 10008eca46af7Smrg else 10009eca46af7Smrg groff_ms_works=no 10010eca46af7Smrg fi 10011eca46af7Smrg AC_MSG_RESULT([$groff_ms_works]) 10012eca46af7Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10013eca46af7Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10014eca46af7Smrg groff_mm_works=yes 10015eca46af7Smrg else 10016eca46af7Smrg groff_mm_works=no 10017eca46af7Smrg fi 10018eca46af7Smrg AC_MSG_RESULT([$groff_mm_works]) 1001914330f12Smrgfi 1002014330f12Smrg 10021eca46af7Smrg# We have groff, test for HTML dependencies, one command per package 10022eca46af7Smrgif test "x$have_groff" = x"yes"; then 10023eca46af7Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10024eca46af7Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10025eca46af7Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10026eca46af7Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10027eca46af7Smrg have_groff_html=yes 10028eca46af7Smrg else 10029eca46af7Smrg have_groff_html=no 10030eca46af7Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10031eca46af7Smrg fi 1003214330f12Smrgfi 1003314330f12Smrg 10034eca46af7Smrg# Set Automake conditionals for Makefiles 10035eca46af7SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10036eca46af7SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10037eca46af7SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10038eca46af7SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10039eca46af7Smrg]) # XORG_WITH_GROFF 1004014330f12Smrg 10041eca46af7Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10042eca46af7Smrg# --------------------------------------- 10043eca46af7Smrg# Minimum version: 1.6.0 10044eca46af7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10045eca46af7Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10046eca46af7Smrg# 10047eca46af7Smrg# Documentation tools are not always available on all platforms and sometimes 10048eca46af7Smrg# not at the appropriate level. This macro enables a module to test for the 10049eca46af7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10050eca46af7Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 10051eca46af7Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 10052eca46af7Smrg# --with-fop assumes 'auto'. 10053eca46af7Smrg# 10054eca46af7Smrg# Interface to module: 10055eca46af7Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10056eca46af7Smrg# FOP: returns the path of the fop program found 10057eca46af7Smrg# returns the path set by the user in the environment 10058eca46af7Smrg# --with-fop: 'yes' user instructs the module to use fop 10059eca46af7Smrg# 'no' user instructs the module not to use fop 10060eca46af7Smrg# 10061eca46af7Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10062eca46af7Smrg# 10063eca46af7SmrgAC_DEFUN([XORG_WITH_FOP],[ 10064eca46af7SmrgAC_ARG_VAR([FOP], [Path to fop command]) 10065eca46af7Smrgm4_define([_defopt], m4_default([$2], [auto])) 10066eca46af7SmrgAC_ARG_WITH(fop, 10067eca46af7Smrg AS_HELP_STRING([--with-fop], 10068eca46af7Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10069eca46af7Smrg [use_fop=$withval], [use_fop=]_defopt) 10070eca46af7Smrgm4_undefine([_defopt]) 1007114330f12Smrg 10072eca46af7Smrgif test "x$use_fop" = x"auto"; then 10073eca46af7Smrg AC_PATH_PROG([FOP], [fop]) 10074eca46af7Smrg if test "x$FOP" = "x"; then 10075eca46af7Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10076eca46af7Smrg have_fop=no 10077eca46af7Smrg else 10078eca46af7Smrg have_fop=yes 10079eca46af7Smrg fi 10080eca46af7Smrgelif test "x$use_fop" = x"yes" ; then 10081eca46af7Smrg AC_PATH_PROG([FOP], [fop]) 10082eca46af7Smrg if test "x$FOP" = "x"; then 10083eca46af7Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10084eca46af7Smrg fi 10085eca46af7Smrg have_fop=yes 10086eca46af7Smrgelif test "x$use_fop" = x"no" ; then 10087eca46af7Smrg if test "x$FOP" != "x"; then 10088eca46af7Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10089eca46af7Smrg fi 10090eca46af7Smrg have_fop=no 10091eca46af7Smrgelse 10092eca46af7Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10093eca46af7Smrgfi 1009414330f12Smrg 10095eca46af7Smrg# Test for a minimum version of fop, if provided. 10096eca46af7Smrgm4_ifval([$1], 10097eca46af7Smrg[if test "$have_fop" = yes; then 10098eca46af7Smrg # scrape the fop version 10099eca46af7Smrg AC_MSG_CHECKING([for fop minimum version]) 10100eca46af7Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10101eca46af7Smrg AC_MSG_RESULT([$fop_version]) 10102eca46af7Smrg AS_VERSION_COMPARE([$fop_version], [$1], 10103eca46af7Smrg [if test "x$use_fop" = xauto; then 10104eca46af7Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10105eca46af7Smrg have_fop=no 10106eca46af7Smrg else 10107eca46af7Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10108eca46af7Smrg fi]) 10109eca46af7Smrgfi]) 10110eca46af7SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10111eca46af7Smrg]) # XORG_WITH_FOP 1011214330f12Smrg 10113eca46af7Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1011414330f12Smrg# ---------------- 10115eca46af7Smrg# Minimum version: 1.6.0 1011614330f12Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1011714330f12Smrg# 1011814330f12Smrg# Documentation tools are not always available on all platforms and sometimes 1011914330f12Smrg# not at the appropriate level. This macro enables a module to test for the 1012014330f12Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10121eca46af7Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10122eca46af7Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10123eca46af7Smrg# --with-ps2pdf assumes 'auto'. 1012414330f12Smrg# 1012514330f12Smrg# Interface to module: 10126eca46af7Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10127eca46af7Smrg# PS2PDF: returns the path of the ps2pdf program found 1012814330f12Smrg# returns the path set by the user in the environment 10129eca46af7Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10130eca46af7Smrg# 'no' user instructs the module not to use ps2pdf 10131eca46af7Smrg# 10132eca46af7Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10133eca46af7Smrg# 10134eca46af7SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10135eca46af7SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10136eca46af7Smrgm4_define([_defopt], m4_default([$1], [auto])) 10137eca46af7SmrgAC_ARG_WITH(ps2pdf, 10138eca46af7Smrg AS_HELP_STRING([--with-ps2pdf], 10139eca46af7Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10140eca46af7Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10141eca46af7Smrgm4_undefine([_defopt]) 10142eca46af7Smrg 10143eca46af7Smrgif test "x$use_ps2pdf" = x"auto"; then 10144eca46af7Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10145eca46af7Smrg if test "x$PS2PDF" = "x"; then 10146eca46af7Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10147eca46af7Smrg have_ps2pdf=no 10148eca46af7Smrg else 10149eca46af7Smrg have_ps2pdf=yes 10150eca46af7Smrg fi 10151eca46af7Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10152eca46af7Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10153eca46af7Smrg if test "x$PS2PDF" = "x"; then 10154eca46af7Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10155eca46af7Smrg fi 10156eca46af7Smrg have_ps2pdf=yes 10157eca46af7Smrgelif test "x$use_ps2pdf" = x"no" ; then 10158eca46af7Smrg if test "x$PS2PDF" != "x"; then 10159eca46af7Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10160eca46af7Smrg fi 10161eca46af7Smrg have_ps2pdf=no 10162eca46af7Smrgelse 10163eca46af7Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10164eca46af7Smrgfi 10165eca46af7SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10166eca46af7Smrg]) # XORG_WITH_PS2PDF 10167eca46af7Smrg 10168eca46af7Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10169eca46af7Smrg# ---------------- 10170eca46af7Smrg# Minimum version: 1.6.0 10171eca46af7Smrg# 10172eca46af7Smrg# Documentation tools are not always available on all platforms and sometimes 10173eca46af7Smrg# not at the appropriate level. This macro enables a builder to skip all 10174eca46af7Smrg# documentation targets except traditional man pages. 10175eca46af7Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10176eca46af7Smrg# maximum flexibilty in controlling documentation building. 10177eca46af7Smrg# Refer to: 10178eca46af7Smrg# XORG_WITH_XMLTO --with-xmlto 10179eca46af7Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10180eca46af7Smrg# XORG_WITH_DOXYGEN --with-doxygen 10181eca46af7Smrg# XORG_WITH_FOP --with-fop 10182eca46af7Smrg# XORG_WITH_GROFF --with-groff 10183eca46af7Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10184eca46af7Smrg# 10185eca46af7Smrg# Interface to module: 10186eca46af7Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10187eca46af7Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10188eca46af7Smrg# 'no' user instructs the module not to generate docs 10189eca46af7Smrg# parm1: specify the default value, yes or no. 10190eca46af7Smrg# 10191eca46af7SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10192eca46af7Smrgm4_define([docs_default], m4_default([$1], [yes])) 10193eca46af7SmrgAC_ARG_ENABLE(docs, 10194eca46af7Smrg AS_HELP_STRING([--enable-docs], 10195eca46af7Smrg [Enable building the documentation (default: ]docs_default[)]), 10196eca46af7Smrg [build_docs=$enableval], [build_docs=]docs_default) 10197eca46af7Smrgm4_undefine([docs_default]) 10198eca46af7SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10199eca46af7SmrgAC_MSG_CHECKING([whether to build documentation]) 10200eca46af7SmrgAC_MSG_RESULT([$build_docs]) 10201eca46af7Smrg]) # XORG_ENABLE_DOCS 10202eca46af7Smrg 10203eca46af7Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10204eca46af7Smrg# ---------------- 10205eca46af7Smrg# Minimum version: 1.6.0 10206eca46af7Smrg# 10207eca46af7Smrg# This macro enables a builder to skip all developer documentation. 10208eca46af7Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10209eca46af7Smrg# maximum flexibilty in controlling documentation building. 10210eca46af7Smrg# Refer to: 10211eca46af7Smrg# XORG_WITH_XMLTO --with-xmlto 10212eca46af7Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10213eca46af7Smrg# XORG_WITH_DOXYGEN --with-doxygen 10214eca46af7Smrg# XORG_WITH_FOP --with-fop 10215eca46af7Smrg# XORG_WITH_GROFF --with-groff 10216eca46af7Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10217eca46af7Smrg# 10218eca46af7Smrg# Interface to module: 10219eca46af7Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10220eca46af7Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10221eca46af7Smrg# 'no' user instructs the module not to generate developer docs 10222eca46af7Smrg# parm1: specify the default value, yes or no. 10223eca46af7Smrg# 10224eca46af7SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10225eca46af7Smrgm4_define([devel_default], m4_default([$1], [yes])) 10226eca46af7SmrgAC_ARG_ENABLE(devel-docs, 10227eca46af7Smrg AS_HELP_STRING([--enable-devel-docs], 10228eca46af7Smrg [Enable building the developer documentation (default: ]devel_default[)]), 10229eca46af7Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10230eca46af7Smrgm4_undefine([devel_default]) 10231eca46af7SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10232eca46af7SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10233eca46af7SmrgAC_MSG_RESULT([$build_devel_docs]) 10234eca46af7Smrg]) # XORG_ENABLE_DEVEL_DOCS 10235eca46af7Smrg 10236eca46af7Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10237eca46af7Smrg# ---------------- 10238eca46af7Smrg# Minimum version: 1.6.0 10239eca46af7Smrg# 10240eca46af7Smrg# This macro enables a builder to skip all functional specification targets. 10241eca46af7Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10242eca46af7Smrg# maximum flexibilty in controlling documentation building. 10243eca46af7Smrg# Refer to: 10244eca46af7Smrg# XORG_WITH_XMLTO --with-xmlto 10245eca46af7Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10246eca46af7Smrg# XORG_WITH_DOXYGEN --with-doxygen 10247eca46af7Smrg# XORG_WITH_FOP --with-fop 10248eca46af7Smrg# XORG_WITH_GROFF --with-groff 10249eca46af7Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10250eca46af7Smrg# 10251eca46af7Smrg# Interface to module: 10252eca46af7Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10253eca46af7Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10254eca46af7Smrg# 'no' user instructs the module not to generate specs 10255eca46af7Smrg# parm1: specify the default value, yes or no. 10256eca46af7Smrg# 10257eca46af7SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10258eca46af7Smrgm4_define([spec_default], m4_default([$1], [yes])) 10259eca46af7SmrgAC_ARG_ENABLE(specs, 10260eca46af7Smrg AS_HELP_STRING([--enable-specs], 10261eca46af7Smrg [Enable building the specs (default: ]spec_default[)]), 10262eca46af7Smrg [build_specs=$enableval], [build_specs=]spec_default) 10263eca46af7Smrgm4_undefine([spec_default]) 10264eca46af7SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10265eca46af7SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10266eca46af7SmrgAC_MSG_RESULT([$build_specs]) 10267eca46af7Smrg]) # XORG_ENABLE_SPECS 10268eca46af7Smrg 10269eca46af7Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10270eca46af7Smrg# ---------------------------------------------- 10271eca46af7Smrg# Minimum version: 1.13.0 1027214330f12Smrg# 10273eca46af7Smrg# This macro enables a builder to enable/disable unit testing 10274eca46af7Smrg# It makes no assumption about the test cases implementation 10275eca46af7Smrg# Test cases may or may not use Automake "Support for test suites" 10276eca46af7Smrg# They may or may not use the software utility library GLib 1027714330f12Smrg# 10278eca46af7Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10279eca46af7Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10280eca46af7Smrg# The variable enable_unit_tests is used by other macros in this file. 1028114330f12Smrg# 10282eca46af7Smrg# Interface to module: 10283eca46af7Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10284eca46af7Smrg# enable_unit_tests: used in configure.ac for additional configuration 10285eca46af7Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10286eca46af7Smrg# 'no' user instructs the module not to build tests 10287eca46af7Smrg# parm1: specify the default value, yes or no. 10288eca46af7Smrg# 10289eca46af7SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10290eca46af7SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10291eca46af7SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10292eca46af7SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10293eca46af7Smrgm4_define([_defopt], m4_default([$1], [auto])) 10294eca46af7SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10295eca46af7Smrg [Enable building unit test cases (default: ]_defopt[)]), 10296eca46af7Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1029714330f12Smrgm4_undefine([_defopt]) 10298eca46af7SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10299eca46af7SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10300eca46af7SmrgAC_MSG_RESULT([$enable_unit_tests]) 10301eca46af7Smrg]) # XORG_ENABLE_UNIT_TESTS 1030214330f12Smrg 10303eca46af7Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10304eca46af7Smrg# ------------------------------------------------------ 10305eca46af7Smrg# Minimum version: 1.17.0 1030614330f12Smrg# 10307eca46af7Smrg# This macro enables a builder to enable/disable integration testing 10308eca46af7Smrg# It makes no assumption about the test cases' implementation 10309eca46af7Smrg# Test cases may or may not use Automake "Support for test suites" 1031014330f12Smrg# 10311eca46af7Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10312eca46af7Smrg# usually requires less dependencies and may be built and run under less 10313eca46af7Smrg# stringent environments than integration tests. 1031414330f12Smrg# 10315eca46af7Smrg# Interface to module: 10316eca46af7Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10317eca46af7Smrg# enable_integration_tests: used in configure.ac for additional configuration 10318eca46af7Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 10319eca46af7Smrg# 'no' user instructs the module not to build tests 10320eca46af7Smrg# parm1: specify the default value, yes or no. 1032114330f12Smrg# 10322eca46af7SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10323eca46af7SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10324eca46af7Smrgm4_define([_defopt], m4_default([$1], [auto])) 10325eca46af7SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10326eca46af7Smrg [Enable building integration test cases (default: ]_defopt[)]), 10327eca46af7Smrg [enable_integration_tests=$enableval], 10328eca46af7Smrg [enable_integration_tests=]_defopt) 1032914330f12Smrgm4_undefine([_defopt]) 10330eca46af7SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10331eca46af7Smrg [test "x$enable_integration_tests" != xno]) 10332eca46af7SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10333eca46af7SmrgAC_MSG_RESULT([$enable_integration_tests]) 10334eca46af7Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 1033514330f12Smrg 10336eca46af7Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1033714330f12Smrg# ---------------------------------------- 10338eca46af7Smrg# Minimum version: 1.13.0 1033995b296d0Smrg# 10340eca46af7Smrg# GLib is a library which provides advanced data structures and functions. 10341eca46af7Smrg# This macro enables a module to test for the presence of Glib. 1034214330f12Smrg# 10343eca46af7Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10344eca46af7Smrg# Otherwise the value of $enable_unit_tests is blank. 1034514330f12Smrg# 10346eca46af7Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10347eca46af7Smrg# test support usually requires less dependencies and may be built and run under 10348eca46af7Smrg# less stringent environments than integration tests. 1034914330f12Smrg# 10350eca46af7Smrg# Interface to module: 10351eca46af7Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 10352eca46af7Smrg# with_glib: used in configure.ac to know if GLib has been found 10353eca46af7Smrg# --with-glib: 'yes' user instructs the module to use glib 10354eca46af7Smrg# 'no' user instructs the module not to use glib 1035514330f12Smrg# 10356eca46af7SmrgAC_DEFUN([XORG_WITH_GLIB],[ 10357eca46af7SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1035814330f12Smrgm4_define([_defopt], m4_default([$2], [auto])) 10359eca46af7SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10360eca46af7Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 10361eca46af7Smrg [with_glib=$withval], [with_glib=]_defopt) 1036214330f12Smrgm4_undefine([_defopt]) 1036314330f12Smrg 10364eca46af7Smrghave_glib=no 10365eca46af7Smrg# Do not probe GLib if user explicitly disabled unit testing 10366eca46af7Smrgif test "x$enable_unit_tests" != x"no"; then 10367eca46af7Smrg # Do not probe GLib if user explicitly disabled it 10368eca46af7Smrg if test "x$with_glib" != x"no"; then 10369eca46af7Smrg m4_ifval( 10370eca46af7Smrg [$1], 10371eca46af7Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10372eca46af7Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10373eca46af7Smrg ) 10374eca46af7Smrg fi 10375eca46af7Smrgfi 10376eca46af7Smrg 10377eca46af7Smrg# Not having GLib when unit testing has been explicitly requested is an error 10378eca46af7Smrgif test "x$enable_unit_tests" = x"yes"; then 10379eca46af7Smrg if test "x$have_glib" = x"no"; then 10380eca46af7Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10381eca46af7Smrg fi 10382eca46af7Smrgfi 10383eca46af7Smrg 10384eca46af7Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 10385eca46af7Smrgif test "x$enable_unit_tests" = x"no"; then 10386eca46af7Smrg if test "x$with_glib" = x"yes"; then 10387eca46af7Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10388eca46af7Smrg fi 1038914330f12Smrgfi 1039095b296d0Smrg 10391eca46af7Smrg# Not having GLib when it has been explicitly requested is an error 10392eca46af7Smrgif test "x$with_glib" = x"yes"; then 10393eca46af7Smrg if test "x$have_glib" = x"no"; then 10394eca46af7Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10395eca46af7Smrg fi 10396eca46af7Smrgfi 1039714330f12Smrg 10398eca46af7SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10399eca46af7Smrg]) # XORG_WITH_GLIB 10400eca46af7Smrg 10401eca46af7Smrg# XORG_LD_WRAP([required|optional]) 10402eca46af7Smrg# --------------------------------- 10403eca46af7Smrg# Minimum version: 1.13.0 1040495b296d0Smrg# 10405eca46af7Smrg# Check if linker supports -wrap, passed via compiler flags 1040614330f12Smrg# 10407eca46af7Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10408eca46af7Smrg# Otherwise the value of $enable_unit_tests is blank. 1040914330f12Smrg# 10410eca46af7Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10411eca46af7Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10412eca46af7Smrg# available, an argument of "optional" allows use when some unit tests require 10413eca46af7Smrg# ld -wrap and others do not. 1041414330f12Smrg# 10415eca46af7SmrgAC_DEFUN([XORG_LD_WRAP],[ 10416eca46af7SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10417eca46af7Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 10418eca46af7Smrg void __wrap_exit(int status) { return; }], 10419eca46af7Smrg [exit(0);])]) 10420eca46af7Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 10421eca46af7Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10422eca46af7Smrg if test "x$have_ld_wrap" = x"no"; then 10423eca46af7Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10424eca46af7Smrg fi 1042514330f12Smrgfi 10426eca46af7SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10427eca46af7Smrg# 10428eca46af7Smrg]) # XORG_LD_WRAP 1042995b296d0Smrg 10430eca46af7Smrg# XORG_CHECK_LINKER_FLAGS 10431eca46af7Smrg# ----------------------- 10432eca46af7Smrg# SYNOPSIS 1043314330f12Smrg# 10434eca46af7Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1043514330f12Smrg# 10436eca46af7Smrg# DESCRIPTION 1043714330f12Smrg# 10438eca46af7Smrg# Check whether the given linker FLAGS work with the current language's 10439eca46af7Smrg# linker, or whether they give an error. 1044014330f12Smrg# 10441eca46af7Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10442eca46af7Smrg# success/failure. 1044395b296d0Smrg# 10444eca46af7Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1044514330f12Smrg# 10446eca46af7Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1044714330f12Smrg# 10448eca46af7Smrg# LICENSE 10449eca46af7Smrg# 10450eca46af7Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10451eca46af7Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10452eca46af7Smrg# Copyright (c) 2009 Matteo Frigo 10453eca46af7Smrg# 10454eca46af7Smrg# This program is free software: you can redistribute it and/or modify it 10455eca46af7Smrg# under the terms of the GNU General Public License as published by the 10456eca46af7Smrg# Free Software Foundation, either version 3 of the License, or (at your 10457eca46af7Smrg# option) any later version. 10458eca46af7Smrg# 10459eca46af7Smrg# This program is distributed in the hope that it will be useful, but 10460eca46af7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10461eca46af7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10462eca46af7Smrg# Public License for more details. 10463eca46af7Smrg# 10464eca46af7Smrg# You should have received a copy of the GNU General Public License along 10465eca46af7Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10466eca46af7Smrg# 10467eca46af7Smrg# As a special exception, the respective Autoconf Macro's copyright owner 10468eca46af7Smrg# gives unlimited permission to copy, distribute and modify the configure 10469eca46af7Smrg# scripts that are the output of Autoconf when processing the Macro. You 10470eca46af7Smrg# need not follow the terms of the GNU General Public License when using 10471eca46af7Smrg# or distributing such scripts, even though portions of the text of the 10472eca46af7Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10473eca46af7Smrg# all other use of the material that constitutes the Autoconf Macro. 10474eca46af7Smrg# 10475eca46af7Smrg# This special exception to the GPL applies to versions of the Autoconf 10476eca46af7Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10477eca46af7Smrg# modified version of the Autoconf Macro, you may extend this special 10478eca46af7Smrg# exception to the GPL to apply to your modified version as well.# 10479eca46af7SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10480eca46af7Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10481eca46af7Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10482eca46af7SmrgAS_LITERAL_IF([$1], 10483eca46af7Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10484eca46af7Smrg ax_save_FLAGS=$LDFLAGS 10485eca46af7Smrg LDFLAGS="$1" 10486eca46af7Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10487eca46af7Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10488eca46af7Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10489eca46af7Smrg LDFLAGS=$ax_save_FLAGS])], 10490eca46af7Smrg [ax_save_FLAGS=$LDFLAGS 10491eca46af7Smrg LDFLAGS="$1" 10492eca46af7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10493eca46af7Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10494eca46af7Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10495eca46af7Smrg LDFLAGS=$ax_save_FLAGS]) 10496eca46af7Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10497eca46af7SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10498eca46af7Smrgif test "x$xorg_check_linker_flags" = xyes; then 10499eca46af7Smrg m4_default([$2], :) 10500eca46af7Smrgelse 10501eca46af7Smrg m4_default([$3], :) 10502eca46af7Smrgfi 10503eca46af7Smrg]) # XORG_CHECK_LINKER_FLAGS 10504eca46af7Smrg 10505eca46af7Smrg# XORG_MEMORY_CHECK_FLAGS 10506eca46af7Smrg# ----------------------- 10507eca46af7Smrg# Minimum version: 1.16.0 1050814330f12Smrg# 10509eca46af7Smrg# This macro attempts to find appropriate memory checking functionality 10510eca46af7Smrg# for various platforms which unit testing code may use to catch various 10511eca46af7Smrg# forms of memory allocation and access errors in testing. 1051214330f12Smrg# 10513eca46af7Smrg# Interface to module: 10514eca46af7Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10515eca46af7Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1051614330f12Smrg# 10517eca46af7Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1051814330f12Smrg# 10519eca46af7SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1052095b296d0Smrg 10521eca46af7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10522eca46af7SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10523eca46af7Smrg [Environment variables to enable memory checking in tests]) 1052495b296d0Smrg 10525eca46af7Smrg# Check for different types of support on different platforms 10526eca46af7Smrgcase $host_os in 10527eca46af7Smrg solaris*) 10528eca46af7Smrg AC_CHECK_LIB([umem], [umem_alloc], 10529eca46af7Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10530eca46af7Smrg ;; 10531eca46af7Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10532eca46af7Smrg # both directly and inverted, so should not be 0 or 255. 10533eca46af7Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10534eca46af7Smrg ;; 10535eca46af7Smrg darwin*) 10536eca46af7Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10537eca46af7Smrg ;; 10538eca46af7Smrg *bsd*) 10539eca46af7Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10540eca46af7Smrg ;; 10541eca46af7Smrgesac 1054295b296d0Smrg 10543eca46af7Smrg# User supplied flags override default flags 10544eca46af7Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10545eca46af7Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1054695b296d0Smrgfi 1054795b296d0Smrg 10548eca46af7SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10549eca46af7Smrg]) # XORG_WITH_LINT 1055095b296d0Smrg 10551eca46af7Smrg# XORG_CHECK_MALLOC_ZERO 10552eca46af7Smrg# ---------------------- 10553eca46af7Smrg# Minimum version: 1.0.0 1055414330f12Smrg# 10555eca46af7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10556eca46af7Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 10557eca46af7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10558eca46af7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10559eca46af7SmrgAC_ARG_ENABLE(malloc0returnsnull, 10560eca46af7Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 10561eca46af7Smrg [malloc(0) returns NULL (default: auto)]), 10562eca46af7Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10563eca46af7Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1056495b296d0Smrg 10565eca46af7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10566eca46af7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10567eca46af7SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10568eca46af7Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10569eca46af7Smrg#include <stdlib.h> 10570eca46af7Smrg],[ 10571eca46af7Smrg char *m0, *r0, *c0, *p; 10572eca46af7Smrg m0 = malloc(0); 10573eca46af7Smrg p = malloc(10); 10574eca46af7Smrg r0 = realloc(p,0); 10575eca46af7Smrg c0 = calloc(0,10); 10576eca46af7Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10577eca46af7Smrg])], 10578eca46af7Smrg [xorg_cv_malloc0_returns_null=yes], 10579eca46af7Smrg [xorg_cv_malloc0_returns_null=no])]) 10580eca46af7SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10581eca46af7Smrgfi 10582eca46af7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10583eca46af7Smrg 10584eca46af7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10585eca46af7Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10586eca46af7Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10587eca46af7Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1058814330f12Smrgelse 10589eca46af7Smrg MALLOC_ZERO_CFLAGS="" 10590eca46af7Smrg XMALLOC_ZERO_CFLAGS="" 10591eca46af7Smrg XTMALLOC_ZERO_CFLAGS="" 1059214330f12Smrgfi 1059395b296d0Smrg 10594eca46af7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10595eca46af7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10596eca46af7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10597eca46af7Smrg]) # XORG_CHECK_MALLOC_ZERO 1059895b296d0Smrg 10599eca46af7Smrg# XORG_WITH_LINT() 1060014330f12Smrg# ---------------- 10601eca46af7Smrg# Minimum version: 1.1.0 1060214330f12Smrg# 10603eca46af7Smrg# This macro enables the use of a tool that flags some suspicious and 10604eca46af7Smrg# non-portable constructs (likely to be bugs) in C language source code. 10605eca46af7Smrg# It will attempt to locate the tool and use appropriate options. 10606eca46af7Smrg# There are various lint type tools on different platforms. 1060714330f12Smrg# 1060814330f12Smrg# Interface to module: 10609eca46af7Smrg# LINT: returns the path to the tool found on the platform 10610eca46af7Smrg# or the value set to LINT on the configure cmd line 10611eca46af7Smrg# also an Automake conditional 10612eca46af7Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1061314330f12Smrg# 10614eca46af7Smrg# --with-lint: 'yes' user instructs the module to use lint 10615eca46af7Smrg# 'no' user instructs the module not to use lint (default) 1061614330f12Smrg# 10617eca46af7Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10618eca46af7Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10619eca46af7Smrg# 10620eca46af7SmrgAC_DEFUN([XORG_WITH_LINT],[ 10621eca46af7Smrg 10622eca46af7SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10623eca46af7SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10624eca46af7SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10625eca46af7Smrg [Use a lint-style source code checker (default: disabled)])], 10626eca46af7Smrg [use_lint=$withval], [use_lint=no]) 10627e6f085baSmrg 10628eca46af7Smrg# Obtain platform specific info like program name and options 10629eca46af7Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10630eca46af7Smrgcase $host_os in 10631eca46af7Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10632eca46af7Smrg lint_name=splint 10633eca46af7Smrg lint_options="-badflag" 10634eca46af7Smrg ;; 10635eca46af7Smrg *freebsd* | *netbsd*) 10636eca46af7Smrg lint_name=lint 10637eca46af7Smrg lint_options="-u -b" 10638eca46af7Smrg ;; 10639eca46af7Smrg *solaris*) 10640eca46af7Smrg lint_name=lint 10641eca46af7Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10642eca46af7Smrg ;; 10643eca46af7Smrgesac 10644eca46af7Smrg 10645eca46af7Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10646eca46af7Smrgif test "x$use_lint" = x"yes" ; then 10647eca46af7Smrg AC_PATH_PROG([LINT], [$lint_name]) 10648eca46af7Smrg if test "x$LINT" = "x"; then 10649eca46af7Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1065014330f12Smrg fi 10651eca46af7Smrgelif test "x$use_lint" = x"no" ; then 10652eca46af7Smrg if test "x$LINT" != "x"; then 10653eca46af7Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1065414330f12Smrg fi 1065514330f12Smrgelse 10656eca46af7Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1065714330f12Smrgfi 1065895b296d0Smrg 10659eca46af7Smrg# User supplied flags override default flags 10660eca46af7Smrgif test "x$LINT_FLAGS" != "x"; then 10661eca46af7Smrg lint_options=$LINT_FLAGS 10662eca46af7Smrgfi 10663eca46af7Smrg 10664eca46af7SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10665eca46af7SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10666eca46af7Smrg 10667eca46af7Smrg]) # XORG_WITH_LINT 10668eca46af7Smrg 10669eca46af7Smrg# XORG_LINT_LIBRARY(LIBNAME) 10670eca46af7Smrg# -------------------------- 10671eca46af7Smrg# Minimum version: 1.1.0 1067214330f12Smrg# 10673eca46af7Smrg# Sets up flags for building lint libraries for checking programs that call 10674eca46af7Smrg# functions in the library. 1067514330f12Smrg# 1067614330f12Smrg# Interface to module: 10677eca46af7Smrg# LINTLIB - Automake variable with the name of lint library file to make 10678eca46af7Smrg# MAKE_LINT_LIB - Automake conditional 1067914330f12Smrg# 10680eca46af7Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10681eca46af7Smrg# - 'no' user instructs the module not to create a lint library (default) 1068295b296d0Smrg 10683eca46af7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10684eca46af7SmrgAC_REQUIRE([XORG_WITH_LINT]) 10685eca46af7SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10686eca46af7Smrg [Create lint library (default: disabled)])], 10687eca46af7Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10688eca46af7Smrg 10689eca46af7Smrgif test "x$make_lint_lib" = x"yes" ; then 10690eca46af7Smrg LINTLIB=llib-l$1.ln 10691eca46af7Smrg if test "x$LINT" = "x"; then 10692eca46af7Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10693eca46af7Smrg fi 10694eca46af7Smrgelif test "x$make_lint_lib" != x"no" ; then 10695eca46af7Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10696eca46af7Smrgfi 10697eca46af7Smrg 10698eca46af7SmrgAC_SUBST(LINTLIB) 10699eca46af7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10700eca46af7Smrg 10701eca46af7Smrg]) # XORG_LINT_LIBRARY 10702eca46af7Smrg 10703eca46af7Smrg# XORG_COMPILER_BRAND 10704eca46af7Smrg# ------------------- 10705eca46af7Smrg# Minimum version: 1.14.0 1070614330f12Smrg# 10707eca46af7Smrg# Checks for various brands of compilers and sets flags as appropriate: 10708eca46af7Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10709eca46af7Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10710eca46af7Smrg# clang compiler - sets CLANGCC to "yes" 10711eca46af7Smrg# Intel compiler - sets INTELCC to "yes" 10712eca46af7Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1071314330f12Smrg# 10714eca46af7SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10715eca46af7SmrgAC_LANG_CASE( 10716eca46af7Smrg [C], [ 10717eca46af7Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10718eca46af7Smrg ], 10719eca46af7Smrg [C++], [ 10720eca46af7Smrg AC_REQUIRE([AC_PROG_CXX]) 10721eca46af7Smrg ] 10722eca46af7Smrg) 10723eca46af7SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10724eca46af7SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10725eca46af7SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10726eca46af7Smrg]) # XORG_COMPILER_BRAND 1072795b296d0Smrg 10728eca46af7Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10729eca46af7Smrg# --------------- 10730eca46af7Smrg# Minimum version: 1.16.0 1073114330f12Smrg# 10732eca46af7Smrg# Test if the compiler works when passed the given flag as a command line argument. 10733eca46af7Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10734eca46af7Smrg# next flag in the list until there are no more options. 1073595b296d0Smrg# 10736eca46af7Smrg# Note that this does not guarantee that the compiler supports the flag as some 10737eca46af7Smrg# compilers will simply ignore arguments that they do not understand, but we do 10738eca46af7Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10739eca46af7Smrg# -Werror=unused-command-line-argument 1074014330f12Smrg# 10741eca46af7SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10742eca46af7Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10743eca46af7Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10744eca46af7Smrg 10745eca46af7SmrgAC_LANG_COMPILER_REQUIRE 10746eca46af7Smrg 10747eca46af7SmrgAC_LANG_CASE( 10748eca46af7Smrg [C], [ 10749eca46af7Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10750eca46af7Smrg define([PREFIX], [C]) 10751eca46af7Smrg define([CACHE_PREFIX], [cc]) 10752eca46af7Smrg define([COMPILER], [$CC]) 10753eca46af7Smrg ], 10754eca46af7Smrg [C++], [ 10755eca46af7Smrg define([PREFIX], [CXX]) 10756eca46af7Smrg define([CACHE_PREFIX], [cxx]) 10757eca46af7Smrg define([COMPILER], [$CXX]) 10758eca46af7Smrg ] 10759eca46af7Smrg) 10760eca46af7Smrg 10761eca46af7Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10762eca46af7Smrg 10763eca46af7Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10764eca46af7Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10765eca46af7Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10766eca46af7Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10767eca46af7Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10768eca46af7Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10769eca46af7Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10770eca46af7Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10771eca46af7Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10772eca46af7Smrgfi 10773eca46af7Smrg 10774eca46af7Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10775eca46af7Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10776eca46af7Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10777eca46af7Smrg fi 10778eca46af7Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10779eca46af7Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10780eca46af7Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10781eca46af7Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10782eca46af7Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10783eca46af7Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10784eca46af7Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10785eca46af7Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10786eca46af7Smrgfi 10787eca46af7Smrg 10788eca46af7Smrgfound="no" 10789eca46af7Smrgm4_foreach([flag], m4_cdr($@), [ 10790eca46af7Smrg if test $found = "no" ; then 10791eca46af7Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10792eca46af7Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10793eca46af7Smrg fi 1079495b296d0Smrg 10795eca46af7Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10796eca46af7Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10797eca46af7Smrg fi 1079814330f12Smrg 10799eca46af7Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10800eca46af7Smrg 10801eca46af7Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10802eca46af7Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10803eca46af7Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10804eca46af7Smrg AC_CACHE_VAL($cacheid, 10805eca46af7Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10806eca46af7Smrg [eval $cacheid=yes], 10807eca46af7Smrg [eval $cacheid=no])]) 10808eca46af7Smrg 10809eca46af7Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10810eca46af7Smrg 10811eca46af7Smrg eval supported=\$$cacheid 10812eca46af7Smrg AC_MSG_RESULT([$supported]) 10813eca46af7Smrg if test "$supported" = "yes" ; then 10814eca46af7Smrg $1="$$1 ]flag[" 10815eca46af7Smrg found="yes" 10816eca46af7Smrg fi 10817eca46af7Smrg fi 10818eca46af7Smrg]) 10819eca46af7Smrg]) # XORG_TESTSET_CFLAG 10820eca46af7Smrg 10821eca46af7Smrg# XORG_COMPILER_FLAGS 10822eca46af7Smrg# --------------- 10823eca46af7Smrg# Minimum version: 1.16.0 1082414330f12Smrg# 10825eca46af7Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10826eca46af7Smrg# arguments supported by the selected compiler which do NOT alter the generated 10827eca46af7Smrg# code. These arguments will cause the compiler to print various warnings 10828eca46af7Smrg# during compilation AND turn a conservative set of warnings into errors. 1082914330f12Smrg# 10830eca46af7Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10831eca46af7Smrg# future versions of util-macros as options are added to new compilers. 1083214330f12Smrg# 10833eca46af7SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10834eca46af7SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1083514330f12Smrg 10836eca46af7SmrgAC_ARG_ENABLE(selective-werror, 10837eca46af7Smrg AS_HELP_STRING([--disable-selective-werror], 10838eca46af7Smrg [Turn off selective compiler errors. (default: enabled)]), 10839eca46af7Smrg [SELECTIVE_WERROR=$enableval], 10840eca46af7Smrg [SELECTIVE_WERROR=yes]) 10841eca46af7Smrg 10842eca46af7SmrgAC_LANG_CASE( 10843eca46af7Smrg [C], [ 10844eca46af7Smrg define([PREFIX], [C]) 10845eca46af7Smrg ], 10846eca46af7Smrg [C++], [ 10847eca46af7Smrg define([PREFIX], [CXX]) 10848eca46af7Smrg ] 10849eca46af7Smrg) 10850eca46af7Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10851eca46af7Smrgif test "x$SUNCC" = "xyes"; then 10852eca46af7Smrg [BASE_]PREFIX[FLAGS]="-v" 10853eca46af7Smrgelse 10854eca46af7Smrg [BASE_]PREFIX[FLAGS]="" 10855eca46af7Smrgfi 10856eca46af7Smrg 10857eca46af7Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10858eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10859eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10860eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10861eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10862eca46af7Smrg 10863eca46af7SmrgAC_LANG_CASE( 10864eca46af7Smrg [C], [ 10865eca46af7Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10866eca46af7Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10867eca46af7Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10868eca46af7Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10869eca46af7Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 10870eca46af7Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10871eca46af7Smrg ] 10872eca46af7Smrg) 10873eca46af7Smrg 10874eca46af7Smrg# This chunk adds additional warnings that could catch undesired effects. 10875eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10876eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10877eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10878eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10879eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10880eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10881eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10882eca46af7Smrg 10883eca46af7Smrg# These are currently disabled because they are noisy. They will be enabled 10884eca46af7Smrg# in the future once the codebase is sufficiently modernized to silence 10885eca46af7Smrg# them. For now, I don't want them to drown out the other warnings. 10886eca46af7Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10887eca46af7Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10888eca46af7Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10889eca46af7Smrg 10890eca46af7Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10891eca46af7Smrg# when there are problems that should be fixed. 10892eca46af7Smrg 10893eca46af7Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10894eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10895eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10896eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10897eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10898eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10899eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10900eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10901eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10902eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10903eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10904eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10905eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10906eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10907eca46af7Smrgelse 10908eca46af7SmrgAC_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]) 10909eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10910eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10911eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10912eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10913eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10914eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10915eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10916eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10917eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10918eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10919eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10920eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10921eca46af7SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10922eca46af7Smrgfi 10923eca46af7Smrg 10924eca46af7SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10925eca46af7Smrg]) # XORG_COMPILER_FLAGS 10926eca46af7Smrg 10927eca46af7Smrg# XORG_CWARNFLAGS 10928eca46af7Smrg# --------------- 10929eca46af7Smrg# Minimum version: 1.2.0 10930eca46af7Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1093114330f12Smrg# 10932eca46af7Smrg# Defines CWARNFLAGS to enable C compiler warnings. 1093314330f12Smrg# 10934eca46af7Smrg# This function is deprecated because it defines -fno-strict-aliasing 10935eca46af7Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10936eca46af7Smrg# is needed, then it should be added explicitly in the module when 10937eca46af7Smrg# it is updated to use BASE_CFLAGS. 1093814330f12Smrg# 10939eca46af7SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10940eca46af7SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10941eca46af7SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10942eca46af7SmrgAC_LANG_CASE( 10943eca46af7Smrg [C], [ 10944eca46af7Smrg CWARNFLAGS="$BASE_CFLAGS" 10945eca46af7Smrg if test "x$GCC" = xyes ; then 10946eca46af7Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10947eca46af7Smrg fi 10948eca46af7Smrg AC_SUBST(CWARNFLAGS) 10949eca46af7Smrg ] 10950eca46af7Smrg) 10951eca46af7Smrg]) # XORG_CWARNFLAGS 10952eca46af7Smrg 10953eca46af7Smrg# XORG_STRICT_OPTION 10954eca46af7Smrg# ----------------------- 10955eca46af7Smrg# Minimum version: 1.3.0 1095614330f12Smrg# 10957eca46af7Smrg# Add configure option to enable strict compilation flags, such as treating 10958eca46af7Smrg# warnings as fatal errors. 10959eca46af7Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10960eca46af7Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1096114330f12Smrg# 10962eca46af7Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10963eca46af7Smrg# when strict compilation is unconditionally desired. 10964eca46af7SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 10965eca46af7SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10966eca46af7SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1096795b296d0Smrg 10968eca46af7SmrgAC_ARG_ENABLE(strict-compilation, 10969eca46af7Smrg AS_HELP_STRING([--enable-strict-compilation], 10970eca46af7Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 10971eca46af7Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1097295b296d0Smrg 10973eca46af7SmrgAC_LANG_CASE( 10974eca46af7Smrg [C], [ 10975eca46af7Smrg define([PREFIX], [C]) 10976eca46af7Smrg ], 10977eca46af7Smrg [C++], [ 10978eca46af7Smrg define([PREFIX], [CXX]) 10979eca46af7Smrg ] 10980eca46af7Smrg) 1098195b296d0Smrg 10982eca46af7Smrg[STRICT_]PREFIX[FLAGS]="" 10983eca46af7SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10984eca46af7SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1098595b296d0Smrg 10986eca46af7Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10987eca46af7Smrg# activate it with -Werror, so we add it here explicitly. 10988eca46af7SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1098995b296d0Smrg 10990eca46af7Smrgif test "x$STRICT_COMPILE" = "xyes"; then 10991eca46af7Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10992eca46af7Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1099314330f12Smrgfi 10994eca46af7SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10995eca46af7SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10996eca46af7SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 10997eca46af7Smrg]) # XORG_STRICT_OPTION 10998eca46af7Smrg 10999eca46af7Smrg# XORG_DEFAULT_OPTIONS 11000eca46af7Smrg# -------------------- 11001eca46af7Smrg# Minimum version: 1.3.0 1100295b296d0Smrg# 11003eca46af7Smrg# Defines default options for X.Org modules. 11004eca46af7Smrg# 11005eca46af7SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11006eca46af7SmrgAC_REQUIRE([AC_PROG_INSTALL]) 11007eca46af7SmrgXORG_COMPILER_FLAGS 11008eca46af7SmrgXORG_CWARNFLAGS 11009eca46af7SmrgXORG_STRICT_OPTION 11010eca46af7SmrgXORG_RELEASE_VERSION 11011eca46af7SmrgXORG_CHANGELOG 11012eca46af7SmrgXORG_INSTALL 11013eca46af7SmrgXORG_MANPAGE_SECTIONS 11014eca46af7Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11015eca46af7Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11016eca46af7Smrg]) # XORG_DEFAULT_OPTIONS 1101795b296d0Smrg 11018eca46af7Smrg# XORG_INSTALL() 11019eca46af7Smrg# ---------------- 11020eca46af7Smrg# Minimum version: 1.4.0 1102114330f12Smrg# 11022eca46af7Smrg# Defines the variable INSTALL_CMD as the command to copy 11023eca46af7Smrg# INSTALL from $prefix/share/util-macros. 1102414330f12Smrg# 11025eca46af7SmrgAC_DEFUN([XORG_INSTALL], [ 11026eca46af7SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11027eca46af7Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11028eca46af7SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11029eca46af7Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11030eca46af7Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11031eca46af7Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11032eca46af7SmrgAC_SUBST([INSTALL_CMD]) 11033eca46af7Smrg]) # XORG_INSTALL 11034eca46af7Smrgdnl Copyright 2005 Red Hat, Inc 11035eca46af7Smrgdnl 11036eca46af7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11037eca46af7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11038eca46af7Smrgdnl the above copyright notice appear in all copies and that both that 11039eca46af7Smrgdnl copyright notice and this permission notice appear in supporting 11040eca46af7Smrgdnl documentation. 11041eca46af7Smrgdnl 11042eca46af7Smrgdnl The above copyright notice and this permission notice shall be included 11043eca46af7Smrgdnl in all copies or substantial portions of the Software. 11044eca46af7Smrgdnl 11045eca46af7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11046eca46af7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11047eca46af7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11048eca46af7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11049eca46af7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11050eca46af7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11051eca46af7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11052eca46af7Smrgdnl 11053eca46af7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11054eca46af7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11055eca46af7Smrgdnl other dealings in this Software without prior written authorization 11056eca46af7Smrgdnl from the copyright holders. 11057eca46af7Smrgdnl 11058eca46af7Smrg 11059eca46af7Smrg# XORG_RELEASE_VERSION 11060eca46af7Smrg# -------------------- 11061eca46af7Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11062eca46af7Smrg 11063eca46af7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11064eca46af7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11065eca46af7Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11066eca46af7Smrg [Major version of this package]) 11067eca46af7Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11068eca46af7Smrg if test "x$PVM" = "x"; then 11069eca46af7Smrg PVM="0" 11070eca46af7Smrg fi 11071eca46af7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11072eca46af7Smrg [$PVM], 11073eca46af7Smrg [Minor version of this package]) 11074eca46af7Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11075eca46af7Smrg if test "x$PVP" = "x"; then 11076eca46af7Smrg PVP="0" 11077eca46af7Smrg fi 11078eca46af7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11079eca46af7Smrg [$PVP], 11080eca46af7Smrg [Patch version of this package]) 11081eca46af7Smrg]) 11082eca46af7Smrg 11083eca46af7Smrg# XORG_CHANGELOG() 11084eca46af7Smrg# ---------------- 11085eca46af7Smrg# Minimum version: 1.2.0 1108614330f12Smrg# 11087eca46af7Smrg# Defines the variable CHANGELOG_CMD as the command to generate 11088eca46af7Smrg# ChangeLog from git. 1108914330f12Smrg# 1109014330f12Smrg# 11091eca46af7SmrgAC_DEFUN([XORG_CHANGELOG], [ 11092eca46af7SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11093eca46af7Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11094eca46af7Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11095eca46af7Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11096eca46af7SmrgAC_SUBST([CHANGELOG_CMD]) 11097eca46af7Smrg]) # XORG_CHANGELOG 11098eca46af7Smrg 11099eca46af7Smrgdnl Copyright 2005 Red Hat, Inc 11100eca46af7Smrgdnl 11101eca46af7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11102eca46af7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11103eca46af7Smrgdnl the above copyright notice appear in all copies and that both that 11104eca46af7Smrgdnl copyright notice and this permission notice appear in supporting 11105eca46af7Smrgdnl documentation. 11106eca46af7Smrgdnl 11107eca46af7Smrgdnl The above copyright notice and this permission notice shall be included 11108eca46af7Smrgdnl in all copies or substantial portions of the Software. 11109eca46af7Smrgdnl 11110eca46af7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11111eca46af7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11112eca46af7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11113eca46af7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11114eca46af7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11115eca46af7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11116eca46af7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11117eca46af7Smrgdnl 11118eca46af7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11119eca46af7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11120eca46af7Smrgdnl other dealings in this Software without prior written authorization 11121eca46af7Smrgdnl from the copyright holders. 11122eca46af7Smrgdnl 11123eca46af7Smrg 11124eca46af7Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11125eca46af7Smrg# -------------------------- 11126eca46af7Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 11127eca46af7Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 11128eca46af7Smrg 11129eca46af7SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11130eca46af7Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11131eca46af7Smrg SAVE_CFLAGS="$CFLAGS" 11132eca46af7Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11133eca46af7Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11134eca46af7Smrg#include "xorg-server.h" 11135eca46af7Smrg#if !defined $1 11136eca46af7Smrg#error $1 not defined 11137eca46af7Smrg#endif 11138eca46af7Smrg ]])], 11139eca46af7Smrg [_EXT_CHECK=yes], 11140eca46af7Smrg [_EXT_CHECK=no]) 11141eca46af7Smrg CFLAGS="$SAVE_CFLAGS" 11142eca46af7Smrg AC_MSG_CHECKING([if $1 is defined]) 11143eca46af7Smrg AC_MSG_RESULT([$_EXT_CHECK]) 11144eca46af7Smrg if test "$_EXT_CHECK" != no; then 11145eca46af7Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11146eca46af7Smrg fi 11147eca46af7Smrg]) 11148eca46af7Smrg 11149eca46af7Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 1115014330f12Smrg# 11151eca46af7Smrg# This file is free software; the Free Software Foundation 11152eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11153eca46af7Smrg# with or without modifications, as long as this notice is preserved. 11154eca46af7Smrg 11155eca46af7Smrg# AM_AUTOMAKE_VERSION(VERSION) 11156eca46af7Smrg# ---------------------------- 11157eca46af7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 11158eca46af7Smrg# generated from the m4 files accompanying Automake X.Y. 11159eca46af7Smrg# (This private macro should not be called outside this file.) 11160eca46af7SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 11161eca46af7Smrg[am__api_version='1.14' 11162eca46af7Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11163eca46af7Smrgdnl require some minimum version. Point them to the right macro. 11164eca46af7Smrgm4_if([$1], [1.14.1], [], 11165eca46af7Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11166eca46af7Smrg]) 11167eca46af7Smrg 11168eca46af7Smrg# _AM_AUTOCONF_VERSION(VERSION) 11169eca46af7Smrg# ----------------------------- 11170eca46af7Smrg# aclocal traces this macro to find the Autoconf version. 11171eca46af7Smrg# This is a private macro too. Using m4_define simplifies 11172eca46af7Smrg# the logic in aclocal, which can simply ignore this definition. 11173eca46af7Smrgm4_define([_AM_AUTOCONF_VERSION], []) 11174eca46af7Smrg 11175eca46af7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 11176eca46af7Smrg# ------------------------------- 11177eca46af7Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11178eca46af7Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11179eca46af7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11180eca46af7Smrg[AM_AUTOMAKE_VERSION([1.14.1])dnl 11181eca46af7Smrgm4_ifndef([AC_AUTOCONF_VERSION], 11182eca46af7Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11183eca46af7Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11184eca46af7Smrg 11185eca46af7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11186eca46af7Smrg 11187eca46af7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1118814330f12Smrg# 11189eca46af7Smrg# This file is free software; the Free Software Foundation 11190eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11191eca46af7Smrg# with or without modifications, as long as this notice is preserved. 11192eca46af7Smrg 11193eca46af7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11194eca46af7Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11195eca46af7Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 1119614330f12Smrg# 11197eca46af7Smrg# Of course, Automake must honor this variable whenever it calls a 11198eca46af7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 11199eca46af7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 11200eca46af7Smrg# depending on how configure is run. This is pretty annoying, since 11201eca46af7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11202eca46af7Smrg# source directory, any form will work fine, but in subdirectories a 11203eca46af7Smrg# relative path needs to be adjusted first. 1120414330f12Smrg# 11205eca46af7Smrg# $ac_aux_dir/missing 11206eca46af7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 11207eca46af7Smrg# $top_srcdir/$ac_aux_dir/missing 11208eca46af7Smrg# fails if $ac_aux_dir is absolute, 11209eca46af7Smrg# fails when called from a subdirectory in a VPATH build with 11210eca46af7Smrg# a relative $ac_aux_dir 1121114330f12Smrg# 11212eca46af7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11213eca46af7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 11214eca46af7Smrg# harmless because $srcdir is '.', but things will broke when you 11215eca46af7Smrg# start a VPATH build or use an absolute $srcdir. 1121614330f12Smrg# 11217eca46af7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11218eca46af7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11219eca46af7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11220eca46af7Smrg# and then we would define $MISSING as 11221eca46af7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 11222eca46af7Smrg# This will work as long as MISSING is not called from configure, because 11223eca46af7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 11224eca46af7Smrg# However there are other variables, like CC, which are often used in 11225eca46af7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1122614330f12Smrg# 11227eca46af7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 11228eca46af7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 11229eca46af7Smrg# configured tree to be moved without reconfiguration. 11230eca46af7Smrg 11231eca46af7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 11232eca46af7Smrg[dnl Rely on autoconf to set up CDPATH properly. 11233eca46af7SmrgAC_PREREQ([2.50])dnl 11234eca46af7Smrg# expand $ac_aux_dir to an absolute path 11235eca46af7Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 11236eca46af7Smrg]) 11237eca46af7Smrg 11238eca46af7Smrg# AM_CONDITIONAL -*- Autoconf -*- 11239eca46af7Smrg 11240eca46af7Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 1124114330f12Smrg# 11242eca46af7Smrg# This file is free software; the Free Software Foundation 11243eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11244eca46af7Smrg# with or without modifications, as long as this notice is preserved. 11245eca46af7Smrg 11246eca46af7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11247eca46af7Smrg# ------------------------------------- 11248eca46af7Smrg# Define a conditional. 11249eca46af7SmrgAC_DEFUN([AM_CONDITIONAL], 11250eca46af7Smrg[AC_PREREQ([2.52])dnl 11251eca46af7Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11252eca46af7Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11253eca46af7SmrgAC_SUBST([$1_TRUE])dnl 11254eca46af7SmrgAC_SUBST([$1_FALSE])dnl 11255eca46af7Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11256eca46af7Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11257eca46af7Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 11258eca46af7Smrgif $2; then 11259eca46af7Smrg $1_TRUE= 11260eca46af7Smrg $1_FALSE='#' 1126114330f12Smrgelse 11262eca46af7Smrg $1_TRUE='#' 11263eca46af7Smrg $1_FALSE= 1126414330f12Smrgfi 11265eca46af7SmrgAC_CONFIG_COMMANDS_PRE( 11266eca46af7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11267eca46af7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 11268eca46af7SmrgUsually this means the macro was only invoked conditionally.]]) 11269eca46af7Smrgfi])]) 1127095b296d0Smrg 11271eca46af7Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 1127214330f12Smrg# 11273eca46af7Smrg# This file is free software; the Free Software Foundation 11274eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11275eca46af7Smrg# with or without modifications, as long as this notice is preserved. 11276eca46af7Smrg 11277eca46af7Smrg 11278eca46af7Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11279eca46af7Smrg# written in clear, in which case automake, when reading aclocal.m4, 11280eca46af7Smrg# will think it sees a *use*, and therefore will trigger all it's 11281eca46af7Smrg# C support machinery. Also note that it means that autoscan, seeing 11282eca46af7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11283eca46af7Smrg 11284eca46af7Smrg 11285eca46af7Smrg# _AM_DEPENDENCIES(NAME) 11286eca46af7Smrg# ---------------------- 11287eca46af7Smrg# See how the compiler implements dependency checking. 11288eca46af7Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11289eca46af7Smrg# We try a few techniques and use that to set a single cache variable. 1129014330f12Smrg# 11291eca46af7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11292eca46af7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11293eca46af7Smrg# dependency, and given that the user is not expected to run this macro, 11294eca46af7Smrg# just rely on AC_PROG_CC. 11295eca46af7SmrgAC_DEFUN([_AM_DEPENDENCIES], 11296eca46af7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 11297eca46af7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11298eca46af7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 11299eca46af7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 11300eca46af7Smrg 11301eca46af7Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11302eca46af7Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11303eca46af7Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11304eca46af7Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11305eca46af7Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11306eca46af7Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11307eca46af7Smrg [depcc="$$1" am_compiler_list=]) 11308eca46af7Smrg 11309eca46af7SmrgAC_CACHE_CHECK([dependency style of $depcc], 11310eca46af7Smrg [am_cv_$1_dependencies_compiler_type], 11311eca46af7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11312eca46af7Smrg # We make a subdir and do the tests there. Otherwise we can end up 11313eca46af7Smrg # making bogus files that we don't know about and never remove. For 11314eca46af7Smrg # instance it was reported that on HP-UX the gcc test will end up 11315eca46af7Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 11316eca46af7Smrg # in D". 11317eca46af7Smrg rm -rf conftest.dir 11318eca46af7Smrg mkdir conftest.dir 11319eca46af7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 11320eca46af7Smrg # using a relative directory. 11321eca46af7Smrg cp "$am_depcomp" conftest.dir 11322eca46af7Smrg cd conftest.dir 11323eca46af7Smrg # We will build objects and dependencies in a subdirectory because 11324eca46af7Smrg # it helps to detect inapplicable dependency modes. For instance 11325eca46af7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 11326eca46af7Smrg # side effect of compilation, but ICC will put the dependencies in 11327eca46af7Smrg # the current directory while Tru64 will put them in the object 11328eca46af7Smrg # directory. 11329eca46af7Smrg mkdir sub 11330eca46af7Smrg 11331eca46af7Smrg am_cv_$1_dependencies_compiler_type=none 11332eca46af7Smrg if test "$am_compiler_list" = ""; then 11333eca46af7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11334eca46af7Smrg fi 11335eca46af7Smrg am__universal=false 11336eca46af7Smrg m4_case([$1], [CC], 11337eca46af7Smrg [case " $depcc " in #( 11338eca46af7Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11339eca46af7Smrg esac], 11340eca46af7Smrg [CXX], 11341eca46af7Smrg [case " $depcc " in #( 11342eca46af7Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11343eca46af7Smrg esac]) 11344eca46af7Smrg 11345eca46af7Smrg for depmode in $am_compiler_list; do 11346eca46af7Smrg # Setup a source with many dependencies, because some compilers 11347eca46af7Smrg # like to wrap large dependency lists on column 80 (with \), and 11348eca46af7Smrg # we should not choose a depcomp mode which is confused by this. 11349eca46af7Smrg # 11350eca46af7Smrg # We need to recreate these files for each test, as the compiler may 11351eca46af7Smrg # overwrite some of them when testing with obscure command lines. 11352eca46af7Smrg # This happens at least with the AIX C compiler. 11353eca46af7Smrg : > sub/conftest.c 11354eca46af7Smrg for i in 1 2 3 4 5 6; do 11355eca46af7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 11356eca46af7Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11357eca46af7Smrg # Solaris 10 /bin/sh. 11358eca46af7Smrg echo '/* dummy */' > sub/conftst$i.h 11359eca46af7Smrg done 11360eca46af7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11361eca46af7Smrg 11362eca46af7Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 11363eca46af7Smrg # mode. It turns out that the SunPro C++ compiler does not properly 11364eca46af7Smrg # handle '-M -o', and we need to detect this. Also, some Intel 11365eca46af7Smrg # versions had trouble with output in subdirs. 11366eca46af7Smrg am__obj=sub/conftest.${OBJEXT-o} 11367eca46af7Smrg am__minus_obj="-o $am__obj" 11368eca46af7Smrg case $depmode in 11369eca46af7Smrg gcc) 11370eca46af7Smrg # This depmode causes a compiler race in universal mode. 11371eca46af7Smrg test "$am__universal" = false || continue 11372eca46af7Smrg ;; 11373eca46af7Smrg nosideeffect) 11374eca46af7Smrg # After this tag, mechanisms are not by side-effect, so they'll 11375eca46af7Smrg # only be used when explicitly requested. 11376eca46af7Smrg if test "x$enable_dependency_tracking" = xyes; then 11377eca46af7Smrg continue 11378eca46af7Smrg else 11379eca46af7Smrg break 11380eca46af7Smrg fi 11381eca46af7Smrg ;; 11382eca46af7Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11383eca46af7Smrg # This compiler won't grok '-c -o', but also, the minuso test has 11384eca46af7Smrg # not run yet. These depmodes are late enough in the game, and 11385eca46af7Smrg # so weak that their functioning should not be impacted. 11386eca46af7Smrg am__obj=conftest.${OBJEXT-o} 11387eca46af7Smrg am__minus_obj= 11388eca46af7Smrg ;; 11389eca46af7Smrg none) break ;; 11390eca46af7Smrg esac 11391eca46af7Smrg if depmode=$depmode \ 11392eca46af7Smrg source=sub/conftest.c object=$am__obj \ 11393eca46af7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11394eca46af7Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11395eca46af7Smrg >/dev/null 2>conftest.err && 11396eca46af7Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11397eca46af7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11398eca46af7Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11399eca46af7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11400eca46af7Smrg # icc doesn't choke on unknown options, it will just issue warnings 11401eca46af7Smrg # or remarks (even with -Werror). So we grep stderr for any message 11402eca46af7Smrg # that says an option was ignored or not supported. 11403eca46af7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 11404eca46af7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 11405eca46af7Smrg # The diagnosis changed in icc 8.0: 11406eca46af7Smrg # icc: Command line remark: option '-MP' not supported 11407eca46af7Smrg if (grep 'ignoring option' conftest.err || 11408eca46af7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11409eca46af7Smrg am_cv_$1_dependencies_compiler_type=$depmode 11410eca46af7Smrg break 11411eca46af7Smrg fi 11412eca46af7Smrg fi 11413eca46af7Smrg done 11414eca46af7Smrg 11415eca46af7Smrg cd .. 11416eca46af7Smrg rm -rf conftest.dir 11417eca46af7Smrgelse 11418eca46af7Smrg am_cv_$1_dependencies_compiler_type=none 11419eca46af7Smrgfi 11420eca46af7Smrg]) 11421eca46af7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11422eca46af7SmrgAM_CONDITIONAL([am__fastdep$1], [ 11423eca46af7Smrg test "x$enable_dependency_tracking" != xno \ 11424eca46af7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11425eca46af7Smrg]) 1142695b296d0Smrg 1142795b296d0Smrg 11428eca46af7Smrg# AM_SET_DEPDIR 11429eca46af7Smrg# ------------- 11430eca46af7Smrg# Choose a directory name for dependency files. 11431eca46af7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11432eca46af7SmrgAC_DEFUN([AM_SET_DEPDIR], 11433eca46af7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11434eca46af7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11435eca46af7Smrg]) 1143614330f12Smrg 11437eca46af7Smrg 11438eca46af7Smrg# AM_DEP_TRACK 11439eca46af7Smrg# ------------ 11440eca46af7SmrgAC_DEFUN([AM_DEP_TRACK], 11441eca46af7Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 11442eca46af7SmrgAS_HELP_STRING( 11443eca46af7Smrg [--enable-dependency-tracking], 11444eca46af7Smrg [do not reject slow dependency extractors]) 11445eca46af7SmrgAS_HELP_STRING( 11446eca46af7Smrg [--disable-dependency-tracking], 11447eca46af7Smrg [speeds up one-time build])]) 11448eca46af7Smrgif test "x$enable_dependency_tracking" != xno; then 11449eca46af7Smrg am_depcomp="$ac_aux_dir/depcomp" 11450eca46af7Smrg AMDEPBACKSLASH='\' 11451eca46af7Smrg am__nodep='_no' 1145295b296d0Smrgfi 11453eca46af7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11454eca46af7SmrgAC_SUBST([AMDEPBACKSLASH])dnl 11455eca46af7Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11456eca46af7SmrgAC_SUBST([am__nodep])dnl 11457eca46af7Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 11458eca46af7Smrg]) 1145995b296d0Smrg 11460eca46af7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1146195b296d0Smrg 11462eca46af7Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 1146395b296d0Smrg# 11464eca46af7Smrg# This file is free software; the Free Software Foundation 11465eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11466eca46af7Smrg# with or without modifications, as long as this notice is preserved. 1146795b296d0Smrg 1146814330f12Smrg 11469eca46af7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11470eca46af7Smrg# ------------------------------ 11471eca46af7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11472eca46af7Smrg[{ 11473eca46af7Smrg # Older Autoconf quotes --file arguments for eval, but not when files 11474eca46af7Smrg # are listed without --file. Let's play safe and only enable the eval 11475eca46af7Smrg # if we detect the quoting. 11476eca46af7Smrg case $CONFIG_FILES in 11477eca46af7Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11478eca46af7Smrg *) set x $CONFIG_FILES ;; 11479eca46af7Smrg esac 11480eca46af7Smrg shift 11481eca46af7Smrg for mf 11482eca46af7Smrg do 11483eca46af7Smrg # Strip MF so we end up with the name of the file. 11484eca46af7Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11485eca46af7Smrg # Check whether this is an Automake generated Makefile or not. 11486eca46af7Smrg # We used to match only the files named 'Makefile.in', but 11487eca46af7Smrg # some people rename them; so instead we look at the file content. 11488eca46af7Smrg # Grep'ing the first line is not enough: some people post-process 11489eca46af7Smrg # each Makefile.in and add a new line on top of each file to say so. 11490eca46af7Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11491eca46af7Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11492eca46af7Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11493eca46af7Smrg dirpart=`AS_DIRNAME("$mf")` 11494eca46af7Smrg else 11495eca46af7Smrg continue 11496eca46af7Smrg fi 11497eca46af7Smrg # Extract the definition of DEPDIR, am__include, and am__quote 11498eca46af7Smrg # from the Makefile without running 'make'. 11499eca46af7Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11500eca46af7Smrg test -z "$DEPDIR" && continue 11501eca46af7Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11502eca46af7Smrg test -z "$am__include" && continue 11503eca46af7Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11504eca46af7Smrg # Find all dependency output files, they are included files with 11505eca46af7Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11506eca46af7Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11507eca46af7Smrg # expansion. 11508eca46af7Smrg for file in `sed -n " 11509eca46af7Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11510eca46af7Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11511eca46af7Smrg # Make sure the directory exists. 11512eca46af7Smrg test -f "$dirpart/$file" && continue 11513eca46af7Smrg fdir=`AS_DIRNAME(["$file"])` 11514eca46af7Smrg AS_MKDIR_P([$dirpart/$fdir]) 11515eca46af7Smrg # echo "creating $dirpart/$file" 11516eca46af7Smrg echo '# dummy' > "$dirpart/$file" 11517eca46af7Smrg done 11518eca46af7Smrg done 11519eca46af7Smrg} 11520eca46af7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1152195b296d0Smrg 1152214330f12Smrg 11523eca46af7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11524eca46af7Smrg# ----------------------------- 11525eca46af7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 1152614330f12Smrg# 11527eca46af7Smrg# This code is only required when automatic dependency tracking 11528eca46af7Smrg# is enabled. FIXME. This creates each '.P' file that we will 11529eca46af7Smrg# need in order to bootstrap the dependency handling code. 11530eca46af7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11531eca46af7Smrg[AC_CONFIG_COMMANDS([depfiles], 11532eca46af7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11533eca46af7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11534eca46af7Smrg]) 11535eca46af7Smrg 11536eca46af7Smrg# Do all the work for Automake. -*- Autoconf -*- 11537eca46af7Smrg 11538eca46af7Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 1153914330f12Smrg# 11540eca46af7Smrg# This file is free software; the Free Software Foundation 11541eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11542eca46af7Smrg# with or without modifications, as long as this notice is preserved. 1154395b296d0Smrg 11544eca46af7Smrg# This macro actually does too much. Some checks are only needed if 11545eca46af7Smrg# your package does certain things. But this isn't really a big deal. 1154614330f12Smrg 11547eca46af7Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 11548eca46af7Smrgm4_define([AC_PROG_CC], 11549eca46af7Smrgm4_defn([AC_PROG_CC]) 11550eca46af7Smrg[_AM_PROG_CC_C_O 11551eca46af7Smrg]) 1155295b296d0Smrg 11553eca46af7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11554eca46af7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 11555eca46af7Smrg# ----------------------------------------------- 11556eca46af7Smrg# The call with PACKAGE and VERSION arguments is the old style 11557eca46af7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11558eca46af7Smrg# and VERSION should now be passed to AC_INIT and removed from 11559eca46af7Smrg# the call to AM_INIT_AUTOMAKE. 11560eca46af7Smrg# We support both call styles for the transition. After 11561eca46af7Smrg# the next Automake release, Autoconf can make the AC_INIT 11562eca46af7Smrg# arguments mandatory, and then we can depend on a new Autoconf 11563eca46af7Smrg# release and drop the old call support. 11564eca46af7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11565eca46af7Smrg[AC_PREREQ([2.65])dnl 11566eca46af7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11567eca46af7Smrgdnl the ones we care about. 11568eca46af7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11569eca46af7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11570eca46af7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11571eca46af7Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11572eca46af7Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11573eca46af7Smrg # is not polluted with repeated "-I." 11574eca46af7Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11575eca46af7Smrg # test to see if srcdir already configured 11576eca46af7Smrg if test -f $srcdir/config.status; then 11577eca46af7Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11578eca46af7Smrg fi 1157914330f12Smrgfi 1158095b296d0Smrg 11581eca46af7Smrg# test whether we have cygpath 11582eca46af7Smrgif test -z "$CYGPATH_W"; then 11583eca46af7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 11584eca46af7Smrg CYGPATH_W='cygpath -w' 11585eca46af7Smrg else 11586eca46af7Smrg CYGPATH_W=echo 11587eca46af7Smrg fi 1158814330f12Smrgfi 11589eca46af7SmrgAC_SUBST([CYGPATH_W]) 1159095b296d0Smrg 11591eca46af7Smrg# Define the identity of the package. 11592eca46af7Smrgdnl Distinguish between old-style and new-style calls. 11593eca46af7Smrgm4_ifval([$2], 11594eca46af7Smrg[AC_DIAGNOSE([obsolete], 11595eca46af7Smrg [$0: two- and three-arguments forms are deprecated.]) 11596eca46af7Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11597eca46af7Smrg AC_SUBST([PACKAGE], [$1])dnl 11598eca46af7Smrg AC_SUBST([VERSION], [$2])], 11599eca46af7Smrg[_AM_SET_OPTIONS([$1])dnl 11600eca46af7Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11601eca46af7Smrgm4_if( 11602eca46af7Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11603eca46af7Smrg [ok:ok],, 11604eca46af7Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11605eca46af7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11606eca46af7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1160795b296d0Smrg 11608eca46af7Smrg_AM_IF_OPTION([no-define],, 11609eca46af7Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11610eca46af7Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 1161195b296d0Smrg 11612eca46af7Smrg# Some tools Automake needs. 11613eca46af7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11614eca46af7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11615eca46af7SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11616eca46af7SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11617eca46af7SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11618eca46af7SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11619eca46af7SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11620eca46af7SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11621eca46af7SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11622eca46af7SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11623eca46af7Smrg# For better backward compatibility. To be removed once Automake 1.9.x 11624eca46af7Smrg# dies out for good. For more background, see: 11625eca46af7Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11626eca46af7Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11627eca46af7SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11628eca46af7Smrg# We need awk for the "check" target. The system "awk" is bad on 11629eca46af7Smrg# some platforms. 11630eca46af7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 11631eca46af7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11632eca46af7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11633eca46af7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11634eca46af7Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11635eca46af7Smrg [_AM_PROG_TAR([v7])])]) 11636eca46af7Smrg_AM_IF_OPTION([no-dependencies],, 11637eca46af7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11638eca46af7Smrg [_AM_DEPENDENCIES([CC])], 11639eca46af7Smrg [m4_define([AC_PROG_CC], 11640eca46af7Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11641eca46af7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11642eca46af7Smrg [_AM_DEPENDENCIES([CXX])], 11643eca46af7Smrg [m4_define([AC_PROG_CXX], 11644eca46af7Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11645eca46af7SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11646eca46af7Smrg [_AM_DEPENDENCIES([OBJC])], 11647eca46af7Smrg [m4_define([AC_PROG_OBJC], 11648eca46af7Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11649eca46af7SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11650eca46af7Smrg [_AM_DEPENDENCIES([OBJCXX])], 11651eca46af7Smrg [m4_define([AC_PROG_OBJCXX], 11652eca46af7Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11653eca46af7Smrg]) 11654eca46af7SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 11655eca46af7Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 11656eca46af7Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11657eca46af7Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11658eca46af7SmrgAC_CONFIG_COMMANDS_PRE(dnl 11659eca46af7Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11660eca46af7Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1166195b296d0Smrg 11662eca46af7Smrg# POSIX will say in a future version that running "rm -f" with no argument 11663eca46af7Smrg# is OK; and we want to be able to make that assumption in our Makefile 11664eca46af7Smrg# recipes. So use an aggressive probe to check that the usage we want is 11665eca46af7Smrg# actually supported "in the wild" to an acceptable degree. 11666eca46af7Smrg# See automake bug#10828. 11667eca46af7Smrg# To make any issue more visible, cause the running configure to be aborted 11668eca46af7Smrg# by default if the 'rm' program in use doesn't match our expectations; the 11669eca46af7Smrg# user can still override this though. 11670eca46af7Smrgif rm -f && rm -fr && rm -rf; then : OK; else 11671eca46af7Smrg cat >&2 <<'END' 11672eca46af7SmrgOops! 11673eca46af7Smrg 11674eca46af7SmrgYour 'rm' program seems unable to run without file operands specified 11675eca46af7Smrgon the command line, even when the '-f' option is present. This is contrary 11676eca46af7Smrgto the behaviour of most rm programs out there, and not conforming with 11677eca46af7Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11678eca46af7Smrg 11679eca46af7SmrgPlease tell bug-automake@gnu.org about your system, including the value 11680eca46af7Smrgof your $PATH and any error possibly output before this message. This 11681eca46af7Smrgcan help us improve future automake versions. 1168295b296d0Smrg 11683eca46af7SmrgEND 11684eca46af7Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 11685eca46af7Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 11686eca46af7Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 11687eca46af7Smrg echo >&2 11688eca46af7Smrg else 11689eca46af7Smrg cat >&2 <<'END' 11690eca46af7SmrgAborting the configuration process, to ensure you take notice of the issue. 1169195b296d0Smrg 11692eca46af7SmrgYou can download and install GNU coreutils to get an 'rm' implementation 11693eca46af7Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 1169495b296d0Smrg 11695eca46af7SmrgIf you want to complete the configuration process using your problematic 11696eca46af7Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 11697eca46af7Smrgto "yes", and re-run configure. 1169895b296d0Smrg 11699eca46af7SmrgEND 11700eca46af7Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 11701eca46af7Smrg fi 11702eca46af7Smrgfi]) 1170395b296d0Smrg 11704eca46af7Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11705eca46af7Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11706eca46af7Smrgdnl mangled by Autoconf and run in a shell conditional statement. 11707eca46af7Smrgm4_define([_AC_COMPILER_EXEEXT], 11708eca46af7Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1170914330f12Smrg 11710eca46af7Smrg# When config.status generates a header, we must update the stamp-h file. 11711eca46af7Smrg# This file resides in the same directory as the config header 11712eca46af7Smrg# that is generated. The stamp files are numbered to have different names. 1171314330f12Smrg 11714eca46af7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11715eca46af7Smrg# loop where config.status creates the headers, so we can generate 11716eca46af7Smrg# our stamp files there. 11717eca46af7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11718eca46af7Smrg[# Compute $1's index in $config_headers. 11719eca46af7Smrg_am_arg=$1 11720eca46af7Smrg_am_stamp_count=1 11721eca46af7Smrgfor _am_header in $config_headers :; do 11722eca46af7Smrg case $_am_header in 11723eca46af7Smrg $_am_arg | $_am_arg:* ) 11724eca46af7Smrg break ;; 11725eca46af7Smrg * ) 11726eca46af7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11727eca46af7Smrg esac 11728eca46af7Smrgdone 11729eca46af7Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11730e6f085baSmrg 11731eca46af7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11732eca46af7Smrg# 11733eca46af7Smrg# This file is free software; the Free Software Foundation 11734eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11735eca46af7Smrg# with or without modifications, as long as this notice is preserved. 1173614330f12Smrg 11737eca46af7Smrg# AM_PROG_INSTALL_SH 11738eca46af7Smrg# ------------------ 11739eca46af7Smrg# Define $install_sh. 11740eca46af7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 11741eca46af7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11742eca46af7Smrgif test x"${install_sh}" != xset; then 11743eca46af7Smrg case $am_aux_dir in 11744eca46af7Smrg *\ * | *\ *) 11745eca46af7Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11746eca46af7Smrg *) 11747eca46af7Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11748eca46af7Smrg esac 1174914330f12Smrgfi 11750eca46af7SmrgAC_SUBST([install_sh])]) 1175195b296d0Smrg 11752eca46af7Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 11753eca46af7Smrg# 11754eca46af7Smrg# This file is free software; the Free Software Foundation 11755eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11756eca46af7Smrg# with or without modifications, as long as this notice is preserved. 11757eca46af7Smrg 11758eca46af7Smrg# Check whether the underlying file-system supports filenames 11759eca46af7Smrg# with a leading dot. For instance MS-DOS doesn't. 11760eca46af7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 11761eca46af7Smrg[rm -rf .tst 2>/dev/null 11762eca46af7Smrgmkdir .tst 2>/dev/null 11763eca46af7Smrgif test -d .tst; then 11764eca46af7Smrg am__leading_dot=. 11765eca46af7Smrgelse 11766eca46af7Smrg am__leading_dot=_ 1176714330f12Smrgfi 11768eca46af7Smrgrmdir .tst 2>/dev/null 11769eca46af7SmrgAC_SUBST([am__leading_dot])]) 1177095b296d0Smrg 11771eca46af7Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 11772eca46af7Smrg# From Jim Meyering 1177314330f12Smrg 11774eca46af7Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 11775eca46af7Smrg# 11776eca46af7Smrg# This file is free software; the Free Software Foundation 11777eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11778eca46af7Smrg# with or without modifications, as long as this notice is preserved. 1177914330f12Smrg 11780eca46af7Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 11781eca46af7Smrg# ---------------------------------- 11782eca46af7Smrg# Control maintainer-specific portions of Makefiles. 11783eca46af7Smrg# Default is to disable them, unless 'enable' is passed literally. 11784eca46af7Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 11785eca46af7Smrg# can override the default with the --enable/--disable switch. 11786eca46af7SmrgAC_DEFUN([AM_MAINTAINER_MODE], 11787eca46af7Smrg[m4_case(m4_default([$1], [disable]), 11788eca46af7Smrg [enable], [m4_define([am_maintainer_other], [disable])], 11789eca46af7Smrg [disable], [m4_define([am_maintainer_other], [enable])], 11790eca46af7Smrg [m4_define([am_maintainer_other], [enable]) 11791eca46af7Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11792eca46af7SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 11793eca46af7Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 11794eca46af7Smrg AC_ARG_ENABLE([maintainer-mode], 11795eca46af7Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 11796eca46af7Smrg am_maintainer_other[ make rules and dependencies not useful 11797eca46af7Smrg (and sometimes confusing) to the casual installer])], 11798eca46af7Smrg [USE_MAINTAINER_MODE=$enableval], 11799eca46af7Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 11800eca46af7Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11801eca46af7Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 11802eca46af7Smrg MAINT=$MAINTAINER_MODE_TRUE 11803eca46af7Smrg AC_SUBST([MAINT])dnl 11804eca46af7Smrg] 11805eca46af7Smrg) 1180614330f12Smrg 11807eca46af7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1180814330f12Smrg 11809eca46af7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11810eca46af7Smrg# 11811eca46af7Smrg# This file is free software; the Free Software Foundation 11812eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11813eca46af7Smrg# with or without modifications, as long as this notice is preserved. 1181414330f12Smrg 11815eca46af7Smrg# AM_MAKE_INCLUDE() 11816eca46af7Smrg# ----------------- 11817eca46af7Smrg# Check to see how make treats includes. 11818eca46af7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 11819eca46af7Smrg[am_make=${MAKE-make} 11820eca46af7Smrgcat > confinc << 'END' 11821eca46af7Smrgam__doit: 11822eca46af7Smrg @echo this is the am__doit target 11823eca46af7Smrg.PHONY: am__doit 11824eca46af7SmrgEND 11825eca46af7Smrg# If we don't find an include directive, just comment out the code. 11826eca46af7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11827eca46af7Smrgam__include="#" 11828eca46af7Smrgam__quote= 11829eca46af7Smrg_am_result=none 11830eca46af7Smrg# First try GNU make style include. 11831eca46af7Smrgecho "include confinc" > confmf 11832eca46af7Smrg# Ignore all kinds of additional output from 'make'. 11833eca46af7Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11834eca46af7Smrg*the\ am__doit\ target*) 11835eca46af7Smrg am__include=include 11836eca46af7Smrg am__quote= 11837eca46af7Smrg _am_result=GNU 11838eca46af7Smrg ;; 11839eca46af7Smrgesac 11840eca46af7Smrg# Now try BSD make style include. 11841eca46af7Smrgif test "$am__include" = "#"; then 11842eca46af7Smrg echo '.include "confinc"' > confmf 11843eca46af7Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 11844eca46af7Smrg *the\ am__doit\ target*) 11845eca46af7Smrg am__include=.include 11846eca46af7Smrg am__quote="\"" 11847eca46af7Smrg _am_result=BSD 11848eca46af7Smrg ;; 11849eca46af7Smrg esac 11850eca46af7Smrgfi 11851eca46af7SmrgAC_SUBST([am__include]) 11852eca46af7SmrgAC_SUBST([am__quote]) 11853eca46af7SmrgAC_MSG_RESULT([$_am_result]) 11854eca46af7Smrgrm -f confinc confmf 1185514330f12Smrg]) 1185614330f12Smrg 11857eca46af7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11858eca46af7Smrg 11859eca46af7Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 1186014330f12Smrg# 11861eca46af7Smrg# This file is free software; the Free Software Foundation 11862eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11863eca46af7Smrg# with or without modifications, as long as this notice is preserved. 1186414330f12Smrg 11865eca46af7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 11866eca46af7Smrg# ------------------------------ 11867eca46af7SmrgAC_DEFUN([AM_MISSING_PROG], 11868eca46af7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11869eca46af7Smrg$1=${$1-"${am_missing_run}$2"} 11870eca46af7SmrgAC_SUBST($1)]) 1187114330f12Smrg 11872eca46af7Smrg# AM_MISSING_HAS_RUN 11873eca46af7Smrg# ------------------ 11874eca46af7Smrg# Define MISSING if not defined so far and test if it is modern enough. 11875eca46af7Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 11876eca46af7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 11877eca46af7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11878eca46af7SmrgAC_REQUIRE_AUX_FILE([missing])dnl 11879eca46af7Smrgif test x"${MISSING+set}" != xset; then 11880eca46af7Smrg case $am_aux_dir in 11881eca46af7Smrg *\ * | *\ *) 11882eca46af7Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11883eca46af7Smrg *) 11884eca46af7Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11885eca46af7Smrg esac 11886eca46af7Smrgfi 11887eca46af7Smrg# Use eval to expand $SHELL 11888eca46af7Smrgif eval "$MISSING --is-lightweight"; then 11889eca46af7Smrg am_missing_run="$MISSING " 1189095b296d0Smrgelse 11891eca46af7Smrg am_missing_run= 11892eca46af7Smrg AC_MSG_WARN(['missing' script is too old or missing]) 1189395b296d0Smrgfi 11894eca46af7Smrg]) 1189595b296d0Smrg 11896eca46af7Smrg# Helper functions for option handling. -*- Autoconf -*- 1189714330f12Smrg 11898eca46af7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11899eca46af7Smrg# 11900eca46af7Smrg# This file is free software; the Free Software Foundation 11901eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11902eca46af7Smrg# with or without modifications, as long as this notice is preserved. 119032378475aSmrg 11904eca46af7Smrg# _AM_MANGLE_OPTION(NAME) 11905eca46af7Smrg# ----------------------- 11906eca46af7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 11907eca46af7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1190814330f12Smrg 11909eca46af7Smrg# _AM_SET_OPTION(NAME) 11910eca46af7Smrg# -------------------- 11911eca46af7Smrg# Set option NAME. Presently that only means defining a flag for this option. 11912eca46af7SmrgAC_DEFUN([_AM_SET_OPTION], 11913eca46af7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 1191414330f12Smrg 11915eca46af7Smrg# _AM_SET_OPTIONS(OPTIONS) 11916eca46af7Smrg# ------------------------ 11917eca46af7Smrg# OPTIONS is a space-separated list of Automake options. 11918eca46af7SmrgAC_DEFUN([_AM_SET_OPTIONS], 11919eca46af7Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1192014330f12Smrg 11921eca46af7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11922eca46af7Smrg# ------------------------------------------- 11923eca46af7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11924eca46af7SmrgAC_DEFUN([_AM_IF_OPTION], 11925eca46af7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 119262378475aSmrg 11927eca46af7Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 11928eca46af7Smrg# 11929eca46af7Smrg# This file is free software; the Free Software Foundation 11930eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11931eca46af7Smrg# with or without modifications, as long as this notice is preserved. 119322378475aSmrg 11933eca46af7Smrg# _AM_PROG_CC_C_O 1193414330f12Smrg# --------------- 11935eca46af7Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 11936eca46af7Smrg# to automatically call this. 11937eca46af7SmrgAC_DEFUN([_AM_PROG_CC_C_O], 11938eca46af7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11939eca46af7SmrgAC_REQUIRE_AUX_FILE([compile])dnl 11940eca46af7SmrgAC_LANG_PUSH([C])dnl 11941eca46af7SmrgAC_CACHE_CHECK( 11942eca46af7Smrg [whether $CC understands -c and -o together], 11943eca46af7Smrg [am_cv_prog_cc_c_o], 11944eca46af7Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 11945eca46af7Smrg # Make sure it works both with $CC and with simple cc. 11946eca46af7Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 11947eca46af7Smrg # compilers refuse to overwrite an existing .o file with -o, 11948eca46af7Smrg # though they will create one. 11949eca46af7Smrg am_cv_prog_cc_c_o=yes 11950eca46af7Smrg for am_i in 1 2; do 11951eca46af7Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 11952eca46af7Smrg && test -f conftest2.$ac_objext; then 11953eca46af7Smrg : OK 11954eca46af7Smrg else 11955eca46af7Smrg am_cv_prog_cc_c_o=no 11956eca46af7Smrg break 11957eca46af7Smrg fi 11958eca46af7Smrg done 11959eca46af7Smrg rm -f core conftest* 11960eca46af7Smrg unset am_i]) 11961eca46af7Smrgif test "$am_cv_prog_cc_c_o" != yes; then 11962eca46af7Smrg # Losing compiler, so override with the script. 11963eca46af7Smrg # FIXME: It is wrong to rewrite CC. 11964eca46af7Smrg # But if we don't then we get into trouble of one sort or another. 11965eca46af7Smrg # A longer-term fix would be to have automake use am__CC in this case, 11966eca46af7Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 11967eca46af7Smrg CC="$am_aux_dir/compile $CC" 11968eca46af7Smrgfi 11969eca46af7SmrgAC_LANG_POP([C])]) 1197095b296d0Smrg 11971eca46af7Smrg# For backward compatibility. 11972eca46af7SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 11973eca46af7Smrg 11974eca46af7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11975ff89ac2bSmrg# 11976eca46af7Smrg# This file is free software; the Free Software Foundation 11977eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11978eca46af7Smrg# with or without modifications, as long as this notice is preserved. 11979eca46af7Smrg 11980eca46af7Smrg# AM_RUN_LOG(COMMAND) 11981eca46af7Smrg# ------------------- 11982eca46af7Smrg# Run COMMAND, save the exit status in ac_status, and log it. 11983eca46af7Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 11984eca46af7SmrgAC_DEFUN([AM_RUN_LOG], 11985eca46af7Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 11986eca46af7Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 11987eca46af7Smrg ac_status=$? 11988eca46af7Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 11989eca46af7Smrg (exit $ac_status); }]) 11990eca46af7Smrg 11991eca46af7Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 11992eca46af7Smrg 11993eca46af7Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 1199414330f12Smrg# 11995eca46af7Smrg# This file is free software; the Free Software Foundation 11996eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 11997eca46af7Smrg# with or without modifications, as long as this notice is preserved. 11998ff89ac2bSmrg 11999eca46af7Smrg# AM_SANITY_CHECK 12000eca46af7Smrg# --------------- 12001eca46af7SmrgAC_DEFUN([AM_SANITY_CHECK], 12002eca46af7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 12003eca46af7Smrg# Reject unsafe characters in $srcdir or the absolute working directory 12004eca46af7Smrg# name. Accept space and tab only in the latter. 12005eca46af7Smrgam_lf=' 12006eca46af7Smrg' 12007eca46af7Smrgcase `pwd` in 12008eca46af7Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 12009eca46af7Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 12010eca46af7Smrgesac 12011eca46af7Smrgcase $srcdir in 12012eca46af7Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12013eca46af7Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12014eca46af7Smrgesac 12015eca46af7Smrg 12016eca46af7Smrg# Do 'set' in a subshell so we don't clobber the current shell's 12017eca46af7Smrg# arguments. Must try -L first in case configure is actually a 12018eca46af7Smrg# symlink; some systems play weird games with the mod time of symlinks 12019eca46af7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 12020eca46af7Smrg# directory). 12021eca46af7Smrgif ( 12022eca46af7Smrg am_has_slept=no 12023eca46af7Smrg for am_try in 1 2; do 12024eca46af7Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 12025eca46af7Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12026eca46af7Smrg if test "$[*]" = "X"; then 12027eca46af7Smrg # -L didn't work. 12028eca46af7Smrg set X `ls -t "$srcdir/configure" conftest.file` 12029eca46af7Smrg fi 12030eca46af7Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 12031eca46af7Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 12032eca46af7Smrg 12033eca46af7Smrg # If neither matched, then we have a broken ls. This can happen 12034eca46af7Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 12035eca46af7Smrg # broken ls alias from the environment. This has actually 12036eca46af7Smrg # happened. Such a system could not be considered "sane". 12037eca46af7Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12038eca46af7Smrg alias in your environment]) 12039eca46af7Smrg fi 12040eca46af7Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 12041eca46af7Smrg break 12042eca46af7Smrg fi 12043eca46af7Smrg # Just in case. 12044eca46af7Smrg sleep 1 12045eca46af7Smrg am_has_slept=yes 12046eca46af7Smrg done 12047eca46af7Smrg test "$[2]" = conftest.file 12048eca46af7Smrg ) 12049eca46af7Smrgthen 12050eca46af7Smrg # Ok. 12051eca46af7Smrg : 12052eca46af7Smrgelse 12053eca46af7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 12054eca46af7SmrgCheck your system clock]) 12055eca46af7Smrgfi 12056eca46af7SmrgAC_MSG_RESULT([yes]) 12057eca46af7Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 12058eca46af7Smrg# generated files are strictly newer. 12059eca46af7Smrgam_sleep_pid= 12060eca46af7Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 12061eca46af7Smrg ( sleep 1 ) & 12062eca46af7Smrg am_sleep_pid=$! 12063eca46af7Smrgfi 12064eca46af7SmrgAC_CONFIG_COMMANDS_PRE( 12065eca46af7Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 12066eca46af7Smrg if test -n "$am_sleep_pid"; then 12067eca46af7Smrg # Hide warnings about reused PIDs. 12068eca46af7Smrg wait $am_sleep_pid 2>/dev/null 12069eca46af7Smrg fi 12070eca46af7Smrg AC_MSG_RESULT([done])]) 12071eca46af7Smrgrm -f conftest.file 12072eca46af7Smrg]) 12073e6f085baSmrg 12074eca46af7Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 12075eca46af7Smrg# 12076eca46af7Smrg# This file is free software; the Free Software Foundation 12077eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 12078eca46af7Smrg# with or without modifications, as long as this notice is preserved. 12079ff89ac2bSmrg 12080eca46af7Smrg# AM_SILENT_RULES([DEFAULT]) 12081eca46af7Smrg# -------------------------- 12082eca46af7Smrg# Enable less verbose build rules; with the default set to DEFAULT 12083eca46af7Smrg# ("yes" being less verbose, "no" or empty being verbose). 12084eca46af7SmrgAC_DEFUN([AM_SILENT_RULES], 12085eca46af7Smrg[AC_ARG_ENABLE([silent-rules], [dnl 12086eca46af7SmrgAS_HELP_STRING( 12087eca46af7Smrg [--enable-silent-rules], 12088eca46af7Smrg [less verbose build output (undo: "make V=1")]) 12089eca46af7SmrgAS_HELP_STRING( 12090eca46af7Smrg [--disable-silent-rules], 12091eca46af7Smrg [verbose build output (undo: "make V=0")])dnl 12092eca46af7Smrg]) 12093eca46af7Smrgcase $enable_silent_rules in @%:@ ((( 12094eca46af7Smrg yes) AM_DEFAULT_VERBOSITY=0;; 12095eca46af7Smrg no) AM_DEFAULT_VERBOSITY=1;; 12096eca46af7Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12097eca46af7Smrgesac 12098eca46af7Smrgdnl 12099eca46af7Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12100eca46af7Smrgdnl do not support nested variable expansions. 12101eca46af7Smrgdnl See automake bug#9928 and bug#10237. 12102eca46af7Smrgam_make=${MAKE-make} 12103eca46af7SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 12104eca46af7Smrg [am_cv_make_support_nested_variables], 12105eca46af7Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 12106eca46af7SmrgBAR0=false 12107eca46af7SmrgBAR1=true 12108eca46af7SmrgV=1 12109eca46af7Smrgam__doit: 12110eca46af7Smrg @$(TRUE) 12111eca46af7Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12112eca46af7Smrg am_cv_make_support_nested_variables=yes 12113eca46af7Smrgelse 12114eca46af7Smrg am_cv_make_support_nested_variables=no 12115eca46af7Smrgfi]) 12116eca46af7Smrgif test $am_cv_make_support_nested_variables = yes; then 12117eca46af7Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 12118eca46af7Smrg AM_V='$(V)' 12119eca46af7Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12120eca46af7Smrgelse 12121eca46af7Smrg AM_V=$AM_DEFAULT_VERBOSITY 12122eca46af7Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12123eca46af7Smrgfi 12124eca46af7SmrgAC_SUBST([AM_V])dnl 12125eca46af7SmrgAM_SUBST_NOTMAKE([AM_V])dnl 12126eca46af7SmrgAC_SUBST([AM_DEFAULT_V])dnl 12127eca46af7SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12128eca46af7SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12129eca46af7SmrgAM_BACKSLASH='\' 12130eca46af7SmrgAC_SUBST([AM_BACKSLASH])dnl 12131eca46af7Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12132eca46af7Smrg]) 12133e6f085baSmrg 12134eca46af7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 12135eca46af7Smrg# 12136eca46af7Smrg# This file is free software; the Free Software Foundation 12137eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 12138eca46af7Smrg# with or without modifications, as long as this notice is preserved. 1213995b296d0Smrg 12140eca46af7Smrg# AM_PROG_INSTALL_STRIP 12141eca46af7Smrg# --------------------- 12142eca46af7Smrg# One issue with vendor 'install' (even GNU) is that you can't 12143eca46af7Smrg# specify the program used to strip binaries. This is especially 12144eca46af7Smrg# annoying in cross-compiling environments, where the build's strip 12145eca46af7Smrg# is unlikely to handle the host's binaries. 12146eca46af7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 12147eca46af7Smrg# always use install-sh in "make install-strip", and initialize 12148eca46af7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 12149eca46af7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 12150eca46af7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12151eca46af7Smrg# Installed binaries are usually stripped using 'strip' when the user 12152eca46af7Smrg# run "make install-strip". However 'strip' might not be the right 12153eca46af7Smrg# tool to use in cross-compilation environments, therefore Automake 12154eca46af7Smrg# will honor the 'STRIP' environment variable to overrule this program. 12155eca46af7Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12156eca46af7Smrgif test "$cross_compiling" != no; then 12157eca46af7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1215814330f12Smrgfi 12159eca46af7SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12160eca46af7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1216114330f12Smrg 12162eca46af7Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 1216314330f12Smrg# 12164eca46af7Smrg# This file is free software; the Free Software Foundation 12165eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 12166eca46af7Smrg# with or without modifications, as long as this notice is preserved. 1216795b296d0Smrg 12168eca46af7Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 12169eca46af7Smrg# --------------------------- 12170eca46af7Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12171eca46af7Smrg# This macro is traced by Automake. 12172eca46af7SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 12173eca46af7Smrg 12174eca46af7Smrg# AM_SUBST_NOTMAKE(VARIABLE) 12175eca46af7Smrg# -------------------------- 12176eca46af7Smrg# Public sister of _AM_SUBST_NOTMAKE. 12177eca46af7SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12178eca46af7Smrg 12179eca46af7Smrg# Check how to create a tarball. -*- Autoconf -*- 12180eca46af7Smrg 12181eca46af7Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 1218214330f12Smrg# 12183eca46af7Smrg# This file is free software; the Free Software Foundation 12184eca46af7Smrg# gives unlimited permission to copy and/or distribute it, 12185eca46af7Smrg# with or without modifications, as long as this notice is preserved. 1218695b296d0Smrg 12187eca46af7Smrg# _AM_PROG_TAR(FORMAT) 1218895b296d0Smrg# -------------------- 12189eca46af7Smrg# Check how to create a tarball in format FORMAT. 12190eca46af7Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1219195b296d0Smrg# 12192eca46af7Smrg# Substitute a variable $(am__tar) that is a command 12193eca46af7Smrg# writing to stdout a FORMAT-tarball containing the directory 12194eca46af7Smrg# $tardir. 12195eca46af7Smrg# tardir=directory && $(am__tar) > result.tar 1219695b296d0Smrg# 12197eca46af7Smrg# Substitute a variable $(am__untar) that extract such 12198eca46af7Smrg# a tarball read from stdin. 12199eca46af7Smrg# $(am__untar) < result.tar 1220014330f12Smrg# 12201eca46af7SmrgAC_DEFUN([_AM_PROG_TAR], 12202eca46af7Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 12203eca46af7Smrg# in the wild :-( We should find a proper way to deprecate it ... 12204eca46af7SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1220595b296d0Smrg 12206eca46af7Smrg# We'll loop over all known methods to create a tar archive until one works. 12207eca46af7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1220895b296d0Smrg 12209eca46af7Smrgm4_if([$1], [v7], 12210eca46af7Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12211eca46af7Smrg 12212eca46af7Smrg [m4_case([$1], 12213eca46af7Smrg [ustar], 12214eca46af7Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12215eca46af7Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 12216eca46af7Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12217eca46af7Smrg # and bug#13588). 12218eca46af7Smrg am_max_uid=2097151 # 2^21 - 1 12219eca46af7Smrg am_max_gid=$am_max_uid 12220eca46af7Smrg # The $UID and $GID variables are not portable, so we need to resort 12221eca46af7Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12222eca46af7Smrg # below are definitely unexpected, so allow the users to see them 12223eca46af7Smrg # (that is, avoid stderr redirection). 12224eca46af7Smrg am_uid=`id -u || echo unknown` 12225eca46af7Smrg am_gid=`id -g || echo unknown` 12226eca46af7Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12227eca46af7Smrg if test $am_uid -le $am_max_uid; then 12228eca46af7Smrg AC_MSG_RESULT([yes]) 12229eca46af7Smrg else 12230eca46af7Smrg AC_MSG_RESULT([no]) 12231eca46af7Smrg _am_tools=none 12232eca46af7Smrg fi 12233eca46af7Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12234eca46af7Smrg if test $am_gid -le $am_max_gid; then 12235eca46af7Smrg AC_MSG_RESULT([yes]) 12236eca46af7Smrg else 12237eca46af7Smrg AC_MSG_RESULT([no]) 12238eca46af7Smrg _am_tools=none 12239eca46af7Smrg fi], 1224095b296d0Smrg 12241eca46af7Smrg [pax], 12242eca46af7Smrg [], 12243eca46af7Smrg 12244eca46af7Smrg [m4_fatal([Unknown tar format])]) 12245eca46af7Smrg 12246eca46af7Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 12247eca46af7Smrg 12248eca46af7Smrg # Go ahead even if we have the value already cached. We do so because we 12249eca46af7Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 12250eca46af7Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12251eca46af7Smrg 12252eca46af7Smrg for _am_tool in $_am_tools; do 12253eca46af7Smrg case $_am_tool in 12254eca46af7Smrg gnutar) 12255eca46af7Smrg for _am_tar in tar gnutar gtar; do 12256eca46af7Smrg AM_RUN_LOG([$_am_tar --version]) && break 12257eca46af7Smrg done 12258eca46af7Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12259eca46af7Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12260eca46af7Smrg am__untar="$_am_tar -xf -" 12261eca46af7Smrg ;; 12262eca46af7Smrg plaintar) 12263eca46af7Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 12264eca46af7Smrg # ustar tarball either. 12265eca46af7Smrg (tar --version) >/dev/null 2>&1 && continue 12266eca46af7Smrg am__tar='tar chf - "$$tardir"' 12267eca46af7Smrg am__tar_='tar chf - "$tardir"' 12268eca46af7Smrg am__untar='tar xf -' 12269eca46af7Smrg ;; 12270eca46af7Smrg pax) 12271eca46af7Smrg am__tar='pax -L -x $1 -w "$$tardir"' 12272eca46af7Smrg am__tar_='pax -L -x $1 -w "$tardir"' 12273eca46af7Smrg am__untar='pax -r' 12274eca46af7Smrg ;; 12275eca46af7Smrg cpio) 12276eca46af7Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12277eca46af7Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12278eca46af7Smrg am__untar='cpio -i -H $1 -d' 12279eca46af7Smrg ;; 12280eca46af7Smrg none) 12281eca46af7Smrg am__tar=false 12282eca46af7Smrg am__tar_=false 12283eca46af7Smrg am__untar=false 12284eca46af7Smrg ;; 12285eca46af7Smrg esac 12286eca46af7Smrg 12287eca46af7Smrg # If the value was cached, stop now. We just wanted to have am__tar 12288eca46af7Smrg # and am__untar set. 12289eca46af7Smrg test -n "${am_cv_prog_tar_$1}" && break 12290eca46af7Smrg 12291eca46af7Smrg # tar/untar a dummy directory, and stop if the command works. 12292eca46af7Smrg rm -rf conftest.dir 12293eca46af7Smrg mkdir conftest.dir 12294eca46af7Smrg echo GrepMe > conftest.dir/file 12295eca46af7Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12296eca46af7Smrg rm -rf conftest.dir 12297eca46af7Smrg if test -s conftest.tar; then 12298eca46af7Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 12299eca46af7Smrg AM_RUN_LOG([cat conftest.dir/file]) 12300eca46af7Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12301eca46af7Smrg fi 12302eca46af7Smrg done 12303eca46af7Smrg rm -rf conftest.dir 12304eca46af7Smrg 12305eca46af7Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12306eca46af7Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12307eca46af7Smrg 12308eca46af7SmrgAC_SUBST([am__tar]) 12309eca46af7SmrgAC_SUBST([am__untar]) 12310eca46af7Smrg]) # _AM_PROG_TAR 1231195b296d0Smrg 12312