aclocal.m4 revision b0de6900
1ee82cb62Smrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 2acd6767fSmrg 3ee82cb62Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4fe5e51b7Smrg 5fe5e51b7Smrg# This file is free software; the Free Software Foundation 6fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8fe5e51b7Smrg 9fe5e51b7Smrg# This program is distributed in the hope that it will be useful, 10fe5e51b7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11fe5e51b7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12fe5e51b7Smrg# PARTICULAR PURPOSE. 13fe5e51b7Smrg 14493f84f4Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15eda3803bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16eda3803bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17acd6767fSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18acd6767fSmrg[m4_warning([this file was generated for autoconf 2.69. 19eda3803bSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20eda3803bSmrgIf you have problems, you may need to regenerate the build system entirely. 21acd6767fSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22fe5e51b7Smrg 23fe5e51b7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24a31a186aSmrg# 25ee82cb62Smrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 26a31a186aSmrg# Written by Gordon Matzigkeit, 1996 27a31a186aSmrg# 28a31a186aSmrg# This file is free software; the Free Software Foundation gives 29a31a186aSmrg# unlimited permission to copy and/or distribute it, with or without 30a31a186aSmrg# modifications, as long as this notice is preserved. 31a31a186aSmrg 32a31a186aSmrgm4_define([_LT_COPYING], [dnl 33493f84f4Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 34493f84f4Smrg# This is free software; see the source for copying conditions. There is NO 35493f84f4Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 36493f84f4Smrg 37493f84f4Smrg# GNU Libtool is free software; you can redistribute it and/or modify 38493f84f4Smrg# it under the terms of the GNU General Public License as published by 39493f84f4Smrg# the Free Software Foundation; either version 2 of of the License, or 40493f84f4Smrg# (at your option) any later version. 41a31a186aSmrg# 42493f84f4Smrg# As a special exception to the GNU General Public License, if you 43493f84f4Smrg# distribute this file as part of a program or library that is built 44493f84f4Smrg# using GNU Libtool, you may include this file under the same 45493f84f4Smrg# distribution terms that you use for the rest of that program. 46a31a186aSmrg# 47493f84f4Smrg# GNU Libtool is distributed in the hope that it will be useful, but 48493f84f4Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 49a31a186aSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50a31a186aSmrg# GNU General Public License for more details. 51a31a186aSmrg# 52a31a186aSmrg# You should have received a copy of the GNU General Public License 53493f84f4Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 54a31a186aSmrg]) 55fe5e51b7Smrg 56493f84f4Smrg# serial 58 LT_INIT 57fe5e51b7Smrg 58fe5e51b7Smrg 59a31a186aSmrg# LT_PREREQ(VERSION) 60a31a186aSmrg# ------------------ 61a31a186aSmrg# Complain and exit if this libtool version is less that VERSION. 62a31a186aSmrgm4_defun([LT_PREREQ], 63a31a186aSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64a31a186aSmrg [m4_default([$3], 65a31a186aSmrg [m4_fatal([Libtool version $1 or higher is required], 66a31a186aSmrg 63)])], 67a31a186aSmrg [$2])]) 68eda3803bSmrg 69eda3803bSmrg 70a31a186aSmrg# _LT_CHECK_BUILDDIR 71a31a186aSmrg# ------------------ 72a31a186aSmrg# Complain if the absolute build directory name contains unusual characters 73a31a186aSmrgm4_defun([_LT_CHECK_BUILDDIR], 74a31a186aSmrg[case `pwd` in 75a31a186aSmrg *\ * | *\ *) 76a31a186aSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77a31a186aSmrgesac 78a31a186aSmrg]) 79a31a186aSmrg 80a31a186aSmrg 81a31a186aSmrg# LT_INIT([OPTIONS]) 82a31a186aSmrg# ------------------ 83a31a186aSmrgAC_DEFUN([LT_INIT], 84493f84f4Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 850bb88ba4SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86a31a186aSmrgAC_BEFORE([$0], [LT_LANG])dnl 87a31a186aSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 88a31a186aSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 89a31a186aSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 90a31a186aSmrg 91a31a186aSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 92a31a186aSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93a31a186aSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94a31a186aSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95a31a186aSmrgdnl unless we require an AC_DEFUNed macro: 96a31a186aSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 97a31a186aSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 98a31a186aSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 99a31a186aSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 100a31a186aSmrgm4_require([_LT_PROG_LTMAIN])dnl 101a31a186aSmrg 1020bb88ba4Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1030bb88ba4Smrg 104a31a186aSmrgdnl Parse OPTIONS 105a31a186aSmrg_LT_SET_OPTIONS([$0], [$1]) 106fe5e51b7Smrg 107fe5e51b7Smrg# This can be used to rebuild libtool when needed 108493f84f4SmrgLIBTOOL_DEPS=$ltmain 109fe5e51b7Smrg 110fe5e51b7Smrg# Always use our own libtool. 111fe5e51b7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 112fe5e51b7SmrgAC_SUBST(LIBTOOL)dnl 113fe5e51b7Smrg 114a31a186aSmrg_LT_SETUP 115eda3803bSmrg 116a31a186aSmrg# Only expand once: 117a31a186aSmrgm4_define([LT_INIT]) 118a31a186aSmrg])# LT_INIT 119eda3803bSmrg 120a31a186aSmrg# Old names: 121a31a186aSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122a31a186aSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 124a31a186aSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125a31a186aSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 126a31a186aSmrg 127a31a186aSmrg 128ee82cb62Smrg# _LT_PREPARE_CC_BASENAME 129ee82cb62Smrg# ----------------------- 130ee82cb62Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 131ee82cb62Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 132ee82cb62Smrgfunc_cc_basename () 133ee82cb62Smrg{ 134ee82cb62Smrg for cc_temp in @S|@*""; do 135ee82cb62Smrg case $cc_temp in 136ee82cb62Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137ee82cb62Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138ee82cb62Smrg \-*) ;; 139ee82cb62Smrg *) break;; 140ee82cb62Smrg esac 141ee82cb62Smrg done 142ee82cb62Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 143ee82cb62Smrg} 144ee82cb62Smrg])# _LT_PREPARE_CC_BASENAME 145ee82cb62Smrg 146ee82cb62Smrg 147a31a186aSmrg# _LT_CC_BASENAME(CC) 148a31a186aSmrg# ------------------- 149ee82cb62Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 150ee82cb62Smrg# but that macro is also expanded into generated libtool script, which 151ee82cb62Smrg# arranges for $SED and $ECHO to be set by different means. 152a31a186aSmrgm4_defun([_LT_CC_BASENAME], 153ee82cb62Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 154ee82cb62SmrgAC_REQUIRE([_LT_DECL_SED])dnl 155ee82cb62SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 156ee82cb62Smrgfunc_cc_basename $1 157ee82cb62Smrgcc_basename=$func_cc_basename_result 158a31a186aSmrg]) 159a31a186aSmrg 160a31a186aSmrg 161a31a186aSmrg# _LT_FILEUTILS_DEFAULTS 162a31a186aSmrg# ---------------------- 163a31a186aSmrg# It is okay to use these file commands and assume they have been set 164493f84f4Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 165a31a186aSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 166a31a186aSmrg[: ${CP="cp -f"} 167a31a186aSmrg: ${MV="mv -f"} 168a31a186aSmrg: ${RM="rm -f"} 169a31a186aSmrg])# _LT_FILEUTILS_DEFAULTS 170a31a186aSmrg 171a31a186aSmrg 172a31a186aSmrg# _LT_SETUP 173a31a186aSmrg# --------- 174a31a186aSmrgm4_defun([_LT_SETUP], 175a31a186aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176fe5e51b7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1770bb88ba4SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1780bb88ba4SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1790bb88ba4Smrg 1800bb88ba4Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1810bb88ba4Smrgdnl 182a31a186aSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 183a31a186aSmrg_LT_DECL([], [host], [0])dnl 184a31a186aSmrg_LT_DECL([], [host_os], [0])dnl 185a31a186aSmrgdnl 186a31a186aSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 187a31a186aSmrg_LT_DECL([], [build], [0])dnl 188a31a186aSmrg_LT_DECL([], [build_os], [0])dnl 189a31a186aSmrgdnl 190fe5e51b7SmrgAC_REQUIRE([AC_PROG_CC])dnl 191a31a186aSmrgAC_REQUIRE([LT_PATH_LD])dnl 192a31a186aSmrgAC_REQUIRE([LT_PATH_NM])dnl 193a31a186aSmrgdnl 194fe5e51b7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 195a31a186aSmrgtest -z "$LN_S" && LN_S="ln -s" 196a31a186aSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197eda3803bSmrgdnl 198a31a186aSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 199a31a186aSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 200a31a186aSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 201a31a186aSmrgdnl 202a31a186aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 203a31a186aSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2040bb88ba4Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 205a31a186aSmrgm4_require([_LT_CMD_RELOAD])dnl 206a31a186aSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2070bb88ba4Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 208a31a186aSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 209a31a186aSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2100bb88ba4Smrgm4_require([_LT_WITH_SYSROOT])dnl 211493f84f4Smrgm4_require([_LT_CMD_TRUNCATE])dnl 212a31a186aSmrg 213a31a186aSmrg_LT_CONFIG_LIBTOOL_INIT([ 214493f84f4Smrg# See if we are running on zsh, and set the options that allow our 215a31a186aSmrg# commands through without removal of \ escapes INIT. 216493f84f4Smrgif test -n "\${ZSH_VERSION+set}"; then 217a31a186aSmrg setopt NO_GLOB_SUBST 218a31a186aSmrgfi 219a31a186aSmrg]) 220493f84f4Smrgif test -n "${ZSH_VERSION+set}"; then 221a31a186aSmrg setopt NO_GLOB_SUBST 222a31a186aSmrgfi 223fe5e51b7Smrg 224a31a186aSmrg_LT_CHECK_OBJDIR 225a31a186aSmrg 226a31a186aSmrgm4_require([_LT_TAG_COMPILER])dnl 227fe5e51b7Smrg 228fe5e51b7Smrgcase $host_os in 229fe5e51b7Smrgaix3*) 230fe5e51b7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 231fe5e51b7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 232fe5e51b7Smrg # vanish in a puff of smoke. 233493f84f4Smrg if test set != "${COLLECT_NAMES+set}"; then 234fe5e51b7Smrg COLLECT_NAMES= 235fe5e51b7Smrg export COLLECT_NAMES 236fe5e51b7Smrg fi 237fe5e51b7Smrg ;; 238fe5e51b7Smrgesac 239fe5e51b7Smrg 240fe5e51b7Smrg# Global variables: 241a31a186aSmrgofile=libtool 242fe5e51b7Smrgcan_build_shared=yes 243fe5e51b7Smrg 244493f84f4Smrg# All known linkers require a '.a' archive for static linking (except MSVC, 245fe5e51b7Smrg# which needs '.lib'). 246fe5e51b7Smrglibext=a 247fe5e51b7Smrg 248493f84f4Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 249643b027fSmrg 250493f84f4Smrgold_CC=$CC 251493f84f4Smrgold_CFLAGS=$CFLAGS 252fe5e51b7Smrg 253fe5e51b7Smrg# Set sane defaults for various variables 254fe5e51b7Smrgtest -z "$CC" && CC=cc 255fe5e51b7Smrgtest -z "$LTCC" && LTCC=$CC 256fe5e51b7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257fe5e51b7Smrgtest -z "$LD" && LD=ld 258fe5e51b7Smrgtest -z "$ac_objext" && ac_objext=o 259fe5e51b7Smrg 260fe5e51b7Smrg_LT_CC_BASENAME([$compiler]) 261fe5e51b7Smrg 262fe5e51b7Smrg# Only perform the check for file, if the check method requires it 263a31a186aSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 264fe5e51b7Smrgcase $deplibs_check_method in 265fe5e51b7Smrgfile_magic*) 266fe5e51b7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 267a31a186aSmrg _LT_PATH_MAGIC 268fe5e51b7Smrg fi 269fe5e51b7Smrg ;; 270fe5e51b7Smrgesac 271fe5e51b7Smrg 272a31a186aSmrg# Use C for the default configuration in the libtool script 273a31a186aSmrgLT_SUPPORTED_TAG([CC]) 274a31a186aSmrg_LT_LANG_C_CONFIG 275a31a186aSmrg_LT_LANG_DEFAULT_CONFIG 276a31a186aSmrg_LT_CONFIG_COMMANDS 277a31a186aSmrg])# _LT_SETUP 278eda3803bSmrg 279eda3803bSmrg 2800bb88ba4Smrg# _LT_PREPARE_SED_QUOTE_VARS 2810bb88ba4Smrg# -------------------------- 2820bb88ba4Smrg# Define a few sed substitution that help us do robust quoting. 2830bb88ba4Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2840bb88ba4Smrg[# Backslashify metacharacters that are still active within 2850bb88ba4Smrg# double-quoted strings. 2860bb88ba4Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2870bb88ba4Smrg 2880bb88ba4Smrg# Same as above, but do not quote variable references. 2890bb88ba4Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2900bb88ba4Smrg 2910bb88ba4Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2920bb88ba4Smrg# double_quote_subst'ed string. 2930bb88ba4Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2940bb88ba4Smrg 2950bb88ba4Smrg# Sed substitution to delay expansion of an escaped single quote. 2960bb88ba4Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2970bb88ba4Smrg 2980bb88ba4Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2990bb88ba4Smrgno_glob_subst='s/\*/\\\*/g' 3000bb88ba4Smrg]) 3010bb88ba4Smrg 302a31a186aSmrg# _LT_PROG_LTMAIN 303a31a186aSmrg# --------------- 304493f84f4Smrg# Note that this code is called both from 'configure', and 'config.status' 305a31a186aSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 306493f84f4Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 307a31a186aSmrg# so we pass a copy along to make sure it has a sensible value anyway. 308a31a186aSmrgm4_defun([_LT_PROG_LTMAIN], 309a31a186aSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 310a31a186aSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 311493f84f4Smrgltmain=$ac_aux_dir/ltmain.sh 312a31a186aSmrg])# _LT_PROG_LTMAIN 313eda3803bSmrg 314eda3803bSmrg 315a31a186aSmrg 316a31a186aSmrg# So that we can recreate a full libtool script including additional 317a31a186aSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 318493f84f4Smrg# in macros and then make a single call at the end using the 'libtool' 319a31a186aSmrg# label. 320a31a186aSmrg 321a31a186aSmrg 322a31a186aSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 323a31a186aSmrg# ---------------------------------------- 324a31a186aSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325a31a186aSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 326a31a186aSmrg[m4_ifval([$1], 327a31a186aSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 328a31a186aSmrg [$1 329a31a186aSmrg])])]) 330a31a186aSmrg 331a31a186aSmrg# Initialize. 332a31a186aSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 333a31a186aSmrg 334a31a186aSmrg 335a31a186aSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 336a31a186aSmrg# ------------------------------ 337a31a186aSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 338a31a186aSmrgm4_define([_LT_CONFIG_LIBTOOL], 339a31a186aSmrg[m4_ifval([$1], 340a31a186aSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 341a31a186aSmrg [$1 342a31a186aSmrg])])]) 343a31a186aSmrg 344a31a186aSmrg# Initialize. 345a31a186aSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 346a31a186aSmrg 347a31a186aSmrg 348a31a186aSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 349a31a186aSmrg# ----------------------------------------------------- 350a31a186aSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 351a31a186aSmrg[_LT_CONFIG_LIBTOOL([$1]) 352a31a186aSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 353a31a186aSmrg]) 354a31a186aSmrg 355a31a186aSmrg 356a31a186aSmrg# _LT_FORMAT_COMMENT([COMMENT]) 357a31a186aSmrg# ----------------------------- 358a31a186aSmrg# Add leading comment marks to the start of each line, and a trailing 359a31a186aSmrg# full-stop to the whole comment if one is not present already. 360a31a186aSmrgm4_define([_LT_FORMAT_COMMENT], 361a31a186aSmrg[m4_ifval([$1], [ 362a31a186aSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 363a31a186aSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 364a31a186aSmrg)]) 365a31a186aSmrg 366a31a186aSmrg 367a31a186aSmrg 368a31a186aSmrg 369a31a186aSmrg 370a31a186aSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 371a31a186aSmrg# ------------------------------------------------------------------- 372a31a186aSmrg# CONFIGNAME is the name given to the value in the libtool script. 373a31a186aSmrg# VARNAME is the (base) name used in the configure script. 374a31a186aSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 375a31a186aSmrg# VARNAME. Any other value will be used directly. 376a31a186aSmrgm4_define([_LT_DECL], 377a31a186aSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 378a31a186aSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 379a31a186aSmrg [m4_ifval([$1], [$1], [$2])]) 380a31a186aSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 381a31a186aSmrg m4_ifval([$4], 382a31a186aSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 383a31a186aSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 384a31a186aSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 385a31a186aSmrg]) 386a31a186aSmrg 387a31a186aSmrg 388a31a186aSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 389a31a186aSmrg# -------------------------------------------------------- 390a31a186aSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 391a31a186aSmrg 392a31a186aSmrg 393a31a186aSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 394a31a186aSmrg# ------------------------------------------------ 395a31a186aSmrgm4_define([lt_decl_tag_varnames], 396a31a186aSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 397a31a186aSmrg 398a31a186aSmrg 399a31a186aSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 400a31a186aSmrg# --------------------------------------------------------- 401a31a186aSmrgm4_define([_lt_decl_filter], 402a31a186aSmrg[m4_case([$#], 403a31a186aSmrg [0], [m4_fatal([$0: too few arguments: $#])], 404a31a186aSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 405a31a186aSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 406a31a186aSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 407a31a186aSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 408a31a186aSmrg]) 409a31a186aSmrg 410a31a186aSmrg 411a31a186aSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 412a31a186aSmrg# -------------------------------------------------- 413a31a186aSmrgm4_define([lt_decl_quote_varnames], 414a31a186aSmrg[_lt_decl_filter([value], [1], $@)]) 415a31a186aSmrg 416a31a186aSmrg 417a31a186aSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 418a31a186aSmrg# --------------------------------------------------- 419a31a186aSmrgm4_define([lt_decl_dquote_varnames], 420a31a186aSmrg[_lt_decl_filter([value], [2], $@)]) 421a31a186aSmrg 422a31a186aSmrg 423a31a186aSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 424a31a186aSmrg# --------------------------------------------------- 425a31a186aSmrgm4_define([lt_decl_varnames_tagged], 426a31a186aSmrg[m4_assert([$# <= 2])dnl 427a31a186aSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 428a31a186aSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 429a31a186aSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 430a31a186aSmrgm4_define([_lt_decl_varnames_tagged], 431a31a186aSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432a31a186aSmrg 433a31a186aSmrg 434a31a186aSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 435a31a186aSmrg# ------------------------------------------------ 436a31a186aSmrgm4_define([lt_decl_all_varnames], 437a31a186aSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 438a31a186aSmrg m4_if([$2], [], 439a31a186aSmrg m4_quote(lt_decl_varnames), 440a31a186aSmrg m4_quote(m4_shift($@))))[]dnl 441a31a186aSmrg]) 442a31a186aSmrgm4_define([_lt_decl_all_varnames], 443a31a186aSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 444a31a186aSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 445a31a186aSmrg]) 446a31a186aSmrg 447a31a186aSmrg 448a31a186aSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 449a31a186aSmrg# ------------------------------------ 450493f84f4Smrg# Quote a variable value, and forward it to 'config.status' so that its 451493f84f4Smrg# declaration there will have the same value as in 'configure'. VARNAME 452a31a186aSmrg# must have a single quote delimited value for this to work. 453a31a186aSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4540bb88ba4Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 455a31a186aSmrg 456a31a186aSmrg 457a31a186aSmrg# _LT_CONFIG_STATUS_DECLARATIONS 458a31a186aSmrg# ------------------------------ 459a31a186aSmrg# We delimit libtool config variables with single quotes, so when 460a31a186aSmrg# we write them to config.status, we have to be sure to quote all 461a31a186aSmrg# embedded single quotes properly. In configure, this macro expands 462a31a186aSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 463a31a186aSmrg# 4640bb88ba4Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 465a31a186aSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 466a31a186aSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 467a31a186aSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 468a31a186aSmrg 469a31a186aSmrg 470a31a186aSmrg# _LT_LIBTOOL_TAGS 471a31a186aSmrg# ---------------- 472a31a186aSmrg# Output comment and list of tags supported by the script 473a31a186aSmrgm4_defun([_LT_LIBTOOL_TAGS], 474a31a186aSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 475493f84f4Smrgavailable_tags='_LT_TAGS'dnl 476a31a186aSmrg]) 477a31a186aSmrg 478a31a186aSmrg 479a31a186aSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 480a31a186aSmrg# ----------------------------------- 481a31a186aSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 482a31a186aSmrg# expand to a commented shell variable setting: 483a31a186aSmrg# 484a31a186aSmrg# # Some comment about what VAR is for. 485a31a186aSmrg# visible_name=$lt_internal_name 486a31a186aSmrgm4_define([_LT_LIBTOOL_DECLARE], 487a31a186aSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 488a31a186aSmrg [description])))[]dnl 489a31a186aSmrgm4_pushdef([_libtool_name], 490a31a186aSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 491a31a186aSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 492a31a186aSmrg [0], [_libtool_name=[$]$1], 493a31a186aSmrg [1], [_libtool_name=$lt_[]$1], 494a31a186aSmrg [2], [_libtool_name=$lt_[]$1], 495a31a186aSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 496a31a186aSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 497a31a186aSmrg]) 498a31a186aSmrg 499a31a186aSmrg 500a31a186aSmrg# _LT_LIBTOOL_CONFIG_VARS 501a31a186aSmrg# ----------------------- 502a31a186aSmrg# Produce commented declarations of non-tagged libtool config variables 503493f84f4Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 504a31a186aSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 505a31a186aSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 506a31a186aSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 507a31a186aSmrg[m4_foreach([_lt_var], 508a31a186aSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 509a31a186aSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 510a31a186aSmrg 511a31a186aSmrg 512a31a186aSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 513a31a186aSmrg# ------------------------- 514a31a186aSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 515a31a186aSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 516a31a186aSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 517eda3803bSmrg 518eda3803bSmrg 519a31a186aSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 520a31a186aSmrg# ------------------------------ 521a31a186aSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 522a31a186aSmrg 523a31a186aSmrg 524a31a186aSmrg# _LT_CONFIG_COMMANDS 525fe5e51b7Smrg# ------------------- 526a31a186aSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 527a31a186aSmrg# variables for single and double quote escaping we saved from calls 528a31a186aSmrg# to _LT_DECL, we can put quote escaped variables declarations 529493f84f4Smrg# into 'config.status', and then the shell code to quote escape them in 530493f84f4Smrg# for loops in 'config.status'. Finally, any additional code accumulated 531a31a186aSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 532a31a186aSmrgm4_defun([_LT_CONFIG_COMMANDS], 533a31a186aSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 534a31a186aSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 535a31a186aSmrg dnl instead of duplicating it all over again into config.status, 536a31a186aSmrg dnl then we will have config.status run $CONFIG_LT later, so it 537a31a186aSmrg dnl needs to know what name is stored there: 538a31a186aSmrg [AC_CONFIG_COMMANDS([libtool], 539a31a186aSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 540a31a186aSmrg dnl If the libtool generation code is destined for config.status, 541a31a186aSmrg dnl expand the accumulated commands and init code now: 542a31a186aSmrg [AC_CONFIG_COMMANDS([libtool], 543a31a186aSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 544a31a186aSmrg])#_LT_CONFIG_COMMANDS 545a31a186aSmrg 546a31a186aSmrg 547a31a186aSmrg# Initialize. 548a31a186aSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 549a31a186aSmrg[ 550a31a186aSmrg 551a31a186aSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 552a31a186aSmrg# if CDPATH is set. 553a31a186aSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 554a31a186aSmrg 555a31a186aSmrgsed_quote_subst='$sed_quote_subst' 556a31a186aSmrgdouble_quote_subst='$double_quote_subst' 557a31a186aSmrgdelay_variable_subst='$delay_variable_subst' 558a31a186aSmrg_LT_CONFIG_STATUS_DECLARATIONS 559a31a186aSmrgLTCC='$LTCC' 560a31a186aSmrgLTCFLAGS='$LTCFLAGS' 561a31a186aSmrgcompiler='$compiler_DEFAULT' 562a31a186aSmrg 5630bb88ba4Smrg# A function that is used when there is no print builtin or printf. 5640bb88ba4Smrgfunc_fallback_echo () 5650bb88ba4Smrg{ 5660bb88ba4Smrg eval 'cat <<_LTECHO_EOF 5670bb88ba4Smrg\$[]1 5680bb88ba4Smrg_LTECHO_EOF' 5690bb88ba4Smrg} 5700bb88ba4Smrg 571a31a186aSmrg# Quote evaled strings. 572a31a186aSmrgfor var in lt_decl_all_varnames([[ \ 573a31a186aSmrg]], lt_decl_quote_varnames); do 5740bb88ba4Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575a31a186aSmrg *[[\\\\\\\`\\"\\\$]]*) 576493f84f4Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 577a31a186aSmrg ;; 578a31a186aSmrg *) 579a31a186aSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580a31a186aSmrg ;; 581a31a186aSmrg esac 582a31a186aSmrgdone 583a31a186aSmrg 584a31a186aSmrg# Double-quote double-evaled strings. 585a31a186aSmrgfor var in lt_decl_all_varnames([[ \ 586a31a186aSmrg]], lt_decl_dquote_varnames); do 5870bb88ba4Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 588a31a186aSmrg *[[\\\\\\\`\\"\\\$]]*) 589493f84f4Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 590a31a186aSmrg ;; 591a31a186aSmrg *) 592a31a186aSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 593a31a186aSmrg ;; 594a31a186aSmrg esac 595a31a186aSmrgdone 596a31a186aSmrg 597a31a186aSmrg_LT_OUTPUT_LIBTOOL_INIT 598a31a186aSmrg]) 599a31a186aSmrg 6000bb88ba4Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 6010bb88ba4Smrg# ------------------------------------ 6020bb88ba4Smrg# Generate a child script FILE with all initialization necessary to 6030bb88ba4Smrg# reuse the environment learned by the parent script, and make the 6040bb88ba4Smrg# file executable. If COMMENT is supplied, it is inserted after the 605493f84f4Smrg# '#!' sequence but before initialization text begins. After this 6060bb88ba4Smrg# macro, additional text can be appended to FILE to form the body of 6070bb88ba4Smrg# the child script. The macro ends with non-zero status if the 6080bb88ba4Smrg# file could not be fully written (such as if the disk is full). 6090bb88ba4Smrgm4_ifdef([AS_INIT_GENERATED], 6100bb88ba4Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 6110bb88ba4Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 6120bb88ba4Smrg[m4_require([AS_PREPARE])]dnl 6130bb88ba4Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6140bb88ba4Smrg[lt_write_fail=0 6150bb88ba4Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6160bb88ba4Smrg#! $SHELL 6170bb88ba4Smrg# Generated by $as_me. 6180bb88ba4Smrg$2 6190bb88ba4SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6200bb88ba4Smrgexport SHELL 6210bb88ba4Smrg_ASEOF 6220bb88ba4Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6230bb88ba4SmrgAS_SHELL_SANITIZE 6240bb88ba4Smrg_AS_PREPARE 6250bb88ba4Smrgexec AS_MESSAGE_FD>&1 6260bb88ba4Smrg_ASEOF 627493f84f4Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6280bb88ba4Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 629a31a186aSmrg 630a31a186aSmrg# LT_OUTPUT 631a31a186aSmrg# --------- 632a31a186aSmrg# This macro allows early generation of the libtool script (before 633a31a186aSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 634a31a186aSmrg# tests. 635a31a186aSmrgAC_DEFUN([LT_OUTPUT], 636a31a186aSmrg[: ${CONFIG_LT=./config.lt} 637a31a186aSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6380bb88ba4Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6390bb88ba4Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 640a31a186aSmrg 641a31a186aSmrgcat >>"$CONFIG_LT" <<\_LTEOF 6420bb88ba4Smrglt_cl_silent=false 643a31a186aSmrgexec AS_MESSAGE_LOG_FD>>config.log 644a31a186aSmrg{ 645a31a186aSmrg echo 646a31a186aSmrg AS_BOX([Running $as_me.]) 647a31a186aSmrg} >&AS_MESSAGE_LOG_FD 648a31a186aSmrg 649a31a186aSmrglt_cl_help="\ 650493f84f4Smrg'$as_me' creates a local libtool stub from the current configuration, 651a31a186aSmrgfor use in further configure time tests before the real libtool is 652a31a186aSmrggenerated. 653a31a186aSmrg 654a31a186aSmrgUsage: $[0] [[OPTIONS]] 655a31a186aSmrg 656a31a186aSmrg -h, --help print this help, then exit 657a31a186aSmrg -V, --version print version number, then exit 658a31a186aSmrg -q, --quiet do not print progress messages 659a31a186aSmrg -d, --debug don't remove temporary files 660a31a186aSmrg 661a31a186aSmrgReport bugs to <bug-libtool@gnu.org>." 662a31a186aSmrg 663a31a186aSmrglt_cl_version="\ 664a31a186aSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 665a31a186aSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 666a31a186aSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 667a31a186aSmrg 6680bb88ba4SmrgCopyright (C) 2011 Free Software Foundation, Inc. 669a31a186aSmrgThis config.lt script is free software; the Free Software Foundation 670a31a186aSmrggives unlimited permision to copy, distribute and modify it." 671a31a186aSmrg 672493f84f4Smrgwhile test 0 != $[#] 673a31a186aSmrgdo 674a31a186aSmrg case $[1] in 675a31a186aSmrg --version | --v* | -V ) 676a31a186aSmrg echo "$lt_cl_version"; exit 0 ;; 677a31a186aSmrg --help | --h* | -h ) 678a31a186aSmrg echo "$lt_cl_help"; exit 0 ;; 679a31a186aSmrg --debug | --d* | -d ) 680a31a186aSmrg debug=: ;; 681a31a186aSmrg --quiet | --q* | --silent | --s* | -q ) 682a31a186aSmrg lt_cl_silent=: ;; 683a31a186aSmrg 684a31a186aSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 685493f84f4SmrgTry '$[0] --help' for more information.]) ;; 686a31a186aSmrg 687a31a186aSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 688493f84f4SmrgTry '$[0] --help' for more information.]) ;; 689a31a186aSmrg esac 690a31a186aSmrg shift 691a31a186aSmrgdone 692a31a186aSmrg 693a31a186aSmrgif $lt_cl_silent; then 694a31a186aSmrg exec AS_MESSAGE_FD>/dev/null 695a31a186aSmrgfi 696a31a186aSmrg_LTEOF 697a31a186aSmrg 698a31a186aSmrgcat >>"$CONFIG_LT" <<_LTEOF 699a31a186aSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 700a31a186aSmrg_LTEOF 701a31a186aSmrg 702a31a186aSmrgcat >>"$CONFIG_LT" <<\_LTEOF 703a31a186aSmrgAC_MSG_NOTICE([creating $ofile]) 704a31a186aSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 705a31a186aSmrgAS_EXIT(0) 706a31a186aSmrg_LTEOF 707a31a186aSmrgchmod +x "$CONFIG_LT" 708a31a186aSmrg 709a31a186aSmrg# configure is writing to config.log, but config.lt does its own redirection, 710a31a186aSmrg# appending to config.log, which fails on DOS, as config.log is still kept 711a31a186aSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 712a31a186aSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 7130bb88ba4Smrglt_cl_success=: 714493f84f4Smrgtest yes = "$silent" && 7150bb88ba4Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7160bb88ba4Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7170bb88ba4Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7180bb88ba4Smrgexec AS_MESSAGE_LOG_FD>>config.log 7190bb88ba4Smrg$lt_cl_success || AS_EXIT(1) 720a31a186aSmrg])# LT_OUTPUT 721a31a186aSmrg 722a31a186aSmrg 723a31a186aSmrg# _LT_CONFIG(TAG) 724a31a186aSmrg# --------------- 725a31a186aSmrg# If TAG is the built-in tag, create an initial libtool script with a 726a31a186aSmrg# default configuration from the untagged config vars. Otherwise add code 727a31a186aSmrg# to config.status for appending the configuration named by TAG from the 728a31a186aSmrg# matching tagged config vars. 729a31a186aSmrgm4_defun([_LT_CONFIG], 730a31a186aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 731a31a186aSmrg_LT_CONFIG_SAVE_COMMANDS([ 732a31a186aSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 733a31a186aSmrg m4_if(_LT_TAG, [C], [ 734493f84f4Smrg # See if we are running on zsh, and set the options that allow our 735a31a186aSmrg # commands through without removal of \ escapes. 736493f84f4Smrg if test -n "${ZSH_VERSION+set}"; then 737a31a186aSmrg setopt NO_GLOB_SUBST 738a31a186aSmrg fi 739a31a186aSmrg 740493f84f4Smrg cfgfile=${ofile}T 741a31a186aSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 742a31a186aSmrg $RM "$cfgfile" 743a31a186aSmrg 744a31a186aSmrg cat <<_LT_EOF >> "$cfgfile" 745a31a186aSmrg#! $SHELL 746493f84f4Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 747a31a186aSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 748a31a186aSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 749493f84f4Smrg 750493f84f4Smrg# Provide generalized library-building support services. 751493f84f4Smrg# Written by Gordon Matzigkeit, 1996 752493f84f4Smrg 753a31a186aSmrg_LT_COPYING 754a31a186aSmrg_LT_LIBTOOL_TAGS 755a31a186aSmrg 756ee82cb62Smrg# Configured defaults for sys_lib_dlsearch_path munging. 757ee82cb62Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 758ee82cb62Smrg 759a31a186aSmrg# ### BEGIN LIBTOOL CONFIG 760a31a186aSmrg_LT_LIBTOOL_CONFIG_VARS 761a31a186aSmrg_LT_LIBTOOL_TAG_VARS 762a31a186aSmrg# ### END LIBTOOL CONFIG 763a31a186aSmrg 764ee82cb62Smrg_LT_EOF 765ee82cb62Smrg 766ee82cb62Smrg cat <<'_LT_EOF' >> "$cfgfile" 767ee82cb62Smrg 768ee82cb62Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 769ee82cb62Smrg 770ee82cb62Smrg_LT_PREPARE_MUNGE_PATH_LIST 771ee82cb62Smrg_LT_PREPARE_CC_BASENAME 772ee82cb62Smrg 773ee82cb62Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 774ee82cb62Smrg 775a31a186aSmrg_LT_EOF 776a31a186aSmrg 777a31a186aSmrg case $host_os in 778a31a186aSmrg aix3*) 779a31a186aSmrg cat <<\_LT_EOF >> "$cfgfile" 780a31a186aSmrg# AIX sometimes has problems with the GCC collect2 program. For some 781a31a186aSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 782a31a186aSmrg# vanish in a puff of smoke. 783493f84f4Smrgif test set != "${COLLECT_NAMES+set}"; then 784a31a186aSmrg COLLECT_NAMES= 785a31a186aSmrg export COLLECT_NAMES 786a31a186aSmrgfi 787a31a186aSmrg_LT_EOF 788a31a186aSmrg ;; 789a31a186aSmrg esac 790a31a186aSmrg 791a31a186aSmrg _LT_PROG_LTMAIN 792a31a186aSmrg 793a31a186aSmrg # We use sed instead of cat because bash on DJGPP gets confused if 794a31a186aSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 795a31a186aSmrg # text mode, it properly converts lines to CR/LF. This bash problem 796a31a186aSmrg # is reportedly fixed, but why not run on old versions too? 7970bb88ba4Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 7980bb88ba4Smrg || (rm -f "$cfgfile"; exit 1) 799a31a186aSmrg 8000bb88ba4Smrg mv -f "$cfgfile" "$ofile" || 801a31a186aSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 802a31a186aSmrg chmod +x "$ofile" 803a31a186aSmrg], 804a31a186aSmrg[cat <<_LT_EOF >> "$ofile" 805a31a186aSmrg 806a31a186aSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 807a31a186aSmrgdnl in a comment (ie after a #). 808a31a186aSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 809a31a186aSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 810a31a186aSmrg# ### END LIBTOOL TAG CONFIG: $1 811a31a186aSmrg_LT_EOF 812a31a186aSmrg])dnl /m4_if 813a31a186aSmrg], 814a31a186aSmrg[m4_if([$1], [], [ 815a31a186aSmrg PACKAGE='$PACKAGE' 816a31a186aSmrg VERSION='$VERSION' 817a31a186aSmrg RM='$RM' 818a31a186aSmrg ofile='$ofile'], []) 819a31a186aSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 820a31a186aSmrg])# _LT_CONFIG 821a31a186aSmrg 822a31a186aSmrg 823a31a186aSmrg# LT_SUPPORTED_TAG(TAG) 824a31a186aSmrg# --------------------- 825a31a186aSmrg# Trace this macro to discover what tags are supported by the libtool 826a31a186aSmrg# --tag option, using: 827a31a186aSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 828a31a186aSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 829a31a186aSmrg 830a31a186aSmrg 831a31a186aSmrg# C support is built-in for now 832a31a186aSmrgm4_define([_LT_LANG_C_enabled], []) 833a31a186aSmrgm4_define([_LT_TAGS], []) 834a31a186aSmrg 835a31a186aSmrg 836a31a186aSmrg# LT_LANG(LANG) 837a31a186aSmrg# ------------- 838a31a186aSmrg# Enable libtool support for the given language if not already enabled. 839a31a186aSmrgAC_DEFUN([LT_LANG], 840a31a186aSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 841a31a186aSmrgm4_case([$1], 842a31a186aSmrg [C], [_LT_LANG(C)], 843a31a186aSmrg [C++], [_LT_LANG(CXX)], 8440bb88ba4Smrg [Go], [_LT_LANG(GO)], 845a31a186aSmrg [Java], [_LT_LANG(GCJ)], 846a31a186aSmrg [Fortran 77], [_LT_LANG(F77)], 847a31a186aSmrg [Fortran], [_LT_LANG(FC)], 848a31a186aSmrg [Windows Resource], [_LT_LANG(RC)], 849a31a186aSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 850a31a186aSmrg [_LT_LANG($1)], 851a31a186aSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 852a31a186aSmrg])# LT_LANG 853a31a186aSmrg 854a31a186aSmrg 855a31a186aSmrg# _LT_LANG(LANGNAME) 856a31a186aSmrg# ------------------ 857a31a186aSmrgm4_defun([_LT_LANG], 858a31a186aSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 859a31a186aSmrg [LT_SUPPORTED_TAG([$1])dnl 860a31a186aSmrg m4_append([_LT_TAGS], [$1 ])dnl 861a31a186aSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 862a31a186aSmrg _LT_LANG_$1_CONFIG($1)])dnl 863a31a186aSmrg])# _LT_LANG 864a31a186aSmrg 865a31a186aSmrg 8660bb88ba4Smrgm4_ifndef([AC_PROG_GO], [ 8670bb88ba4Smrg# NOTE: This macro has been submitted for inclusion into # 8680bb88ba4Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8690bb88ba4Smrg# a released version of Autoconf we should remove this # 8700bb88ba4Smrg# macro and use it instead. # 8710bb88ba4Smrgm4_defun([AC_PROG_GO], 8720bb88ba4Smrg[AC_LANG_PUSH(Go)dnl 8730bb88ba4SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8740bb88ba4SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8750bb88ba4Smrg_AC_ARG_VAR_LDFLAGS()dnl 8760bb88ba4SmrgAC_CHECK_TOOL(GOC, gccgo) 8770bb88ba4Smrgif test -z "$GOC"; then 8780bb88ba4Smrg if test -n "$ac_tool_prefix"; then 8790bb88ba4Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8800bb88ba4Smrg fi 8810bb88ba4Smrgfi 8820bb88ba4Smrgif test -z "$GOC"; then 8830bb88ba4Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8840bb88ba4Smrgfi 8850bb88ba4Smrg])#m4_defun 8860bb88ba4Smrg])#m4_ifndef 8870bb88ba4Smrg 8880bb88ba4Smrg 889a31a186aSmrg# _LT_LANG_DEFAULT_CONFIG 890a31a186aSmrg# ----------------------- 891a31a186aSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 892a31a186aSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 893a31a186aSmrg [LT_LANG(CXX)], 894a31a186aSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 895a31a186aSmrg 896a31a186aSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 897a31a186aSmrg [LT_LANG(F77)], 898a31a186aSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 899a31a186aSmrg 900a31a186aSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 901a31a186aSmrg [LT_LANG(FC)], 902a31a186aSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903a31a186aSmrg 904a31a186aSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 905a31a186aSmrgdnl pulling things in needlessly. 906a31a186aSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 907a31a186aSmrg [LT_LANG(GCJ)], 908a31a186aSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 909a31a186aSmrg [LT_LANG(GCJ)], 910a31a186aSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 911a31a186aSmrg [LT_LANG(GCJ)], 912a31a186aSmrg [m4_ifdef([AC_PROG_GCJ], 913a31a186aSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 914a31a186aSmrg m4_ifdef([A][M_PROG_GCJ], 915a31a186aSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 916a31a186aSmrg m4_ifdef([LT_PROG_GCJ], 917a31a186aSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918a31a186aSmrg 9190bb88ba4SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 9200bb88ba4Smrg [LT_LANG(GO)], 9210bb88ba4Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9220bb88ba4Smrg 923a31a186aSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 924a31a186aSmrg [LT_LANG(RC)], 925a31a186aSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 926a31a186aSmrg])# _LT_LANG_DEFAULT_CONFIG 927a31a186aSmrg 928a31a186aSmrg# Obsolete macros: 929a31a186aSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 930a31a186aSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 931a31a186aSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 932a31a186aSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9330bb88ba4SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 934a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 935a31a186aSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 936a31a186aSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 937a31a186aSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 938a31a186aSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9390bb88ba4Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 940a31a186aSmrg 941a31a186aSmrg 942a31a186aSmrg# _LT_TAG_COMPILER 943a31a186aSmrg# ---------------- 944a31a186aSmrgm4_defun([_LT_TAG_COMPILER], 945fe5e51b7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 946fe5e51b7Smrg 947a31a186aSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 948a31a186aSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 949a31a186aSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 950a31a186aSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 951a31a186aSmrg 952fe5e51b7Smrg# If no C compiler was specified, use CC. 953fe5e51b7SmrgLTCC=${LTCC-"$CC"} 954fe5e51b7Smrg 955fe5e51b7Smrg# If no C compiler flags were specified, use CFLAGS. 956fe5e51b7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957fe5e51b7Smrg 958fe5e51b7Smrg# Allow CC to be a program name with arguments. 959fe5e51b7Smrgcompiler=$CC 960a31a186aSmrg])# _LT_TAG_COMPILER 961fe5e51b7Smrg 962fe5e51b7Smrg 963fe5e51b7Smrg# _LT_COMPILER_BOILERPLATE 964fe5e51b7Smrg# ------------------------ 965fe5e51b7Smrg# Check for compiler boilerplate output or warnings with 966fe5e51b7Smrg# the simple compiler test code. 967a31a186aSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 968a31a186aSmrg[m4_require([_LT_DECL_SED])dnl 969fe5e51b7Smrgac_outfile=conftest.$ac_objext 970fe5e51b7Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 971fe5e51b7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972fe5e51b7Smrg_lt_compiler_boilerplate=`cat conftest.err` 973a31a186aSmrg$RM conftest* 974fe5e51b7Smrg])# _LT_COMPILER_BOILERPLATE 975fe5e51b7Smrg 976fe5e51b7Smrg 977fe5e51b7Smrg# _LT_LINKER_BOILERPLATE 978fe5e51b7Smrg# ---------------------- 979fe5e51b7Smrg# Check for linker boilerplate output or warnings with 980fe5e51b7Smrg# the simple link test code. 981a31a186aSmrgm4_defun([_LT_LINKER_BOILERPLATE], 982a31a186aSmrg[m4_require([_LT_DECL_SED])dnl 983fe5e51b7Smrgac_outfile=conftest.$ac_objext 984fe5e51b7Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 985fe5e51b7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 986fe5e51b7Smrg_lt_linker_boilerplate=`cat conftest.err` 987a31a186aSmrg$RM -r conftest* 988fe5e51b7Smrg])# _LT_LINKER_BOILERPLATE 989fe5e51b7Smrg 990eda3803bSmrg# _LT_REQUIRED_DARWIN_CHECKS 991a31a186aSmrg# ------------------------- 992a31a186aSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 993eda3803bSmrg case $host_os in 994eda3803bSmrg rhapsody* | darwin*) 995eda3803bSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 996eda3803bSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 997a31a186aSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 998a31a186aSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 999a31a186aSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1000a31a186aSmrg _LT_DECL([], [DSYMUTIL], [1], 1001a31a186aSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1002a31a186aSmrg _LT_DECL([], [NMEDIT], [1], 1003a31a186aSmrg [Tool to change global to local symbols on Mac OS X]) 1004a31a186aSmrg _LT_DECL([], [LIPO], [1], 1005a31a186aSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 1006a31a186aSmrg _LT_DECL([], [OTOOL], [1], 1007a31a186aSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1008a31a186aSmrg _LT_DECL([], [OTOOL64], [1], 1009a31a186aSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1010eda3803bSmrg 1011eda3803bSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1012eda3803bSmrg [lt_cv_apple_cc_single_mod=no 1013493f84f4Smrg if test -z "$LT_MULTI_MODULE"; then 1014a31a186aSmrg # By default we will add the -single_module flag. You can override 1015a31a186aSmrg # by either setting the environment variable LT_MULTI_MODULE 1016a31a186aSmrg # non-empty at configure time, or by adding -multi_module to the 1017a31a186aSmrg # link flags. 1018a31a186aSmrg rm -rf libconftest.dylib* 1019a31a186aSmrg echo "int foo(void){return 1;}" > conftest.c 1020a31a186aSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1021a31a186aSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1022a31a186aSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023a31a186aSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1024a31a186aSmrg _lt_result=$? 10250bb88ba4Smrg # If there is a non-empty error log, and "single_module" 10260bb88ba4Smrg # appears in it, assume the flag caused a linker warning 10270bb88ba4Smrg if test -s conftest.err && $GREP single_module conftest.err; then 10280bb88ba4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10290bb88ba4Smrg # Otherwise, if the output was created with a 0 exit code from 10300bb88ba4Smrg # the compiler, it worked. 1031493f84f4Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1032a31a186aSmrg lt_cv_apple_cc_single_mod=yes 1033a31a186aSmrg else 1034a31a186aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1035a31a186aSmrg fi 1036a31a186aSmrg rm -rf libconftest.dylib* 1037a31a186aSmrg rm -f conftest.* 1038eda3803bSmrg fi]) 10390bb88ba4Smrg 1040eda3803bSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1041eda3803bSmrg [lt_cv_ld_exported_symbols_list], 1042eda3803bSmrg [lt_cv_ld_exported_symbols_list=no 1043eda3803bSmrg save_LDFLAGS=$LDFLAGS 1044eda3803bSmrg echo "_main" > conftest.sym 1045eda3803bSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1046eda3803bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1047a31a186aSmrg [lt_cv_ld_exported_symbols_list=yes], 1048a31a186aSmrg [lt_cv_ld_exported_symbols_list=no]) 1049493f84f4Smrg LDFLAGS=$save_LDFLAGS 1050eda3803bSmrg ]) 10510bb88ba4Smrg 10520bb88ba4Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10530bb88ba4Smrg [lt_cv_ld_force_load=no 10540bb88ba4Smrg cat > conftest.c << _LT_EOF 10550bb88ba4Smrgint forced_loaded() { return 2;} 10560bb88ba4Smrg_LT_EOF 10570bb88ba4Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10580bb88ba4Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10590bb88ba4Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10600bb88ba4Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10610bb88ba4Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10620bb88ba4Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10630bb88ba4Smrg cat > conftest.c << _LT_EOF 10640bb88ba4Smrgint main() { return 0;} 10650bb88ba4Smrg_LT_EOF 10660bb88ba4Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10670bb88ba4Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10680bb88ba4Smrg _lt_result=$? 10690bb88ba4Smrg if test -s conftest.err && $GREP force_load conftest.err; then 10700bb88ba4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1071493f84f4Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10720bb88ba4Smrg lt_cv_ld_force_load=yes 10730bb88ba4Smrg else 10740bb88ba4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10750bb88ba4Smrg fi 10760bb88ba4Smrg rm -f conftest.err libconftest.a conftest conftest.c 10770bb88ba4Smrg rm -rf conftest.dSYM 10780bb88ba4Smrg ]) 1079eda3803bSmrg case $host_os in 1080a31a186aSmrg rhapsody* | darwin1.[[012]]) 1081493f84f4Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1082eda3803bSmrg darwin1.*) 1083493f84f4Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1084a31a186aSmrg darwin*) # darwin 5.x on 1085eda3803bSmrg # if running on 10.5 or later, the deployment target defaults 1086eda3803bSmrg # to the OS version, if on x86, and 10.4, the deployment 1087eda3803bSmrg # target defaults to 10.4. Don't you love it? 1088eda3803bSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1089a31a186aSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1090493f84f4Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1091493f84f4Smrg 10.[[012]][[,.]]*) 1092493f84f4Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1093a31a186aSmrg 10.*) 1094493f84f4Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1095eda3803bSmrg esac 1096eda3803bSmrg ;; 1097eda3803bSmrg esac 1098493f84f4Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1099eda3803bSmrg _lt_dar_single_mod='$single_module' 1100eda3803bSmrg fi 1101493f84f4Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1102493f84f4Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1103eda3803bSmrg else 1104493f84f4Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1105eda3803bSmrg fi 1106493f84f4Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1107a31a186aSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1108eda3803bSmrg else 1109eda3803bSmrg _lt_dsymutil= 1110eda3803bSmrg fi 1111eda3803bSmrg ;; 1112eda3803bSmrg esac 1113eda3803bSmrg]) 1114eda3803bSmrg 1115a31a186aSmrg 11160bb88ba4Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 11170bb88ba4Smrg# --------------------------------- 1118a31a186aSmrg# Checks for linker and compiler features on darwin 1119a31a186aSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1120a31a186aSmrg[ 1121a31a186aSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1122a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1123a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1124a31a186aSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1125a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1126493f84f4Smrg if test yes = "$lt_cv_ld_force_load"; then 1127493f84f4Smrg _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\"`' 11280bb88ba4Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11290bb88ba4Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11300bb88ba4Smrg else 11310bb88ba4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11320bb88ba4Smrg fi 1133a31a186aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1134493f84f4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1135a31a186aSmrg case $cc_basename in 1136493f84f4Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1137a31a186aSmrg *) _lt_dar_can_shared=$GCC ;; 1138a31a186aSmrg esac 1139493f84f4Smrg if test yes = "$_lt_dar_can_shared"; then 11400bb88ba4Smrg output_verbose_link_cmd=func_echo_all 1141493f84f4Smrg _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" 1142493f84f4Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1143493f84f4Smrg _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" 1144493f84f4Smrg _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" 1145a31a186aSmrg m4_if([$1], [CXX], 1146493f84f4Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1147493f84f4Smrg _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" 1148493f84f4Smrg _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" 1149a31a186aSmrg fi 1150a31a186aSmrg],[]) 1151a31a186aSmrg else 1152a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1153a31a186aSmrg fi 1154a31a186aSmrg]) 1155a31a186aSmrg 11560bb88ba4Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11570bb88ba4Smrg# ---------------------------------- 1158fe5e51b7Smrg# Links a minimal program and checks the executable 1159fe5e51b7Smrg# for the system default hardcoded library path. In most cases, 1160fe5e51b7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1161fe5e51b7Smrg# the location of the communication and MPI libs are included too. 1162fe5e51b7Smrg# If we don't find anything, use the default library path according 1163fe5e51b7Smrg# to the aix ld manual. 11640bb88ba4Smrg# Store the results from the different compilers for each TAGNAME. 11650bb88ba4Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1166a31a186aSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1167a31a186aSmrg[m4_require([_LT_DECL_SED])dnl 1168493f84f4Smrgif test set = "${lt_cv_aix_libpath+set}"; then 11690bb88ba4Smrg aix_libpath=$lt_cv_aix_libpath 11700bb88ba4Smrgelse 11710bb88ba4Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11720bb88ba4Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11730bb88ba4Smrg lt_aix_libpath_sed='[ 11740bb88ba4Smrg /Import File Strings/,/^$/ { 11750bb88ba4Smrg /^0/ { 11760bb88ba4Smrg s/^0 *\([^ ]*\) *$/\1/ 11770bb88ba4Smrg p 11780bb88ba4Smrg } 11790bb88ba4Smrg }]' 11800bb88ba4Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11810bb88ba4Smrg # Check for a 64-bit object if we didn't find anything. 11820bb88ba4Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11830bb88ba4Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11840bb88ba4Smrg fi],[]) 11850bb88ba4Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1186493f84f4Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 11870bb88ba4Smrg fi 11880bb88ba4Smrg ]) 11890bb88ba4Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11900bb88ba4Smrgfi 1191a31a186aSmrg])# _LT_SYS_MODULE_PATH_AIX 1192fe5e51b7Smrg 1193fe5e51b7Smrg 1194a31a186aSmrg# _LT_SHELL_INIT(ARG) 1195a31a186aSmrg# ------------------- 1196a31a186aSmrgm4_define([_LT_SHELL_INIT], 11970bb88ba4Smrg[m4_divert_text([M4SH-INIT], [$1 11980bb88ba4Smrg])])# _LT_SHELL_INIT 11990bb88ba4Smrg 1200fe5e51b7Smrg 1201fe5e51b7Smrg 1202a31a186aSmrg# _LT_PROG_ECHO_BACKSLASH 1203a31a186aSmrg# ----------------------- 12040bb88ba4Smrg# Find how we can fake an echo command that does not interpret backslash. 12050bb88ba4Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1206493f84f4Smrg# of the generated configure script that will find a shell with a builtin 1207493f84f4Smrg# printf (that we can use as an echo command). 1208a31a186aSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 12090bb88ba4Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12100bb88ba4SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12110bb88ba4SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12120bb88ba4Smrg 12130bb88ba4SmrgAC_MSG_CHECKING([how to print strings]) 12140bb88ba4Smrg# Test print first, because it will be a builtin if present. 12150bb88ba4Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 12160bb88ba4Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 12170bb88ba4Smrg ECHO='print -r --' 12180bb88ba4Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12190bb88ba4Smrg ECHO='printf %s\n' 1220fe5e51b7Smrgelse 12210bb88ba4Smrg # Use this function as a fallback that always works. 12220bb88ba4Smrg func_fallback_echo () 12230bb88ba4Smrg { 12240bb88ba4Smrg eval 'cat <<_LTECHO_EOF 12250bb88ba4Smrg$[]1 12260bb88ba4Smrg_LTECHO_EOF' 12270bb88ba4Smrg } 12280bb88ba4Smrg ECHO='func_fallback_echo' 1229fe5e51b7Smrgfi 1230fe5e51b7Smrg 12310bb88ba4Smrg# func_echo_all arg... 12320bb88ba4Smrg# Invoke $ECHO with all args, space-separated. 12330bb88ba4Smrgfunc_echo_all () 12340bb88ba4Smrg{ 1235493f84f4Smrg $ECHO "$*" 12360bb88ba4Smrg} 1237643b027fSmrg 1238493f84f4Smrgcase $ECHO in 12390bb88ba4Smrg printf*) AC_MSG_RESULT([printf]) ;; 12400bb88ba4Smrg print*) AC_MSG_RESULT([print -r]) ;; 12410bb88ba4Smrg *) AC_MSG_RESULT([cat]) ;; 12420bb88ba4Smrgesac 1243fe5e51b7Smrg 12440bb88ba4Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12450bb88ba4Smrg[_AS_DETECT_SUGGESTED([ 12460bb88ba4Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12470bb88ba4Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12480bb88ba4Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12490bb88ba4Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12500bb88ba4Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12510bb88ba4Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12520bb88ba4Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253fe5e51b7Smrg 1254a31a186aSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12550bb88ba4Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1256a31a186aSmrg])# _LT_PROG_ECHO_BACKSLASH 1257fe5e51b7Smrg 1258fe5e51b7Smrg 12590bb88ba4Smrg# _LT_WITH_SYSROOT 12600bb88ba4Smrg# ---------------- 12610bb88ba4SmrgAC_DEFUN([_LT_WITH_SYSROOT], 12620bb88ba4Smrg[AC_MSG_CHECKING([for sysroot]) 12630bb88ba4SmrgAC_ARG_WITH([sysroot], 1264493f84f4Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1265493f84f4Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 1266493f84f4Smrg if not specified).])], 12670bb88ba4Smrg[], [with_sysroot=no]) 12680bb88ba4Smrg 12690bb88ba4Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 12700bb88ba4Smrgdnl in case the user passed a directory name. 12710bb88ba4Smrglt_sysroot= 1272493f84f4Smrgcase $with_sysroot in #( 12730bb88ba4Smrg yes) 1274493f84f4Smrg if test yes = "$GCC"; then 12750bb88ba4Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12760bb88ba4Smrg fi 12770bb88ba4Smrg ;; #( 12780bb88ba4Smrg /*) 12790bb88ba4Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 12800bb88ba4Smrg ;; #( 12810bb88ba4Smrg no|'') 12820bb88ba4Smrg ;; #( 12830bb88ba4Smrg *) 1284493f84f4Smrg AC_MSG_RESULT([$with_sysroot]) 12850bb88ba4Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12860bb88ba4Smrg ;; 12870bb88ba4Smrgesac 12880bb88ba4Smrg 12890bb88ba4Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12900bb88ba4Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1291493f84f4Smrg[dependent libraries, and where our libraries should be installed.])]) 12920bb88ba4Smrg 1293a31a186aSmrg# _LT_ENABLE_LOCK 1294a31a186aSmrg# --------------- 1295a31a186aSmrgm4_defun([_LT_ENABLE_LOCK], 1296fe5e51b7Smrg[AC_ARG_ENABLE([libtool-lock], 1297a31a186aSmrg [AS_HELP_STRING([--disable-libtool-lock], 1298a31a186aSmrg [avoid locking (might break parallel builds)])]) 1299493f84f4Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1300fe5e51b7Smrg 1301fe5e51b7Smrg# Some flags need to be propagated to the compiler or linker for good 1302fe5e51b7Smrg# libtool support. 1303fe5e51b7Smrgcase $host in 1304fe5e51b7Smrgia64-*-hpux*) 1305493f84f4Smrg # Find out what ABI is being produced by ac_compile, and set mode 1306493f84f4Smrg # options accordingly. 1307fe5e51b7Smrg echo 'int i;' > conftest.$ac_ext 1308fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 1309fe5e51b7Smrg case `/usr/bin/file conftest.$ac_objext` in 1310a31a186aSmrg *ELF-32*) 1311493f84f4Smrg HPUX_IA64_MODE=32 1312a31a186aSmrg ;; 1313a31a186aSmrg *ELF-64*) 1314493f84f4Smrg HPUX_IA64_MODE=64 1315a31a186aSmrg ;; 1316fe5e51b7Smrg esac 1317fe5e51b7Smrg fi 1318fe5e51b7Smrg rm -rf conftest* 1319fe5e51b7Smrg ;; 1320fe5e51b7Smrg*-*-irix6*) 1321493f84f4Smrg # Find out what ABI is being produced by ac_compile, and set linker 1322493f84f4Smrg # options accordingly. 13230bb88ba4Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1324fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 1325493f84f4Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 1326a31a186aSmrg case `/usr/bin/file conftest.$ac_objext` in 1327a31a186aSmrg *32-bit*) 1328a31a186aSmrg LD="${LD-ld} -melf32bsmip" 1329a31a186aSmrg ;; 1330a31a186aSmrg *N32*) 1331a31a186aSmrg LD="${LD-ld} -melf32bmipn32" 1332a31a186aSmrg ;; 1333a31a186aSmrg *64-bit*) 1334a31a186aSmrg LD="${LD-ld} -melf64bmip" 1335a31a186aSmrg ;; 1336a31a186aSmrg esac 1337a31a186aSmrg else 1338a31a186aSmrg case `/usr/bin/file conftest.$ac_objext` in 1339a31a186aSmrg *32-bit*) 1340a31a186aSmrg LD="${LD-ld} -32" 1341a31a186aSmrg ;; 1342a31a186aSmrg *N32*) 1343a31a186aSmrg LD="${LD-ld} -n32" 1344a31a186aSmrg ;; 1345a31a186aSmrg *64-bit*) 1346a31a186aSmrg LD="${LD-ld} -64" 1347a31a186aSmrg ;; 1348a31a186aSmrg esac 1349a31a186aSmrg fi 1350fe5e51b7Smrg fi 1351fe5e51b7Smrg rm -rf conftest* 1352fe5e51b7Smrg ;; 1353fe5e51b7Smrg 1354493f84f4Smrgmips64*-*linux*) 1355493f84f4Smrg # Find out what ABI is being produced by ac_compile, and set linker 1356493f84f4Smrg # options accordingly. 1357493f84f4Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1358493f84f4Smrg if AC_TRY_EVAL(ac_compile); then 1359493f84f4Smrg emul=elf 1360493f84f4Smrg case `/usr/bin/file conftest.$ac_objext` in 1361493f84f4Smrg *32-bit*) 1362493f84f4Smrg emul="${emul}32" 1363493f84f4Smrg ;; 1364493f84f4Smrg *64-bit*) 1365493f84f4Smrg emul="${emul}64" 1366493f84f4Smrg ;; 1367493f84f4Smrg esac 1368493f84f4Smrg case `/usr/bin/file conftest.$ac_objext` in 1369493f84f4Smrg *MSB*) 1370493f84f4Smrg emul="${emul}btsmip" 1371493f84f4Smrg ;; 1372493f84f4Smrg *LSB*) 1373493f84f4Smrg emul="${emul}ltsmip" 1374493f84f4Smrg ;; 1375493f84f4Smrg esac 1376493f84f4Smrg case `/usr/bin/file conftest.$ac_objext` in 1377493f84f4Smrg *N32*) 1378493f84f4Smrg emul="${emul}n32" 1379493f84f4Smrg ;; 1380493f84f4Smrg esac 1381493f84f4Smrg LD="${LD-ld} -m $emul" 1382493f84f4Smrg fi 1383493f84f4Smrg rm -rf conftest* 1384493f84f4Smrg ;; 1385493f84f4Smrg 1386493f84f4Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1387a31a186aSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1388493f84f4Smrg # Find out what ABI is being produced by ac_compile, and set linker 1389493f84f4Smrg # options accordingly. Note that the listed cases only cover the 1390493f84f4Smrg # situations where additional linker options are needed (such as when 1391493f84f4Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1392493f84f4Smrg # vice versa); the common cases where no linker options are needed do 1393493f84f4Smrg # not appear in the list. 1394fe5e51b7Smrg echo 'int i;' > conftest.$ac_ext 1395fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 1396fe5e51b7Smrg case `/usr/bin/file conftest.o` in 1397a31a186aSmrg *32-bit*) 1398a31a186aSmrg case $host in 1399a31a186aSmrg x86_64-*kfreebsd*-gnu) 1400a31a186aSmrg LD="${LD-ld} -m elf_i386_fbsd" 1401a31a186aSmrg ;; 1402a31a186aSmrg x86_64-*linux*) 1403493f84f4Smrg case `/usr/bin/file conftest.o` in 1404493f84f4Smrg *x86-64*) 1405493f84f4Smrg LD="${LD-ld} -m elf32_x86_64" 1406493f84f4Smrg ;; 1407493f84f4Smrg *) 1408493f84f4Smrg LD="${LD-ld} -m elf_i386" 1409493f84f4Smrg ;; 1410493f84f4Smrg esac 1411493f84f4Smrg ;; 1412493f84f4Smrg powerpc64le-*linux*) 1413493f84f4Smrg LD="${LD-ld} -m elf32lppclinux" 1414a31a186aSmrg ;; 1415493f84f4Smrg powerpc64-*linux*) 1416a31a186aSmrg LD="${LD-ld} -m elf32ppclinux" 1417a31a186aSmrg ;; 1418a31a186aSmrg s390x-*linux*) 1419a31a186aSmrg LD="${LD-ld} -m elf_s390" 1420a31a186aSmrg ;; 1421a31a186aSmrg sparc64-*linux*) 1422a31a186aSmrg LD="${LD-ld} -m elf32_sparc" 1423a31a186aSmrg ;; 1424a31a186aSmrg esac 1425a31a186aSmrg ;; 1426a31a186aSmrg *64-bit*) 1427a31a186aSmrg case $host in 1428a31a186aSmrg x86_64-*kfreebsd*-gnu) 1429a31a186aSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1430a31a186aSmrg ;; 1431a31a186aSmrg x86_64-*linux*) 1432a31a186aSmrg LD="${LD-ld} -m elf_x86_64" 1433a31a186aSmrg ;; 1434493f84f4Smrg powerpcle-*linux*) 1435493f84f4Smrg LD="${LD-ld} -m elf64lppc" 1436493f84f4Smrg ;; 1437493f84f4Smrg powerpc-*linux*) 1438a31a186aSmrg LD="${LD-ld} -m elf64ppc" 1439a31a186aSmrg ;; 1440a31a186aSmrg s390*-*linux*|s390*-*tpf*) 1441a31a186aSmrg LD="${LD-ld} -m elf64_s390" 1442a31a186aSmrg ;; 1443a31a186aSmrg sparc*-*linux*) 1444a31a186aSmrg LD="${LD-ld} -m elf64_sparc" 1445a31a186aSmrg ;; 1446a31a186aSmrg esac 1447a31a186aSmrg ;; 1448fe5e51b7Smrg esac 1449fe5e51b7Smrg fi 1450fe5e51b7Smrg rm -rf conftest* 1451fe5e51b7Smrg ;; 1452fe5e51b7Smrg 1453fe5e51b7Smrg*-*-sco3.2v5*) 1454fe5e51b7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1455493f84f4Smrg SAVE_CFLAGS=$CFLAGS 1456fe5e51b7Smrg CFLAGS="$CFLAGS -belf" 1457fe5e51b7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1458fe5e51b7Smrg [AC_LANG_PUSH(C) 1459a31a186aSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1460fe5e51b7Smrg AC_LANG_POP]) 1461493f84f4Smrg if test yes != "$lt_cv_cc_needs_belf"; then 1462fe5e51b7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1463493f84f4Smrg CFLAGS=$SAVE_CFLAGS 1464fe5e51b7Smrg fi 1465fe5e51b7Smrg ;; 14660bb88ba4Smrg*-*solaris*) 1467493f84f4Smrg # Find out what ABI is being produced by ac_compile, and set linker 1468493f84f4Smrg # options accordingly. 1469fe5e51b7Smrg echo 'int i;' > conftest.$ac_ext 1470fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 1471fe5e51b7Smrg case `/usr/bin/file conftest.o` in 1472fe5e51b7Smrg *64-bit*) 1473fe5e51b7Smrg case $lt_cv_prog_gnu_ld in 14740bb88ba4Smrg yes*) 14750bb88ba4Smrg case $host in 1476493f84f4Smrg i?86-*-solaris*|x86_64-*-solaris*) 14770bb88ba4Smrg LD="${LD-ld} -m elf_x86_64" 14780bb88ba4Smrg ;; 14790bb88ba4Smrg sparc*-*-solaris*) 14800bb88ba4Smrg LD="${LD-ld} -m elf64_sparc" 14810bb88ba4Smrg ;; 14820bb88ba4Smrg esac 14830bb88ba4Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14840bb88ba4Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1485493f84f4Smrg LD=${LD-ld}_sol2 14860bb88ba4Smrg fi 14870bb88ba4Smrg ;; 1488eda3803bSmrg *) 1489a31a186aSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1490eda3803bSmrg LD="${LD-ld} -64" 1491eda3803bSmrg fi 1492eda3803bSmrg ;; 1493fe5e51b7Smrg esac 1494fe5e51b7Smrg ;; 1495fe5e51b7Smrg esac 1496fe5e51b7Smrg fi 1497fe5e51b7Smrg rm -rf conftest* 1498fe5e51b7Smrg ;; 1499fe5e51b7Smrgesac 1500fe5e51b7Smrg 1501493f84f4Smrgneed_locks=$enable_libtool_lock 1502a31a186aSmrg])# _LT_ENABLE_LOCK 1503a31a186aSmrg 1504a31a186aSmrg 15050bb88ba4Smrg# _LT_PROG_AR 15060bb88ba4Smrg# ----------- 15070bb88ba4Smrgm4_defun([_LT_PROG_AR], 15080bb88ba4Smrg[AC_CHECK_TOOLS(AR, [ar], false) 15090bb88ba4Smrg: ${AR=ar} 15100bb88ba4Smrg: ${AR_FLAGS=cru} 15110bb88ba4Smrg_LT_DECL([], [AR], [1], [The archiver]) 15120bb88ba4Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 15130bb88ba4Smrg 15140bb88ba4SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15150bb88ba4Smrg [lt_cv_ar_at_file=no 15160bb88ba4Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15170bb88ba4Smrg [echo conftest.$ac_objext > conftest.lst 15180bb88ba4Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15190bb88ba4Smrg AC_TRY_EVAL([lt_ar_try]) 1520493f84f4Smrg if test 0 -eq "$ac_status"; then 15210bb88ba4Smrg # Ensure the archiver fails upon bogus file names. 15220bb88ba4Smrg rm -f conftest.$ac_objext libconftest.a 15230bb88ba4Smrg AC_TRY_EVAL([lt_ar_try]) 1524493f84f4Smrg if test 0 -ne "$ac_status"; then 15250bb88ba4Smrg lt_cv_ar_at_file=@ 15260bb88ba4Smrg fi 15270bb88ba4Smrg fi 15280bb88ba4Smrg rm -f conftest.* libconftest.a 15290bb88ba4Smrg ]) 15300bb88ba4Smrg ]) 15310bb88ba4Smrg 1532493f84f4Smrgif test no = "$lt_cv_ar_at_file"; then 15330bb88ba4Smrg archiver_list_spec= 15340bb88ba4Smrgelse 15350bb88ba4Smrg archiver_list_spec=$lt_cv_ar_at_file 15360bb88ba4Smrgfi 15370bb88ba4Smrg_LT_DECL([], [archiver_list_spec], [1], 15380bb88ba4Smrg [How to feed a file listing to the archiver]) 15390bb88ba4Smrg])# _LT_PROG_AR 15400bb88ba4Smrg 15410bb88ba4Smrg 1542a31a186aSmrg# _LT_CMD_OLD_ARCHIVE 1543a31a186aSmrg# ------------------- 1544a31a186aSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 15450bb88ba4Smrg[_LT_PROG_AR 1546a31a186aSmrg 1547a31a186aSmrgAC_CHECK_TOOL(STRIP, strip, :) 1548a31a186aSmrgtest -z "$STRIP" && STRIP=: 1549a31a186aSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1550eda3803bSmrg 1551a31a186aSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1552a31a186aSmrgtest -z "$RANLIB" && RANLIB=: 1553a31a186aSmrg_LT_DECL([], [RANLIB], [1], 1554a31a186aSmrg [Commands used to install an old-style archive]) 1555a31a186aSmrg 1556a31a186aSmrg# Determine commands to create old-style static archives. 1557a31a186aSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1558a31a186aSmrgold_postinstall_cmds='chmod 644 $oldlib' 1559a31a186aSmrgold_postuninstall_cmds= 1560a31a186aSmrg 1561a31a186aSmrgif test -n "$RANLIB"; then 1562a31a186aSmrg case $host_os in 1563493f84f4Smrg bitrig* | openbsd*) 15640bb88ba4Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1565a31a186aSmrg ;; 1566a31a186aSmrg *) 15670bb88ba4Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1568a31a186aSmrg ;; 1569a31a186aSmrg esac 15700bb88ba4Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1571a31a186aSmrgfi 15720bb88ba4Smrg 15730bb88ba4Smrgcase $host_os in 15740bb88ba4Smrg darwin*) 15750bb88ba4Smrg lock_old_archive_extraction=yes ;; 15760bb88ba4Smrg *) 15770bb88ba4Smrg lock_old_archive_extraction=no ;; 15780bb88ba4Smrgesac 1579a31a186aSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1580a31a186aSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1581a31a186aSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1582a31a186aSmrg [Commands used to build an old-style archive]) 15830bb88ba4Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 15840bb88ba4Smrg [Whether to use a lock for old archive extraction]) 1585a31a186aSmrg])# _LT_CMD_OLD_ARCHIVE 1586fe5e51b7Smrg 1587fe5e51b7Smrg 1588a31a186aSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1589fe5e51b7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1590fe5e51b7Smrg# ---------------------------------------------------------------- 1591fe5e51b7Smrg# Check whether the given compiler option works 1592a31a186aSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1593a31a186aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1594a31a186aSmrgm4_require([_LT_DECL_SED])dnl 1595fe5e51b7SmrgAC_CACHE_CHECK([$1], [$2], 1596fe5e51b7Smrg [$2=no 1597a31a186aSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1598fe5e51b7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1599493f84f4Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1600fe5e51b7Smrg # Insert the option either (1) after the last *FLAGS variable, or 1601fe5e51b7Smrg # (2) before a word containing "conftest.", or (3) at the end. 1602fe5e51b7Smrg # Note that $ac_compile itself does not contain backslashes and begins 1603fe5e51b7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1604fe5e51b7Smrg # The option is referenced via a variable to avoid confusing sed. 1605fe5e51b7Smrg lt_compile=`echo "$ac_compile" | $SED \ 1606fe5e51b7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1607fe5e51b7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1608fe5e51b7Smrg -e 's:$: $lt_compiler_flag:'` 16090bb88ba4Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1610fe5e51b7Smrg (eval "$lt_compile" 2>conftest.err) 1611fe5e51b7Smrg ac_status=$? 1612fe5e51b7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 16130bb88ba4Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1614fe5e51b7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1615fe5e51b7Smrg # The compiler can only warn and ignore the option if not recognized 1616fe5e51b7Smrg # So say no if there are warnings other than the usual output. 16170bb88ba4Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1618fe5e51b7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1619fe5e51b7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1620fe5e51b7Smrg $2=yes 1621fe5e51b7Smrg fi 1622fe5e51b7Smrg fi 1623a31a186aSmrg $RM conftest* 1624fe5e51b7Smrg]) 1625fe5e51b7Smrg 1626493f84f4Smrgif test yes = "[$]$2"; then 1627a31a186aSmrg m4_if([$5], , :, [$5]) 1628fe5e51b7Smrgelse 1629a31a186aSmrg m4_if([$6], , :, [$6]) 1630fe5e51b7Smrgfi 1631a31a186aSmrg])# _LT_COMPILER_OPTION 1632fe5e51b7Smrg 1633a31a186aSmrg# Old name: 1634a31a186aSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1635a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 1636a31a186aSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1637eda3803bSmrg 1638a31a186aSmrg 1639a31a186aSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1640a31a186aSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1641a31a186aSmrg# ---------------------------------------------------- 1642a31a186aSmrg# Check whether the given linker option works 1643a31a186aSmrgAC_DEFUN([_LT_LINKER_OPTION], 1644a31a186aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1645a31a186aSmrgm4_require([_LT_DECL_SED])dnl 1646fe5e51b7SmrgAC_CACHE_CHECK([$1], [$2], 1647fe5e51b7Smrg [$2=no 1648493f84f4Smrg save_LDFLAGS=$LDFLAGS 1649fe5e51b7Smrg LDFLAGS="$LDFLAGS $3" 1650fe5e51b7Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1651fe5e51b7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1652fe5e51b7Smrg # The linker can only warn and ignore the option if not recognized 1653fe5e51b7Smrg # So say no if there are warnings 1654fe5e51b7Smrg if test -s conftest.err; then 1655fe5e51b7Smrg # Append any errors to the config.log. 1656fe5e51b7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16570bb88ba4Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1658fe5e51b7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1659fe5e51b7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 1660fe5e51b7Smrg $2=yes 1661fe5e51b7Smrg fi 1662fe5e51b7Smrg else 1663fe5e51b7Smrg $2=yes 1664fe5e51b7Smrg fi 1665fe5e51b7Smrg fi 1666a31a186aSmrg $RM -r conftest* 1667493f84f4Smrg LDFLAGS=$save_LDFLAGS 1668fe5e51b7Smrg]) 1669fe5e51b7Smrg 1670493f84f4Smrgif test yes = "[$]$2"; then 1671a31a186aSmrg m4_if([$4], , :, [$4]) 1672fe5e51b7Smrgelse 1673a31a186aSmrg m4_if([$5], , :, [$5]) 1674fe5e51b7Smrgfi 1675a31a186aSmrg])# _LT_LINKER_OPTION 1676fe5e51b7Smrg 1677a31a186aSmrg# Old name: 1678a31a186aSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1679a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 1680a31a186aSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1681fe5e51b7Smrg 1682a31a186aSmrg 1683a31a186aSmrg# LT_CMD_MAX_LEN 1684a31a186aSmrg#--------------- 1685a31a186aSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1686a31a186aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1687a31a186aSmrg# find the maximum length of command line arguments 1688fe5e51b7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1689fe5e51b7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1690fe5e51b7Smrg i=0 1691493f84f4Smrg teststring=ABCD 1692fe5e51b7Smrg 1693fe5e51b7Smrg case $build_os in 1694fe5e51b7Smrg msdosdjgpp*) 1695fe5e51b7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1696fe5e51b7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1697fe5e51b7Smrg # during glob expansion). Even if it were fixed, the result of this 1698fe5e51b7Smrg # check would be larger than it should be. 1699fe5e51b7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1700fe5e51b7Smrg ;; 1701fe5e51b7Smrg 1702fe5e51b7Smrg gnu*) 1703fe5e51b7Smrg # Under GNU Hurd, this test is not required because there is 1704fe5e51b7Smrg # no limit to the length of command line arguments. 1705fe5e51b7Smrg # Libtool will interpret -1 as no limit whatsoever 1706fe5e51b7Smrg lt_cv_sys_max_cmd_len=-1; 1707fe5e51b7Smrg ;; 1708fe5e51b7Smrg 1709a31a186aSmrg cygwin* | mingw* | cegcc*) 1710fe5e51b7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1711fe5e51b7Smrg # about 5 minutes as the teststring grows exponentially. 1712fe5e51b7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 1713fe5e51b7Smrg # you end up with a "frozen" computer, even though with patience 1714fe5e51b7Smrg # the test eventually succeeds (with a max line length of 256k). 1715fe5e51b7Smrg # Instead, let's just punt: use the minimum linelength reported by 1716fe5e51b7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 1717fe5e51b7Smrg lt_cv_sys_max_cmd_len=8192; 1718fe5e51b7Smrg ;; 1719fe5e51b7Smrg 17200bb88ba4Smrg mint*) 17210bb88ba4Smrg # On MiNT this can take a long time and run out of memory. 17220bb88ba4Smrg lt_cv_sys_max_cmd_len=8192; 17230bb88ba4Smrg ;; 17240bb88ba4Smrg 1725fe5e51b7Smrg amigaos*) 1726fe5e51b7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 1727fe5e51b7Smrg # So we just punt and use a minimum line length of 8192. 1728fe5e51b7Smrg lt_cv_sys_max_cmd_len=8192; 1729fe5e51b7Smrg ;; 1730fe5e51b7Smrg 1731493f84f4Smrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1732fe5e51b7Smrg # This has been around since 386BSD, at least. Likely further. 1733fe5e51b7Smrg if test -x /sbin/sysctl; then 1734fe5e51b7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1735fe5e51b7Smrg elif test -x /usr/sbin/sysctl; then 1736fe5e51b7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1737fe5e51b7Smrg else 1738fe5e51b7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1739fe5e51b7Smrg fi 1740fe5e51b7Smrg # And add a safety zone 1741fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1742fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1743fe5e51b7Smrg ;; 1744fe5e51b7Smrg 1745fe5e51b7Smrg interix*) 1746fe5e51b7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1747fe5e51b7Smrg lt_cv_sys_max_cmd_len=196608 1748fe5e51b7Smrg ;; 1749fe5e51b7Smrg 17500bb88ba4Smrg os2*) 17510bb88ba4Smrg # The test takes a long time on OS/2. 17520bb88ba4Smrg lt_cv_sys_max_cmd_len=8192 17530bb88ba4Smrg ;; 17540bb88ba4Smrg 1755fe5e51b7Smrg osf*) 1756fe5e51b7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1757fe5e51b7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1758fe5e51b7Smrg # nice to cause kernel panics so lets avoid the loop below. 1759fe5e51b7Smrg # First set a reasonable default. 1760fe5e51b7Smrg lt_cv_sys_max_cmd_len=16384 1761fe5e51b7Smrg # 1762fe5e51b7Smrg if test -x /sbin/sysconfig; then 1763fe5e51b7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1764fe5e51b7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1765fe5e51b7Smrg esac 1766fe5e51b7Smrg fi 1767fe5e51b7Smrg ;; 1768fe5e51b7Smrg sco3.2v5*) 1769fe5e51b7Smrg lt_cv_sys_max_cmd_len=102400 1770fe5e51b7Smrg ;; 1771fe5e51b7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 1772fe5e51b7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1773fe5e51b7Smrg if test -n "$kargmax"; then 1774a31a186aSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1775fe5e51b7Smrg else 1776fe5e51b7Smrg lt_cv_sys_max_cmd_len=32768 1777fe5e51b7Smrg fi 1778fe5e51b7Smrg ;; 1779fe5e51b7Smrg *) 1780fe5e51b7Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1781493f84f4Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1782493f84f4Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1783fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1784fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1785fe5e51b7Smrg else 1786a31a186aSmrg # Make teststring a little bigger before we do anything with it. 1787a31a186aSmrg # a 1K string should be a reasonable start. 1788493f84f4Smrg for i in 1 2 3 4 5 6 7 8; do 1789a31a186aSmrg teststring=$teststring$teststring 1790a31a186aSmrg done 1791fe5e51b7Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1792a31a186aSmrg # If test is not a shell built-in, we'll probably end up computing a 1793a31a186aSmrg # maximum length that is only half of the actual maximum length, but 1794a31a186aSmrg # we can't tell. 1795493f84f4Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 17960bb88ba4Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1797493f84f4Smrg test 17 != "$i" # 1/2 MB should be enough 1798fe5e51b7Smrg do 1799fe5e51b7Smrg i=`expr $i + 1` 1800fe5e51b7Smrg teststring=$teststring$teststring 1801fe5e51b7Smrg done 1802a31a186aSmrg # Only check the string length outside the loop. 1803a31a186aSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1804fe5e51b7Smrg teststring= 1805a31a186aSmrg # Add a significant safety factor because C++ compilers can tack on 1806a31a186aSmrg # massive amounts of additional arguments before passing them to the 1807a31a186aSmrg # linker. It appears as though 1/2 is a usable value. 1808fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1809fe5e51b7Smrg fi 1810fe5e51b7Smrg ;; 1811fe5e51b7Smrg esac 1812fe5e51b7Smrg]) 1813493f84f4Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 1814fe5e51b7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1815fe5e51b7Smrgelse 1816fe5e51b7Smrg AC_MSG_RESULT(none) 1817fe5e51b7Smrgfi 1818a31a186aSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1819a31a186aSmrg_LT_DECL([], [max_cmd_len], [0], 1820a31a186aSmrg [What is the maximum length of a command?]) 1821a31a186aSmrg])# LT_CMD_MAX_LEN 1822fe5e51b7Smrg 1823a31a186aSmrg# Old name: 1824a31a186aSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1825a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 1826a31a186aSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827fe5e51b7Smrg 1828a31a186aSmrg 1829a31a186aSmrg# _LT_HEADER_DLFCN 1830a31a186aSmrg# ---------------- 1831a31a186aSmrgm4_defun([_LT_HEADER_DLFCN], 1832a31a186aSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1833a31a186aSmrg])# _LT_HEADER_DLFCN 1834fe5e51b7Smrg 1835fe5e51b7Smrg 1836a31a186aSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1837a31a186aSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1838a31a186aSmrg# ---------------------------------------------------------------- 1839a31a186aSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1840a31a186aSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1841493f84f4Smrgif test yes = "$cross_compiling"; then : 1842fe5e51b7Smrg [$4] 1843fe5e51b7Smrgelse 1844fe5e51b7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1845fe5e51b7Smrg lt_status=$lt_dlunknown 1846a31a186aSmrg cat > conftest.$ac_ext <<_LT_EOF 18470bb88ba4Smrg[#line $LINENO "configure" 1848fe5e51b7Smrg#include "confdefs.h" 1849fe5e51b7Smrg 1850fe5e51b7Smrg#if HAVE_DLFCN_H 1851fe5e51b7Smrg#include <dlfcn.h> 1852fe5e51b7Smrg#endif 1853fe5e51b7Smrg 1854fe5e51b7Smrg#include <stdio.h> 1855fe5e51b7Smrg 1856fe5e51b7Smrg#ifdef RTLD_GLOBAL 1857fe5e51b7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1858fe5e51b7Smrg#else 1859fe5e51b7Smrg# ifdef DL_GLOBAL 1860fe5e51b7Smrg# define LT_DLGLOBAL DL_GLOBAL 1861fe5e51b7Smrg# else 1862fe5e51b7Smrg# define LT_DLGLOBAL 0 1863fe5e51b7Smrg# endif 1864fe5e51b7Smrg#endif 1865fe5e51b7Smrg 1866fe5e51b7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1867fe5e51b7Smrg find out it does not work in some platform. */ 1868fe5e51b7Smrg#ifndef LT_DLLAZY_OR_NOW 1869fe5e51b7Smrg# ifdef RTLD_LAZY 1870fe5e51b7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1871fe5e51b7Smrg# else 1872fe5e51b7Smrg# ifdef DL_LAZY 1873fe5e51b7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1874fe5e51b7Smrg# else 1875fe5e51b7Smrg# ifdef RTLD_NOW 1876fe5e51b7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1877fe5e51b7Smrg# else 1878fe5e51b7Smrg# ifdef DL_NOW 1879fe5e51b7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1880fe5e51b7Smrg# else 1881fe5e51b7Smrg# define LT_DLLAZY_OR_NOW 0 1882fe5e51b7Smrg# endif 1883fe5e51b7Smrg# endif 1884fe5e51b7Smrg# endif 1885fe5e51b7Smrg# endif 1886fe5e51b7Smrg#endif 1887fe5e51b7Smrg 1888493f84f4Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 18890bb88ba4Smrg correspondingly for the symbols needed. */ 1890493f84f4Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18910bb88ba4Smrgint fnord () __attribute__((visibility("default"))); 18920bb88ba4Smrg#endif 18930bb88ba4Smrg 18940bb88ba4Smrgint fnord () { return 42; } 1895fe5e51b7Smrgint main () 1896fe5e51b7Smrg{ 1897fe5e51b7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1898fe5e51b7Smrg int status = $lt_dlunknown; 1899fe5e51b7Smrg 1900fe5e51b7Smrg if (self) 1901fe5e51b7Smrg { 1902fe5e51b7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 19030bb88ba4Smrg else 19040bb88ba4Smrg { 19050bb88ba4Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19060bb88ba4Smrg else puts (dlerror ()); 19070bb88ba4Smrg } 1908fe5e51b7Smrg /* dlclose (self); */ 1909fe5e51b7Smrg } 1910fe5e51b7Smrg else 1911fe5e51b7Smrg puts (dlerror ()); 1912fe5e51b7Smrg 1913a31a186aSmrg return status; 1914fe5e51b7Smrg}] 1915a31a186aSmrg_LT_EOF 1916493f84f4Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1917fe5e51b7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1918fe5e51b7Smrg lt_status=$? 1919fe5e51b7Smrg case x$lt_status in 1920fe5e51b7Smrg x$lt_dlno_uscore) $1 ;; 1921fe5e51b7Smrg x$lt_dlneed_uscore) $2 ;; 1922fe5e51b7Smrg x$lt_dlunknown|x*) $3 ;; 1923fe5e51b7Smrg esac 1924fe5e51b7Smrg else : 1925fe5e51b7Smrg # compilation failed 1926fe5e51b7Smrg $3 1927fe5e51b7Smrg fi 1928fe5e51b7Smrgfi 1929fe5e51b7Smrgrm -fr conftest* 1930a31a186aSmrg])# _LT_TRY_DLOPEN_SELF 1931fe5e51b7Smrg 1932fe5e51b7Smrg 1933a31a186aSmrg# LT_SYS_DLOPEN_SELF 1934a31a186aSmrg# ------------------ 1935a31a186aSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1936a31a186aSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1937493f84f4Smrgif test yes != "$enable_dlopen"; then 1938fe5e51b7Smrg enable_dlopen=unknown 1939fe5e51b7Smrg enable_dlopen_self=unknown 1940fe5e51b7Smrg enable_dlopen_self_static=unknown 1941fe5e51b7Smrgelse 1942fe5e51b7Smrg lt_cv_dlopen=no 1943fe5e51b7Smrg lt_cv_dlopen_libs= 1944fe5e51b7Smrg 1945fe5e51b7Smrg case $host_os in 1946fe5e51b7Smrg beos*) 1947493f84f4Smrg lt_cv_dlopen=load_add_on 1948fe5e51b7Smrg lt_cv_dlopen_libs= 1949fe5e51b7Smrg lt_cv_dlopen_self=yes 1950fe5e51b7Smrg ;; 1951fe5e51b7Smrg 1952a31a186aSmrg mingw* | pw32* | cegcc*) 1953493f84f4Smrg lt_cv_dlopen=LoadLibrary 1954fe5e51b7Smrg lt_cv_dlopen_libs= 1955a31a186aSmrg ;; 1956fe5e51b7Smrg 1957fe5e51b7Smrg cygwin*) 1958493f84f4Smrg lt_cv_dlopen=dlopen 1959fe5e51b7Smrg lt_cv_dlopen_libs= 1960a31a186aSmrg ;; 1961fe5e51b7Smrg 1962fe5e51b7Smrg darwin*) 1963493f84f4Smrg # if libdl is installed we need to link against it 1964fe5e51b7Smrg AC_CHECK_LIB([dl], [dlopen], 1965493f84f4Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1966493f84f4Smrg lt_cv_dlopen=dyld 1967fe5e51b7Smrg lt_cv_dlopen_libs= 1968fe5e51b7Smrg lt_cv_dlopen_self=yes 1969fe5e51b7Smrg ]) 1970a31a186aSmrg ;; 1971fe5e51b7Smrg 1972493f84f4Smrg tpf*) 1973493f84f4Smrg # Don't try to run any link tests for TPF. We know it's impossible 1974493f84f4Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 1975493f84f4Smrg lt_cv_dlopen=dlopen 1976493f84f4Smrg lt_cv_dlopen_libs= 1977493f84f4Smrg lt_cv_dlopen_self=no 1978493f84f4Smrg ;; 1979493f84f4Smrg 1980fe5e51b7Smrg *) 1981fe5e51b7Smrg AC_CHECK_FUNC([shl_load], 1982493f84f4Smrg [lt_cv_dlopen=shl_load], 1983fe5e51b7Smrg [AC_CHECK_LIB([dld], [shl_load], 1984493f84f4Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1985fe5e51b7Smrg [AC_CHECK_FUNC([dlopen], 1986493f84f4Smrg [lt_cv_dlopen=dlopen], 1987fe5e51b7Smrg [AC_CHECK_LIB([dl], [dlopen], 1988493f84f4Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1989fe5e51b7Smrg [AC_CHECK_LIB([svld], [dlopen], 1990493f84f4Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1991fe5e51b7Smrg [AC_CHECK_LIB([dld], [dld_link], 1992493f84f4Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1993fe5e51b7Smrg ]) 1994fe5e51b7Smrg ]) 1995fe5e51b7Smrg ]) 1996fe5e51b7Smrg ]) 1997fe5e51b7Smrg ]) 1998fe5e51b7Smrg ;; 1999fe5e51b7Smrg esac 2000fe5e51b7Smrg 2001493f84f4Smrg if test no = "$lt_cv_dlopen"; then 2002fe5e51b7Smrg enable_dlopen=no 2003493f84f4Smrg else 2004493f84f4Smrg enable_dlopen=yes 2005fe5e51b7Smrg fi 2006fe5e51b7Smrg 2007fe5e51b7Smrg case $lt_cv_dlopen in 2008fe5e51b7Smrg dlopen) 2009493f84f4Smrg save_CPPFLAGS=$CPPFLAGS 2010493f84f4Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011fe5e51b7Smrg 2012493f84f4Smrg save_LDFLAGS=$LDFLAGS 2013fe5e51b7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014fe5e51b7Smrg 2015493f84f4Smrg save_LIBS=$LIBS 2016fe5e51b7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 2017fe5e51b7Smrg 2018fe5e51b7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 2019fe5e51b7Smrg lt_cv_dlopen_self, [dnl 2020a31a186aSmrg _LT_TRY_DLOPEN_SELF( 2021fe5e51b7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2022fe5e51b7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2023fe5e51b7Smrg ]) 2024fe5e51b7Smrg 2025493f84f4Smrg if test yes = "$lt_cv_dlopen_self"; then 2026fe5e51b7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2027fe5e51b7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2028a31a186aSmrg lt_cv_dlopen_self_static, [dnl 2029a31a186aSmrg _LT_TRY_DLOPEN_SELF( 2030fe5e51b7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2031fe5e51b7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2032fe5e51b7Smrg ]) 2033fe5e51b7Smrg fi 2034fe5e51b7Smrg 2035493f84f4Smrg CPPFLAGS=$save_CPPFLAGS 2036493f84f4Smrg LDFLAGS=$save_LDFLAGS 2037493f84f4Smrg LIBS=$save_LIBS 2038fe5e51b7Smrg ;; 2039fe5e51b7Smrg esac 2040fe5e51b7Smrg 2041fe5e51b7Smrg case $lt_cv_dlopen_self in 2042fe5e51b7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2043fe5e51b7Smrg *) enable_dlopen_self=unknown ;; 2044fe5e51b7Smrg esac 2045fe5e51b7Smrg 2046fe5e51b7Smrg case $lt_cv_dlopen_self_static in 2047fe5e51b7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2048fe5e51b7Smrg *) enable_dlopen_self_static=unknown ;; 2049fe5e51b7Smrg esac 2050fe5e51b7Smrgfi 2051a31a186aSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2052a31a186aSmrg [Whether dlopen is supported]) 2053a31a186aSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2054a31a186aSmrg [Whether dlopen of programs is supported]) 2055a31a186aSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2056a31a186aSmrg [Whether dlopen of statically linked programs is supported]) 2057a31a186aSmrg])# LT_SYS_DLOPEN_SELF 2058fe5e51b7Smrg 2059a31a186aSmrg# Old name: 2060a31a186aSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2061a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 2062a31a186aSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063eda3803bSmrg 2064a31a186aSmrg 2065a31a186aSmrg# _LT_COMPILER_C_O([TAGNAME]) 2066a31a186aSmrg# --------------------------- 2067a31a186aSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 2068a31a186aSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2069a31a186aSmrgm4_defun([_LT_COMPILER_C_O], 2070a31a186aSmrg[m4_require([_LT_DECL_SED])dnl 2071a31a186aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2072a31a186aSmrgm4_require([_LT_TAG_COMPILER])dnl 2073fe5e51b7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2074a31a186aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2075a31a186aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2076a31a186aSmrg $RM -r conftest 2>/dev/null 2077fe5e51b7Smrg mkdir conftest 2078fe5e51b7Smrg cd conftest 2079fe5e51b7Smrg mkdir out 2080fe5e51b7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2081fe5e51b7Smrg 2082fe5e51b7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2083fe5e51b7Smrg # Insert the option either (1) after the last *FLAGS variable, or 2084fe5e51b7Smrg # (2) before a word containing "conftest.", or (3) at the end. 2085fe5e51b7Smrg # Note that $ac_compile itself does not contain backslashes and begins 2086fe5e51b7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2087fe5e51b7Smrg lt_compile=`echo "$ac_compile" | $SED \ 2088fe5e51b7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2089fe5e51b7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2090fe5e51b7Smrg -e 's:$: $lt_compiler_flag:'` 20910bb88ba4Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2092fe5e51b7Smrg (eval "$lt_compile" 2>out/conftest.err) 2093fe5e51b7Smrg ac_status=$? 2094fe5e51b7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20950bb88ba4Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2096fe5e51b7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2097fe5e51b7Smrg then 2098fe5e51b7Smrg # The compiler can only warn and ignore the option if not recognized 2099fe5e51b7Smrg # So say no if there are warnings 21000bb88ba4Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2101fe5e51b7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2102fe5e51b7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2103a31a186aSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2104fe5e51b7Smrg fi 2105fe5e51b7Smrg fi 2106fe5e51b7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2107a31a186aSmrg $RM conftest* 2108fe5e51b7Smrg # SGI C++ compiler will create directory out/ii_files/ for 2109fe5e51b7Smrg # template instantiation 2110a31a186aSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2111a31a186aSmrg $RM out/* && rmdir out 2112fe5e51b7Smrg cd .. 2113a31a186aSmrg $RM -r conftest 2114a31a186aSmrg $RM conftest* 2115fe5e51b7Smrg]) 2116a31a186aSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2117a31a186aSmrg [Does compiler simultaneously support -c and -o options?]) 2118a31a186aSmrg])# _LT_COMPILER_C_O 2119fe5e51b7Smrg 2120fe5e51b7Smrg 2121a31a186aSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2122a31a186aSmrg# ---------------------------------- 2123fe5e51b7Smrg# Check to see if we can do hard links to lock some files if needed 2124a31a186aSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2125a31a186aSmrg[m4_require([_LT_ENABLE_LOCK])dnl 2126a31a186aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2127a31a186aSmrg_LT_COMPILER_C_O([$1]) 2128fe5e51b7Smrg 2129493f84f4Smrghard_links=nottested 2130493f84f4Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2131fe5e51b7Smrg # do not overwrite the value of need_locks provided by the user 2132fe5e51b7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 2133fe5e51b7Smrg hard_links=yes 2134a31a186aSmrg $RM conftest* 2135fe5e51b7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2136fe5e51b7Smrg touch conftest.a 2137fe5e51b7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 2138fe5e51b7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2139fe5e51b7Smrg AC_MSG_RESULT([$hard_links]) 2140493f84f4Smrg if test no = "$hard_links"; then 2141493f84f4Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2142fe5e51b7Smrg need_locks=warn 2143fe5e51b7Smrg fi 2144fe5e51b7Smrgelse 2145fe5e51b7Smrg need_locks=no 2146fe5e51b7Smrgfi 2147a31a186aSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2148a31a186aSmrg])# _LT_COMPILER_FILE_LOCKS 2149fe5e51b7Smrg 2150fe5e51b7Smrg 2151a31a186aSmrg# _LT_CHECK_OBJDIR 2152a31a186aSmrg# ---------------- 2153a31a186aSmrgm4_defun([_LT_CHECK_OBJDIR], 2154fe5e51b7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2155fe5e51b7Smrg[rm -f .libs 2>/dev/null 2156fe5e51b7Smrgmkdir .libs 2>/dev/null 2157fe5e51b7Smrgif test -d .libs; then 2158fe5e51b7Smrg lt_cv_objdir=.libs 2159fe5e51b7Smrgelse 2160fe5e51b7Smrg # MS-DOS does not allow filenames that begin with a dot. 2161fe5e51b7Smrg lt_cv_objdir=_libs 2162fe5e51b7Smrgfi 2163fe5e51b7Smrgrmdir .libs 2>/dev/null]) 2164fe5e51b7Smrgobjdir=$lt_cv_objdir 2165a31a186aSmrg_LT_DECL([], [objdir], [0], 2166a31a186aSmrg [The name of the directory that contains temporary libtool files])dnl 2167a31a186aSmrgm4_pattern_allow([LT_OBJDIR])dnl 2168493f84f4SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2169493f84f4Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2170a31a186aSmrg])# _LT_CHECK_OBJDIR 2171fe5e51b7Smrg 2172fe5e51b7Smrg 2173a31a186aSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2174a31a186aSmrg# -------------------------------------- 2175fe5e51b7Smrg# Check hardcoding attributes. 2176a31a186aSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2177fe5e51b7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2178a31a186aSmrg_LT_TAGVAR(hardcode_action, $1)= 2179a31a186aSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2180a31a186aSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2181493f84f4Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2182fe5e51b7Smrg 2183a31a186aSmrg # We can hardcode non-existent directories. 2184493f84f4Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2185fe5e51b7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2186fe5e51b7Smrg # have to relink, otherwise we might link with an installed library 2187fe5e51b7Smrg # when we should be linking with a yet-to-be-installed one 2188493f84f4Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2189493f84f4Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2190fe5e51b7Smrg # Linking always hardcodes the temporary library directory. 2191a31a186aSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2192fe5e51b7Smrg else 2193fe5e51b7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2194a31a186aSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2195fe5e51b7Smrg fi 2196fe5e51b7Smrgelse 2197fe5e51b7Smrg # We cannot hardcode anything, or else we can only hardcode existing 2198fe5e51b7Smrg # directories. 2199a31a186aSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2200fe5e51b7Smrgfi 2201a31a186aSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202fe5e51b7Smrg 2203493f84f4Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2204493f84f4Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2205fe5e51b7Smrg # Fast installation is not supported 2206fe5e51b7Smrg enable_fast_install=no 2207493f84f4Smrgelif test yes = "$shlibpath_overrides_runpath" || 2208493f84f4Smrg test no = "$enable_shared"; then 2209fe5e51b7Smrg # Fast installation is not necessary 2210fe5e51b7Smrg enable_fast_install=needless 2211fe5e51b7Smrgfi 2212a31a186aSmrg_LT_TAGDECL([], [hardcode_action], [0], 2213a31a186aSmrg [How to hardcode a shared library path into an executable]) 2214a31a186aSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2215fe5e51b7Smrg 2216fe5e51b7Smrg 2217a31a186aSmrg# _LT_CMD_STRIPLIB 2218a31a186aSmrg# ---------------- 2219a31a186aSmrgm4_defun([_LT_CMD_STRIPLIB], 2220a31a186aSmrg[m4_require([_LT_DECL_EGREP]) 2221a31a186aSmrgstriplib= 2222fe5e51b7Smrgold_striplib= 2223fe5e51b7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2224a31a186aSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225fe5e51b7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2226fe5e51b7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2227fe5e51b7Smrg AC_MSG_RESULT([yes]) 2228fe5e51b7Smrgelse 2229fe5e51b7Smrg# FIXME - insert some real tests, host_os isn't really good enough 2230fe5e51b7Smrg case $host_os in 2231a31a186aSmrg darwin*) 2232493f84f4Smrg if test -n "$STRIP"; then 2233a31a186aSmrg striplib="$STRIP -x" 2234a31a186aSmrg old_striplib="$STRIP -S" 2235a31a186aSmrg AC_MSG_RESULT([yes]) 2236a31a186aSmrg else 2237a31a186aSmrg AC_MSG_RESULT([no]) 2238a31a186aSmrg fi 2239a31a186aSmrg ;; 2240a31a186aSmrg *) 2241a31a186aSmrg AC_MSG_RESULT([no]) 2242fe5e51b7Smrg ;; 2243fe5e51b7Smrg esac 2244fe5e51b7Smrgfi 2245a31a186aSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2246a31a186aSmrg_LT_DECL([], [striplib], [1]) 2247a31a186aSmrg])# _LT_CMD_STRIPLIB 2248fe5e51b7Smrg 2249fe5e51b7Smrg 2250ee82cb62Smrg# _LT_PREPARE_MUNGE_PATH_LIST 2251ee82cb62Smrg# --------------------------- 2252ee82cb62Smrg# Make sure func_munge_path_list() is defined correctly. 2253ee82cb62Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2254ee82cb62Smrg[[# func_munge_path_list VARIABLE PATH 2255ee82cb62Smrg# ----------------------------------- 2256ee82cb62Smrg# VARIABLE is name of variable containing _space_ separated list of 2257ee82cb62Smrg# directories to be munged by the contents of PATH, which is string 2258ee82cb62Smrg# having a format: 2259ee82cb62Smrg# "DIR[:DIR]:" 2260ee82cb62Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 2261ee82cb62Smrg# ":DIR[:DIR]" 2262ee82cb62Smrg# string "DIR[ DIR]" will be appended to VARIABLE 2263ee82cb62Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2264ee82cb62Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2265ee82cb62Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 2266ee82cb62Smrg# "DIR[:DIR]" 2267ee82cb62Smrg# VARIABLE will be replaced by "DIR[ DIR]" 2268ee82cb62Smrgfunc_munge_path_list () 2269ee82cb62Smrg{ 2270ee82cb62Smrg case x@S|@2 in 2271ee82cb62Smrg x) 2272ee82cb62Smrg ;; 2273ee82cb62Smrg *:) 2274ee82cb62Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2275ee82cb62Smrg ;; 2276ee82cb62Smrg x:*) 2277ee82cb62Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2278ee82cb62Smrg ;; 2279ee82cb62Smrg *::*) 2280ee82cb62Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2281ee82cb62Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2282ee82cb62Smrg ;; 2283ee82cb62Smrg *) 2284ee82cb62Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2285ee82cb62Smrg ;; 2286ee82cb62Smrg esac 2287ee82cb62Smrg} 2288ee82cb62Smrg]])# _LT_PREPARE_PATH_LIST 2289ee82cb62Smrg 2290ee82cb62Smrg 2291a31a186aSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2292fe5e51b7Smrg# ----------------------------- 2293fe5e51b7Smrg# PORTME Fill in your ld.so characteristics 2294a31a186aSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2295a31a186aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2296a31a186aSmrgm4_require([_LT_DECL_EGREP])dnl 2297a31a186aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2298a31a186aSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2299a31a186aSmrgm4_require([_LT_DECL_SED])dnl 23000bb88ba4Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2301ee82cb62Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2302fe5e51b7SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2303a31a186aSmrgm4_if([$1], 2304a31a186aSmrg [], [ 2305493f84f4Smrgif test yes = "$GCC"; then 2306fe5e51b7Smrg case $host_os in 2307493f84f4Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2308493f84f4Smrg *) lt_awk_arg='/^libraries:/' ;; 2309fe5e51b7Smrg esac 23100bb88ba4Smrg case $host_os in 2311493f84f4Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2312493f84f4Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23130bb88ba4Smrg esac 23140bb88ba4Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23150bb88ba4Smrg case $lt_search_path_spec in 23160bb88ba4Smrg *\;*) 2317fe5e51b7Smrg # if the path contains ";" then we assume it to be the separator 2318fe5e51b7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 2319fe5e51b7Smrg # assumed that no part of a normal pathname contains ";" but that should 2320fe5e51b7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 23210bb88ba4Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23220bb88ba4Smrg ;; 23230bb88ba4Smrg *) 23240bb88ba4Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23250bb88ba4Smrg ;; 23260bb88ba4Smrg esac 2327fe5e51b7Smrg # Ok, now we have the path, separated by spaces, we can step through it 2328493f84f4Smrg # and add multilib dir if necessary... 2329fe5e51b7Smrg lt_tmp_lt_search_path_spec= 2330493f84f4Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2331493f84f4Smrg # ...but if some path component already ends with the multilib dir we assume 2332493f84f4Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2333493f84f4Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2334493f84f4Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2335493f84f4Smrg lt_multi_os_dir= 2336493f84f4Smrg ;; 2337493f84f4Smrg esac 2338fe5e51b7Smrg for lt_sys_path in $lt_search_path_spec; do 2339493f84f4Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2340493f84f4Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2341493f84f4Smrg elif test -n "$lt_multi_os_dir"; then 2342fe5e51b7Smrg test -d "$lt_sys_path" && \ 2343fe5e51b7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2344fe5e51b7Smrg fi 2345fe5e51b7Smrg done 23460bb88ba4Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2347493f84f4SmrgBEGIN {RS = " "; FS = "/|\n";} { 2348493f84f4Smrg lt_foo = ""; 2349493f84f4Smrg lt_count = 0; 2350fe5e51b7Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 2351fe5e51b7Smrg if ($lt_i != "" && $lt_i != ".") { 2352fe5e51b7Smrg if ($lt_i == "..") { 2353fe5e51b7Smrg lt_count++; 2354fe5e51b7Smrg } else { 2355fe5e51b7Smrg if (lt_count == 0) { 2356493f84f4Smrg lt_foo = "/" $lt_i lt_foo; 2357fe5e51b7Smrg } else { 2358fe5e51b7Smrg lt_count--; 2359fe5e51b7Smrg } 2360fe5e51b7Smrg } 2361fe5e51b7Smrg } 2362fe5e51b7Smrg } 2363fe5e51b7Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2364fe5e51b7Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2365fe5e51b7Smrg}'` 23660bb88ba4Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 23670bb88ba4Smrg # for these hosts. 23680bb88ba4Smrg case $host_os in 23690bb88ba4Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2370493f84f4Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23710bb88ba4Smrg esac 23720bb88ba4Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2373fe5e51b7Smrgelse 2374fe5e51b7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2375fe5e51b7Smrgfi]) 2376a31a186aSmrglibrary_names_spec= 2377a31a186aSmrglibname_spec='lib$name' 2378a31a186aSmrgsoname_spec= 2379493f84f4Smrgshrext_cmds=.so 2380a31a186aSmrgpostinstall_cmds= 2381a31a186aSmrgpostuninstall_cmds= 2382a31a186aSmrgfinish_cmds= 2383a31a186aSmrgfinish_eval= 2384a31a186aSmrgshlibpath_var= 2385a31a186aSmrgshlibpath_overrides_runpath=unknown 2386a31a186aSmrgversion_type=none 2387a31a186aSmrgdynamic_linker="$host_os ld.so" 2388a31a186aSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2389fe5e51b7Smrgneed_lib_prefix=unknown 2390fe5e51b7Smrghardcode_into_libs=no 2391fe5e51b7Smrg 2392fe5e51b7Smrg# when you set need_version to no, make sure it does not cause -set_version 2393fe5e51b7Smrg# flags to be left without arguments 2394fe5e51b7Smrgneed_version=unknown 2395fe5e51b7Smrg 2396ee82cb62SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2397ee82cb62Smrg[User-defined run-time library search path.]) 2398ee82cb62Smrg 2399fe5e51b7Smrgcase $host_os in 2400fe5e51b7Smrgaix3*) 24010bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2402493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2403fe5e51b7Smrg shlibpath_var=LIBPATH 2404fe5e51b7Smrg 2405fe5e51b7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2406493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2407fe5e51b7Smrg ;; 2408fe5e51b7Smrg 2409eda3803bSmrgaix[[4-9]]*) 24100bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2411fe5e51b7Smrg need_lib_prefix=no 2412fe5e51b7Smrg need_version=no 2413fe5e51b7Smrg hardcode_into_libs=yes 2414493f84f4Smrg if test ia64 = "$host_cpu"; then 2415fe5e51b7Smrg # AIX 5 supports IA64 2416493f84f4Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2417fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2418fe5e51b7Smrg else 2419fe5e51b7Smrg # With GCC up to 2.95.x, collect2 would create an import file 2420fe5e51b7Smrg # for dependence libraries. The import file would start with 2421493f84f4Smrg # the line '#! .'. This would cause the generated library to 2422493f84f4Smrg # depend on '.', always an invalid library. This was fixed in 2423fe5e51b7Smrg # development snapshots of GCC prior to 3.0. 2424fe5e51b7Smrg case $host_os in 2425fe5e51b7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2426fe5e51b7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2427fe5e51b7Smrg echo ' yes ' 2428493f84f4Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2429fe5e51b7Smrg : 2430fe5e51b7Smrg else 2431fe5e51b7Smrg can_build_shared=no 2432fe5e51b7Smrg fi 2433fe5e51b7Smrg ;; 2434fe5e51b7Smrg esac 2435493f84f4Smrg # Using Import Files as archive members, it is possible to support 2436493f84f4Smrg # filename-based versioning of shared library archives on AIX. While 2437493f84f4Smrg # this would work for both with and without runtime linking, it will 2438493f84f4Smrg # prevent static linking of such archives. So we do filename-based 2439493f84f4Smrg # shared library versioning with .so extension only, which is used 2440493f84f4Smrg # when both runtime linking and shared linking is enabled. 2441493f84f4Smrg # Unfortunately, runtime linking may impact performance, so we do 2442493f84f4Smrg # not want this to be the default eventually. Also, we use the 2443493f84f4Smrg # versioned .so libs for executables only if there is the -brtl 2444493f84f4Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2445493f84f4Smrg # To allow for filename-based versioning support, we need to create 2446493f84f4Smrg # libNAME.so.V as an archive file, containing: 2447493f84f4Smrg # *) an Import File, referring to the versioned filename of the 2448493f84f4Smrg # archive as well as the shared archive member, telling the 2449493f84f4Smrg # bitwidth (32 or 64) of that shared object, and providing the 2450493f84f4Smrg # list of exported symbols of that shared object, eventually 2451493f84f4Smrg # decorated with the 'weak' keyword 2452493f84f4Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2453493f84f4Smrg # it being seen by the linker. 2454493f84f4Smrg # At run time we better use the real file rather than another symlink, 2455493f84f4Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2456493f84f4Smrg 2457493f84f4Smrg case $with_aix_soname,$aix_use_runtimelinking in 2458493f84f4Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2459fe5e51b7Smrg # soname into executable. Probably we can add versioning support to 2460fe5e51b7Smrg # collect2, so additional links can be useful in future. 2461493f84f4Smrg aix,yes) # traditional libtool 2462493f84f4Smrg dynamic_linker='AIX unversionable lib.so' 2463fe5e51b7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2464fe5e51b7Smrg # instead of lib<name>.a to let people know that these are not 2465fe5e51b7Smrg # typical AIX shared libraries. 2466493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2467493f84f4Smrg ;; 2468493f84f4Smrg aix,no) # traditional AIX only 2469493f84f4Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2470fe5e51b7Smrg # We preserve .a as extension for shared libraries through AIX4.2 2471fe5e51b7Smrg # and later when we are not doing run time linking. 2472493f84f4Smrg library_names_spec='$libname$release.a $libname.a' 2473493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2474493f84f4Smrg ;; 2475493f84f4Smrg svr4,*) # full svr4 only 2476493f84f4Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2477493f84f4Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2478493f84f4Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2479493f84f4Smrg shlibpath_overrides_runpath=yes 2480493f84f4Smrg ;; 2481493f84f4Smrg *,yes) # both, prefer svr4 2482493f84f4Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2483493f84f4Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484493f84f4Smrg # unpreferred sharedlib libNAME.a needs extra handling 2485493f84f4Smrg 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"' 2486493f84f4Smrg 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"' 2487493f84f4Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2488493f84f4Smrg shlibpath_overrides_runpath=yes 2489493f84f4Smrg ;; 2490493f84f4Smrg *,no) # both, prefer aix 2491493f84f4Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2492493f84f4Smrg library_names_spec='$libname$release.a $libname.a' 2493493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2494493f84f4Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2495493f84f4Smrg 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)' 2496493f84f4Smrg 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"' 2497493f84f4Smrg ;; 2498493f84f4Smrg esac 2499fe5e51b7Smrg shlibpath_var=LIBPATH 2500fe5e51b7Smrg fi 2501fe5e51b7Smrg ;; 2502fe5e51b7Smrg 2503fe5e51b7Smrgamigaos*) 2504a31a186aSmrg case $host_cpu in 2505a31a186aSmrg powerpc) 2506a31a186aSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2507a31a186aSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2508493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2509a31a186aSmrg ;; 2510a31a186aSmrg m68k) 2511a31a186aSmrg library_names_spec='$libname.ixlibrary $libname.a' 2512a31a186aSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2513493f84f4Smrg 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' 2514a31a186aSmrg ;; 2515a31a186aSmrg esac 2516fe5e51b7Smrg ;; 2517fe5e51b7Smrg 2518fe5e51b7Smrgbeos*) 2519493f84f4Smrg library_names_spec='$libname$shared_ext' 2520fe5e51b7Smrg dynamic_linker="$host_os ld.so" 2521fe5e51b7Smrg shlibpath_var=LIBRARY_PATH 2522fe5e51b7Smrg ;; 2523fe5e51b7Smrg 2524fe5e51b7Smrgbsdi[[45]]*) 25250bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2526fe5e51b7Smrg need_version=no 2527493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2528493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2529fe5e51b7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2530fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2531fe5e51b7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2532fe5e51b7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2533fe5e51b7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 2534fe5e51b7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2535fe5e51b7Smrg # libtool to hard-code these into programs 2536fe5e51b7Smrg ;; 2537fe5e51b7Smrg 2538a31a186aSmrgcygwin* | mingw* | pw32* | cegcc*) 2539fe5e51b7Smrg version_type=windows 2540493f84f4Smrg shrext_cmds=.dll 2541fe5e51b7Smrg need_version=no 2542fe5e51b7Smrg need_lib_prefix=no 2543fe5e51b7Smrg 25440bb88ba4Smrg case $GCC,$cc_basename in 25450bb88ba4Smrg yes,*) 25460bb88ba4Smrg # gcc 2547fe5e51b7Smrg library_names_spec='$libname.dll.a' 2548fe5e51b7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2549493f84f4Smrg postinstall_cmds='base_file=`basename \$file`~ 2550493f84f4Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2551fe5e51b7Smrg dldir=$destdir/`dirname \$dlpath`~ 2552fe5e51b7Smrg test -d \$dldir || mkdir -p \$dldir~ 2553fe5e51b7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2554a31a186aSmrg chmod a+x \$dldir/$dlname~ 2555a31a186aSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2556a31a186aSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2557a31a186aSmrg fi' 2558fe5e51b7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2559fe5e51b7Smrg dlpath=$dir/\$dldll~ 2560a31a186aSmrg $RM \$dlpath' 2561fe5e51b7Smrg shlibpath_overrides_runpath=yes 2562fe5e51b7Smrg 2563fe5e51b7Smrg case $host_os in 2564fe5e51b7Smrg cygwin*) 2565fe5e51b7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2566493f84f4Smrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25670bb88ba4Smrgm4_if([$1], [],[ 25680bb88ba4Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2569fe5e51b7Smrg ;; 2570a31a186aSmrg mingw* | cegcc*) 2571fe5e51b7Smrg # MinGW DLLs use traditional 'lib' prefix 2572493f84f4Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2573fe5e51b7Smrg ;; 2574fe5e51b7Smrg pw32*) 2575fe5e51b7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2576493f84f4Smrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2577fe5e51b7Smrg ;; 2578fe5e51b7Smrg esac 25790bb88ba4Smrg dynamic_linker='Win32 ld.exe' 25800bb88ba4Smrg ;; 25810bb88ba4Smrg 25820bb88ba4Smrg *,cl*) 25830bb88ba4Smrg # Native MSVC 25840bb88ba4Smrg libname_spec='$name' 2585493f84f4Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2586493f84f4Smrg library_names_spec='$libname.dll.lib' 25870bb88ba4Smrg 25880bb88ba4Smrg case $build_os in 25890bb88ba4Smrg mingw*) 25900bb88ba4Smrg sys_lib_search_path_spec= 25910bb88ba4Smrg lt_save_ifs=$IFS 25920bb88ba4Smrg IFS=';' 25930bb88ba4Smrg for lt_path in $LIB 25940bb88ba4Smrg do 25950bb88ba4Smrg IFS=$lt_save_ifs 25960bb88ba4Smrg # Let DOS variable expansion print the short 8.3 style file name. 25970bb88ba4Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 25980bb88ba4Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 25990bb88ba4Smrg done 26000bb88ba4Smrg IFS=$lt_save_ifs 26010bb88ba4Smrg # Convert to MSYS style. 26020bb88ba4Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26030bb88ba4Smrg ;; 26040bb88ba4Smrg cygwin*) 26050bb88ba4Smrg # Convert to unix form, then to dos form, then back to unix form 26060bb88ba4Smrg # but this time dos style (no spaces!) so that the unix form looks 26070bb88ba4Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 26080bb88ba4Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 26090bb88ba4Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 26100bb88ba4Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26110bb88ba4Smrg ;; 26120bb88ba4Smrg *) 2613493f84f4Smrg sys_lib_search_path_spec=$LIB 26140bb88ba4Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26150bb88ba4Smrg # It is most probably a Windows format PATH. 26160bb88ba4Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26170bb88ba4Smrg else 26180bb88ba4Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26190bb88ba4Smrg fi 26200bb88ba4Smrg # FIXME: find the short name or the path components, as spaces are 26210bb88ba4Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 26220bb88ba4Smrg ;; 26230bb88ba4Smrg esac 26240bb88ba4Smrg 26250bb88ba4Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2626493f84f4Smrg postinstall_cmds='base_file=`basename \$file`~ 2627493f84f4Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26280bb88ba4Smrg dldir=$destdir/`dirname \$dlpath`~ 26290bb88ba4Smrg test -d \$dldir || mkdir -p \$dldir~ 26300bb88ba4Smrg $install_prog $dir/$dlname \$dldir/$dlname' 26310bb88ba4Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26320bb88ba4Smrg dlpath=$dir/\$dldll~ 26330bb88ba4Smrg $RM \$dlpath' 26340bb88ba4Smrg shlibpath_overrides_runpath=yes 26350bb88ba4Smrg dynamic_linker='Win32 link.exe' 2636fe5e51b7Smrg ;; 2637fe5e51b7Smrg 2638fe5e51b7Smrg *) 26390bb88ba4Smrg # Assume MSVC wrapper 2640493f84f4Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26410bb88ba4Smrg dynamic_linker='Win32 ld.exe' 2642fe5e51b7Smrg ;; 2643fe5e51b7Smrg esac 2644fe5e51b7Smrg # FIXME: first we should search . and the directory the executable is in 2645fe5e51b7Smrg shlibpath_var=PATH 2646fe5e51b7Smrg ;; 2647fe5e51b7Smrg 2648fe5e51b7Smrgdarwin* | rhapsody*) 2649fe5e51b7Smrg dynamic_linker="$host_os dyld" 2650fe5e51b7Smrg version_type=darwin 2651fe5e51b7Smrg need_lib_prefix=no 2652fe5e51b7Smrg need_version=no 2653493f84f4Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2654493f84f4Smrg soname_spec='$libname$release$major$shared_ext' 2655fe5e51b7Smrg shlibpath_overrides_runpath=yes 2656fe5e51b7Smrg shlibpath_var=DYLD_LIBRARY_PATH 2657fe5e51b7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2658a31a186aSmrgm4_if([$1], [],[ 2659a31a186aSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2660fe5e51b7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2661fe5e51b7Smrg ;; 2662fe5e51b7Smrg 2663fe5e51b7Smrgdgux*) 26640bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2665fe5e51b7Smrg need_lib_prefix=no 2666fe5e51b7Smrg need_version=no 2667493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2668493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2669fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2670fe5e51b7Smrg ;; 2671fe5e51b7Smrg 2672fe5e51b7Smrgfreebsd* | dragonfly*) 2673fe5e51b7Smrg # DragonFly does not have aout. When/if they implement a new 2674fe5e51b7Smrg # versioning mechanism, adjust this. 2675fe5e51b7Smrg if test -x /usr/bin/objformat; then 2676fe5e51b7Smrg objformat=`/usr/bin/objformat` 2677fe5e51b7Smrg else 2678fe5e51b7Smrg case $host_os in 26790bb88ba4Smrg freebsd[[23]].*) objformat=aout ;; 2680fe5e51b7Smrg *) objformat=elf ;; 2681fe5e51b7Smrg esac 2682fe5e51b7Smrg fi 2683b0de6900Smrg version_type=freebsd-$objformat 2684fe5e51b7Smrg case $version_type in 2685fe5e51b7Smrg freebsd-elf*) 2686493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2687ee82cb62Smrg soname_spec='$libname$release$shared_ext$major' 2688fe5e51b7Smrg need_version=no 2689fe5e51b7Smrg need_lib_prefix=no 2690fe5e51b7Smrg ;; 2691fe5e51b7Smrg freebsd-*) 2692493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2693fe5e51b7Smrg need_version=yes 2694fe5e51b7Smrg ;; 2695fe5e51b7Smrg esac 2696fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2697fe5e51b7Smrg case $host_os in 26980bb88ba4Smrg freebsd2.*) 2699fe5e51b7Smrg shlibpath_overrides_runpath=yes 2700fe5e51b7Smrg ;; 2701fe5e51b7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2702fe5e51b7Smrg shlibpath_overrides_runpath=yes 2703fe5e51b7Smrg hardcode_into_libs=yes 2704fe5e51b7Smrg ;; 2705fe5e51b7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2706fe5e51b7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2707fe5e51b7Smrg shlibpath_overrides_runpath=no 2708fe5e51b7Smrg hardcode_into_libs=yes 2709fe5e51b7Smrg ;; 2710fe5e51b7Smrg *) # from 4.6 on, and DragonFly 2711fe5e51b7Smrg shlibpath_overrides_runpath=yes 2712fe5e51b7Smrg hardcode_into_libs=yes 2713fe5e51b7Smrg ;; 2714fe5e51b7Smrg esac 2715fe5e51b7Smrg ;; 2716fe5e51b7Smrg 27170bb88ba4Smrghaiku*) 27180bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 27190bb88ba4Smrg need_lib_prefix=no 27200bb88ba4Smrg need_version=no 27210bb88ba4Smrg dynamic_linker="$host_os runtime_loader" 2722493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2723493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 27240bb88ba4Smrg shlibpath_var=LIBRARY_PATH 2725493f84f4Smrg shlibpath_overrides_runpath=no 27260bb88ba4Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2727fe5e51b7Smrg hardcode_into_libs=yes 2728fe5e51b7Smrg ;; 2729fe5e51b7Smrg 2730fe5e51b7Smrghpux9* | hpux10* | hpux11*) 2731fe5e51b7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 2732fe5e51b7Smrg # link against other versions. 2733fe5e51b7Smrg version_type=sunos 2734fe5e51b7Smrg need_lib_prefix=no 2735fe5e51b7Smrg need_version=no 2736fe5e51b7Smrg case $host_cpu in 2737fe5e51b7Smrg ia64*) 2738fe5e51b7Smrg shrext_cmds='.so' 2739fe5e51b7Smrg hardcode_into_libs=yes 2740fe5e51b7Smrg dynamic_linker="$host_os dld.so" 2741fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2742fe5e51b7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2743493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2744493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2745493f84f4Smrg if test 32 = "$HPUX_IA64_MODE"; then 2746fe5e51b7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2747ee82cb62Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2748fe5e51b7Smrg else 2749fe5e51b7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2750ee82cb62Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2751fe5e51b7Smrg fi 2752fe5e51b7Smrg ;; 2753a31a186aSmrg hppa*64*) 2754a31a186aSmrg shrext_cmds='.sl' 2755a31a186aSmrg hardcode_into_libs=yes 2756a31a186aSmrg dynamic_linker="$host_os dld.sl" 2757a31a186aSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2758a31a186aSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2759493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2760493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2761a31a186aSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2762a31a186aSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2763a31a186aSmrg ;; 2764a31a186aSmrg *) 2765fe5e51b7Smrg shrext_cmds='.sl' 2766fe5e51b7Smrg dynamic_linker="$host_os dld.sl" 2767fe5e51b7Smrg shlibpath_var=SHLIB_PATH 2768fe5e51b7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2769493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2770493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2771fe5e51b7Smrg ;; 2772fe5e51b7Smrg esac 27730bb88ba4Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2774fe5e51b7Smrg postinstall_cmds='chmod 555 $lib' 27750bb88ba4Smrg # or fails outright, so override atomically: 27760bb88ba4Smrg install_override_mode=555 2777fe5e51b7Smrg ;; 2778fe5e51b7Smrg 2779fe5e51b7Smrginterix[[3-9]]*) 27800bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2781fe5e51b7Smrg need_lib_prefix=no 2782fe5e51b7Smrg need_version=no 2783493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2784493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2785fe5e51b7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2786fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2787fe5e51b7Smrg shlibpath_overrides_runpath=no 2788fe5e51b7Smrg hardcode_into_libs=yes 2789fe5e51b7Smrg ;; 2790fe5e51b7Smrg 2791fe5e51b7Smrgirix5* | irix6* | nonstopux*) 2792fe5e51b7Smrg case $host_os in 2793fe5e51b7Smrg nonstopux*) version_type=nonstopux ;; 2794fe5e51b7Smrg *) 2795493f84f4Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 27960bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2797fe5e51b7Smrg else 2798fe5e51b7Smrg version_type=irix 2799fe5e51b7Smrg fi ;; 2800fe5e51b7Smrg esac 2801fe5e51b7Smrg need_lib_prefix=no 2802fe5e51b7Smrg need_version=no 2803493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2804493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2805fe5e51b7Smrg case $host_os in 2806fe5e51b7Smrg irix5* | nonstopux*) 2807fe5e51b7Smrg libsuff= shlibsuff= 2808fe5e51b7Smrg ;; 2809fe5e51b7Smrg *) 2810fe5e51b7Smrg case $LD in # libtool.m4 will add one of these switches to LD 2811fe5e51b7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2812fe5e51b7Smrg libsuff= shlibsuff= libmagic=32-bit;; 2813fe5e51b7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2814fe5e51b7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2815fe5e51b7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2816fe5e51b7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2817fe5e51b7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 2818fe5e51b7Smrg esac 2819fe5e51b7Smrg ;; 2820fe5e51b7Smrg esac 2821fe5e51b7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2822fe5e51b7Smrg shlibpath_overrides_runpath=no 2823493f84f4Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2824493f84f4Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2825fe5e51b7Smrg hardcode_into_libs=yes 2826fe5e51b7Smrg ;; 2827fe5e51b7Smrg 2828fe5e51b7Smrg# No shared lib support for Linux oldld, aout, or coff. 2829fe5e51b7Smrglinux*oldld* | linux*aout* | linux*coff*) 2830fe5e51b7Smrg dynamic_linker=no 2831fe5e51b7Smrg ;; 2832fe5e51b7Smrg 2833493f84f4Smrglinux*android*) 2834493f84f4Smrg version_type=none # Android doesn't support versioned libraries. 2835493f84f4Smrg need_lib_prefix=no 2836493f84f4Smrg need_version=no 2837493f84f4Smrg library_names_spec='$libname$release$shared_ext' 2838493f84f4Smrg soname_spec='$libname$release$shared_ext' 2839493f84f4Smrg finish_cmds= 2840493f84f4Smrg shlibpath_var=LD_LIBRARY_PATH 2841493f84f4Smrg shlibpath_overrides_runpath=yes 2842493f84f4Smrg 2843493f84f4Smrg # This implies no fast_install, which is unacceptable. 2844493f84f4Smrg # Some rework will be needed to allow for fast_install 2845493f84f4Smrg # before this can be enabled. 2846493f84f4Smrg hardcode_into_libs=yes 2847493f84f4Smrg 2848493f84f4Smrg dynamic_linker='Android linker' 2849493f84f4Smrg # Don't embed -rpath directories since the linker doesn't support them. 2850493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2851493f84f4Smrg ;; 2852493f84f4Smrg 28530bb88ba4Smrg# This must be glibc/ELF. 2854493f84f4Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 28550bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2856fe5e51b7Smrg need_lib_prefix=no 2857fe5e51b7Smrg need_version=no 2858493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2859493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2860fe5e51b7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2861fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2862fe5e51b7Smrg shlibpath_overrides_runpath=no 28630bb88ba4Smrg 2864a31a186aSmrg # Some binutils ld are patched to set DT_RUNPATH 28650bb88ba4Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 28660bb88ba4Smrg [lt_cv_shlibpath_overrides_runpath=no 28670bb88ba4Smrg save_LDFLAGS=$LDFLAGS 28680bb88ba4Smrg save_libdir=$libdir 28690bb88ba4Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 28700bb88ba4Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 28710bb88ba4Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 28720bb88ba4Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 28730bb88ba4Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 28740bb88ba4Smrg LDFLAGS=$save_LDFLAGS 28750bb88ba4Smrg libdir=$save_libdir 28760bb88ba4Smrg ]) 28770bb88ba4Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2878a31a186aSmrg 2879fe5e51b7Smrg # This implies no fast_install, which is unacceptable. 2880fe5e51b7Smrg # Some rework will be needed to allow for fast_install 2881fe5e51b7Smrg # before this can be enabled. 2882fe5e51b7Smrg hardcode_into_libs=yes 2883a31a186aSmrg 2884ee82cb62Smrg # Ideally, we could use ldconfig to report *all* directores which are 2885ee82cb62Smrg # searched for libraries, however this is still not possible. Aside from not 2886ee82cb62Smrg # being certain /sbin/ldconfig is available, command 2887ee82cb62Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2888ee82cb62Smrg # even though it is searched at run-time. Try to do the best guess by 2889ee82cb62Smrg # appending ld.so.conf contents (and includes) to the search path. 2890fe5e51b7Smrg if test -f /etc/ld.so.conf; then 28910bb88ba4Smrg 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' ' '` 2892493f84f4Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2893fe5e51b7Smrg fi 2894fe5e51b7Smrg 2895fe5e51b7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2896fe5e51b7Smrg # powerpc, because MkLinux only supported shared libraries with the 2897fe5e51b7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 2898fe5e51b7Smrg # most powerpc-linux boxes support dynamic linking these days and 2899fe5e51b7Smrg # people can always --disable-shared, the test was removed, and we 2900fe5e51b7Smrg # assume the GNU/Linux dynamic linker is in use. 2901fe5e51b7Smrg dynamic_linker='GNU/Linux ld.so' 2902fe5e51b7Smrg ;; 2903fe5e51b7Smrg 2904b0de6900Smrgnetbsdelf*-gnu) 2905b0de6900Smrg version_type=linux 2906b0de6900Smrg need_lib_prefix=no 2907b0de6900Smrg need_version=no 2908b0de6900Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2909b0de6900Smrg soname_spec='${libname}${release}${shared_ext}$major' 2910b0de6900Smrg shlibpath_var=LD_LIBRARY_PATH 2911b0de6900Smrg shlibpath_overrides_runpath=no 2912b0de6900Smrg hardcode_into_libs=yes 2913b0de6900Smrg dynamic_linker='NetBSD ld.elf_so' 2914b0de6900Smrg ;; 2915b0de6900Smrg 2916fe5e51b7Smrgnetbsd*) 2917fe5e51b7Smrg version_type=sunos 2918fe5e51b7Smrg need_lib_prefix=no 2919fe5e51b7Smrg need_version=no 2920a31a186aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2921493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2922fe5e51b7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2923fe5e51b7Smrg dynamic_linker='NetBSD (a.out) ld.so' 2924fe5e51b7Smrg else 2925493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2926493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2927fe5e51b7Smrg dynamic_linker='NetBSD ld.elf_so' 2928fe5e51b7Smrg fi 2929fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2930fe5e51b7Smrg shlibpath_overrides_runpath=yes 2931fe5e51b7Smrg hardcode_into_libs=yes 2932fe5e51b7Smrg ;; 2933fe5e51b7Smrg 2934fe5e51b7Smrgnewsos6) 29350bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2936493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2937fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2938fe5e51b7Smrg shlibpath_overrides_runpath=yes 2939fe5e51b7Smrg ;; 2940fe5e51b7Smrg 2941a31a186aSmrg*nto* | *qnx*) 2942a31a186aSmrg version_type=qnx 2943fe5e51b7Smrg need_lib_prefix=no 2944fe5e51b7Smrg need_version=no 2945493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2946493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 2947fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2948a31a186aSmrg shlibpath_overrides_runpath=no 2949a31a186aSmrg hardcode_into_libs=yes 2950a31a186aSmrg dynamic_linker='ldqnx.so' 2951fe5e51b7Smrg ;; 2952fe5e51b7Smrg 2953493f84f4Smrgopenbsd* | bitrig*) 2954fe5e51b7Smrg version_type=sunos 2955493f84f4Smrg sys_lib_dlsearch_path_spec=/usr/lib 2956fe5e51b7Smrg need_lib_prefix=no 2957493f84f4Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2958493f84f4Smrg need_version=no 2959fe5e51b7Smrg else 2960493f84f4Smrg need_version=yes 2961fe5e51b7Smrg fi 2962493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2963493f84f4Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2964493f84f4Smrg shlibpath_var=LD_LIBRARY_PATH 2965493f84f4Smrg shlibpath_overrides_runpath=yes 2966fe5e51b7Smrg ;; 2967fe5e51b7Smrg 2968fe5e51b7Smrgos2*) 2969fe5e51b7Smrg libname_spec='$name' 2970493f84f4Smrg version_type=windows 2971493f84f4Smrg shrext_cmds=.dll 2972493f84f4Smrg need_version=no 2973fe5e51b7Smrg need_lib_prefix=no 2974493f84f4Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2975493f84f4Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2976493f84f4Smrg v=$($ECHO $release$versuffix | tr -d .-); 2977493f84f4Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2978493f84f4Smrg $ECHO $n$v`$shared_ext' 2979493f84f4Smrg library_names_spec='${libname}_dll.$libext' 2980fe5e51b7Smrg dynamic_linker='OS/2 ld.exe' 2981493f84f4Smrg shlibpath_var=BEGINLIBPATH 2982493f84f4Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2983493f84f4Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2984493f84f4Smrg postinstall_cmds='base_file=`basename \$file`~ 2985493f84f4Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2986493f84f4Smrg dldir=$destdir/`dirname \$dlpath`~ 2987493f84f4Smrg test -d \$dldir || mkdir -p \$dldir~ 2988493f84f4Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2989493f84f4Smrg chmod a+x \$dldir/$dlname~ 2990493f84f4Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2991493f84f4Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2992493f84f4Smrg fi' 2993493f84f4Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2994493f84f4Smrg dlpath=$dir/\$dldll~ 2995493f84f4Smrg $RM \$dlpath' 2996fe5e51b7Smrg ;; 2997fe5e51b7Smrg 2998fe5e51b7Smrgosf3* | osf4* | osf5*) 2999fe5e51b7Smrg version_type=osf 3000fe5e51b7Smrg need_lib_prefix=no 3001fe5e51b7Smrg need_version=no 3002493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 3003493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3004fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 3005fe5e51b7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3006493f84f4Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3007fe5e51b7Smrg ;; 3008fe5e51b7Smrg 3009fe5e51b7Smrgrdos*) 3010fe5e51b7Smrg dynamic_linker=no 3011fe5e51b7Smrg ;; 3012fe5e51b7Smrg 3013fe5e51b7Smrgsolaris*) 30140bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 3015fe5e51b7Smrg need_lib_prefix=no 3016fe5e51b7Smrg need_version=no 3017493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3018493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 3019fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 3020fe5e51b7Smrg shlibpath_overrides_runpath=yes 3021fe5e51b7Smrg hardcode_into_libs=yes 3022fe5e51b7Smrg # ldd complains unless libraries are executable 3023fe5e51b7Smrg postinstall_cmds='chmod +x $lib' 3024fe5e51b7Smrg ;; 3025fe5e51b7Smrg 3026fe5e51b7Smrgsunos4*) 3027fe5e51b7Smrg version_type=sunos 3028493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3029fe5e51b7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3030fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 3031fe5e51b7Smrg shlibpath_overrides_runpath=yes 3032493f84f4Smrg if test yes = "$with_gnu_ld"; then 3033fe5e51b7Smrg need_lib_prefix=no 3034fe5e51b7Smrg fi 3035fe5e51b7Smrg need_version=yes 3036fe5e51b7Smrg ;; 3037fe5e51b7Smrg 3038fe5e51b7Smrgsysv4 | sysv4.3*) 30390bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 3040493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3041493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 3042fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 3043fe5e51b7Smrg case $host_vendor in 3044fe5e51b7Smrg sni) 3045fe5e51b7Smrg shlibpath_overrides_runpath=no 3046fe5e51b7Smrg need_lib_prefix=no 3047fe5e51b7Smrg runpath_var=LD_RUN_PATH 3048fe5e51b7Smrg ;; 3049fe5e51b7Smrg siemens) 3050fe5e51b7Smrg need_lib_prefix=no 3051fe5e51b7Smrg ;; 3052fe5e51b7Smrg motorola) 3053fe5e51b7Smrg need_lib_prefix=no 3054fe5e51b7Smrg need_version=no 3055fe5e51b7Smrg shlibpath_overrides_runpath=no 3056fe5e51b7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3057fe5e51b7Smrg ;; 3058fe5e51b7Smrg esac 3059fe5e51b7Smrg ;; 3060fe5e51b7Smrg 3061fe5e51b7Smrgsysv4*MP*) 3062493f84f4Smrg if test -d /usr/nec; then 30630bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 3064493f84f4Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3065493f84f4Smrg soname_spec='$libname$shared_ext.$major' 3066fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 3067fe5e51b7Smrg fi 3068fe5e51b7Smrg ;; 3069fe5e51b7Smrg 3070fe5e51b7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3071493f84f4Smrg version_type=sco 3072fe5e51b7Smrg need_lib_prefix=no 3073fe5e51b7Smrg need_version=no 3074493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3075493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 3076fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 3077a31a186aSmrg shlibpath_overrides_runpath=yes 3078fe5e51b7Smrg hardcode_into_libs=yes 3079493f84f4Smrg if test yes = "$with_gnu_ld"; then 3080fe5e51b7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3081fe5e51b7Smrg else 3082fe5e51b7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3083fe5e51b7Smrg case $host_os in 3084fe5e51b7Smrg sco3.2v5*) 3085fe5e51b7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3086fe5e51b7Smrg ;; 3087fe5e51b7Smrg esac 3088fe5e51b7Smrg fi 3089fe5e51b7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 3090fe5e51b7Smrg ;; 3091fe5e51b7Smrg 3092a31a186aSmrgtpf*) 3093a31a186aSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 30940bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 3095a31a186aSmrg need_lib_prefix=no 3096a31a186aSmrg need_version=no 3097493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3098a31a186aSmrg shlibpath_var=LD_LIBRARY_PATH 3099a31a186aSmrg shlibpath_overrides_runpath=no 3100a31a186aSmrg hardcode_into_libs=yes 3101a31a186aSmrg ;; 3102a31a186aSmrg 3103eda3803bSmrguts4*) 31040bb88ba4Smrg version_type=linux # correct to gnu/linux during the next big refactor 3105493f84f4Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3106493f84f4Smrg soname_spec='$libname$release$shared_ext$major' 3107eda3803bSmrg shlibpath_var=LD_LIBRARY_PATH 3108eda3803bSmrg ;; 3109fe5e51b7Smrg 3110fe5e51b7Smrg*) 3111fe5e51b7Smrg dynamic_linker=no 3112fe5e51b7Smrg ;; 3113fe5e51b7Smrgesac 3114fe5e51b7SmrgAC_MSG_RESULT([$dynamic_linker]) 3115493f84f4Smrgtest no = "$dynamic_linker" && can_build_shared=no 3116fe5e51b7Smrg 3117fe5e51b7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3118493f84f4Smrgif test yes = "$GCC"; then 3119fe5e51b7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3120fe5e51b7Smrgfi 3121fe5e51b7Smrg 3122493f84f4Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3123493f84f4Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3124a31a186aSmrgfi 3125ee82cb62Smrg 3126493f84f4Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3127493f84f4Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3128a31a186aSmrgfi 3129fe5e51b7Smrg 3130ee82cb62Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3131ee82cb62Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3132ee82cb62Smrg 3133ee82cb62Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3134ee82cb62Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3135ee82cb62Smrg 3136ee82cb62Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3137ee82cb62Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3138ee82cb62Smrg 3139a31a186aSmrg_LT_DECL([], [variables_saved_for_relink], [1], 3140a31a186aSmrg [Variables whose values should be saved in libtool wrapper scripts and 3141a31a186aSmrg restored at link time]) 3142a31a186aSmrg_LT_DECL([], [need_lib_prefix], [0], 3143a31a186aSmrg [Do we need the "lib" prefix for modules?]) 3144a31a186aSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3145a31a186aSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3146a31a186aSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3147a31a186aSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3148a31a186aSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3149a31a186aSmrg [Is shlibpath searched before the hard-coded library search path?]) 3150a31a186aSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3151a31a186aSmrg_LT_DECL([], [library_names_spec], [1], 3152a31a186aSmrg [[List of archive names. First name is the real one, the rest are links. 3153a31a186aSmrg The last name is the one that the linker finds with -lNAME]]) 3154a31a186aSmrg_LT_DECL([], [soname_spec], [1], 3155a31a186aSmrg [[The coded name of the library, if different from the real name]]) 31560bb88ba4Smrg_LT_DECL([], [install_override_mode], [1], 31570bb88ba4Smrg [Permission mode override for installation of shared libraries]) 3158a31a186aSmrg_LT_DECL([], [postinstall_cmds], [2], 3159a31a186aSmrg [Command to use after installation of a shared archive]) 3160a31a186aSmrg_LT_DECL([], [postuninstall_cmds], [2], 3161a31a186aSmrg [Command to use after uninstallation of a shared archive]) 3162a31a186aSmrg_LT_DECL([], [finish_cmds], [2], 3163a31a186aSmrg [Commands used to finish a libtool library installation in a directory]) 3164a31a186aSmrg_LT_DECL([], [finish_eval], [1], 3165a31a186aSmrg [[As "finish_cmds", except a single script fragment to be evaled but 3166a31a186aSmrg not shown]]) 3167a31a186aSmrg_LT_DECL([], [hardcode_into_libs], [0], 3168a31a186aSmrg [Whether we should hardcode library paths into libraries]) 3169a31a186aSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3170a31a186aSmrg [Compile-time system search path for libraries]) 3171ee82cb62Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3172ee82cb62Smrg [Detected run-time system search path for libraries]) 3173ee82cb62Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3174ee82cb62Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3175a31a186aSmrg])# _LT_SYS_DYNAMIC_LINKER 3176a31a186aSmrg 3177a31a186aSmrg 3178a31a186aSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 3179643b027fSmrg# -------------------------- 3180493f84f4Smrg# find a file program that can recognize shared library 3181a31a186aSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3182a31a186aSmrg[m4_require([_LT_DECL_EGREP])dnl 3183643b027fSmrgAC_MSG_CHECKING([for $1]) 3184643b027fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3185643b027fSmrg[case $MAGIC_CMD in 3186fe5e51b7Smrg[[\\/*] | ?:[\\/]*]) 3187493f84f4Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3188fe5e51b7Smrg ;; 3189fe5e51b7Smrg*) 3190493f84f4Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 3191493f84f4Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3192fe5e51b7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3193fe5e51b7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3194fe5e51b7Smrgdnl not every word. This closes a longstanding sh security hole. 3195a31a186aSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3196fe5e51b7Smrg for ac_dir in $ac_dummy; do 3197493f84f4Smrg IFS=$lt_save_ifs 3198fe5e51b7Smrg test -z "$ac_dir" && ac_dir=. 3199493f84f4Smrg if test -f "$ac_dir/$1"; then 3200493f84f4Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3201fe5e51b7Smrg if test -n "$file_magic_test_file"; then 3202fe5e51b7Smrg case $deplibs_check_method in 3203fe5e51b7Smrg "file_magic "*) 3204fe5e51b7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3205493f84f4Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3206fe5e51b7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3207fe5e51b7Smrg $EGREP "$file_magic_regex" > /dev/null; then 3208fe5e51b7Smrg : 3209fe5e51b7Smrg else 3210a31a186aSmrg cat <<_LT_EOF 1>&2 3211fe5e51b7Smrg 3212fe5e51b7Smrg*** Warning: the command libtool uses to detect shared libraries, 3213fe5e51b7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3214fe5e51b7Smrg*** The result is that libtool may fail to recognize shared libraries 3215fe5e51b7Smrg*** as such. This will affect the creation of libtool libraries that 3216fe5e51b7Smrg*** depend on shared libraries, but programs linked with such libtool 3217fe5e51b7Smrg*** libraries will work regardless of this problem. Nevertheless, you 3218fe5e51b7Smrg*** may want to report the problem to your system manager and/or to 3219fe5e51b7Smrg*** bug-libtool@gnu.org 3220fe5e51b7Smrg 3221a31a186aSmrg_LT_EOF 3222fe5e51b7Smrg fi ;; 3223fe5e51b7Smrg esac 3224fe5e51b7Smrg fi 3225fe5e51b7Smrg break 3226fe5e51b7Smrg fi 3227fe5e51b7Smrg done 3228493f84f4Smrg IFS=$lt_save_ifs 3229493f84f4Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 3230fe5e51b7Smrg ;; 3231fe5e51b7Smrgesac]) 3232493f84f4SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3233fe5e51b7Smrgif test -n "$MAGIC_CMD"; then 3234fe5e51b7Smrg AC_MSG_RESULT($MAGIC_CMD) 3235fe5e51b7Smrgelse 3236fe5e51b7Smrg AC_MSG_RESULT(no) 3237fe5e51b7Smrgfi 3238a31a186aSmrg_LT_DECL([], [MAGIC_CMD], [0], 3239a31a186aSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3240a31a186aSmrg])# _LT_PATH_TOOL_PREFIX 3241fe5e51b7Smrg 3242a31a186aSmrg# Old name: 3243a31a186aSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3244a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 3245a31a186aSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3246eda3803bSmrg 3247a31a186aSmrg 3248a31a186aSmrg# _LT_PATH_MAGIC 3249a31a186aSmrg# -------------- 3250493f84f4Smrg# find a file program that can recognize a shared library 3251a31a186aSmrgm4_defun([_LT_PATH_MAGIC], 3252a31a186aSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3253fe5e51b7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3254fe5e51b7Smrg if test -n "$ac_tool_prefix"; then 3255a31a186aSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3256fe5e51b7Smrg else 3257fe5e51b7Smrg MAGIC_CMD=: 3258fe5e51b7Smrg fi 3259fe5e51b7Smrgfi 3260a31a186aSmrg])# _LT_PATH_MAGIC 3261fe5e51b7Smrg 3262fe5e51b7Smrg 3263a31a186aSmrg# LT_PATH_LD 3264fe5e51b7Smrg# ---------- 3265fe5e51b7Smrg# find the pathname to the GNU or non-GNU linker 3266a31a186aSmrgAC_DEFUN([LT_PATH_LD], 3267a31a186aSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3268643b027fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3269643b027fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3270a31a186aSmrgm4_require([_LT_DECL_SED])dnl 3271a31a186aSmrgm4_require([_LT_DECL_EGREP])dnl 32720bb88ba4Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3273a31a186aSmrg 3274a31a186aSmrgAC_ARG_WITH([gnu-ld], 3275a31a186aSmrg [AS_HELP_STRING([--with-gnu-ld], 3276a31a186aSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3277493f84f4Smrg [test no = "$withval" || with_gnu_ld=yes], 3278a31a186aSmrg [with_gnu_ld=no])dnl 3279a31a186aSmrg 3280fe5e51b7Smrgac_prog=ld 3281493f84f4Smrgif test yes = "$GCC"; then 3282fe5e51b7Smrg # Check if gcc -print-prog-name=ld gives a path. 3283fe5e51b7Smrg AC_MSG_CHECKING([for ld used by $CC]) 3284fe5e51b7Smrg case $host in 3285fe5e51b7Smrg *-*-mingw*) 3286493f84f4Smrg # gcc leaves a trailing carriage return, which upsets mingw 3287fe5e51b7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3288fe5e51b7Smrg *) 3289fe5e51b7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3290fe5e51b7Smrg esac 3291fe5e51b7Smrg case $ac_prog in 3292fe5e51b7Smrg # Accept absolute paths. 3293fe5e51b7Smrg [[\\/]]* | ?:[[\\/]]*) 3294fe5e51b7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 3295fe5e51b7Smrg # Canonicalize the pathname of ld 3296a31a186aSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3297a31a186aSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3298a31a186aSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3299fe5e51b7Smrg done 3300493f84f4Smrg test -z "$LD" && LD=$ac_prog 3301fe5e51b7Smrg ;; 3302fe5e51b7Smrg "") 3303fe5e51b7Smrg # If it fails, then pretend we aren't using GCC. 3304fe5e51b7Smrg ac_prog=ld 3305fe5e51b7Smrg ;; 3306fe5e51b7Smrg *) 3307fe5e51b7Smrg # If it is relative, then search for the first ld in PATH. 3308fe5e51b7Smrg with_gnu_ld=unknown 3309fe5e51b7Smrg ;; 3310fe5e51b7Smrg esac 3311493f84f4Smrgelif test yes = "$with_gnu_ld"; then 3312fe5e51b7Smrg AC_MSG_CHECKING([for GNU ld]) 3313fe5e51b7Smrgelse 3314fe5e51b7Smrg AC_MSG_CHECKING([for non-GNU ld]) 3315fe5e51b7Smrgfi 3316fe5e51b7SmrgAC_CACHE_VAL(lt_cv_path_LD, 3317fe5e51b7Smrg[if test -z "$LD"; then 3318493f84f4Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3319fe5e51b7Smrg for ac_dir in $PATH; do 3320493f84f4Smrg IFS=$lt_save_ifs 3321fe5e51b7Smrg test -z "$ac_dir" && ac_dir=. 3322fe5e51b7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3323493f84f4Smrg lt_cv_path_LD=$ac_dir/$ac_prog 3324fe5e51b7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 3325fe5e51b7Smrg # but apparently some variants of GNU ld only accept -v. 3326fe5e51b7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 3327fe5e51b7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3328fe5e51b7Smrg *GNU* | *'with BFD'*) 3329493f84f4Smrg test no != "$with_gnu_ld" && break 3330fe5e51b7Smrg ;; 3331fe5e51b7Smrg *) 3332493f84f4Smrg test yes != "$with_gnu_ld" && break 3333fe5e51b7Smrg ;; 3334fe5e51b7Smrg esac 3335fe5e51b7Smrg fi 3336fe5e51b7Smrg done 3337493f84f4Smrg IFS=$lt_save_ifs 3338fe5e51b7Smrgelse 3339493f84f4Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 3340fe5e51b7Smrgfi]) 3341493f84f4SmrgLD=$lt_cv_path_LD 3342fe5e51b7Smrgif test -n "$LD"; then 3343fe5e51b7Smrg AC_MSG_RESULT($LD) 3344fe5e51b7Smrgelse 3345fe5e51b7Smrg AC_MSG_RESULT(no) 3346fe5e51b7Smrgfi 3347fe5e51b7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3348a31a186aSmrg_LT_PATH_LD_GNU 3349a31a186aSmrgAC_SUBST([LD]) 3350fe5e51b7Smrg 3351a31a186aSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3352a31a186aSmrg])# LT_PATH_LD 3353fe5e51b7Smrg 3354a31a186aSmrg# Old names: 3355a31a186aSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3356a31a186aSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3357a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 3358a31a186aSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3359a31a186aSmrgdnl AC_DEFUN([AC_PROG_LD], []) 3360a31a186aSmrg 3361a31a186aSmrg 3362a31a186aSmrg# _LT_PATH_LD_GNU 3363a31a186aSmrg#- -------------- 3364a31a186aSmrgm4_defun([_LT_PATH_LD_GNU], 3365a31a186aSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3366fe5e51b7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3367fe5e51b7Smrgcase `$LD -v 2>&1 </dev/null` in 3368fe5e51b7Smrg*GNU* | *'with BFD'*) 3369fe5e51b7Smrg lt_cv_prog_gnu_ld=yes 3370fe5e51b7Smrg ;; 3371fe5e51b7Smrg*) 3372fe5e51b7Smrg lt_cv_prog_gnu_ld=no 3373fe5e51b7Smrg ;; 3374fe5e51b7Smrgesac]) 3375fe5e51b7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3376a31a186aSmrg])# _LT_PATH_LD_GNU 3377fe5e51b7Smrg 3378fe5e51b7Smrg 3379a31a186aSmrg# _LT_CMD_RELOAD 3380a31a186aSmrg# -------------- 3381fe5e51b7Smrg# find reload flag for linker 3382fe5e51b7Smrg# -- PORTME Some linkers may need a different reload flag. 3383a31a186aSmrgm4_defun([_LT_CMD_RELOAD], 3384fe5e51b7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 3385fe5e51b7Smrg lt_cv_ld_reload_flag, 3386fe5e51b7Smrg [lt_cv_ld_reload_flag='-r']) 3387fe5e51b7Smrgreload_flag=$lt_cv_ld_reload_flag 3388fe5e51b7Smrgcase $reload_flag in 3389fe5e51b7Smrg"" | " "*) ;; 3390fe5e51b7Smrg*) reload_flag=" $reload_flag" ;; 3391fe5e51b7Smrgesac 3392fe5e51b7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3393fe5e51b7Smrgcase $host_os in 33940bb88ba4Smrg cygwin* | mingw* | pw32* | cegcc*) 3395493f84f4Smrg if test yes != "$GCC"; then 33960bb88ba4Smrg reload_cmds=false 33970bb88ba4Smrg fi 33980bb88ba4Smrg ;; 3399fe5e51b7Smrg darwin*) 3400493f84f4Smrg if test yes = "$GCC"; then 3401493f84f4Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3402fe5e51b7Smrg else 3403fe5e51b7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3404fe5e51b7Smrg fi 3405fe5e51b7Smrg ;; 3406fe5e51b7Smrgesac 34070bb88ba4Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 34080bb88ba4Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3409a31a186aSmrg])# _LT_CMD_RELOAD 3410fe5e51b7Smrg 3411fe5e51b7Smrg 3412493f84f4Smrg# _LT_PATH_DD 3413493f84f4Smrg# ----------- 3414493f84f4Smrg# find a working dd 3415493f84f4Smrgm4_defun([_LT_PATH_DD], 3416493f84f4Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3417493f84f4Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3418493f84f4Smrgcat conftest.i conftest.i >conftest2.i 3419493f84f4Smrg: ${lt_DD:=$DD} 3420493f84f4SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3421493f84f4Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3422493f84f4Smrg cmp -s conftest.i conftest.out \ 3423493f84f4Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3424493f84f4Smrgfi]) 3425493f84f4Smrgrm -f conftest.i conftest2.i conftest.out]) 3426493f84f4Smrg])# _LT_PATH_DD 3427493f84f4Smrg 3428493f84f4Smrg 3429493f84f4Smrg# _LT_CMD_TRUNCATE 3430493f84f4Smrg# ---------------- 3431493f84f4Smrg# find command to truncate a binary pipe 3432493f84f4Smrgm4_defun([_LT_CMD_TRUNCATE], 3433493f84f4Smrg[m4_require([_LT_PATH_DD]) 3434493f84f4SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3435493f84f4Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3436493f84f4Smrgcat conftest.i conftest.i >conftest2.i 3437493f84f4Smrglt_cv_truncate_bin= 3438493f84f4Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3439493f84f4Smrg cmp -s conftest.i conftest.out \ 3440493f84f4Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3441493f84f4Smrgfi 3442493f84f4Smrgrm -f conftest.i conftest2.i conftest.out 3443493f84f4Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3444493f84f4Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3445493f84f4Smrg [Command to truncate a binary pipe]) 3446493f84f4Smrg])# _LT_CMD_TRUNCATE 3447493f84f4Smrg 3448493f84f4Smrg 3449a31a186aSmrg# _LT_CHECK_MAGIC_METHOD 3450a31a186aSmrg# ---------------------- 3451fe5e51b7Smrg# how to check for library dependencies 3452fe5e51b7Smrg# -- PORTME fill in with the dynamic library characteristics 3453a31a186aSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3454a31a186aSmrg[m4_require([_LT_DECL_EGREP]) 3455a31a186aSmrgm4_require([_LT_DECL_OBJDUMP]) 3456a31a186aSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3457fe5e51b7Smrglt_cv_deplibs_check_method, 3458fe5e51b7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3459fe5e51b7Smrglt_cv_file_magic_test_file= 3460fe5e51b7Smrglt_cv_deplibs_check_method='unknown' 3461fe5e51b7Smrg# Need to set the preceding variable on all platforms that support 3462fe5e51b7Smrg# interlibrary dependencies. 3463fe5e51b7Smrg# 'none' -- dependencies not supported. 3464493f84f4Smrg# 'unknown' -- same as none, but documents that we really don't know. 3465fe5e51b7Smrg# 'pass_all' -- all dependencies passed with no checks. 3466fe5e51b7Smrg# 'test_compile' -- check by making test program. 3467fe5e51b7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 3468493f84f4Smrg# that responds to the $file_magic_cmd with a given extended regex. 3469493f84f4Smrg# If you have 'file' or equivalent on your system and you're not sure 3470493f84f4Smrg# whether 'pass_all' will *always* work, you probably want this one. 3471fe5e51b7Smrg 3472fe5e51b7Smrgcase $host_os in 3473eda3803bSmrgaix[[4-9]]*) 3474fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3475fe5e51b7Smrg ;; 3476fe5e51b7Smrg 3477fe5e51b7Smrgbeos*) 3478fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3479fe5e51b7Smrg ;; 3480fe5e51b7Smrg 3481fe5e51b7Smrgbsdi[[45]]*) 3482fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3483fe5e51b7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3484fe5e51b7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 3485fe5e51b7Smrg ;; 3486fe5e51b7Smrg 3487fe5e51b7Smrgcygwin*) 3488fe5e51b7Smrg # func_win32_libid is a shell function defined in ltmain.sh 3489fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3490fe5e51b7Smrg lt_cv_file_magic_cmd='func_win32_libid' 3491fe5e51b7Smrg ;; 3492fe5e51b7Smrg 3493fe5e51b7Smrgmingw* | pw32*) 3494fe5e51b7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 3495fe5e51b7Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3496fe5e51b7Smrg # unless we find 'file', for example because we are cross-compiling. 3497493f84f4Smrg if ( file / ) >/dev/null 2>&1; then 3498fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3499fe5e51b7Smrg lt_cv_file_magic_cmd='func_win32_libid' 3500fe5e51b7Smrg else 35010bb88ba4Smrg # Keep this pattern in sync with the one in func_win32_libid. 35020bb88ba4Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3503fe5e51b7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3504fe5e51b7Smrg fi 3505fe5e51b7Smrg ;; 3506fe5e51b7Smrg 35070bb88ba4Smrgcegcc*) 3508a31a186aSmrg # use the weaker test based on 'objdump'. See mingw*. 3509a31a186aSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3510a31a186aSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3511a31a186aSmrg ;; 3512a31a186aSmrg 3513fe5e51b7Smrgdarwin* | rhapsody*) 3514fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3515fe5e51b7Smrg ;; 3516fe5e51b7Smrg 3517fe5e51b7Smrgfreebsd* | dragonfly*) 3518a31a186aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3519fe5e51b7Smrg case $host_cpu in 3520fe5e51b7Smrg i*86 ) 3521fe5e51b7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 3522fe5e51b7Smrg # Let's accept both of them until this is cleared up. 3523fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3524fe5e51b7Smrg lt_cv_file_magic_cmd=/usr/bin/file 3525fe5e51b7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3526fe5e51b7Smrg ;; 3527fe5e51b7Smrg esac 3528fe5e51b7Smrg else 3529fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3530fe5e51b7Smrg fi 3531fe5e51b7Smrg ;; 3532fe5e51b7Smrg 35330bb88ba4Smrghaiku*) 35340bb88ba4Smrg lt_cv_deplibs_check_method=pass_all 35350bb88ba4Smrg ;; 35360bb88ba4Smrg 3537fe5e51b7Smrghpux10.20* | hpux11*) 3538fe5e51b7Smrg lt_cv_file_magic_cmd=/usr/bin/file 3539fe5e51b7Smrg case $host_cpu in 3540fe5e51b7Smrg ia64*) 3541fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3542fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3543fe5e51b7Smrg ;; 3544fe5e51b7Smrg hppa*64*) 35450bb88ba4Smrg [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]'] 3546fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3547fe5e51b7Smrg ;; 3548fe5e51b7Smrg *) 35490bb88ba4Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3550fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3551fe5e51b7Smrg ;; 3552fe5e51b7Smrg esac 3553fe5e51b7Smrg ;; 3554fe5e51b7Smrg 3555fe5e51b7Smrginterix[[3-9]]*) 3556fe5e51b7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3557fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3558fe5e51b7Smrg ;; 3559fe5e51b7Smrg 3560fe5e51b7Smrgirix5* | irix6* | nonstopux*) 3561fe5e51b7Smrg case $LD in 3562fe5e51b7Smrg *-32|*"-32 ") libmagic=32-bit;; 3563fe5e51b7Smrg *-n32|*"-n32 ") libmagic=N32;; 3564fe5e51b7Smrg *-64|*"-64 ") libmagic=64-bit;; 3565fe5e51b7Smrg *) libmagic=never-match;; 3566fe5e51b7Smrg esac 3567fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3568fe5e51b7Smrg ;; 3569fe5e51b7Smrg 35700bb88ba4Smrg# This must be glibc/ELF. 3571493f84f4Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3572fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3573fe5e51b7Smrg ;; 3574fe5e51b7Smrg 3575b0de6900Smrgnetbsd* | netbsdelf*-gnu) 3576a31a186aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3577fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3578fe5e51b7Smrg else 3579fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3580fe5e51b7Smrg fi 3581fe5e51b7Smrg ;; 3582fe5e51b7Smrg 3583fe5e51b7Smrgnewos6*) 3584fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3585fe5e51b7Smrg lt_cv_file_magic_cmd=/usr/bin/file 3586fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3587fe5e51b7Smrg ;; 3588fe5e51b7Smrg 3589a31a186aSmrg*nto* | *qnx*) 3590a31a186aSmrg lt_cv_deplibs_check_method=pass_all 3591fe5e51b7Smrg ;; 3592fe5e51b7Smrg 3593493f84f4Smrgopenbsd* | bitrig*) 3594493f84f4Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3595fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3596fe5e51b7Smrg else 3597fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3598fe5e51b7Smrg fi 3599fe5e51b7Smrg ;; 3600fe5e51b7Smrg 3601fe5e51b7Smrgosf3* | osf4* | osf5*) 3602fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3603fe5e51b7Smrg ;; 3604fe5e51b7Smrg 3605fe5e51b7Smrgrdos*) 3606fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3607fe5e51b7Smrg ;; 3608fe5e51b7Smrg 3609fe5e51b7Smrgsolaris*) 3610fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3611fe5e51b7Smrg ;; 3612fe5e51b7Smrg 3613a31a186aSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3614a31a186aSmrg lt_cv_deplibs_check_method=pass_all 3615a31a186aSmrg ;; 3616a31a186aSmrg 3617fe5e51b7Smrgsysv4 | sysv4.3*) 3618fe5e51b7Smrg case $host_vendor in 3619fe5e51b7Smrg motorola) 3620fe5e51b7Smrg 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]]' 3621fe5e51b7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3622fe5e51b7Smrg ;; 3623fe5e51b7Smrg ncr) 3624fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3625fe5e51b7Smrg ;; 3626fe5e51b7Smrg sequent) 3627fe5e51b7Smrg lt_cv_file_magic_cmd='/bin/file' 3628fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3629fe5e51b7Smrg ;; 3630fe5e51b7Smrg sni) 3631fe5e51b7Smrg lt_cv_file_magic_cmd='/bin/file' 3632fe5e51b7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3633fe5e51b7Smrg lt_cv_file_magic_test_file=/lib/libc.so 3634fe5e51b7Smrg ;; 3635fe5e51b7Smrg siemens) 3636fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3637fe5e51b7Smrg ;; 3638fe5e51b7Smrg pc) 3639fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3640fe5e51b7Smrg ;; 3641fe5e51b7Smrg esac 3642fe5e51b7Smrg ;; 3643fe5e51b7Smrg 3644a31a186aSmrgtpf*) 3645fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3646fe5e51b7Smrg ;; 3647493f84f4Smrgos2*) 3648493f84f4Smrg lt_cv_deplibs_check_method=pass_all 3649493f84f4Smrg ;; 3650fe5e51b7Smrgesac 3651fe5e51b7Smrg]) 36520bb88ba4Smrg 36530bb88ba4Smrgfile_magic_glob= 36540bb88ba4Smrgwant_nocaseglob=no 36550bb88ba4Smrgif test "$build" = "$host"; then 36560bb88ba4Smrg case $host_os in 36570bb88ba4Smrg mingw* | pw32*) 36580bb88ba4Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 36590bb88ba4Smrg want_nocaseglob=yes 36600bb88ba4Smrg else 36610bb88ba4Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36620bb88ba4Smrg fi 36630bb88ba4Smrg ;; 36640bb88ba4Smrg esac 36650bb88ba4Smrgfi 36660bb88ba4Smrg 3667fe5e51b7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 3668fe5e51b7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 3669fe5e51b7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3670a31a186aSmrg 3671a31a186aSmrg_LT_DECL([], [deplibs_check_method], [1], 3672a31a186aSmrg [Method to check whether dependent libraries are shared objects]) 3673a31a186aSmrg_LT_DECL([], [file_magic_cmd], [1], 36740bb88ba4Smrg [Command to use when deplibs_check_method = "file_magic"]) 36750bb88ba4Smrg_LT_DECL([], [file_magic_glob], [1], 36760bb88ba4Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 36770bb88ba4Smrg_LT_DECL([], [want_nocaseglob], [1], 36780bb88ba4Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3679a31a186aSmrg])# _LT_CHECK_MAGIC_METHOD 3680eda3803bSmrg 3681fe5e51b7Smrg 3682a31a186aSmrg# LT_PATH_NM 3683fe5e51b7Smrg# ---------- 3684a31a186aSmrg# find the pathname to a BSD- or MS-compatible name lister 3685a31a186aSmrgAC_DEFUN([LT_PATH_NM], 3686a31a186aSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3687a31a186aSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3688fe5e51b7Smrg[if test -n "$NM"; then 3689fe5e51b7Smrg # Let the user override the test. 3690493f84f4Smrg lt_cv_path_NM=$NM 3691fe5e51b7Smrgelse 3692493f84f4Smrg lt_nm_to_check=${ac_tool_prefix}nm 3693fe5e51b7Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3694fe5e51b7Smrg lt_nm_to_check="$lt_nm_to_check nm" 3695fe5e51b7Smrg fi 3696fe5e51b7Smrg for lt_tmp_nm in $lt_nm_to_check; do 3697493f84f4Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3698fe5e51b7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3699493f84f4Smrg IFS=$lt_save_ifs 3700fe5e51b7Smrg test -z "$ac_dir" && ac_dir=. 3701493f84f4Smrg tmp_nm=$ac_dir/$lt_tmp_nm 3702493f84f4Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3703fe5e51b7Smrg # Check to see if the nm accepts a BSD-compat flag. 3704493f84f4Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3705fe5e51b7Smrg # nm: unknown option "B" ignored 3706fe5e51b7Smrg # Tru64's nm complains that /dev/null is an invalid object file 3707493f84f4Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3708493f84f4Smrg case $build_os in 3709493f84f4Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3710493f84f4Smrg *) lt_bad_file=/dev/null ;; 3711493f84f4Smrg esac 3712493f84f4Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3713493f84f4Smrg *$lt_bad_file* | *'Invalid file or object type'*) 3714fe5e51b7Smrg lt_cv_path_NM="$tmp_nm -B" 3715493f84f4Smrg break 2 3716fe5e51b7Smrg ;; 3717fe5e51b7Smrg *) 3718fe5e51b7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3719fe5e51b7Smrg */dev/null*) 3720fe5e51b7Smrg lt_cv_path_NM="$tmp_nm -p" 3721493f84f4Smrg break 2 3722fe5e51b7Smrg ;; 3723fe5e51b7Smrg *) 3724fe5e51b7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3725fe5e51b7Smrg continue # so that we can try to find one that supports BSD flags 3726fe5e51b7Smrg ;; 3727fe5e51b7Smrg esac 3728fe5e51b7Smrg ;; 3729fe5e51b7Smrg esac 3730fe5e51b7Smrg fi 3731fe5e51b7Smrg done 3732493f84f4Smrg IFS=$lt_save_ifs 3733fe5e51b7Smrg done 3734a31a186aSmrg : ${lt_cv_path_NM=no} 3735fe5e51b7Smrgfi]) 3736493f84f4Smrgif test no != "$lt_cv_path_NM"; then 3737493f84f4Smrg NM=$lt_cv_path_NM 3738a31a186aSmrgelse 3739a31a186aSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 37400bb88ba4Smrg if test -n "$DUMPBIN"; then : 37410bb88ba4Smrg # Let the user override the test. 37420bb88ba4Smrg else 37430bb88ba4Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3744493f84f4Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 37450bb88ba4Smrg *COFF*) 3746493f84f4Smrg DUMPBIN="$DUMPBIN -symbols -headers" 37470bb88ba4Smrg ;; 37480bb88ba4Smrg *) 37490bb88ba4Smrg DUMPBIN=: 37500bb88ba4Smrg ;; 37510bb88ba4Smrg esac 37520bb88ba4Smrg fi 3753a31a186aSmrg AC_SUBST([DUMPBIN]) 3754493f84f4Smrg if test : != "$DUMPBIN"; then 3755493f84f4Smrg NM=$DUMPBIN 3756a31a186aSmrg fi 3757a31a186aSmrgfi 3758a31a186aSmrgtest -z "$NM" && NM=nm 3759a31a186aSmrgAC_SUBST([NM]) 3760a31a186aSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3761a31a186aSmrg 3762a31a186aSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3763a31a186aSmrg [lt_cv_nm_interface="BSD nm" 3764a31a186aSmrg echo "int some_variable = 0;" > conftest.$ac_ext 37650bb88ba4Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3766a31a186aSmrg (eval "$ac_compile" 2>conftest.err) 3767a31a186aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 37680bb88ba4Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3769a31a186aSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3770a31a186aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 37710bb88ba4Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3772a31a186aSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3773a31a186aSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3774a31a186aSmrg lt_cv_nm_interface="MS dumpbin" 3775a31a186aSmrg fi 3776a31a186aSmrg rm -f conftest*]) 3777a31a186aSmrg])# LT_PATH_NM 3778fe5e51b7Smrg 3779a31a186aSmrg# Old names: 3780a31a186aSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3781a31a186aSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3782a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 3783a31a186aSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3784a31a186aSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3785eda3803bSmrg 37860bb88ba4Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 37870bb88ba4Smrg# -------------------------------- 37880bb88ba4Smrg# how to determine the name of the shared library 37890bb88ba4Smrg# associated with a specific link library. 37900bb88ba4Smrg# -- PORTME fill in with the dynamic library characteristics 37910bb88ba4Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 37920bb88ba4Smrg[m4_require([_LT_DECL_EGREP]) 37930bb88ba4Smrgm4_require([_LT_DECL_OBJDUMP]) 37940bb88ba4Smrgm4_require([_LT_DECL_DLLTOOL]) 37950bb88ba4SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 37960bb88ba4Smrglt_cv_sharedlib_from_linklib_cmd, 37970bb88ba4Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 37980bb88ba4Smrg 37990bb88ba4Smrgcase $host_os in 38000bb88ba4Smrgcygwin* | mingw* | pw32* | cegcc*) 3801493f84f4Smrg # two different shell functions defined in ltmain.sh; 3802493f84f4Smrg # decide which one to use based on capabilities of $DLLTOOL 38030bb88ba4Smrg case `$DLLTOOL --help 2>&1` in 38040bb88ba4Smrg *--identify-strict*) 38050bb88ba4Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 38060bb88ba4Smrg ;; 38070bb88ba4Smrg *) 38080bb88ba4Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 38090bb88ba4Smrg ;; 38100bb88ba4Smrg esac 38110bb88ba4Smrg ;; 38120bb88ba4Smrg*) 38130bb88ba4Smrg # fallback: assume linklib IS sharedlib 3814493f84f4Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 38150bb88ba4Smrg ;; 38160bb88ba4Smrgesac 38170bb88ba4Smrg]) 38180bb88ba4Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 38190bb88ba4Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 38200bb88ba4Smrg 38210bb88ba4Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 38220bb88ba4Smrg [Command to associate shared and link libraries]) 38230bb88ba4Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38240bb88ba4Smrg 38250bb88ba4Smrg 38260bb88ba4Smrg# _LT_PATH_MANIFEST_TOOL 38270bb88ba4Smrg# ---------------------- 38280bb88ba4Smrg# locate the manifest tool 38290bb88ba4Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 38300bb88ba4Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 38310bb88ba4Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 38320bb88ba4SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 38330bb88ba4Smrg [lt_cv_path_mainfest_tool=no 38340bb88ba4Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 38350bb88ba4Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 38360bb88ba4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 38370bb88ba4Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 38380bb88ba4Smrg lt_cv_path_mainfest_tool=yes 38390bb88ba4Smrg fi 38400bb88ba4Smrg rm -f conftest*]) 3841493f84f4Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 38420bb88ba4Smrg MANIFEST_TOOL=: 38430bb88ba4Smrgfi 38440bb88ba4Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 38450bb88ba4Smrg])# _LT_PATH_MANIFEST_TOOL 38460bb88ba4Smrg 3847a31a186aSmrg 3848493f84f4Smrg# _LT_DLL_DEF_P([FILE]) 3849493f84f4Smrg# --------------------- 3850493f84f4Smrg# True iff FILE is a Windows DLL '.def' file. 3851493f84f4Smrg# Keep in sync with func_dll_def_p in the libtool script 3852493f84f4SmrgAC_DEFUN([_LT_DLL_DEF_P], 3853493f84f4Smrg[dnl 3854493f84f4Smrg test DEF = "`$SED -n dnl 3855493f84f4Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3856493f84f4Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3857493f84f4Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3858493f84f4Smrg -e q dnl Only consider the first "real" line 3859493f84f4Smrg $1`" dnl 3860493f84f4Smrg])# _LT_DLL_DEF_P 3861493f84f4Smrg 3862493f84f4Smrg 3863a31a186aSmrg# LT_LIB_M 3864a31a186aSmrg# -------- 3865fe5e51b7Smrg# check for math library 3866a31a186aSmrgAC_DEFUN([LT_LIB_M], 3867fe5e51b7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3868fe5e51b7SmrgLIBM= 3869fe5e51b7Smrgcase $host in 38700bb88ba4Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3871fe5e51b7Smrg # These system don't have libm, or don't need it 3872fe5e51b7Smrg ;; 3873fe5e51b7Smrg*-ncr-sysv4.3*) 3874493f84f4Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3875fe5e51b7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3876fe5e51b7Smrg ;; 3877fe5e51b7Smrg*) 3878493f84f4Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 3879fe5e51b7Smrg ;; 3880fe5e51b7Smrgesac 3881a31a186aSmrgAC_SUBST([LIBM]) 3882a31a186aSmrg])# LT_LIB_M 3883fe5e51b7Smrg 3884a31a186aSmrg# Old name: 3885a31a186aSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3886a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 3887a31a186aSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3888fe5e51b7Smrg 3889fe5e51b7Smrg 3890a31a186aSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3891a31a186aSmrg# ------------------------------- 3892a31a186aSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3893a31a186aSmrg[m4_require([_LT_TAG_COMPILER])dnl 3894fe5e51b7Smrg 3895a31a186aSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3896fe5e51b7Smrg 3897493f84f4Smrgif test yes = "$GCC"; then 38980bb88ba4Smrg case $cc_basename in 38990bb88ba4Smrg nvcc*) 39000bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 39010bb88ba4Smrg *) 39020bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 39030bb88ba4Smrg esac 3904fe5e51b7Smrg 3905a31a186aSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3906a31a186aSmrg lt_cv_prog_compiler_rtti_exceptions, 3907a31a186aSmrg [-fno-rtti -fno-exceptions], [], 3908a31a186aSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3909a31a186aSmrgfi 3910a31a186aSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3911a31a186aSmrg [Compiler flag to turn off builtin functions]) 3912a31a186aSmrg])# _LT_COMPILER_NO_RTTI 3913fe5e51b7Smrg 3914fe5e51b7Smrg 3915a31a186aSmrg# _LT_CMD_GLOBAL_SYMBOLS 3916a31a186aSmrg# ---------------------- 3917a31a186aSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3918a31a186aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3919a31a186aSmrgAC_REQUIRE([AC_PROG_CC])dnl 39200bb88ba4SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3921a31a186aSmrgAC_REQUIRE([LT_PATH_NM])dnl 3922a31a186aSmrgAC_REQUIRE([LT_PATH_LD])dnl 3923a31a186aSmrgm4_require([_LT_DECL_SED])dnl 3924a31a186aSmrgm4_require([_LT_DECL_EGREP])dnl 3925a31a186aSmrgm4_require([_LT_TAG_COMPILER])dnl 3926fe5e51b7Smrg 3927a31a186aSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3928a31a186aSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3929a31a186aSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3930fe5e51b7Smrg[ 3931a31a186aSmrg# These are sane defaults that work on at least a few old systems. 3932a31a186aSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3933fe5e51b7Smrg 3934a31a186aSmrg# Character class describing NM global symbol codes. 3935a31a186aSmrgsymcode='[[BCDEGRST]]' 3936fe5e51b7Smrg 3937a31a186aSmrg# Regexp to match symbols that can be accessed directly from C. 3938a31a186aSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3939fe5e51b7Smrg 3940a31a186aSmrg# Define system-specific variables. 3941a31a186aSmrgcase $host_os in 3942a31a186aSmrgaix*) 3943a31a186aSmrg symcode='[[BCDT]]' 3944a31a186aSmrg ;; 3945a31a186aSmrgcygwin* | mingw* | pw32* | cegcc*) 3946a31a186aSmrg symcode='[[ABCDGISTW]]' 3947a31a186aSmrg ;; 3948a31a186aSmrghpux*) 3949493f84f4Smrg if test ia64 = "$host_cpu"; then 3950a31a186aSmrg symcode='[[ABCDEGRST]]' 3951a31a186aSmrg fi 3952a31a186aSmrg ;; 3953a31a186aSmrgirix* | nonstopux*) 3954a31a186aSmrg symcode='[[BCDEGRST]]' 3955a31a186aSmrg ;; 3956a31a186aSmrgosf*) 3957a31a186aSmrg symcode='[[BCDEGQRST]]' 3958a31a186aSmrg ;; 3959a31a186aSmrgsolaris*) 3960a31a186aSmrg symcode='[[BDRT]]' 3961a31a186aSmrg ;; 3962a31a186aSmrgsco3.2v5*) 3963a31a186aSmrg symcode='[[DT]]' 3964a31a186aSmrg ;; 3965a31a186aSmrgsysv4.2uw2*) 3966a31a186aSmrg symcode='[[DT]]' 3967a31a186aSmrg ;; 3968a31a186aSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3969a31a186aSmrg symcode='[[ABDT]]' 3970a31a186aSmrg ;; 3971a31a186aSmrgsysv4) 3972a31a186aSmrg symcode='[[DFNSTU]]' 3973a31a186aSmrg ;; 3974a31a186aSmrgesac 3975fe5e51b7Smrg 3976a31a186aSmrg# If we're using GNU nm, then use its standard symbol codes. 3977a31a186aSmrgcase `$NM -V 2>&1` in 3978a31a186aSmrg*GNU* | *'with BFD'*) 3979a31a186aSmrg symcode='[[ABCDGIRSTW]]' ;; 3980a31a186aSmrgesac 3981fe5e51b7Smrg 3982493f84f4Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3983493f84f4Smrg # Gets list of data symbols to import. 3984493f84f4Smrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3985493f84f4Smrg # Adjust the below global symbol transforms to fixup imported variables. 3986493f84f4Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3987493f84f4Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3988493f84f4Smrg lt_c_name_lib_hook="\ 3989493f84f4Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3990493f84f4Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3991493f84f4Smrgelse 3992493f84f4Smrg # Disable hooks by default. 3993493f84f4Smrg lt_cv_sys_global_symbol_to_import= 3994493f84f4Smrg lt_cdecl_hook= 3995493f84f4Smrg lt_c_name_hook= 3996493f84f4Smrg lt_c_name_lib_hook= 3997493f84f4Smrgfi 3998493f84f4Smrg 3999a31a186aSmrg# Transform an extracted symbol line into a proper C declaration. 4000a31a186aSmrg# Some systems (esp. on ia64) link data and code symbols differently, 4001a31a186aSmrg# so use this general approach. 4002493f84f4Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 4003493f84f4Smrg$lt_cdecl_hook\ 4004493f84f4Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4005493f84f4Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4006fe5e51b7Smrg 4007a31a186aSmrg# Transform an extracted symbol line into symbol name and symbol address 4008493f84f4Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4009493f84f4Smrg$lt_c_name_hook\ 4010493f84f4Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4011493f84f4Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4012493f84f4Smrg 4013493f84f4Smrg# Transform an extracted symbol line into symbol name with lib prefix and 4014493f84f4Smrg# symbol address. 4015493f84f4Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4016493f84f4Smrg$lt_c_name_lib_hook\ 4017493f84f4Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4018493f84f4Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4019493f84f4Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4020fe5e51b7Smrg 4021a31a186aSmrg# Handle CRLF in mingw tool chain 4022a31a186aSmrgopt_cr= 4023a31a186aSmrgcase $build_os in 4024a31a186aSmrgmingw*) 4025a31a186aSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4026a31a186aSmrg ;; 4027a31a186aSmrgesac 4028fe5e51b7Smrg 4029a31a186aSmrg# Try without a prefix underscore, then with it. 4030a31a186aSmrgfor ac_symprfx in "" "_"; do 4031fe5e51b7Smrg 4032a31a186aSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4033a31a186aSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4034fe5e51b7Smrg 4035a31a186aSmrg # Write the raw and C identifiers. 4036a31a186aSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4037493f84f4Smrg # Fake it for dumpbin and say T for any non-static function, 4038493f84f4Smrg # D for any global variable and I for any imported variable. 4039a31a186aSmrg # Also find C++ and __fastcall symbols from MSVC++, 4040a31a186aSmrg # which start with @ or ?. 4041a31a186aSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4042a31a186aSmrg" {last_section=section; section=\$ 3};"\ 40430bb88ba4Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4044a31a186aSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4045493f84f4Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4046493f84f4Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4047493f84f4Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4048a31a186aSmrg" \$ 0!~/External *\|/{next};"\ 4049a31a186aSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4050a31a186aSmrg" {if(hide[section]) next};"\ 4051493f84f4Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4052493f84f4Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4053493f84f4Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4054493f84f4Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4055a31a186aSmrg" ' prfx=^$ac_symprfx]" 4056a31a186aSmrg else 4057a31a186aSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4058643b027fSmrg fi 40590bb88ba4Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4060fe5e51b7Smrg 4061a31a186aSmrg # Check to see that the pipe works correctly. 4062a31a186aSmrg pipe_works=no 4063fe5e51b7Smrg 4064a31a186aSmrg rm -f conftest* 4065a31a186aSmrg cat > conftest.$ac_ext <<_LT_EOF 4066a31a186aSmrg#ifdef __cplusplus 4067a31a186aSmrgextern "C" { 4068a31a186aSmrg#endif 4069a31a186aSmrgchar nm_test_var; 4070a31a186aSmrgvoid nm_test_func(void); 4071a31a186aSmrgvoid nm_test_func(void){} 4072a31a186aSmrg#ifdef __cplusplus 4073a31a186aSmrg} 4074a31a186aSmrg#endif 4075a31a186aSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 4076a31a186aSmrg_LT_EOF 4077643b027fSmrg 4078a31a186aSmrg if AC_TRY_EVAL(ac_compile); then 4079a31a186aSmrg # Now try to grab the symbols. 4080a31a186aSmrg nlist=conftest.nm 40810bb88ba4Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4082a31a186aSmrg # Try sorting and uniquifying the output. 4083a31a186aSmrg if sort "$nlist" | uniq > "$nlist"T; then 4084a31a186aSmrg mv -f "$nlist"T "$nlist" 4085a31a186aSmrg else 4086a31a186aSmrg rm -f "$nlist"T 4087a31a186aSmrg fi 4088643b027fSmrg 4089a31a186aSmrg # Make sure that we snagged all the symbols we need. 4090a31a186aSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4091a31a186aSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4092a31a186aSmrg cat <<_LT_EOF > conftest.$ac_ext 40930bb88ba4Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4094493f84f4Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4095493f84f4Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 40960bb88ba4Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 40970bb88ba4Smrg# define LT@&t@_DLSYM_CONST 4098493f84f4Smrg#elif defined __osf__ 40990bb88ba4Smrg/* This system does not cope well with relocations in const data. */ 41000bb88ba4Smrg# define LT@&t@_DLSYM_CONST 41010bb88ba4Smrg#else 41020bb88ba4Smrg# define LT@&t@_DLSYM_CONST const 41030bb88ba4Smrg#endif 41040bb88ba4Smrg 4105a31a186aSmrg#ifdef __cplusplus 4106a31a186aSmrgextern "C" { 4107a31a186aSmrg#endif 4108643b027fSmrg 4109a31a186aSmrg_LT_EOF 4110a31a186aSmrg # Now generate the symbol file. 4111a31a186aSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4112643b027fSmrg 4113a31a186aSmrg cat <<_LT_EOF >> conftest.$ac_ext 4114643b027fSmrg 4115a31a186aSmrg/* The mapping between symbol names and symbols. */ 41160bb88ba4SmrgLT@&t@_DLSYM_CONST struct { 4117a31a186aSmrg const char *name; 4118a31a186aSmrg void *address; 4119a31a186aSmrg} 4120a31a186aSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4121a31a186aSmrg{ 4122a31a186aSmrg { "@PROGRAM@", (void *) 0 }, 4123a31a186aSmrg_LT_EOF 4124493f84f4Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4125a31a186aSmrg cat <<\_LT_EOF >> conftest.$ac_ext 4126a31a186aSmrg {0, (void *) 0} 4127a31a186aSmrg}; 4128643b027fSmrg 4129a31a186aSmrg/* This works around a problem in FreeBSD linker */ 4130a31a186aSmrg#ifdef FREEBSD_WORKAROUND 4131a31a186aSmrgstatic const void *lt_preloaded_setup() { 4132a31a186aSmrg return lt__PROGRAM__LTX_preloaded_symbols; 4133a31a186aSmrg} 4134a31a186aSmrg#endif 4135643b027fSmrg 4136a31a186aSmrg#ifdef __cplusplus 4137a31a186aSmrg} 4138a31a186aSmrg#endif 4139a31a186aSmrg_LT_EOF 4140a31a186aSmrg # Now try linking the two files. 4141a31a186aSmrg mv conftest.$ac_objext conftstm.$ac_objext 41420bb88ba4Smrg lt_globsym_save_LIBS=$LIBS 41430bb88ba4Smrg lt_globsym_save_CFLAGS=$CFLAGS 4144493f84f4Smrg LIBS=conftstm.$ac_objext 4145a31a186aSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4146493f84f4Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4147a31a186aSmrg pipe_works=yes 4148a31a186aSmrg fi 41490bb88ba4Smrg LIBS=$lt_globsym_save_LIBS 41500bb88ba4Smrg CFLAGS=$lt_globsym_save_CFLAGS 4151a31a186aSmrg else 4152a31a186aSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4153a31a186aSmrg fi 4154a31a186aSmrg else 4155a31a186aSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4156a31a186aSmrg fi 4157fe5e51b7Smrg else 4158a31a186aSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4159fe5e51b7Smrg fi 4160fe5e51b7Smrg else 4161a31a186aSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4162a31a186aSmrg cat conftest.$ac_ext >&5 4163fe5e51b7Smrg fi 4164a31a186aSmrg rm -rf conftest* conftst* 4165fe5e51b7Smrg 4166a31a186aSmrg # Do not use the global_symbol_pipe unless it works. 4167493f84f4Smrg if test yes = "$pipe_works"; then 4168a31a186aSmrg break 4169a31a186aSmrg else 4170a31a186aSmrg lt_cv_sys_global_symbol_pipe= 4171a31a186aSmrg fi 4172a31a186aSmrgdone 4173a31a186aSmrg]) 4174a31a186aSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4175a31a186aSmrg lt_cv_sys_global_symbol_to_cdecl= 4176a31a186aSmrgfi 4177a31a186aSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4178a31a186aSmrg AC_MSG_RESULT(failed) 4179fe5e51b7Smrgelse 4180a31a186aSmrg AC_MSG_RESULT(ok) 4181fe5e51b7Smrgfi 4182fe5e51b7Smrg 41830bb88ba4Smrg# Response file support. 41840bb88ba4Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 41850bb88ba4Smrg nm_file_list_spec='@' 41860bb88ba4Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 41870bb88ba4Smrg nm_file_list_spec='@' 41880bb88ba4Smrgfi 41890bb88ba4Smrg 4190a31a186aSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4191a31a186aSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 4192a31a186aSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4193a31a186aSmrg [Transform the output of nm in a proper C declaration]) 4194493f84f4Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4195493f84f4Smrg [Transform the output of nm into a list of symbols to manually relocate]) 4196a31a186aSmrg_LT_DECL([global_symbol_to_c_name_address], 4197a31a186aSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4198a31a186aSmrg [Transform the output of nm in a C name address pair]) 4199a31a186aSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4200a31a186aSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4201a31a186aSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4202493f84f4Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4203493f84f4Smrg [The name lister interface]) 42040bb88ba4Smrg_LT_DECL([], [nm_file_list_spec], [1], 42050bb88ba4Smrg [Specify filename containing input files for $NM]) 4206a31a186aSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 4207fe5e51b7Smrg 4208fe5e51b7Smrg 4209a31a186aSmrg# _LT_COMPILER_PIC([TAGNAME]) 4210a31a186aSmrg# --------------------------- 4211a31a186aSmrgm4_defun([_LT_COMPILER_PIC], 4212a31a186aSmrg[m4_require([_LT_TAG_COMPILER])dnl 4213a31a186aSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4214a31a186aSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4215a31a186aSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4216fe5e51b7Smrg 4217a31a186aSmrgm4_if([$1], [CXX], [ 4218a31a186aSmrg # C++ specific cases for pic, static, wl, etc. 4219493f84f4Smrg if test yes = "$GXX"; then 4220a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4221a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4222643b027fSmrg 4223a31a186aSmrg case $host_os in 4224a31a186aSmrg aix*) 4225a31a186aSmrg # All AIX code is PIC. 4226493f84f4Smrg if test ia64 = "$host_cpu"; then 4227a31a186aSmrg # AIX 5 now supports IA64 processor 4228a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4229fe5e51b7Smrg fi 4230493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4231fe5e51b7Smrg ;; 4232fe5e51b7Smrg 4233a31a186aSmrg amigaos*) 4234fe5e51b7Smrg case $host_cpu in 4235a31a186aSmrg powerpc) 4236a31a186aSmrg # see comment about AmigaOS4 .so support 4237a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4238a31a186aSmrg ;; 4239a31a186aSmrg m68k) 4240a31a186aSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4241493f84f4Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4242493f84f4Smrg # like '-m68040'. 4243a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4244fe5e51b7Smrg ;; 4245fe5e51b7Smrg esac 4246643b027fSmrg ;; 4247eda3803bSmrg 4248a31a186aSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4249a31a186aSmrg # PIC is the default for these OSes. 4250a31a186aSmrg ;; 4251a31a186aSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4252a31a186aSmrg # This hack is so that the source file can tell whether it is being 4253a31a186aSmrg # built for inclusion in a dll (and should export symbols for example). 4254a31a186aSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4255a31a186aSmrg # (--disable-auto-import) libraries 4256a31a186aSmrg m4_if([$1], [GCJ], [], 4257a31a186aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4258493f84f4Smrg case $host_os in 4259493f84f4Smrg os2*) 4260493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4261493f84f4Smrg ;; 4262493f84f4Smrg esac 4263a31a186aSmrg ;; 4264a31a186aSmrg darwin* | rhapsody*) 4265a31a186aSmrg # PIC is the default on this platform 4266a31a186aSmrg # Common symbols not allowed in MH_DYLIB files 4267a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4268a31a186aSmrg ;; 4269a31a186aSmrg *djgpp*) 4270a31a186aSmrg # DJGPP does not support shared libraries at all 4271a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4272a31a186aSmrg ;; 42730bb88ba4Smrg haiku*) 42740bb88ba4Smrg # PIC is the default for Haiku. 42750bb88ba4Smrg # The "-static" flag exists, but is broken. 42760bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42770bb88ba4Smrg ;; 4278a31a186aSmrg interix[[3-9]]*) 4279a31a186aSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4280a31a186aSmrg # Instead, we relocate shared libraries at runtime. 4281a31a186aSmrg ;; 4282a31a186aSmrg sysv4*MP*) 4283a31a186aSmrg if test -d /usr/nec; then 4284a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4285a31a186aSmrg fi 4286a31a186aSmrg ;; 4287a31a186aSmrg hpux*) 4288a31a186aSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4289a31a186aSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4290a31a186aSmrg # sets the default TLS model and affects inlining. 4291a31a186aSmrg case $host_cpu in 4292a31a186aSmrg hppa*64*) 4293fe5e51b7Smrg ;; 4294643b027fSmrg *) 4295a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4296fe5e51b7Smrg ;; 4297a31a186aSmrg esac 4298a31a186aSmrg ;; 4299a31a186aSmrg *qnx* | *nto*) 4300a31a186aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4301a31a186aSmrg # it will coredump. 4302a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4303a31a186aSmrg ;; 4304a31a186aSmrg *) 4305a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4306a31a186aSmrg ;; 4307643b027fSmrg esac 4308a31a186aSmrg else 4309a31a186aSmrg case $host_os in 4310a31a186aSmrg aix[[4-9]]*) 4311a31a186aSmrg # All AIX code is PIC. 4312493f84f4Smrg if test ia64 = "$host_cpu"; then 4313a31a186aSmrg # AIX 5 now supports IA64 processor 4314a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4315a31a186aSmrg else 4316a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4317643b027fSmrg fi 4318643b027fSmrg ;; 4319a31a186aSmrg chorus*) 4320a31a186aSmrg case $cc_basename in 4321a31a186aSmrg cxch68*) 4322a31a186aSmrg # Green Hills C++ Compiler 4323a31a186aSmrg # _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" 4324643b027fSmrg ;; 4325fe5e51b7Smrg esac 4326fe5e51b7Smrg ;; 43270bb88ba4Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 43280bb88ba4Smrg # This hack is so that the source file can tell whether it is being 43290bb88ba4Smrg # built for inclusion in a dll (and should export symbols for example). 43300bb88ba4Smrg m4_if([$1], [GCJ], [], 43310bb88ba4Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43320bb88ba4Smrg ;; 4333a31a186aSmrg dgux*) 4334a31a186aSmrg case $cc_basename in 4335a31a186aSmrg ec++*) 4336a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4337a31a186aSmrg ;; 4338a31a186aSmrg ghcx*) 4339a31a186aSmrg # Green Hills C++ Compiler 4340a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4341a31a186aSmrg ;; 4342a31a186aSmrg *) 4343a31a186aSmrg ;; 4344eda3803bSmrg esac 4345fe5e51b7Smrg ;; 4346a31a186aSmrg freebsd* | dragonfly*) 4347a31a186aSmrg # FreeBSD uses GNU C++ 4348fe5e51b7Smrg ;; 4349a31a186aSmrg hpux9* | hpux10* | hpux11*) 4350a31a186aSmrg case $cc_basename in 4351a31a186aSmrg CC*) 4352a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4353493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4354493f84f4Smrg if test ia64 != "$host_cpu"; then 4355a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4356a31a186aSmrg fi 4357a31a186aSmrg ;; 4358a31a186aSmrg aCC*) 4359a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4360493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4361a31a186aSmrg case $host_cpu in 4362a31a186aSmrg hppa*64*|ia64*) 4363a31a186aSmrg # +Z the default 4364a31a186aSmrg ;; 4365a31a186aSmrg *) 4366a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4367a31a186aSmrg ;; 4368a31a186aSmrg esac 4369a31a186aSmrg ;; 4370a31a186aSmrg *) 4371a31a186aSmrg ;; 4372a31a186aSmrg esac 4373fe5e51b7Smrg ;; 4374a31a186aSmrg interix*) 4375a31a186aSmrg # This is c89, which is MS Visual C++ (no shared libs) 4376a31a186aSmrg # Anyone wants to do a port? 4377fe5e51b7Smrg ;; 4378a31a186aSmrg irix5* | irix6* | nonstopux*) 4379a31a186aSmrg case $cc_basename in 4380a31a186aSmrg CC*) 4381a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4382a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4383a31a186aSmrg # CC pic flag -KPIC is the default. 4384a31a186aSmrg ;; 4385a31a186aSmrg *) 4386a31a186aSmrg ;; 4387a31a186aSmrg esac 4388fe5e51b7Smrg ;; 4389493f84f4Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4390a31a186aSmrg case $cc_basename in 4391a31a186aSmrg KCC*) 4392a31a186aSmrg # KAI C++ Compiler 4393a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4394a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4395a31a186aSmrg ;; 4396a31a186aSmrg ecpc* ) 4397493f84f4Smrg # old Intel C++ for x86_64, which still supported -KPIC. 4398a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4400a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4401a31a186aSmrg ;; 4402a31a186aSmrg icpc* ) 4403a31a186aSmrg # Intel C++, used to be incompatible with GCC. 4404a31a186aSmrg # ICC 10 doesn't accept -KPIC any more. 4405a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4406a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4407a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4408a31a186aSmrg ;; 4409a31a186aSmrg pgCC* | pgcpp*) 4410a31a186aSmrg # Portland Group C++ compiler 4411a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4412a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4413a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4414a31a186aSmrg ;; 4415a31a186aSmrg cxx*) 4416a31a186aSmrg # Compaq C++ 4417a31a186aSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4418a31a186aSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4419a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4420a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4421a31a186aSmrg ;; 44220bb88ba4Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44230bb88ba4Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4424a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4425a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4426a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4427a31a186aSmrg ;; 4428a31a186aSmrg *) 4429a31a186aSmrg case `$CC -V 2>&1 | sed 5q` in 4430a31a186aSmrg *Sun\ C*) 4431a31a186aSmrg # Sun C++ 5.9 4432a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4433a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4434a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4435a31a186aSmrg ;; 4436a31a186aSmrg esac 4437a31a186aSmrg ;; 4438a31a186aSmrg esac 4439fe5e51b7Smrg ;; 4440a31a186aSmrg lynxos*) 4441fe5e51b7Smrg ;; 4442a31a186aSmrg m88k*) 4443fe5e51b7Smrg ;; 4444a31a186aSmrg mvs*) 4445a31a186aSmrg case $cc_basename in 4446a31a186aSmrg cxx*) 4447a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4448a31a186aSmrg ;; 4449a31a186aSmrg *) 4450a31a186aSmrg ;; 4451a31a186aSmrg esac 4452fe5e51b7Smrg ;; 4453b0de6900Smrg netbsd* | netbsdelf*-gnu) 4454643b027fSmrg ;; 4455a31a186aSmrg *qnx* | *nto*) 4456a31a186aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4457a31a186aSmrg # it will coredump. 4458a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4459a31a186aSmrg ;; 4460a31a186aSmrg osf3* | osf4* | osf5*) 4461a31a186aSmrg case $cc_basename in 4462a31a186aSmrg KCC*) 4463a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4464a31a186aSmrg ;; 4465a31a186aSmrg RCC*) 4466a31a186aSmrg # Rational C++ 2.4.1 4467a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4468a31a186aSmrg ;; 4469a31a186aSmrg cxx*) 4470a31a186aSmrg # Digital/Compaq C++ 4471a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4472a31a186aSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4473a31a186aSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4474a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4475a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4476a31a186aSmrg ;; 4477a31a186aSmrg *) 4478a31a186aSmrg ;; 4479a31a186aSmrg esac 4480643b027fSmrg ;; 4481a31a186aSmrg psos*) 4482643b027fSmrg ;; 4483a31a186aSmrg solaris*) 4484a31a186aSmrg case $cc_basename in 44850bb88ba4Smrg CC* | sunCC*) 4486a31a186aSmrg # Sun C++ 4.2, 5.x and Centerline C++ 4487a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4488a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4489a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4490a31a186aSmrg ;; 4491a31a186aSmrg gcx*) 4492a31a186aSmrg # Green Hills C++ Compiler 4493a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4494a31a186aSmrg ;; 4495a31a186aSmrg *) 4496a31a186aSmrg ;; 4497a31a186aSmrg esac 4498643b027fSmrg ;; 4499a31a186aSmrg sunos4*) 4500a31a186aSmrg case $cc_basename in 4501a31a186aSmrg CC*) 4502a31a186aSmrg # Sun C++ 4.x 4503a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4504a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4505a31a186aSmrg ;; 4506a31a186aSmrg lcc*) 4507a31a186aSmrg # Lucid 4508a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4509a31a186aSmrg ;; 4510fe5e51b7Smrg *) 4511fe5e51b7Smrg ;; 4512fe5e51b7Smrg esac 4513fe5e51b7Smrg ;; 4514a31a186aSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4515a31a186aSmrg case $cc_basename in 4516a31a186aSmrg CC*) 4517a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4518a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4519a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4520a31a186aSmrg ;; 4521a31a186aSmrg esac 4522fe5e51b7Smrg ;; 4523a31a186aSmrg tandem*) 4524a31a186aSmrg case $cc_basename in 4525a31a186aSmrg NCC*) 4526a31a186aSmrg # NonStop-UX NCC 3.20 4527a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4528a31a186aSmrg ;; 4529643b027fSmrg *) 4530643b027fSmrg ;; 4531a31a186aSmrg esac 4532643b027fSmrg ;; 4533a31a186aSmrg vxworks*) 4534fe5e51b7Smrg ;; 4535fe5e51b7Smrg *) 4536a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4537fe5e51b7Smrg ;; 4538fe5e51b7Smrg esac 4539a31a186aSmrg fi 4540a31a186aSmrg], 4541a31a186aSmrg[ 4542493f84f4Smrg if test yes = "$GCC"; then 4543a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4544a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4545a31a186aSmrg 4546a31a186aSmrg case $host_os in 4547a31a186aSmrg aix*) 4548a31a186aSmrg # All AIX code is PIC. 4549493f84f4Smrg if test ia64 = "$host_cpu"; then 4550a31a186aSmrg # AIX 5 now supports IA64 processor 4551a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4552a31a186aSmrg fi 4553493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4554a31a186aSmrg ;; 4555a31a186aSmrg 4556a31a186aSmrg amigaos*) 4557a31a186aSmrg case $host_cpu in 4558a31a186aSmrg powerpc) 4559a31a186aSmrg # see comment about AmigaOS4 .so support 4560a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4561a31a186aSmrg ;; 4562a31a186aSmrg m68k) 4563a31a186aSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4564493f84f4Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4565493f84f4Smrg # like '-m68040'. 4566a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4567a31a186aSmrg ;; 4568a31a186aSmrg esac 4569a31a186aSmrg ;; 4570a31a186aSmrg 4571a31a186aSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4572a31a186aSmrg # PIC is the default for these OSes. 4573a31a186aSmrg ;; 4574a31a186aSmrg 4575a31a186aSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4576a31a186aSmrg # This hack is so that the source file can tell whether it is being 4577a31a186aSmrg # built for inclusion in a dll (and should export symbols for example). 4578a31a186aSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4579a31a186aSmrg # (--disable-auto-import) libraries 4580a31a186aSmrg m4_if([$1], [GCJ], [], 4581a31a186aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4582493f84f4Smrg case $host_os in 4583493f84f4Smrg os2*) 4584493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4585493f84f4Smrg ;; 4586493f84f4Smrg esac 4587a31a186aSmrg ;; 4588a31a186aSmrg 4589a31a186aSmrg darwin* | rhapsody*) 4590a31a186aSmrg # PIC is the default on this platform 4591a31a186aSmrg # Common symbols not allowed in MH_DYLIB files 4592a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4593a31a186aSmrg ;; 4594a31a186aSmrg 45950bb88ba4Smrg haiku*) 45960bb88ba4Smrg # PIC is the default for Haiku. 45970bb88ba4Smrg # The "-static" flag exists, but is broken. 45980bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 45990bb88ba4Smrg ;; 46000bb88ba4Smrg 4601a31a186aSmrg hpux*) 4602a31a186aSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4603a31a186aSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4604a31a186aSmrg # sets the default TLS model and affects inlining. 4605a31a186aSmrg case $host_cpu in 4606a31a186aSmrg hppa*64*) 4607a31a186aSmrg # +Z the default 4608fe5e51b7Smrg ;; 4609fe5e51b7Smrg *) 4610a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4611eda3803bSmrg ;; 4612a31a186aSmrg esac 4613a31a186aSmrg ;; 4614a31a186aSmrg 4615a31a186aSmrg interix[[3-9]]*) 4616a31a186aSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4617a31a186aSmrg # Instead, we relocate shared libraries at runtime. 4618a31a186aSmrg ;; 4619a31a186aSmrg 4620a31a186aSmrg msdosdjgpp*) 4621a31a186aSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4622a31a186aSmrg # on systems that don't support them. 4623a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4624a31a186aSmrg enable_shared=no 4625a31a186aSmrg ;; 4626a31a186aSmrg 4627a31a186aSmrg *nto* | *qnx*) 4628a31a186aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4629a31a186aSmrg # it will coredump. 4630a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4631a31a186aSmrg ;; 4632a31a186aSmrg 4633a31a186aSmrg sysv4*MP*) 4634a31a186aSmrg if test -d /usr/nec; then 4635a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4636a31a186aSmrg fi 4637a31a186aSmrg ;; 4638a31a186aSmrg 4639a31a186aSmrg *) 4640a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4641a31a186aSmrg ;; 4642643b027fSmrg esac 46430bb88ba4Smrg 46440bb88ba4Smrg case $cc_basename in 46450bb88ba4Smrg nvcc*) # Cuda Compiler Driver 2.2 46460bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 46470bb88ba4Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 46480bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 46490bb88ba4Smrg fi 46500bb88ba4Smrg ;; 46510bb88ba4Smrg esac 4652a31a186aSmrg else 4653a31a186aSmrg # PORTME Check for flag to pass linker flags through the system compiler. 4654a31a186aSmrg case $host_os in 4655a31a186aSmrg aix*) 4656a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4657493f84f4Smrg if test ia64 = "$host_cpu"; then 4658a31a186aSmrg # AIX 5 now supports IA64 processor 4659a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4660a31a186aSmrg else 4661a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4662a31a186aSmrg fi 4663a31a186aSmrg ;; 4664a31a186aSmrg 4665493f84f4Smrg darwin* | rhapsody*) 4666493f84f4Smrg # PIC is the default on this platform 4667493f84f4Smrg # Common symbols not allowed in MH_DYLIB files 4668493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4669493f84f4Smrg case $cc_basename in 4670493f84f4Smrg nagfor*) 4671493f84f4Smrg # NAG Fortran compiler 4672493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4673493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4674493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4675493f84f4Smrg ;; 4676493f84f4Smrg esac 4677493f84f4Smrg ;; 4678493f84f4Smrg 4679a31a186aSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4680a31a186aSmrg # This hack is so that the source file can tell whether it is being 4681a31a186aSmrg # built for inclusion in a dll (and should export symbols for example). 4682a31a186aSmrg m4_if([$1], [GCJ], [], 4683a31a186aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4684493f84f4Smrg case $host_os in 4685493f84f4Smrg os2*) 4686493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4687493f84f4Smrg ;; 4688493f84f4Smrg esac 4689a31a186aSmrg ;; 4690a31a186aSmrg 4691a31a186aSmrg hpux9* | hpux10* | hpux11*) 4692a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4693a31a186aSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4694a31a186aSmrg # not for PA HP-UX. 4695a31a186aSmrg case $host_cpu in 4696a31a186aSmrg hppa*64*|ia64*) 4697a31a186aSmrg # +Z the default 4698fe5e51b7Smrg ;; 4699fe5e51b7Smrg *) 4700a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4701fe5e51b7Smrg ;; 4702a31a186aSmrg esac 4703a31a186aSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4704493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4705a31a186aSmrg ;; 4706fe5e51b7Smrg 4707a31a186aSmrg irix5* | irix6* | nonstopux*) 4708a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4709a31a186aSmrg # PIC (with -KPIC) is the default. 4710a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4711a31a186aSmrg ;; 4712fe5e51b7Smrg 4713493f84f4Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4714a31a186aSmrg case $cc_basename in 4715493f84f4Smrg # old Intel for x86_64, which still supported -KPIC. 4716a31a186aSmrg ecc*) 4717a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4718a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4719a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4720a31a186aSmrg ;; 4721a31a186aSmrg # icc used to be incompatible with GCC. 4722a31a186aSmrg # ICC 10 doesn't accept -KPIC any more. 4723a31a186aSmrg icc* | ifort*) 4724a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4725a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4726a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4727a31a186aSmrg ;; 4728a31a186aSmrg # Lahey Fortran 8.1. 4729a31a186aSmrg lf95*) 4730a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4731a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4732a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4733a31a186aSmrg ;; 47340bb88ba4Smrg nagfor*) 47350bb88ba4Smrg # NAG Fortran compiler 47360bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47370bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47380bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47390bb88ba4Smrg ;; 4740493f84f4Smrg tcc*) 4741493f84f4Smrg # Fabrice Bellard et al's Tiny C Compiler 4742493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4743493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4744493f84f4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4745493f84f4Smrg ;; 47460bb88ba4Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4747a31a186aSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 4748a31a186aSmrg # which looks to be a dead project) 4749a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4750a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4751a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4752a31a186aSmrg ;; 4753a31a186aSmrg ccc*) 4754a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4755a31a186aSmrg # All Alpha code is PIC. 4756a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4757a31a186aSmrg ;; 47580bb88ba4Smrg xl* | bgxl* | bgf* | mpixl*) 47590bb88ba4Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4760a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4761a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4762a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4763a31a186aSmrg ;; 4764a31a186aSmrg *) 4765a31a186aSmrg case `$CC -V 2>&1 | sed 5q` in 47660bb88ba4Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47670bb88ba4Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47680bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47690bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47700bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47710bb88ba4Smrg ;; 47720bb88ba4Smrg *Sun\ F* | *Sun*Fortran*) 47730bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47740bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47750bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 47760bb88ba4Smrg ;; 4777a31a186aSmrg *Sun\ C*) 4778a31a186aSmrg # Sun C 5.9 4779a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4780a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4781a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4782a31a186aSmrg ;; 47830bb88ba4Smrg *Intel*\ [[CF]]*Compiler*) 47840bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47850bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47860bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47870bb88ba4Smrg ;; 47880bb88ba4Smrg *Portland\ Group*) 47890bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47900bb88ba4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4791a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4792a31a186aSmrg ;; 4793a31a186aSmrg esac 4794a31a186aSmrg ;; 4795a31a186aSmrg esac 4796a31a186aSmrg ;; 4797fe5e51b7Smrg 4798a31a186aSmrg newsos6) 4799a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4800a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4801a31a186aSmrg ;; 4802fe5e51b7Smrg 4803a31a186aSmrg *nto* | *qnx*) 4804a31a186aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4805a31a186aSmrg # it will coredump. 4806a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4807a31a186aSmrg ;; 4808fe5e51b7Smrg 4809a31a186aSmrg osf3* | osf4* | osf5*) 4810a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4811a31a186aSmrg # All OSF/1 code is PIC. 4812a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4813a31a186aSmrg ;; 4814fe5e51b7Smrg 4815a31a186aSmrg rdos*) 4816a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4817a31a186aSmrg ;; 4818fe5e51b7Smrg 4819a31a186aSmrg solaris*) 4820a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4821a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4822a31a186aSmrg case $cc_basename in 48230bb88ba4Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4824a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4825a31a186aSmrg *) 4826a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4827a31a186aSmrg esac 4828a31a186aSmrg ;; 4829fe5e51b7Smrg 4830a31a186aSmrg sunos4*) 4831a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4832a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4833a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4834a31a186aSmrg ;; 4835fe5e51b7Smrg 4836a31a186aSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4837a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4838a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4839a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4840a31a186aSmrg ;; 4841fe5e51b7Smrg 4842a31a186aSmrg sysv4*MP*) 4843493f84f4Smrg if test -d /usr/nec; then 4844a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4845a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4846a31a186aSmrg fi 4847a31a186aSmrg ;; 4848fe5e51b7Smrg 4849a31a186aSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4850a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4851a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4852a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4853a31a186aSmrg ;; 4854643b027fSmrg 4855a31a186aSmrg unicos*) 4856a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4857a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4858a31a186aSmrg ;; 4859fe5e51b7Smrg 4860a31a186aSmrg uts4*) 4861a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4862a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4863a31a186aSmrg ;; 4864a31a186aSmrg 4865a31a186aSmrg *) 4866a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4867a31a186aSmrg ;; 4868fe5e51b7Smrg esac 4869a31a186aSmrg fi 4870a31a186aSmrg]) 4871a31a186aSmrgcase $host_os in 4872493f84f4Smrg # For platforms that do not support PIC, -DPIC is meaningless: 4873a31a186aSmrg *djgpp*) 4874a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4875a31a186aSmrg ;; 4876a31a186aSmrg *) 4877a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4878a31a186aSmrg ;; 4879a31a186aSmrgesac 48800bb88ba4Smrg 48810bb88ba4SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 48820bb88ba4Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 48830bb88ba4Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 48840bb88ba4Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4885fe5e51b7Smrg 4886a31a186aSmrg# 4887a31a186aSmrg# Check to make sure the PIC flag actually works. 4888a31a186aSmrg# 4889a31a186aSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4890a31a186aSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4891a31a186aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4892a31a186aSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4893a31a186aSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4894a31a186aSmrg "" | " "*) ;; 4895a31a186aSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4896a31a186aSmrg esac], 4897a31a186aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4898a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4899fe5e51b7Smrgfi 4900a31a186aSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4901a31a186aSmrg [Additional compiler flags for building library objects]) 4902fe5e51b7Smrg 49030bb88ba4Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 49040bb88ba4Smrg [How to pass a linker flag through the compiler]) 4905a31a186aSmrg# 4906a31a186aSmrg# Check to make sure the static flag actually works. 4907a31a186aSmrg# 4908a31a186aSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4909a31a186aSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4910a31a186aSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4911a31a186aSmrg $lt_tmp_static_flag, 4912a31a186aSmrg [], 4913a31a186aSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4914a31a186aSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4915a31a186aSmrg [Compiler flag to prevent dynamic linking]) 4916a31a186aSmrg])# _LT_COMPILER_PIC 4917fe5e51b7Smrg 4918643b027fSmrg 4919a31a186aSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4920a31a186aSmrg# ---------------------------- 4921a31a186aSmrg# See if the linker supports building shared libraries. 4922a31a186aSmrgm4_defun([_LT_LINKER_SHLIBS], 4923a31a186aSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4924a31a186aSmrgAC_REQUIRE([LT_PATH_NM])dnl 49250bb88ba4Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4926a31a186aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4927a31a186aSmrgm4_require([_LT_DECL_EGREP])dnl 4928a31a186aSmrgm4_require([_LT_DECL_SED])dnl 4929a31a186aSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4930a31a186aSmrgm4_require([_LT_TAG_COMPILER])dnl 4931a31a186aSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4932a31a186aSmrgm4_if([$1], [CXX], [ 4933a31a186aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49340bb88ba4Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4935a31a186aSmrg case $host_os in 4936a31a186aSmrg aix[[4-9]]*) 4937a31a186aSmrg # If we're using GNU nm, then we don't want the "-C" option. 4938493f84f4Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4939493f84f4Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4940493f84f4Smrg # weak defined symbols like other global defined symbols, whereas 4941493f84f4Smrg # GNU nm marks them as "W". 4942493f84f4Smrg # While the 'weak' keyword is ignored in the Export File, we need 4943493f84f4Smrg # it in the Import File for the 'aix-soname' feature, so we have 4944493f84f4Smrg # to replace the "-B" option with "-P" for AIX nm. 4945a31a186aSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4946493f84f4Smrg _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' 4947a31a186aSmrg else 4948493f84f4Smrg _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' 4949fe5e51b7Smrg fi 4950fe5e51b7Smrg ;; 4951a31a186aSmrg pw32*) 4952493f84f4Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49530bb88ba4Smrg ;; 4954a31a186aSmrg cygwin* | mingw* | cegcc*) 49550bb88ba4Smrg case $cc_basename in 49560bb88ba4Smrg cl*) 49570bb88ba4Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 49580bb88ba4Smrg ;; 49590bb88ba4Smrg *) 49600bb88ba4Smrg _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' 49610bb88ba4Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49620bb88ba4Smrg ;; 49630bb88ba4Smrg esac 49640bb88ba4Smrg ;; 4965b0de6900Smrg linux* | k*bsd*-gnu | gnu*) 4966b0de6900Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 4967b0de6900Smrg ;; 4968a31a186aSmrg *) 4969a31a186aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49700bb88ba4Smrg ;; 4971a31a186aSmrg esac 4972a31a186aSmrg], [ 4973a31a186aSmrg runpath_var= 4974a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4975a31a186aSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4976a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)= 4977a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4978a31a186aSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4979a31a186aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4980a31a186aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4981a31a186aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4982a31a186aSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4983a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4984a31a186aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4985a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4986a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4987a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4988a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4989a31a186aSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4990a31a186aSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4991a31a186aSmrg _LT_TAGVAR(module_cmds, $1)= 4992a31a186aSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 4993a31a186aSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4994a31a186aSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4995a31a186aSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4996a31a186aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4997a31a186aSmrg # include_expsyms should be a list of space-separated symbols to be *always* 4998a31a186aSmrg # included in the symbol list 4999a31a186aSmrg _LT_TAGVAR(include_expsyms, $1)= 5000a31a186aSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 5001493f84f4Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 5002493f84f4Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5003493f84f4Smrg # as well as any symbol that contains 'd'. 5004a31a186aSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5005a31a186aSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5006a31a186aSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 5007a31a186aSmrg # the symbol is explicitly referenced. Since portable code cannot 5008a31a186aSmrg # rely on this symbol name, it's probably fine to never include it in 5009a31a186aSmrg # preloaded symbol tables. 5010a31a186aSmrg # Exclude shared library initialization/finalization symbols. 5011a31a186aSmrgdnl Note also adjust exclude_expsyms for C++ above. 5012a31a186aSmrg extract_expsyms_cmds= 5013fe5e51b7Smrg 5014a31a186aSmrg case $host_os in 5015a31a186aSmrg cygwin* | mingw* | pw32* | cegcc*) 5016a31a186aSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5017a31a186aSmrg # When not using gcc, we currently assume that we are using 5018a31a186aSmrg # Microsoft Visual C++. 5019493f84f4Smrg if test yes != "$GCC"; then 5020a31a186aSmrg with_gnu_ld=no 5021fe5e51b7Smrg fi 5022fe5e51b7Smrg ;; 5023a31a186aSmrg interix*) 5024a31a186aSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5025a31a186aSmrg with_gnu_ld=yes 5026a31a186aSmrg ;; 5027493f84f4Smrg openbsd* | bitrig*) 5028a31a186aSmrg with_gnu_ld=no 5029a31a186aSmrg ;; 5030b0de6900Smrg linux* | k*bsd*-gnu | gnu*) 5031b0de6900Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 5032b0de6900Smrg ;; 5033fe5e51b7Smrg esac 5034fe5e51b7Smrg 5035a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 50360bb88ba4Smrg 50370bb88ba4Smrg # On some targets, GNU ld is compatible enough with the native linker 50380bb88ba4Smrg # that we're better off using the native interface for both. 50390bb88ba4Smrg lt_use_gnu_ld_interface=no 5040493f84f4Smrg if test yes = "$with_gnu_ld"; then 50410bb88ba4Smrg case $host_os in 50420bb88ba4Smrg aix*) 50430bb88ba4Smrg # The AIX port of GNU ld has always aspired to compatibility 50440bb88ba4Smrg # with the native linker. However, as the warning in the GNU ld 50450bb88ba4Smrg # block says, versions before 2.19.5* couldn't really create working 50460bb88ba4Smrg # shared libraries, regardless of the interface used. 50470bb88ba4Smrg case `$LD -v 2>&1` in 50480bb88ba4Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50490bb88ba4Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50500bb88ba4Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50510bb88ba4Smrg *) 50520bb88ba4Smrg lt_use_gnu_ld_interface=yes 50530bb88ba4Smrg ;; 50540bb88ba4Smrg esac 50550bb88ba4Smrg ;; 50560bb88ba4Smrg *) 50570bb88ba4Smrg lt_use_gnu_ld_interface=yes 50580bb88ba4Smrg ;; 50590bb88ba4Smrg esac 50600bb88ba4Smrg fi 50610bb88ba4Smrg 5062493f84f4Smrg if test yes = "$lt_use_gnu_ld_interface"; then 5063a31a186aSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5064493f84f4Smrg wlarc='$wl' 5065fe5e51b7Smrg 5066a31a186aSmrg # Set some defaults for GNU ld with shared library support. These 5067a31a186aSmrg # are reset later if shared libraries are not supported. Putting them 5068a31a186aSmrg # here allows them to be overridden if necessary. 5069a31a186aSmrg runpath_var=LD_RUN_PATH 5070493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5071493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5072a31a186aSmrg # ancient GNU ld didn't support --whole-archive et. al. 5073a31a186aSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5074493f84f4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5075a31a186aSmrg else 5076a31a186aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5077a31a186aSmrg fi 5078a31a186aSmrg supports_anon_versioning=no 5079493f84f4Smrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 50800bb88ba4Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 5081a31a186aSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5082a31a186aSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5083a31a186aSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5084a31a186aSmrg *\ 2.11.*) ;; # other 2.11 versions 5085a31a186aSmrg *) supports_anon_versioning=yes ;; 5086a31a186aSmrg esac 5087fe5e51b7Smrg 5088a31a186aSmrg # See if GNU ld supports shared libraries. 5089a31a186aSmrg case $host_os in 5090a31a186aSmrg aix[[3-9]]*) 5091a31a186aSmrg # On AIX/PPC, the GNU linker is very broken 5092493f84f4Smrg if test ia64 != "$host_cpu"; then 5093a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5094a31a186aSmrg cat <<_LT_EOF 1>&2 5095fe5e51b7Smrg 50960bb88ba4Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5097a31a186aSmrg*** to be unable to reliably create shared libraries on AIX. 5098a31a186aSmrg*** Therefore, libtool is disabling shared libraries support. If you 50990bb88ba4Smrg*** really care for shared libraries, you may want to install binutils 51000bb88ba4Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 51010bb88ba4Smrg*** You will then need to restart the configuration process. 5102fe5e51b7Smrg 5103a31a186aSmrg_LT_EOF 5104a31a186aSmrg fi 5105a31a186aSmrg ;; 5106fe5e51b7Smrg 5107a31a186aSmrg amigaos*) 5108a31a186aSmrg case $host_cpu in 5109a31a186aSmrg powerpc) 5110a31a186aSmrg # see comment about AmigaOS4 .so support 5111493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5112a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5113a31a186aSmrg ;; 5114a31a186aSmrg m68k) 5115a31a186aSmrg _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)' 5116a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5117a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5118a31a186aSmrg ;; 5119a31a186aSmrg esac 5120a31a186aSmrg ;; 5121fe5e51b7Smrg 5122a31a186aSmrg beos*) 5123a31a186aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5124a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5125a31a186aSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5126a31a186aSmrg # support --undefined. This deserves some investigation. FIXME 5127493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5128a31a186aSmrg else 5129a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5130a31a186aSmrg fi 5131a31a186aSmrg ;; 5132fe5e51b7Smrg 5133a31a186aSmrg cygwin* | mingw* | pw32* | cegcc*) 5134a31a186aSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5135a31a186aSmrg # as there is no search path for DLLs. 5136a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5137493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5138a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5139a31a186aSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5140a31a186aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51410bb88ba4Smrg _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' 51420bb88ba4Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5143a31a186aSmrg 5144a31a186aSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5145493f84f4Smrg _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' 5146493f84f4Smrg # If the export-symbols file already is a .def file, use it as 5147493f84f4Smrg # is; otherwise, prepend EXPORTS... 5148493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5149493f84f4Smrg cp $export_symbols $output_objdir/$soname.def; 5150493f84f4Smrg else 5151493f84f4Smrg echo EXPORTS > $output_objdir/$soname.def; 5152493f84f4Smrg cat $export_symbols >> $output_objdir/$soname.def; 5153493f84f4Smrg fi~ 5154493f84f4Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5155a31a186aSmrg else 5156a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5157a31a186aSmrg fi 5158a31a186aSmrg ;; 5159fe5e51b7Smrg 51600bb88ba4Smrg haiku*) 5161493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51620bb88ba4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51630bb88ba4Smrg ;; 51640bb88ba4Smrg 5165493f84f4Smrg os2*) 5166493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5167493f84f4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5168493f84f4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5169493f84f4Smrg shrext_cmds=.dll 5170493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5171493f84f4Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5172493f84f4Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5173493f84f4Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5174493f84f4Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5175493f84f4Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5176493f84f4Smrg emximp -o $lib $output_objdir/$libname.def' 5177493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5178493f84f4Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5179493f84f4Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5180493f84f4Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5181493f84f4Smrg prefix_cmds="$SED"~ 5182493f84f4Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5183493f84f4Smrg prefix_cmds="$prefix_cmds -e 1d"; 5184493f84f4Smrg fi~ 5185493f84f4Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5186493f84f4Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5187493f84f4Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5188493f84f4Smrg emximp -o $lib $output_objdir/$libname.def' 5189493f84f4Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5190493f84f4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5191493f84f4Smrg ;; 5192493f84f4Smrg 5193a31a186aSmrg interix[[3-9]]*) 5194a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5195a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5196493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5197493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5198a31a186aSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5199a31a186aSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5200a31a186aSmrg # default) and relocated if they conflict, which is a slow very memory 5201a31a186aSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5202a31a186aSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5203a31a186aSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5204493f84f4Smrg _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' 5205493f84f4Smrg _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' 5206a31a186aSmrg ;; 5207fe5e51b7Smrg 52080bb88ba4Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5209a31a186aSmrg tmp_diet=no 5210493f84f4Smrg if test linux-dietlibc = "$host_os"; then 5211a31a186aSmrg case $cc_basename in 5212a31a186aSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5213a31a186aSmrg esac 5214a31a186aSmrg fi 5215a31a186aSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5216493f84f4Smrg && test no = "$tmp_diet" 5217a31a186aSmrg then 52180bb88ba4Smrg tmp_addflag=' $pic_flag' 5219a31a186aSmrg tmp_sharedflag='-shared' 5220a31a186aSmrg case $cc_basename,$host_cpu in 5221a31a186aSmrg pgcc*) # Portland Group C compiler 5222493f84f4Smrg _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' 5223a31a186aSmrg tmp_addflag=' $pic_flag' 5224a31a186aSmrg ;; 52250bb88ba4Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 52260bb88ba4Smrg # Portland Group f77 and f90 compilers 5227493f84f4Smrg _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' 5228a31a186aSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 5229a31a186aSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5230a31a186aSmrg tmp_addflag=' -i_dynamic' ;; 5231a31a186aSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5232a31a186aSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5233a31a186aSmrg ifc* | ifort*) # Intel Fortran compiler 5234a31a186aSmrg tmp_addflag=' -nofor_main' ;; 5235a31a186aSmrg lf95*) # Lahey Fortran 8.1 5236a31a186aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5237a31a186aSmrg tmp_sharedflag='--shared' ;; 5238493f84f4Smrg nagfor*) # NAGFOR 5.3 5239493f84f4Smrg tmp_sharedflag='-Wl,-shared' ;; 52400bb88ba4Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5241a31a186aSmrg tmp_sharedflag='-qmkshrobj' 5242a31a186aSmrg tmp_addflag= ;; 52430bb88ba4Smrg nvcc*) # Cuda Compiler Driver 2.2 5244493f84f4Smrg _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' 52450bb88ba4Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52460bb88ba4Smrg ;; 5247a31a186aSmrg esac 5248a31a186aSmrg case `$CC -V 2>&1 | sed 5q` in 5249a31a186aSmrg *Sun\ C*) # Sun C 5.9 5250493f84f4Smrg _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' 5251a31a186aSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5252a31a186aSmrg tmp_sharedflag='-G' ;; 5253a31a186aSmrg *Sun\ F*) # Sun Fortran 8.3 5254a31a186aSmrg tmp_sharedflag='-G' ;; 5255a31a186aSmrg esac 5256493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5257fe5e51b7Smrg 5258493f84f4Smrg if test yes = "$supports_anon_versioning"; then 5259a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5260493f84f4Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5261493f84f4Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5262493f84f4Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5263a31a186aSmrg fi 5264fe5e51b7Smrg 5265a31a186aSmrg case $cc_basename in 5266493f84f4Smrg tcc*) 5267493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5268493f84f4Smrg ;; 52690bb88ba4Smrg xlf* | bgf* | bgxlf* | mpixlf*) 5270a31a186aSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5271a31a186aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5272493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52730bb88ba4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5274493f84f4Smrg if test yes = "$supports_anon_versioning"; then 5275a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5276493f84f4Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5277493f84f4Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5278493f84f4Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5279a31a186aSmrg fi 5280a31a186aSmrg ;; 5281a31a186aSmrg esac 5282a31a186aSmrg else 5283a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5284a31a186aSmrg fi 5285a31a186aSmrg ;; 5286fe5e51b7Smrg 5287b0de6900Smrg netbsd* | netbsdelf*-gnu) 5288a31a186aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5289a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5290a31a186aSmrg wlarc= 5291a31a186aSmrg else 5292493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5293493f84f4Smrg _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' 5294a31a186aSmrg fi 5295a31a186aSmrg ;; 5296fe5e51b7Smrg 5297a31a186aSmrg solaris*) 5298a31a186aSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5299a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5300a31a186aSmrg cat <<_LT_EOF 1>&2 5301fe5e51b7Smrg 5302a31a186aSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5303a31a186aSmrg*** create shared libraries on Solaris systems. Therefore, libtool 5304a31a186aSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5305a31a186aSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 5306a31a186aSmrg*** your PATH or compiler configuration so that the native linker is 5307a31a186aSmrg*** used, and then restart. 5308fe5e51b7Smrg 5309a31a186aSmrg_LT_EOF 5310a31a186aSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5311493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5312493f84f4Smrg _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' 5313a31a186aSmrg else 5314a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5315a31a186aSmrg fi 5316a31a186aSmrg ;; 5317fe5e51b7Smrg 5318a31a186aSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5319a31a186aSmrg case `$LD -v 2>&1` in 5320a31a186aSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5321a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5322a31a186aSmrg cat <<_LT_EOF 1>&2 5323fe5e51b7Smrg 5324493f84f4Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5325a31a186aSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5326a31a186aSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5327a31a186aSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5328a31a186aSmrg*** your PATH or compiler configuration so that the native linker is 5329a31a186aSmrg*** used, and then restart. 5330fe5e51b7Smrg 5331a31a186aSmrg_LT_EOF 5332a31a186aSmrg ;; 5333a31a186aSmrg *) 5334a31a186aSmrg # For security reasons, it is highly recommended that you always 5335a31a186aSmrg # use absolute paths for naming shared libraries, and exclude the 5336a31a186aSmrg # DT_RUNPATH tag from executables and libraries. But doing so 5337a31a186aSmrg # requires that you compile everything twice, which is a pain. 5338a31a186aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5339493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5340493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5341493f84f4Smrg _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' 5342a31a186aSmrg else 5343a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5344a31a186aSmrg fi 5345a31a186aSmrg ;; 5346a31a186aSmrg esac 5347a31a186aSmrg ;; 5348fe5e51b7Smrg 5349a31a186aSmrg sunos4*) 5350a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5351a31a186aSmrg wlarc= 5352a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5353a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5354a31a186aSmrg ;; 5355fe5e51b7Smrg 5356a31a186aSmrg *) 5357a31a186aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5358493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5359493f84f4Smrg _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' 5360a31a186aSmrg else 5361a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5362a31a186aSmrg fi 5363a31a186aSmrg ;; 5364a31a186aSmrg esac 5365fe5e51b7Smrg 5366493f84f4Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5367a31a186aSmrg runpath_var= 5368a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5369a31a186aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5370a31a186aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5371a31a186aSmrg fi 5372a31a186aSmrg else 5373a31a186aSmrg # PORTME fill in a description of your system's linker (not GNU ld) 5374a31a186aSmrg case $host_os in 5375a31a186aSmrg aix3*) 5376a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5377a31a186aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5378a31a186aSmrg _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' 5379a31a186aSmrg # Note: this linker hardcodes the directories in LIBPATH if there 5380a31a186aSmrg # are no directories specified by -L. 5381a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5382493f84f4Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5383a31a186aSmrg # Neither direct hardcoding nor static linking is supported with a 5384a31a186aSmrg # broken collect2. 5385a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5386a31a186aSmrg fi 5387a31a186aSmrg ;; 5388fe5e51b7Smrg 5389a31a186aSmrg aix[[4-9]]*) 5390493f84f4Smrg if test ia64 = "$host_cpu"; then 5391a31a186aSmrg # On IA64, the linker does run time linking by default, so we don't 5392a31a186aSmrg # have to do anything special. 5393a31a186aSmrg aix_use_runtimelinking=no 5394a31a186aSmrg exp_sym_flag='-Bexport' 5395493f84f4Smrg no_entry_flag= 5396a31a186aSmrg else 5397a31a186aSmrg # If we're using GNU nm, then we don't want the "-C" option. 5398493f84f4Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5399493f84f4Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5400493f84f4Smrg # weak defined symbols like other global defined symbols, whereas 5401493f84f4Smrg # GNU nm marks them as "W". 5402493f84f4Smrg # While the 'weak' keyword is ignored in the Export File, we need 5403493f84f4Smrg # it in the Import File for the 'aix-soname' feature, so we have 5404493f84f4Smrg # to replace the "-B" option with "-P" for AIX nm. 5405a31a186aSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5406493f84f4Smrg _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' 5407a31a186aSmrg else 5408493f84f4Smrg _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' 5409a31a186aSmrg fi 5410a31a186aSmrg aix_use_runtimelinking=no 5411fe5e51b7Smrg 5412a31a186aSmrg # Test if we are trying to use run time linking or normal 5413a31a186aSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5414493f84f4Smrg # have runtime linking enabled, and use it for executables. 5415493f84f4Smrg # For shared libraries, we enable/disable runtime linking 5416493f84f4Smrg # depending on the kind of the shared library created - 5417493f84f4Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 5418493f84f4Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5419493f84f4Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 5420493f84f4Smrg # lib.a static archive 5421493f84f4Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5422493f84f4Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 5423493f84f4Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5424493f84f4Smrg # lib.a(lib.so.V) shared, rtl:no 5425493f84f4Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5426493f84f4Smrg # lib.a static archive 5427a31a186aSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5428a31a186aSmrg for ld_flag in $LDFLAGS; do 5429493f84f4Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5430a31a186aSmrg aix_use_runtimelinking=yes 5431a31a186aSmrg break 5432a31a186aSmrg fi 5433a31a186aSmrg done 5434493f84f4Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5435493f84f4Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5436493f84f4Smrg # so we don't have lib.a shared libs to link our executables. 5437493f84f4Smrg # We have to force runtime linking in this case. 5438493f84f4Smrg aix_use_runtimelinking=yes 5439493f84f4Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5440493f84f4Smrg fi 5441a31a186aSmrg ;; 5442a31a186aSmrg esac 5443fe5e51b7Smrg 5444a31a186aSmrg exp_sym_flag='-bexport' 5445a31a186aSmrg no_entry_flag='-bnoentry' 5446a31a186aSmrg fi 5447fe5e51b7Smrg 5448a31a186aSmrg # When large executables or shared objects are built, AIX ld can 5449a31a186aSmrg # have problems creating the table of contents. If linking a library 5450a31a186aSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5451a31a186aSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5452a31a186aSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5453a31a186aSmrg 5454a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='' 5455a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5456a31a186aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5457a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5458a31a186aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5459493f84f4Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5460493f84f4Smrg case $with_aix_soname,$aix_use_runtimelinking in 5461493f84f4Smrg aix,*) ;; # traditional, no import file 5462493f84f4Smrg svr4,* | *,yes) # use import file 5463493f84f4Smrg # The Import File defines what to hardcode. 5464493f84f4Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5465493f84f4Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5466493f84f4Smrg ;; 5467493f84f4Smrg esac 5468fe5e51b7Smrg 5469493f84f4Smrg if test yes = "$GCC"; then 5470a31a186aSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5471a31a186aSmrg # We only want to do this on AIX 4.2 and lower, the check 5472a31a186aSmrg # below for broken collect2 doesn't work under 4.3+ 5473493f84f4Smrg collect2name=`$CC -print-prog-name=collect2` 5474a31a186aSmrg if test -f "$collect2name" && 5475a31a186aSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5476a31a186aSmrg then 5477a31a186aSmrg # We have reworked collect2 5478a31a186aSmrg : 5479a31a186aSmrg else 5480a31a186aSmrg # We have old collect2 5481a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5482a31a186aSmrg # It fails to find uninstalled libraries when the uninstalled 5483a31a186aSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5484a31a186aSmrg # to unsupported forces relinking 5485a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5486a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5487a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5488a31a186aSmrg fi 5489a31a186aSmrg ;; 5490a31a186aSmrg esac 5491a31a186aSmrg shared_flag='-shared' 5492493f84f4Smrg if test yes = "$aix_use_runtimelinking"; then 5493493f84f4Smrg shared_flag="$shared_flag "'$wl-G' 5494a31a186aSmrg fi 5495493f84f4Smrg # Need to ensure runtime linking is disabled for the traditional 5496493f84f4Smrg # shared library, or the linker may eventually find shared libraries 5497493f84f4Smrg # /with/ Import File - we do not want to mix them. 5498493f84f4Smrg shared_flag_aix='-shared' 5499493f84f4Smrg shared_flag_svr4='-shared $wl-G' 5500a31a186aSmrg else 5501a31a186aSmrg # not using gcc 5502493f84f4Smrg if test ia64 = "$host_cpu"; then 5503a31a186aSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5504a31a186aSmrg # chokes on -Wl,-G. The following line is correct: 5505a31a186aSmrg shared_flag='-G' 5506a31a186aSmrg else 5507493f84f4Smrg if test yes = "$aix_use_runtimelinking"; then 5508493f84f4Smrg shared_flag='$wl-G' 5509a31a186aSmrg else 5510493f84f4Smrg shared_flag='$wl-bM:SRE' 5511a31a186aSmrg fi 5512493f84f4Smrg shared_flag_aix='$wl-bM:SRE' 5513493f84f4Smrg shared_flag_svr4='$wl-G' 5514a31a186aSmrg fi 5515a31a186aSmrg fi 5516fe5e51b7Smrg 5517493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5518a31a186aSmrg # It seems that -bexpall does not export symbols beginning with 5519a31a186aSmrg # underscore (_), so it is better to generate a list of symbols to export. 5520a31a186aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5521493f84f4Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5522a31a186aSmrg # Warning - without using the other runtime loading flags (-brtl), 5523a31a186aSmrg # -berok will link without error, but may produce a broken library. 5524a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5525a31a186aSmrg # Determine the default libpath from the value encoded in an 5526a31a186aSmrg # empty executable. 55270bb88ba4Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5528493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5529493f84f4Smrg _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 5530a31a186aSmrg else 5531493f84f4Smrg if test ia64 = "$host_cpu"; then 5532493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5533a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5534493f84f4Smrg _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" 5535a31a186aSmrg else 5536a31a186aSmrg # Determine the default libpath from the value encoded in an 5537a31a186aSmrg # empty executable. 55380bb88ba4Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5539493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5540a31a186aSmrg # Warning - without using the other run time loading flags, 5541a31a186aSmrg # -berok will link without error, but may produce a broken library. 5542493f84f4Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5543493f84f4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5544493f84f4Smrg if test yes = "$with_gnu_ld"; then 55450bb88ba4Smrg # We only use this code for GNU lds that support --whole-archive. 5546493f84f4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55470bb88ba4Smrg else 55480bb88ba4Smrg # Exported symbols can be pulled into shared objects from archives 55490bb88ba4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55500bb88ba4Smrg fi 5551a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5552493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5553493f84f4Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5554493f84f4Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5555493f84f4Smrg if test svr4 != "$with_aix_soname"; then 5556493f84f4Smrg # This is similar to how AIX traditionally builds its shared libraries. 5557493f84f4Smrg _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' 5558493f84f4Smrg fi 5559493f84f4Smrg if test aix != "$with_aix_soname"; then 5560493f84f4Smrg _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' 5561493f84f4Smrg else 5562493f84f4Smrg # used by -dlpreopen to get the symbols 5563493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5564493f84f4Smrg fi 5565493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5566a31a186aSmrg fi 5567a31a186aSmrg fi 5568a31a186aSmrg ;; 5569fe5e51b7Smrg 5570a31a186aSmrg amigaos*) 5571a31a186aSmrg case $host_cpu in 5572a31a186aSmrg powerpc) 5573a31a186aSmrg # see comment about AmigaOS4 .so support 5574493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5575a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5576a31a186aSmrg ;; 5577a31a186aSmrg m68k) 5578a31a186aSmrg _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)' 5579a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5580a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5581a31a186aSmrg ;; 5582a31a186aSmrg esac 5583a31a186aSmrg ;; 5584fe5e51b7Smrg 5585a31a186aSmrg bsdi[[45]]*) 5586a31a186aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5587a31a186aSmrg ;; 5588fe5e51b7Smrg 5589a31a186aSmrg cygwin* | mingw* | pw32* | cegcc*) 5590a31a186aSmrg # When not using gcc, we currently assume that we are using 5591a31a186aSmrg # Microsoft Visual C++. 5592a31a186aSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5593a31a186aSmrg # no search path for DLLs. 55940bb88ba4Smrg case $cc_basename in 55950bb88ba4Smrg cl*) 55960bb88ba4Smrg # Native MSVC 55970bb88ba4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 55980bb88ba4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 55990bb88ba4Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 56000bb88ba4Smrg _LT_TAGVAR(file_list_spec, $1)='@' 56010bb88ba4Smrg # Tell ltmain to make .lib files, not .a files. 56020bb88ba4Smrg libext=lib 56030bb88ba4Smrg # Tell ltmain to make .dll files, not .so files. 5604493f84f4Smrg shrext_cmds=.dll 56050bb88ba4Smrg # FIXME: Setting linknames here is a bad hack. 5606493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5607493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5608493f84f4Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 5609493f84f4Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5610493f84f4Smrg else 5611493f84f4Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5612493f84f4Smrg fi~ 5613493f84f4Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5614493f84f4Smrg linknames=' 56150bb88ba4Smrg # The linker will not automatically build a static lib if we build a DLL. 56160bb88ba4Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56170bb88ba4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56180bb88ba4Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56190bb88ba4Smrg _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' 56200bb88ba4Smrg # Don't use ranlib 56210bb88ba4Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 56220bb88ba4Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5623493f84f4Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5624493f84f4Smrg case $lt_outputfile in 5625493f84f4Smrg *.exe|*.EXE) ;; 5626493f84f4Smrg *) 5627493f84f4Smrg lt_outputfile=$lt_outputfile.exe 5628493f84f4Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 5629493f84f4Smrg ;; 5630493f84f4Smrg esac~ 5631493f84f4Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5632493f84f4Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5633493f84f4Smrg $RM "$lt_outputfile.manifest"; 5634493f84f4Smrg fi' 56350bb88ba4Smrg ;; 56360bb88ba4Smrg *) 56370bb88ba4Smrg # Assume MSVC wrapper 56380bb88ba4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56390bb88ba4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56400bb88ba4Smrg # Tell ltmain to make .lib files, not .a files. 56410bb88ba4Smrg libext=lib 56420bb88ba4Smrg # Tell ltmain to make .dll files, not .so files. 5643493f84f4Smrg shrext_cmds=.dll 56440bb88ba4Smrg # FIXME: Setting linknames here is a bad hack. 56450bb88ba4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56460bb88ba4Smrg # The linker will automatically build a .lib file if we build a DLL. 56470bb88ba4Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56480bb88ba4Smrg # FIXME: Should let the user specify the lib program. 56490bb88ba4Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56500bb88ba4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56510bb88ba4Smrg ;; 56520bb88ba4Smrg esac 5653a31a186aSmrg ;; 5654fe5e51b7Smrg 5655a31a186aSmrg darwin* | rhapsody*) 5656a31a186aSmrg _LT_DARWIN_LINKER_FEATURES($1) 5657a31a186aSmrg ;; 5658fe5e51b7Smrg 5659a31a186aSmrg dgux*) 5660a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5661a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5662a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5663a31a186aSmrg ;; 5664fe5e51b7Smrg 5665a31a186aSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5666a31a186aSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 5667a31a186aSmrg # does not break anything, and helps significantly (at the cost of a little 5668a31a186aSmrg # extra space). 5669a31a186aSmrg freebsd2.2*) 5670a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5671a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5672a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5673a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5674a31a186aSmrg ;; 5675fe5e51b7Smrg 5676a31a186aSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 56770bb88ba4Smrg freebsd2.*) 5678a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5679a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5680a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5681a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5682a31a186aSmrg ;; 5683fe5e51b7Smrg 5684a31a186aSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5685a31a186aSmrg freebsd* | dragonfly*) 56860bb88ba4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5687a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5688a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5689a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5690a31a186aSmrg ;; 5691fe5e51b7Smrg 5692a31a186aSmrg hpux9*) 5693493f84f4Smrg if test yes = "$GCC"; then 5694493f84f4Smrg _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' 5695a31a186aSmrg else 5696493f84f4Smrg _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' 5697a31a186aSmrg fi 5698493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5699a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5700a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5701fe5e51b7Smrg 5702a31a186aSmrg # hardcode_minus_L: Not really in the search PATH, 5703a31a186aSmrg # but as the default location of the library. 5704a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5705493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5706a31a186aSmrg ;; 5707fe5e51b7Smrg 5708a31a186aSmrg hpux10*) 5709493f84f4Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5710493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5711a31a186aSmrg else 5712a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5713a31a186aSmrg fi 5714493f84f4Smrg if test no = "$with_gnu_ld"; then 5715493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5716a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5717a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5718a31a186aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5719493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5720a31a186aSmrg # hardcode_minus_L: Not really in the search PATH, 5721a31a186aSmrg # but as the default location of the library. 5722a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5723a31a186aSmrg fi 5724a31a186aSmrg ;; 5725fe5e51b7Smrg 5726a31a186aSmrg hpux11*) 5727493f84f4Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5728a31a186aSmrg case $host_cpu in 5729a31a186aSmrg hppa*64*) 5730493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5731a31a186aSmrg ;; 5732a31a186aSmrg ia64*) 5733493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5734a31a186aSmrg ;; 5735a31a186aSmrg *) 5736493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5737a31a186aSmrg ;; 5738a31a186aSmrg esac 5739a31a186aSmrg else 5740a31a186aSmrg case $host_cpu in 5741a31a186aSmrg hppa*64*) 5742493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5743a31a186aSmrg ;; 5744a31a186aSmrg ia64*) 5745493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5746a31a186aSmrg ;; 5747a31a186aSmrg *) 57480bb88ba4Smrg m4_if($1, [], [ 57490bb88ba4Smrg # Older versions of the 11.00 compiler do not understand -b yet 57500bb88ba4Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57510bb88ba4Smrg _LT_LINKER_OPTION([if $CC understands -b], 57520bb88ba4Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5753493f84f4Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57540bb88ba4Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5755493f84f4Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5756a31a186aSmrg ;; 5757a31a186aSmrg esac 5758a31a186aSmrg fi 5759493f84f4Smrg if test no = "$with_gnu_ld"; then 5760493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5761a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5762fe5e51b7Smrg 5763a31a186aSmrg case $host_cpu in 5764a31a186aSmrg hppa*64*|ia64*) 5765a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5766a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5767a31a186aSmrg ;; 5768a31a186aSmrg *) 5769a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5770a31a186aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5771493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5772fe5e51b7Smrg 5773a31a186aSmrg # hardcode_minus_L: Not really in the search PATH, 5774a31a186aSmrg # but as the default location of the library. 5775a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5776a31a186aSmrg ;; 5777a31a186aSmrg esac 5778a31a186aSmrg fi 5779eda3803bSmrg ;; 5780a31a186aSmrg 5781a31a186aSmrg irix5* | irix6* | nonstopux*) 5782493f84f4Smrg if test yes = "$GCC"; then 5783493f84f4Smrg _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' 5784a31a186aSmrg # Try to use the -exported_symbol ld option, if it does not 5785a31a186aSmrg # work, assume that -exports_file does not work either and 5786a31a186aSmrg # implicitly export all symbols. 57870bb88ba4Smrg # This should be the same for all languages, so no per-tag cache variable. 57880bb88ba4Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 57890bb88ba4Smrg [lt_cv_irix_exported_symbol], 5790493f84f4Smrg [save_LDFLAGS=$LDFLAGS 5791493f84f4Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 57920bb88ba4Smrg AC_LINK_IFELSE( 57930bb88ba4Smrg [AC_LANG_SOURCE( 57940bb88ba4Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 57950bb88ba4Smrg [C++], [[int foo (void) { return 0; }]], 57960bb88ba4Smrg [Fortran 77], [[ 57970bb88ba4Smrg subroutine foo 57980bb88ba4Smrg end]], 57990bb88ba4Smrg [Fortran], [[ 58000bb88ba4Smrg subroutine foo 58010bb88ba4Smrg end]])])], 58020bb88ba4Smrg [lt_cv_irix_exported_symbol=yes], 58030bb88ba4Smrg [lt_cv_irix_exported_symbol=no]) 5804493f84f4Smrg LDFLAGS=$save_LDFLAGS]) 5805493f84f4Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 5806493f84f4Smrg _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' 58070bb88ba4Smrg fi 5808b0de6900Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 5809a31a186aSmrg else 5810493f84f4Smrg _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' 5811493f84f4Smrg _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' 5812a31a186aSmrg fi 5813a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5814493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5815a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5816a31a186aSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5817a31a186aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5818fe5e51b7Smrg ;; 5819eda3803bSmrg 5820493f84f4Smrg linux*) 5821493f84f4Smrg case $cc_basename in 5822493f84f4Smrg tcc*) 5823493f84f4Smrg # Fabrice Bellard et al's Tiny C Compiler 5824493f84f4Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5825493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5826493f84f4Smrg ;; 5827493f84f4Smrg esac 5828493f84f4Smrg ;; 5829493f84f4Smrg 5830b0de6900Smrg netbsd* | netbsdelf*-gnu) 5831a31a186aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5832a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5833a31a186aSmrg else 5834a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5835a31a186aSmrg fi 5836a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5837a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5838a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5839a31a186aSmrg ;; 5840fe5e51b7Smrg 5841a31a186aSmrg newsos6) 5842a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5843a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5844493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5845a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5846a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5847a31a186aSmrg ;; 5848fe5e51b7Smrg 5849a31a186aSmrg *nto* | *qnx*) 5850a31a186aSmrg ;; 5851fe5e51b7Smrg 5852493f84f4Smrg openbsd* | bitrig*) 5853a31a186aSmrg if test -f /usr/libexec/ld.so; then 5854a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5855a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5856a31a186aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5857493f84f4Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5858a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5859493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5860493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5861493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5862a31a186aSmrg else 5863493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5864493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5865a31a186aSmrg fi 5866a31a186aSmrg else 5867a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5868a31a186aSmrg fi 5869a31a186aSmrg ;; 5870fe5e51b7Smrg 5871a31a186aSmrg os2*) 5872a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5873a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5874a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5875493f84f4Smrg shrext_cmds=.dll 5876493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5877493f84f4Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5878493f84f4Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5879493f84f4Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5880493f84f4Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5881493f84f4Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5882493f84f4Smrg emximp -o $lib $output_objdir/$libname.def' 5883493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5884493f84f4Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5885493f84f4Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5886493f84f4Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5887493f84f4Smrg prefix_cmds="$SED"~ 5888493f84f4Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5889493f84f4Smrg prefix_cmds="$prefix_cmds -e 1d"; 5890493f84f4Smrg fi~ 5891493f84f4Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5892493f84f4Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5893493f84f4Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5894493f84f4Smrg emximp -o $lib $output_objdir/$libname.def' 5895493f84f4Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5896493f84f4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5897a31a186aSmrg ;; 5898fe5e51b7Smrg 5899a31a186aSmrg osf3*) 5900493f84f4Smrg if test yes = "$GCC"; then 5901493f84f4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5902493f84f4Smrg _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' 5903a31a186aSmrg else 5904a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5905493f84f4Smrg _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' 5906a31a186aSmrg fi 5907a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5908493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5909a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5910a31a186aSmrg ;; 5911fe5e51b7Smrg 5912a31a186aSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5913493f84f4Smrg if test yes = "$GCC"; then 5914493f84f4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5915493f84f4Smrg _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' 5916493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5917a31a186aSmrg else 5918a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5919493f84f4Smrg _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' 5920a31a186aSmrg _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~ 5921493f84f4Smrg $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' 5922fe5e51b7Smrg 5923a31a186aSmrg # Both c and cxx compiler support -rpath directly 5924a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5925a31a186aSmrg fi 5926a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5927a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5928a31a186aSmrg ;; 5929fe5e51b7Smrg 5930a31a186aSmrg solaris*) 5931a31a186aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5932493f84f4Smrg if test yes = "$GCC"; then 5933493f84f4Smrg wlarc='$wl' 5934493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5935a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5936493f84f4Smrg $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' 5937a31a186aSmrg else 5938a31a186aSmrg case `$CC -V 2>&1` in 5939a31a186aSmrg *"Compilers 5.0"*) 5940a31a186aSmrg wlarc='' 5941493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5942a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5943493f84f4Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5944a31a186aSmrg ;; 5945a31a186aSmrg *) 5946493f84f4Smrg wlarc='$wl' 5947493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5948a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5949493f84f4Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5950a31a186aSmrg ;; 5951a31a186aSmrg esac 5952a31a186aSmrg fi 5953a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5954a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5955a31a186aSmrg case $host_os in 5956a31a186aSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5957a31a186aSmrg *) 5958a31a186aSmrg # The compiler driver will combine and reorder linker options, 5959493f84f4Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 5960a31a186aSmrg # but is careful enough not to reorder. 5961a31a186aSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5962493f84f4Smrg if test yes = "$GCC"; then 5963493f84f4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5964a31a186aSmrg else 5965a31a186aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5966a31a186aSmrg fi 5967a31a186aSmrg ;; 5968a31a186aSmrg esac 5969a31a186aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5970a31a186aSmrg ;; 5971fe5e51b7Smrg 5972a31a186aSmrg sunos4*) 5973493f84f4Smrg if test sequent = "$host_vendor"; then 5974a31a186aSmrg # Use $CC to link under sequent, because it throws in some extra .o 5975a31a186aSmrg # files that make .init and .fini sections work. 5976493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5977a31a186aSmrg else 5978a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5979a31a186aSmrg fi 5980a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5981a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5982a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5983a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5984a31a186aSmrg ;; 5985fe5e51b7Smrg 5986a31a186aSmrg sysv4) 5987a31a186aSmrg case $host_vendor in 5988a31a186aSmrg sni) 5989a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5990a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5991a31a186aSmrg ;; 5992a31a186aSmrg siemens) 5993a31a186aSmrg ## LD is ld it makes a PLAMLIB 5994a31a186aSmrg ## CC just makes a GrossModule. 5995a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5996a31a186aSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5997a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5998a31a186aSmrg ;; 5999a31a186aSmrg motorola) 6000a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6001a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6002a31a186aSmrg ;; 6003a31a186aSmrg esac 6004a31a186aSmrg runpath_var='LD_RUN_PATH' 6005a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6006a31a186aSmrg ;; 6007fe5e51b7Smrg 6008a31a186aSmrg sysv4.3*) 6009a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6010a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6011a31a186aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6012a31a186aSmrg ;; 6013fe5e51b7Smrg 6014a31a186aSmrg sysv4*MP*) 6015a31a186aSmrg if test -d /usr/nec; then 6016a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6017a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6018a31a186aSmrg runpath_var=LD_RUN_PATH 6019a31a186aSmrg hardcode_runpath_var=yes 6020a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6021a31a186aSmrg fi 6022a31a186aSmrg ;; 6023fe5e51b7Smrg 6024a31a186aSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6025493f84f4Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6026a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6027a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6028a31a186aSmrg runpath_var='LD_RUN_PATH' 6029fe5e51b7Smrg 6030493f84f4Smrg if test yes = "$GCC"; then 6031493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6032493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6033a31a186aSmrg else 6034493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6035493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6036a31a186aSmrg fi 6037a31a186aSmrg ;; 6038fe5e51b7Smrg 6039a31a186aSmrg sysv5* | sco3.2v5* | sco5v6*) 6040493f84f4Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 6041a31a186aSmrg # link with -lc, and that would cause any symbols used from libc to 6042a31a186aSmrg # always be unresolved, which means just about no library would 6043a31a186aSmrg # ever link correctly. If we're not using GNU ld we use -z text 6044a31a186aSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6045a31a186aSmrg # as -z defs. 6046493f84f4Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6047493f84f4Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6048a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6049a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6050493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6051a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6052a31a186aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6053493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6054a31a186aSmrg runpath_var='LD_RUN_PATH' 6055fe5e51b7Smrg 6056493f84f4Smrg if test yes = "$GCC"; then 6057493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6058493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6059a31a186aSmrg else 6060493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6061493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6062a31a186aSmrg fi 6063a31a186aSmrg ;; 6064fe5e51b7Smrg 6065a31a186aSmrg uts4*) 6066a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6067a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6068a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6069a31a186aSmrg ;; 6070fe5e51b7Smrg 6071a31a186aSmrg *) 6072a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6073a31a186aSmrg ;; 6074a31a186aSmrg esac 6075fe5e51b7Smrg 6076493f84f4Smrg if test sni = "$host_vendor"; then 6077a31a186aSmrg case $host in 6078a31a186aSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6079493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6080a31a186aSmrg ;; 6081a31a186aSmrg esac 6082a31a186aSmrg fi 6083a31a186aSmrg fi 6084a31a186aSmrg]) 6085a31a186aSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6086493f84f4Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6087fe5e51b7Smrg 6088a31a186aSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6089fe5e51b7Smrg 6090a31a186aSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6091a31a186aSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6092a31a186aSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 6093a31a186aSmrg [The commands to extract the exported symbol list from a shared archive]) 6094fe5e51b7Smrg 6095a31a186aSmrg# 6096a31a186aSmrg# Do we need to explicitly link libc? 6097a31a186aSmrg# 6098a31a186aSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6099a31a186aSmrgx|xyes) 6100a31a186aSmrg # Assume -lc should be added 6101a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6102fe5e51b7Smrg 6103493f84f4Smrg if test yes,yes = "$GCC,$enable_shared"; then 6104a31a186aSmrg case $_LT_TAGVAR(archive_cmds, $1) in 6105a31a186aSmrg *'~'*) 6106a31a186aSmrg # FIXME: we may have to deal with multi-command sequences. 6107a31a186aSmrg ;; 6108a31a186aSmrg '$CC '*) 6109a31a186aSmrg # Test whether the compiler implicitly links with -lc since on some 6110a31a186aSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6111a31a186aSmrg # to ld, don't add -lc before -lgcc. 61120bb88ba4Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 61130bb88ba4Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 61140bb88ba4Smrg [$RM conftest* 61150bb88ba4Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 61160bb88ba4Smrg 61170bb88ba4Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 61180bb88ba4Smrg soname=conftest 61190bb88ba4Smrg lib=conftest 61200bb88ba4Smrg libobjs=conftest.$ac_objext 61210bb88ba4Smrg deplibs= 61220bb88ba4Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61230bb88ba4Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61240bb88ba4Smrg compiler_flags=-v 61250bb88ba4Smrg linker_flags=-v 61260bb88ba4Smrg verstring= 61270bb88ba4Smrg output_objdir=. 61280bb88ba4Smrg libname=conftest 61290bb88ba4Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61300bb88ba4Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 61310bb88ba4Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61320bb88ba4Smrg then 61330bb88ba4Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61340bb88ba4Smrg else 61350bb88ba4Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61360bb88ba4Smrg fi 61370bb88ba4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61380bb88ba4Smrg else 61390bb88ba4Smrg cat conftest.err 1>&5 61400bb88ba4Smrg fi 61410bb88ba4Smrg $RM conftest* 61420bb88ba4Smrg ]) 61430bb88ba4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6144a31a186aSmrg ;; 6145a31a186aSmrg esac 6146a31a186aSmrg fi 6147a31a186aSmrg ;; 6148a31a186aSmrgesac 6149fe5e51b7Smrg 6150a31a186aSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6151a31a186aSmrg [Whether or not to add -lc for building shared libraries]) 6152a31a186aSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6153a31a186aSmrg [enable_shared_with_static_runtimes], [0], 6154a31a186aSmrg [Whether or not to disallow shared libs when runtime libs are static]) 6155a31a186aSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6156a31a186aSmrg [Compiler flag to allow reflexive dlopens]) 6157a31a186aSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6158a31a186aSmrg [Compiler flag to generate shared objects directly from archives]) 6159a31a186aSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 6160a31a186aSmrg [Whether the compiler copes with passing no objects directly]) 6161a31a186aSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6162a31a186aSmrg [Create an old-style archive from a shared archive]) 6163a31a186aSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6164a31a186aSmrg [Create a temporary old-style archive to link instead of a shared archive]) 6165a31a186aSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6166a31a186aSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6167a31a186aSmrg_LT_TAGDECL([], [module_cmds], [2], 6168a31a186aSmrg [Commands used to build a loadable module if different from building 6169a31a186aSmrg a shared archive.]) 6170a31a186aSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6171a31a186aSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 6172a31a186aSmrg [Whether we are building with GNU ld or not]) 6173a31a186aSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6174a31a186aSmrg [Flag that allows shared libraries with undefined symbols to be built]) 6175a31a186aSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 6176a31a186aSmrg [Flag that enforces no undefined symbols]) 6177a31a186aSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6178a31a186aSmrg [Flag to hardcode $libdir into a binary during linking. 6179a31a186aSmrg This must work even if $libdir does not exist]) 6180a31a186aSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6181a31a186aSmrg [Whether we need a single "-rpath" flag with a separated argument]) 6182a31a186aSmrg_LT_TAGDECL([], [hardcode_direct], [0], 6183493f84f4Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6184a31a186aSmrg DIR into the resulting binary]) 6185a31a186aSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6186493f84f4Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6187a31a186aSmrg DIR into the resulting binary and the resulting library dependency is 6188493f84f4Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 6189a31a186aSmrg library is relocated]) 6190a31a186aSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6191a31a186aSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6192a31a186aSmrg into the resulting binary]) 6193a31a186aSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6194a31a186aSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6195a31a186aSmrg into the resulting binary]) 6196a31a186aSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 6197a31a186aSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 6198a31a186aSmrg into the library and all subsequent libraries and executables linked 6199a31a186aSmrg against it]) 6200a31a186aSmrg_LT_TAGDECL([], [inherit_rpath], [0], 6201a31a186aSmrg [Set to yes if linker adds runtime paths of dependent libraries 6202a31a186aSmrg to runtime path list]) 6203a31a186aSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 6204a31a186aSmrg [Whether libtool must link a program against all its dependency libraries]) 6205a31a186aSmrg_LT_TAGDECL([], [always_export_symbols], [0], 6206a31a186aSmrg [Set to "yes" if exported symbols are required]) 6207a31a186aSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6208a31a186aSmrg [The commands to list exported symbols]) 6209a31a186aSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 6210a31a186aSmrg [Symbols that should not be listed in the preloaded symbols]) 6211a31a186aSmrg_LT_TAGDECL([], [include_expsyms], [1], 6212a31a186aSmrg [Symbols that must always be exported]) 6213a31a186aSmrg_LT_TAGDECL([], [prelink_cmds], [2], 6214a31a186aSmrg [Commands necessary for linking programs (against libraries) with templates]) 62150bb88ba4Smrg_LT_TAGDECL([], [postlink_cmds], [2], 62160bb88ba4Smrg [Commands necessary for finishing linking programs]) 6217a31a186aSmrg_LT_TAGDECL([], [file_list_spec], [1], 6218a31a186aSmrg [Specify filename containing input files]) 6219a31a186aSmrgdnl FIXME: Not yet implemented 6220a31a186aSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6221a31a186aSmrgdnl [Compiler flag to generate thread safe objects]) 6222a31a186aSmrg])# _LT_LINKER_SHLIBS 6223a31a186aSmrg 6224a31a186aSmrg 6225a31a186aSmrg# _LT_LANG_C_CONFIG([TAG]) 6226a31a186aSmrg# ------------------------ 6227a31a186aSmrg# Ensure that the configuration variables for a C compiler are suitably 6228a31a186aSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6229493f84f4Smrg# the compiler configuration to 'libtool'. 6230a31a186aSmrgm4_defun([_LT_LANG_C_CONFIG], 6231a31a186aSmrg[m4_require([_LT_DECL_EGREP])dnl 6232493f84f4Smrglt_save_CC=$CC 6233a31a186aSmrgAC_LANG_PUSH(C) 6234fe5e51b7Smrg 6235a31a186aSmrg# Source file extension for C test sources. 6236a31a186aSmrgac_ext=c 6237fe5e51b7Smrg 6238a31a186aSmrg# Object file extension for compiled C test sources. 6239a31a186aSmrgobjext=o 6240a31a186aSmrg_LT_TAGVAR(objext, $1)=$objext 6241fe5e51b7Smrg 6242a31a186aSmrg# Code to be used in simple compile tests 6243a31a186aSmrglt_simple_compile_test_code="int some_variable = 0;" 6244fe5e51b7Smrg 6245a31a186aSmrg# Code to be used in simple link tests 6246a31a186aSmrglt_simple_link_test_code='int main(){return(0);}' 6247fe5e51b7Smrg 6248a31a186aSmrg_LT_TAG_COMPILER 6249a31a186aSmrg# Save the default compiler, since it gets overwritten when the other 6250a31a186aSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6251a31a186aSmrgcompiler_DEFAULT=$CC 6252fe5e51b7Smrg 6253a31a186aSmrg# save warnings/boilerplate of simple test code 6254a31a186aSmrg_LT_COMPILER_BOILERPLATE 6255a31a186aSmrg_LT_LINKER_BOILERPLATE 6256fe5e51b7Smrg 6257a31a186aSmrgif test -n "$compiler"; then 6258a31a186aSmrg _LT_COMPILER_NO_RTTI($1) 6259a31a186aSmrg _LT_COMPILER_PIC($1) 6260a31a186aSmrg _LT_COMPILER_C_O($1) 6261a31a186aSmrg _LT_COMPILER_FILE_LOCKS($1) 6262a31a186aSmrg _LT_LINKER_SHLIBS($1) 6263a31a186aSmrg _LT_SYS_DYNAMIC_LINKER($1) 6264a31a186aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6265a31a186aSmrg LT_SYS_DLOPEN_SELF 6266a31a186aSmrg _LT_CMD_STRIPLIB 6267a31a186aSmrg 6268493f84f4Smrg # Report what library types will actually be built 6269a31a186aSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6270a31a186aSmrg AC_MSG_RESULT([$can_build_shared]) 6271a31a186aSmrg 6272a31a186aSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6273493f84f4Smrg test no = "$can_build_shared" && enable_shared=no 6274a31a186aSmrg 6275a31a186aSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6276a31a186aSmrg # are all built from PIC. 6277a31a186aSmrg case $host_os in 6278a31a186aSmrg aix3*) 6279493f84f4Smrg test yes = "$enable_shared" && enable_static=no 6280a31a186aSmrg if test -n "$RANLIB"; then 6281a31a186aSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6282a31a186aSmrg postinstall_cmds='$RANLIB $lib' 6283a31a186aSmrg fi 6284a31a186aSmrg ;; 6285fe5e51b7Smrg 6286a31a186aSmrg aix[[4-9]]*) 6287493f84f4Smrg if test ia64 != "$host_cpu"; then 6288493f84f4Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6289493f84f4Smrg yes,aix,yes) ;; # shared object as lib.so file only 6290493f84f4Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 6291493f84f4Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6292493f84f4Smrg esac 6293a31a186aSmrg fi 6294a31a186aSmrg ;; 6295a31a186aSmrg esac 6296a31a186aSmrg AC_MSG_RESULT([$enable_shared]) 6297fe5e51b7Smrg 6298a31a186aSmrg AC_MSG_CHECKING([whether to build static libraries]) 6299a31a186aSmrg # Make sure either enable_shared or enable_static is yes. 6300493f84f4Smrg test yes = "$enable_shared" || enable_static=yes 6301a31a186aSmrg AC_MSG_RESULT([$enable_static]) 6302fe5e51b7Smrg 6303a31a186aSmrg _LT_CONFIG($1) 6304a31a186aSmrgfi 6305a31a186aSmrgAC_LANG_POP 6306493f84f4SmrgCC=$lt_save_CC 6307a31a186aSmrg])# _LT_LANG_C_CONFIG 6308fe5e51b7Smrg 6309fe5e51b7Smrg 6310a31a186aSmrg# _LT_LANG_CXX_CONFIG([TAG]) 6311a31a186aSmrg# -------------------------- 6312a31a186aSmrg# Ensure that the configuration variables for a C++ compiler are suitably 6313a31a186aSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6314493f84f4Smrg# the compiler configuration to 'libtool'. 6315a31a186aSmrgm4_defun([_LT_LANG_CXX_CONFIG], 63160bb88ba4Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6317a31a186aSmrgm4_require([_LT_DECL_EGREP])dnl 63180bb88ba4Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6319493f84f4Smrgif test -n "$CXX" && ( test no != "$CXX" && 6320493f84f4Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6321493f84f4Smrg (test g++ != "$CXX"))); then 63220bb88ba4Smrg AC_PROG_CXXCPP 63230bb88ba4Smrgelse 63240bb88ba4Smrg _lt_caught_CXX_error=yes 63250bb88ba4Smrgfi 6326a31a186aSmrg 6327a31a186aSmrgAC_LANG_PUSH(C++) 6328a31a186aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6329a31a186aSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6330a31a186aSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6331a31a186aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6332a31a186aSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 6333a31a186aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6334a31a186aSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6335a31a186aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6336a31a186aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6337a31a186aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6338a31a186aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6339a31a186aSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6340a31a186aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6341a31a186aSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6342a31a186aSmrg_LT_TAGVAR(module_cmds, $1)= 6343a31a186aSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6344a31a186aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6345a31a186aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 63460bb88ba4Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 63470bb88ba4Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6348a31a186aSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6349a31a186aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6350a31a186aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6351fe5e51b7Smrg 6352a31a186aSmrg# Source file extension for C++ test sources. 6353a31a186aSmrgac_ext=cpp 6354fe5e51b7Smrg 6355a31a186aSmrg# Object file extension for compiled C++ test sources. 6356a31a186aSmrgobjext=o 6357a31a186aSmrg_LT_TAGVAR(objext, $1)=$objext 6358a31a186aSmrg 6359a31a186aSmrg# No sense in running all these tests if we already determined that 6360a31a186aSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 6361a31a186aSmrg# are currently assumed to apply to all compilers on this platform, 6362a31a186aSmrg# and will be corrupted by setting them based on a non-working compiler. 6363493f84f4Smrgif test yes != "$_lt_caught_CXX_error"; then 6364a31a186aSmrg # Code to be used in simple compile tests 6365a31a186aSmrg lt_simple_compile_test_code="int some_variable = 0;" 6366a31a186aSmrg 6367a31a186aSmrg # Code to be used in simple link tests 6368a31a186aSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6369a31a186aSmrg 6370a31a186aSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6371a31a186aSmrg _LT_TAG_COMPILER 6372a31a186aSmrg 6373a31a186aSmrg # save warnings/boilerplate of simple test code 6374a31a186aSmrg _LT_COMPILER_BOILERPLATE 6375a31a186aSmrg _LT_LINKER_BOILERPLATE 6376a31a186aSmrg 6377a31a186aSmrg # Allow CC to be a program name with arguments. 6378a31a186aSmrg lt_save_CC=$CC 63790bb88ba4Smrg lt_save_CFLAGS=$CFLAGS 6380a31a186aSmrg lt_save_LD=$LD 6381a31a186aSmrg lt_save_GCC=$GCC 6382a31a186aSmrg GCC=$GXX 6383a31a186aSmrg lt_save_with_gnu_ld=$with_gnu_ld 6384a31a186aSmrg lt_save_path_LD=$lt_cv_path_LD 6385a31a186aSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6386a31a186aSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6387a31a186aSmrg else 6388a31a186aSmrg $as_unset lt_cv_prog_gnu_ld 6389a31a186aSmrg fi 6390a31a186aSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 6391a31a186aSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 6392a31a186aSmrg else 6393a31a186aSmrg $as_unset lt_cv_path_LD 6394a31a186aSmrg fi 6395a31a186aSmrg test -z "${LDCXX+set}" || LD=$LDCXX 6396a31a186aSmrg CC=${CXX-"c++"} 63970bb88ba4Smrg CFLAGS=$CXXFLAGS 6398a31a186aSmrg compiler=$CC 6399a31a186aSmrg _LT_TAGVAR(compiler, $1)=$CC 6400a31a186aSmrg _LT_CC_BASENAME([$compiler]) 6401fe5e51b7Smrg 6402a31a186aSmrg if test -n "$compiler"; then 6403a31a186aSmrg # We don't want -fno-exception when compiling C++ code, so set the 6404a31a186aSmrg # no_builtin_flag separately 6405493f84f4Smrg if test yes = "$GXX"; then 6406a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6407a31a186aSmrg else 6408a31a186aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6409a31a186aSmrg fi 6410fe5e51b7Smrg 6411493f84f4Smrg if test yes = "$GXX"; then 6412a31a186aSmrg # Set up default GNU C++ configuration 6413fe5e51b7Smrg 6414a31a186aSmrg LT_PATH_LD 6415fe5e51b7Smrg 6416a31a186aSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 6417a31a186aSmrg # archiving commands below assume that GNU ld is being used. 6418493f84f4Smrg if test yes = "$with_gnu_ld"; then 6419493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6420493f84f4Smrg _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' 6421fe5e51b7Smrg 6422493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6423493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6424fe5e51b7Smrg 6425a31a186aSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 6426a31a186aSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6427a31a186aSmrg # investigate it a little bit more. (MM) 6428493f84f4Smrg wlarc='$wl' 6429fe5e51b7Smrg 6430a31a186aSmrg # ancient GNU ld didn't support --whole-archive et. al. 6431a31a186aSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6432a31a186aSmrg $GREP 'no-whole-archive' > /dev/null; then 6433493f84f4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6434a31a186aSmrg else 6435a31a186aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6436a31a186aSmrg fi 6437a31a186aSmrg else 6438a31a186aSmrg with_gnu_ld=no 6439a31a186aSmrg wlarc= 6440a31a186aSmrg 6441a31a186aSmrg # A generic and very simple default shared library creation 6442a31a186aSmrg # command for GNU C++ for the case where it uses the native 6443a31a186aSmrg # linker, instead of GNU ld. If possible, this setting should 6444a31a186aSmrg # overridden to take advantage of the native linker features on 6445a31a186aSmrg # the platform it is being used on. 6446a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6447a31a186aSmrg fi 6448fe5e51b7Smrg 6449a31a186aSmrg # Commands to make compiler produce verbose output that lists 6450a31a186aSmrg # what "hidden" libraries, object files and flags are used when 6451a31a186aSmrg # linking a shared library. 64520bb88ba4Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6453fe5e51b7Smrg 6454a31a186aSmrg else 6455a31a186aSmrg GXX=no 6456a31a186aSmrg with_gnu_ld=no 6457a31a186aSmrg wlarc= 6458a31a186aSmrg fi 6459fe5e51b7Smrg 6460a31a186aSmrg # PORTME: fill in a description of your system's C++ link characteristics 6461a31a186aSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6462a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6463a31a186aSmrg case $host_os in 6464a31a186aSmrg aix3*) 6465a31a186aSmrg # FIXME: insert proper C++ library support 6466a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6467a31a186aSmrg ;; 6468a31a186aSmrg aix[[4-9]]*) 6469493f84f4Smrg if test ia64 = "$host_cpu"; then 6470a31a186aSmrg # On IA64, the linker does run time linking by default, so we don't 6471a31a186aSmrg # have to do anything special. 6472a31a186aSmrg aix_use_runtimelinking=no 6473a31a186aSmrg exp_sym_flag='-Bexport' 6474493f84f4Smrg no_entry_flag= 6475a31a186aSmrg else 6476a31a186aSmrg aix_use_runtimelinking=no 6477a31a186aSmrg 6478a31a186aSmrg # Test if we are trying to use run time linking or normal 6479a31a186aSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6480493f84f4Smrg # have runtime linking enabled, and use it for executables. 6481493f84f4Smrg # For shared libraries, we enable/disable runtime linking 6482493f84f4Smrg # depending on the kind of the shared library created - 6483493f84f4Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 6484493f84f4Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6485493f84f4Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 6486493f84f4Smrg # lib.a static archive 6487493f84f4Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6488493f84f4Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 6489493f84f4Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6490493f84f4Smrg # lib.a(lib.so.V) shared, rtl:no 6491493f84f4Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6492493f84f4Smrg # lib.a static archive 6493a31a186aSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6494a31a186aSmrg for ld_flag in $LDFLAGS; do 6495a31a186aSmrg case $ld_flag in 6496a31a186aSmrg *-brtl*) 6497a31a186aSmrg aix_use_runtimelinking=yes 6498a31a186aSmrg break 6499a31a186aSmrg ;; 6500a31a186aSmrg esac 6501a31a186aSmrg done 6502493f84f4Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6503493f84f4Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6504493f84f4Smrg # so we don't have lib.a shared libs to link our executables. 6505493f84f4Smrg # We have to force runtime linking in this case. 6506493f84f4Smrg aix_use_runtimelinking=yes 6507493f84f4Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6508493f84f4Smrg fi 6509a31a186aSmrg ;; 6510a31a186aSmrg esac 6511fe5e51b7Smrg 6512a31a186aSmrg exp_sym_flag='-bexport' 6513a31a186aSmrg no_entry_flag='-bnoentry' 6514a31a186aSmrg fi 6515fe5e51b7Smrg 6516a31a186aSmrg # When large executables or shared objects are built, AIX ld can 6517a31a186aSmrg # have problems creating the table of contents. If linking a library 6518a31a186aSmrg # or program results in "error TOC overflow" add -mminimal-toc to 6519a31a186aSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6520a31a186aSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6521a31a186aSmrg 6522a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='' 6523a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6524a31a186aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6525a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6526a31a186aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6527493f84f4Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6528493f84f4Smrg case $with_aix_soname,$aix_use_runtimelinking in 6529493f84f4Smrg aix,*) ;; # no import file 6530493f84f4Smrg svr4,* | *,yes) # use import file 6531493f84f4Smrg # The Import File defines what to hardcode. 6532493f84f4Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6533493f84f4Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6534493f84f4Smrg ;; 6535493f84f4Smrg esac 6536a31a186aSmrg 6537493f84f4Smrg if test yes = "$GXX"; then 6538a31a186aSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6539a31a186aSmrg # We only want to do this on AIX 4.2 and lower, the check 6540a31a186aSmrg # below for broken collect2 doesn't work under 4.3+ 6541493f84f4Smrg collect2name=`$CC -print-prog-name=collect2` 6542a31a186aSmrg if test -f "$collect2name" && 6543a31a186aSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6544a31a186aSmrg then 6545a31a186aSmrg # We have reworked collect2 6546a31a186aSmrg : 6547a31a186aSmrg else 6548a31a186aSmrg # We have old collect2 6549a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6550a31a186aSmrg # It fails to find uninstalled libraries when the uninstalled 6551a31a186aSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6552a31a186aSmrg # to unsupported forces relinking 6553a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6554a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6555a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6556a31a186aSmrg fi 6557a31a186aSmrg esac 6558a31a186aSmrg shared_flag='-shared' 6559493f84f4Smrg if test yes = "$aix_use_runtimelinking"; then 6560493f84f4Smrg shared_flag=$shared_flag' $wl-G' 6561a31a186aSmrg fi 6562493f84f4Smrg # Need to ensure runtime linking is disabled for the traditional 6563493f84f4Smrg # shared library, or the linker may eventually find shared libraries 6564493f84f4Smrg # /with/ Import File - we do not want to mix them. 6565493f84f4Smrg shared_flag_aix='-shared' 6566493f84f4Smrg shared_flag_svr4='-shared $wl-G' 6567a31a186aSmrg else 6568a31a186aSmrg # not using gcc 6569493f84f4Smrg if test ia64 = "$host_cpu"; then 6570a31a186aSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6571a31a186aSmrg # chokes on -Wl,-G. The following line is correct: 6572a31a186aSmrg shared_flag='-G' 6573a31a186aSmrg else 6574493f84f4Smrg if test yes = "$aix_use_runtimelinking"; then 6575493f84f4Smrg shared_flag='$wl-G' 6576a31a186aSmrg else 6577493f84f4Smrg shared_flag='$wl-bM:SRE' 6578a31a186aSmrg fi 6579493f84f4Smrg shared_flag_aix='$wl-bM:SRE' 6580493f84f4Smrg shared_flag_svr4='$wl-G' 6581a31a186aSmrg fi 6582a31a186aSmrg fi 6583fe5e51b7Smrg 6584493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6585a31a186aSmrg # It seems that -bexpall does not export symbols beginning with 6586a31a186aSmrg # underscore (_), so it is better to generate a list of symbols to 6587a31a186aSmrg # export. 6588a31a186aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6589493f84f4Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6590a31a186aSmrg # Warning - without using the other runtime loading flags (-brtl), 6591a31a186aSmrg # -berok will link without error, but may produce a broken library. 6592493f84f4Smrg # The "-G" linker flag allows undefined symbols. 6593493f84f4Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6594a31a186aSmrg # Determine the default libpath from the value encoded in an empty 6595a31a186aSmrg # executable. 65960bb88ba4Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6597493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6598a31a186aSmrg 6599493f84f4Smrg _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 6600a31a186aSmrg else 6601493f84f4Smrg if test ia64 = "$host_cpu"; then 6602493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6603a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6604493f84f4Smrg _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" 6605a31a186aSmrg else 6606a31a186aSmrg # Determine the default libpath from the value encoded in an 6607a31a186aSmrg # empty executable. 66080bb88ba4Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6609493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6610a31a186aSmrg # Warning - without using the other run time loading flags, 6611a31a186aSmrg # -berok will link without error, but may produce a broken library. 6612493f84f4Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6613493f84f4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6614493f84f4Smrg if test yes = "$with_gnu_ld"; then 66150bb88ba4Smrg # We only use this code for GNU lds that support --whole-archive. 6616493f84f4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 66170bb88ba4Smrg else 66180bb88ba4Smrg # Exported symbols can be pulled into shared objects from archives 66190bb88ba4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66200bb88ba4Smrg fi 6621a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6622493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6623493f84f4Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6624493f84f4Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6625493f84f4Smrg if test svr4 != "$with_aix_soname"; then 6626493f84f4Smrg # This is similar to how AIX traditionally builds its shared 6627493f84f4Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6628493f84f4Smrg _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' 6629493f84f4Smrg fi 6630493f84f4Smrg if test aix != "$with_aix_soname"; then 6631493f84f4Smrg _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' 6632493f84f4Smrg else 6633493f84f4Smrg # used by -dlpreopen to get the symbols 6634493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6635493f84f4Smrg fi 6636493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6637a31a186aSmrg fi 6638a31a186aSmrg fi 6639a31a186aSmrg ;; 6640fe5e51b7Smrg 6641a31a186aSmrg beos*) 6642a31a186aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6643a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6644a31a186aSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6645a31a186aSmrg # support --undefined. This deserves some investigation. FIXME 6646493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6647a31a186aSmrg else 6648a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6649a31a186aSmrg fi 6650a31a186aSmrg ;; 6651fe5e51b7Smrg 6652a31a186aSmrg chorus*) 6653a31a186aSmrg case $cc_basename in 6654a31a186aSmrg *) 6655a31a186aSmrg # FIXME: insert proper C++ library support 6656a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6657a31a186aSmrg ;; 6658a31a186aSmrg esac 6659a31a186aSmrg ;; 6660fe5e51b7Smrg 6661a31a186aSmrg cygwin* | mingw* | pw32* | cegcc*) 66620bb88ba4Smrg case $GXX,$cc_basename in 66630bb88ba4Smrg ,cl* | no,cl*) 66640bb88ba4Smrg # Native MSVC 66650bb88ba4Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 66660bb88ba4Smrg # no search path for DLLs. 66670bb88ba4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66680bb88ba4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66690bb88ba4Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 66700bb88ba4Smrg _LT_TAGVAR(file_list_spec, $1)='@' 66710bb88ba4Smrg # Tell ltmain to make .lib files, not .a files. 66720bb88ba4Smrg libext=lib 66730bb88ba4Smrg # Tell ltmain to make .dll files, not .so files. 6674493f84f4Smrg shrext_cmds=.dll 66750bb88ba4Smrg # FIXME: Setting linknames here is a bad hack. 6676493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6677493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6678493f84f4Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 6679493f84f4Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6680493f84f4Smrg else 6681493f84f4Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6682493f84f4Smrg fi~ 6683493f84f4Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6684493f84f4Smrg linknames=' 66850bb88ba4Smrg # The linker will not automatically build a static lib if we build a DLL. 66860bb88ba4Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 66870bb88ba4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66880bb88ba4Smrg # Don't use ranlib 66890bb88ba4Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 66900bb88ba4Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6691493f84f4Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6692493f84f4Smrg case $lt_outputfile in 6693493f84f4Smrg *.exe|*.EXE) ;; 6694493f84f4Smrg *) 6695493f84f4Smrg lt_outputfile=$lt_outputfile.exe 6696493f84f4Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 6697493f84f4Smrg ;; 6698493f84f4Smrg esac~ 6699493f84f4Smrg func_to_tool_file "$lt_outputfile"~ 6700493f84f4Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6701493f84f4Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6702493f84f4Smrg $RM "$lt_outputfile.manifest"; 6703493f84f4Smrg fi' 67040bb88ba4Smrg ;; 67050bb88ba4Smrg *) 67060bb88ba4Smrg # g++ 67070bb88ba4Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 67080bb88ba4Smrg # as there is no search path for DLLs. 67090bb88ba4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6710493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 67110bb88ba4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67120bb88ba4Smrg _LT_TAGVAR(always_export_symbols, $1)=no 67130bb88ba4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67140bb88ba4Smrg 67150bb88ba4Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6716493f84f4Smrg _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' 6717493f84f4Smrg # If the export-symbols file already is a .def file, use it as 6718493f84f4Smrg # is; otherwise, prepend EXPORTS... 6719493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6720493f84f4Smrg cp $export_symbols $output_objdir/$soname.def; 6721493f84f4Smrg else 6722493f84f4Smrg echo EXPORTS > $output_objdir/$soname.def; 6723493f84f4Smrg cat $export_symbols >> $output_objdir/$soname.def; 6724493f84f4Smrg fi~ 6725493f84f4Smrg $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' 67260bb88ba4Smrg else 67270bb88ba4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67280bb88ba4Smrg fi 67290bb88ba4Smrg ;; 67300bb88ba4Smrg esac 67310bb88ba4Smrg ;; 6732a31a186aSmrg darwin* | rhapsody*) 6733a31a186aSmrg _LT_DARWIN_LINKER_FEATURES($1) 6734a31a186aSmrg ;; 6735fe5e51b7Smrg 6736493f84f4Smrg os2*) 6737493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6738493f84f4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6739493f84f4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6740493f84f4Smrg shrext_cmds=.dll 6741493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6742493f84f4Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6743493f84f4Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6744493f84f4Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6745493f84f4Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6746493f84f4Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6747493f84f4Smrg emximp -o $lib $output_objdir/$libname.def' 6748493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6749493f84f4Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6750493f84f4Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6751493f84f4Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6752493f84f4Smrg prefix_cmds="$SED"~ 6753493f84f4Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6754493f84f4Smrg prefix_cmds="$prefix_cmds -e 1d"; 6755493f84f4Smrg fi~ 6756493f84f4Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6757493f84f4Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6758493f84f4Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6759493f84f4Smrg emximp -o $lib $output_objdir/$libname.def' 6760493f84f4Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6761493f84f4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6762493f84f4Smrg ;; 6763493f84f4Smrg 6764a31a186aSmrg dgux*) 6765a31a186aSmrg case $cc_basename in 6766a31a186aSmrg ec++*) 6767a31a186aSmrg # FIXME: insert proper C++ library support 6768a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6769a31a186aSmrg ;; 6770a31a186aSmrg ghcx*) 6771a31a186aSmrg # Green Hills C++ Compiler 6772a31a186aSmrg # FIXME: insert proper C++ library support 6773a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6774a31a186aSmrg ;; 6775a31a186aSmrg *) 6776a31a186aSmrg # FIXME: insert proper C++ library support 6777a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6778a31a186aSmrg ;; 6779a31a186aSmrg esac 6780a31a186aSmrg ;; 6781fe5e51b7Smrg 67820bb88ba4Smrg freebsd2.*) 6783a31a186aSmrg # C++ shared libraries reported to be fairly broken before 6784a31a186aSmrg # switch to ELF 6785a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6786a31a186aSmrg ;; 6787fe5e51b7Smrg 6788a31a186aSmrg freebsd-elf*) 6789a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6790a31a186aSmrg ;; 6791a31a186aSmrg 6792a31a186aSmrg freebsd* | dragonfly*) 6793a31a186aSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6794a31a186aSmrg # conventions 6795a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6796a31a186aSmrg ;; 6797fe5e51b7Smrg 67980bb88ba4Smrg haiku*) 6799493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 68000bb88ba4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68010bb88ba4Smrg ;; 68020bb88ba4Smrg 6803a31a186aSmrg hpux9*) 6804493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6805a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6806493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6807a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6808a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6809a31a186aSmrg # but as the default 6810a31a186aSmrg # location of the library. 6811a31a186aSmrg 6812a31a186aSmrg case $cc_basename in 6813a31a186aSmrg CC*) 6814a31a186aSmrg # FIXME: insert proper C++ library support 6815a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6816a31a186aSmrg ;; 6817a31a186aSmrg aCC*) 6818493f84f4Smrg _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' 6819a31a186aSmrg # Commands to make compiler produce verbose output that lists 6820a31a186aSmrg # what "hidden" libraries, object files and flags are used when 6821a31a186aSmrg # linking a shared library. 6822a31a186aSmrg # 6823a31a186aSmrg # There doesn't appear to be a way to prevent this compiler from 6824a31a186aSmrg # explicitly linking system object files so we need to strip them 6825a31a186aSmrg # from the output so that they don't get included in the library 6826a31a186aSmrg # dependencies. 6827493f84f4Smrg 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"' 6828a31a186aSmrg ;; 6829a31a186aSmrg *) 6830493f84f4Smrg if test yes = "$GXX"; then 6831493f84f4Smrg _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' 6832a31a186aSmrg else 6833a31a186aSmrg # FIXME: insert proper C++ library support 6834a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6835a31a186aSmrg fi 6836a31a186aSmrg ;; 6837a31a186aSmrg esac 6838a31a186aSmrg ;; 6839fe5e51b7Smrg 6840a31a186aSmrg hpux10*|hpux11*) 6841493f84f4Smrg if test no = "$with_gnu_ld"; then 6842493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6843a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6844a31a186aSmrg 6845a31a186aSmrg case $host_cpu in 6846a31a186aSmrg hppa*64*|ia64*) 6847a31a186aSmrg ;; 6848a31a186aSmrg *) 6849493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6850a31a186aSmrg ;; 6851a31a186aSmrg esac 6852a31a186aSmrg fi 6853a31a186aSmrg case $host_cpu in 6854a31a186aSmrg hppa*64*|ia64*) 6855a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6856a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6857a31a186aSmrg ;; 6858a31a186aSmrg *) 6859a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6860a31a186aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6861a31a186aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6862a31a186aSmrg # but as the default 6863a31a186aSmrg # location of the library. 6864a31a186aSmrg ;; 6865a31a186aSmrg esac 6866a31a186aSmrg 6867a31a186aSmrg case $cc_basename in 6868a31a186aSmrg CC*) 6869a31a186aSmrg # FIXME: insert proper C++ library support 6870a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6871a31a186aSmrg ;; 6872a31a186aSmrg aCC*) 6873a31a186aSmrg case $host_cpu in 6874a31a186aSmrg hppa*64*) 6875493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6876a31a186aSmrg ;; 6877a31a186aSmrg ia64*) 6878493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6879a31a186aSmrg ;; 6880a31a186aSmrg *) 6881493f84f4Smrg _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' 6882a31a186aSmrg ;; 6883a31a186aSmrg esac 6884a31a186aSmrg # Commands to make compiler produce verbose output that lists 6885a31a186aSmrg # what "hidden" libraries, object files and flags are used when 6886a31a186aSmrg # linking a shared library. 6887a31a186aSmrg # 6888a31a186aSmrg # There doesn't appear to be a way to prevent this compiler from 6889a31a186aSmrg # explicitly linking system object files so we need to strip them 6890a31a186aSmrg # from the output so that they don't get included in the library 6891a31a186aSmrg # dependencies. 6892493f84f4Smrg 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"' 6893a31a186aSmrg ;; 6894a31a186aSmrg *) 6895493f84f4Smrg if test yes = "$GXX"; then 6896493f84f4Smrg if test no = "$with_gnu_ld"; then 6897a31a186aSmrg case $host_cpu in 6898a31a186aSmrg hppa*64*) 6899493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6900a31a186aSmrg ;; 6901a31a186aSmrg ia64*) 6902493f84f4Smrg _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' 6903a31a186aSmrg ;; 6904a31a186aSmrg *) 6905493f84f4Smrg _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' 6906a31a186aSmrg ;; 6907a31a186aSmrg esac 6908a31a186aSmrg fi 6909a31a186aSmrg else 6910a31a186aSmrg # FIXME: insert proper C++ library support 6911a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6912a31a186aSmrg fi 6913a31a186aSmrg ;; 6914a31a186aSmrg esac 6915a31a186aSmrg ;; 6916fe5e51b7Smrg 6917a31a186aSmrg interix[[3-9]]*) 6918a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6919a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6920493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6921493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6922a31a186aSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6923a31a186aSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6924a31a186aSmrg # default) and relocated if they conflict, which is a slow very memory 6925a31a186aSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6926a31a186aSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6927a31a186aSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6928493f84f4Smrg _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' 6929493f84f4Smrg _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' 6930a31a186aSmrg ;; 6931a31a186aSmrg irix5* | irix6*) 6932a31a186aSmrg case $cc_basename in 6933a31a186aSmrg CC*) 6934a31a186aSmrg # SGI C++ 6935493f84f4Smrg _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' 6936a31a186aSmrg 6937a31a186aSmrg # Archives containing C++ object files must be created using 6938a31a186aSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6939a31a186aSmrg # necessary to make sure instantiated templates are included 6940a31a186aSmrg # in the archive. 6941a31a186aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6942a31a186aSmrg ;; 6943a31a186aSmrg *) 6944493f84f4Smrg if test yes = "$GXX"; then 6945493f84f4Smrg if test no = "$with_gnu_ld"; then 6946493f84f4Smrg _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' 6947a31a186aSmrg else 6948493f84f4Smrg _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' 6949a31a186aSmrg fi 6950a31a186aSmrg fi 6951a31a186aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6952a31a186aSmrg ;; 6953a31a186aSmrg esac 6954493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6955a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6956a31a186aSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 6957a31a186aSmrg ;; 6958fe5e51b7Smrg 6959493f84f4Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6960a31a186aSmrg case $cc_basename in 6961a31a186aSmrg KCC*) 6962a31a186aSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6963a31a186aSmrg 6964a31a186aSmrg # KCC will only create a shared library if the output file 6965a31a186aSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6966a31a186aSmrg # to its proper name (with version) after linking. 6967493f84f4Smrg _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' 6968493f84f4Smrg _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' 6969a31a186aSmrg # Commands to make compiler produce verbose output that lists 6970a31a186aSmrg # what "hidden" libraries, object files and flags are used when 6971a31a186aSmrg # linking a shared library. 6972a31a186aSmrg # 6973a31a186aSmrg # There doesn't appear to be a way to prevent this compiler from 6974a31a186aSmrg # explicitly linking system object files so we need to strip them 6975a31a186aSmrg # from the output so that they don't get included in the library 6976a31a186aSmrg # dependencies. 6977493f84f4Smrg 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"' 6978a31a186aSmrg 6979493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6980493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6981a31a186aSmrg 6982a31a186aSmrg # Archives containing C++ object files must be created using 6983a31a186aSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6984a31a186aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6985a31a186aSmrg ;; 6986a31a186aSmrg icpc* | ecpc* ) 6987a31a186aSmrg # Intel C++ 6988a31a186aSmrg with_gnu_ld=yes 6989a31a186aSmrg # version 8.0 and above of icpc choke on multiply defined symbols 6990a31a186aSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6991a31a186aSmrg # earlier do not add the objects themselves. 6992a31a186aSmrg case `$CC -V 2>&1` in 6993a31a186aSmrg *"Version 7."*) 6994493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6995493f84f4Smrg _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' 6996a31a186aSmrg ;; 6997a31a186aSmrg *) # Version 8.0 or newer 6998a31a186aSmrg tmp_idyn= 6999a31a186aSmrg case $host_cpu in 7000a31a186aSmrg ia64*) tmp_idyn=' -i_dynamic';; 7001a31a186aSmrg esac 7002493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7003493f84f4Smrg _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' 7004a31a186aSmrg ;; 7005a31a186aSmrg esac 7006a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7007493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7008493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7009493f84f4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7010a31a186aSmrg ;; 7011a31a186aSmrg pgCC* | pgcpp*) 7012a31a186aSmrg # Portland Group C++ compiler 7013a31a186aSmrg case `$CC -V` in 70140bb88ba4Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7015a31a186aSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7016493f84f4Smrg rm -rf $tpldir~ 7017493f84f4Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7018493f84f4Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7019a31a186aSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7020493f84f4Smrg rm -rf $tpldir~ 7021493f84f4Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7022493f84f4Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7023493f84f4Smrg $RANLIB $oldlib' 7024a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7025493f84f4Smrg rm -rf $tpldir~ 7026493f84f4Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7027493f84f4Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7028a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7029493f84f4Smrg rm -rf $tpldir~ 7030493f84f4Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7031493f84f4Smrg $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' 7032a31a186aSmrg ;; 70330bb88ba4Smrg *) # Version 6 and above use weak symbols 7034493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7035493f84f4Smrg _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' 7036a31a186aSmrg ;; 7037a31a186aSmrg esac 7038fe5e51b7Smrg 7039493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7040493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7041493f84f4Smrg _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' 7042a31a186aSmrg ;; 7043a31a186aSmrg cxx*) 7044a31a186aSmrg # Compaq C++ 7045493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7046493f84f4Smrg _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' 7047fe5e51b7Smrg 7048a31a186aSmrg runpath_var=LD_RUN_PATH 7049a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7050a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7051fe5e51b7Smrg 7052a31a186aSmrg # Commands to make compiler produce verbose output that lists 7053a31a186aSmrg # what "hidden" libraries, object files and flags are used when 7054a31a186aSmrg # linking a shared library. 7055a31a186aSmrg # 7056a31a186aSmrg # There doesn't appear to be a way to prevent this compiler from 7057a31a186aSmrg # explicitly linking system object files so we need to strip them 7058a31a186aSmrg # from the output so that they don't get included in the library 7059a31a186aSmrg # dependencies. 7060493f84f4Smrg 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' 7061a31a186aSmrg ;; 70620bb88ba4Smrg xl* | mpixl* | bgxl*) 7063a31a186aSmrg # IBM XL 8.0 on PPC, with GNU ld 7064493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7065493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7066493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7067493f84f4Smrg if test yes = "$supports_anon_versioning"; then 7068a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7069493f84f4Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7070493f84f4Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7071493f84f4Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7072a31a186aSmrg fi 7073a31a186aSmrg ;; 7074a31a186aSmrg *) 7075a31a186aSmrg case `$CC -V 2>&1 | sed 5q` in 7076a31a186aSmrg *Sun\ C*) 7077a31a186aSmrg # Sun C++ 5.9 7078a31a186aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7079493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7080493f84f4Smrg _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' 7081a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7082493f84f4Smrg _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' 7083a31a186aSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7084a31a186aSmrg 7085a31a186aSmrg # Not sure whether something based on 7086a31a186aSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7087a31a186aSmrg # would be better. 70880bb88ba4Smrg output_verbose_link_cmd='func_echo_all' 7089a31a186aSmrg 7090a31a186aSmrg # Archives containing C++ object files must be created using 7091a31a186aSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7092a31a186aSmrg # necessary to make sure instantiated templates are included 7093a31a186aSmrg # in the archive. 7094a31a186aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7095a31a186aSmrg ;; 7096a31a186aSmrg esac 7097a31a186aSmrg ;; 7098a31a186aSmrg esac 7099a31a186aSmrg ;; 7100fe5e51b7Smrg 7101a31a186aSmrg lynxos*) 7102a31a186aSmrg # FIXME: insert proper C++ library support 7103a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7104a31a186aSmrg ;; 7105fe5e51b7Smrg 7106a31a186aSmrg m88k*) 7107a31a186aSmrg # FIXME: insert proper C++ library support 7108a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7109a31a186aSmrg ;; 7110fe5e51b7Smrg 7111a31a186aSmrg mvs*) 7112a31a186aSmrg case $cc_basename in 7113a31a186aSmrg cxx*) 7114a31a186aSmrg # FIXME: insert proper C++ library support 7115a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7116a31a186aSmrg ;; 7117a31a186aSmrg *) 7118a31a186aSmrg # FIXME: insert proper C++ library support 7119a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7120a31a186aSmrg ;; 7121a31a186aSmrg esac 7122a31a186aSmrg ;; 7123fe5e51b7Smrg 7124a31a186aSmrg netbsd*) 7125a31a186aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7126a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7127a31a186aSmrg wlarc= 7128a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7129a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7130a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7131a31a186aSmrg fi 7132a31a186aSmrg # Workaround some broken pre-1.5 toolchains 7133a31a186aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7134a31a186aSmrg ;; 7135fe5e51b7Smrg 7136a31a186aSmrg *nto* | *qnx*) 7137a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7138a31a186aSmrg ;; 7139fe5e51b7Smrg 7140493f84f4Smrg openbsd* | bitrig*) 7141a31a186aSmrg if test -f /usr/libexec/ld.so; then 7142a31a186aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7143a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7144a31a186aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7145a31a186aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7146493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7147493f84f4Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7148493f84f4Smrg _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' 7149493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7150493f84f4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7151a31a186aSmrg fi 71520bb88ba4Smrg output_verbose_link_cmd=func_echo_all 7153a31a186aSmrg else 7154a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7155a31a186aSmrg fi 7156a31a186aSmrg ;; 7157fe5e51b7Smrg 7158a31a186aSmrg osf3* | osf4* | osf5*) 7159a31a186aSmrg case $cc_basename in 7160a31a186aSmrg KCC*) 7161a31a186aSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7162a31a186aSmrg 7163a31a186aSmrg # KCC will only create a shared library if the output file 7164a31a186aSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7165a31a186aSmrg # to its proper name (with version) after linking. 7166493f84f4Smrg _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' 7167a31a186aSmrg 7168493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7169a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7170a31a186aSmrg 7171a31a186aSmrg # Archives containing C++ object files must be created using 7172a31a186aSmrg # the KAI C++ compiler. 7173a31a186aSmrg case $host in 7174a31a186aSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7175a31a186aSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7176a31a186aSmrg esac 7177a31a186aSmrg ;; 7178a31a186aSmrg RCC*) 7179a31a186aSmrg # Rational C++ 2.4.1 7180a31a186aSmrg # FIXME: insert proper C++ library support 7181a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7182a31a186aSmrg ;; 7183a31a186aSmrg cxx*) 7184a31a186aSmrg case $host in 7185a31a186aSmrg osf3*) 7186493f84f4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7187493f84f4Smrg _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' 7188493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7189a31a186aSmrg ;; 7190a31a186aSmrg *) 7191a31a186aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7192493f84f4Smrg _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' 7193a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7194493f84f4Smrg echo "-hidden">> $lib.exp~ 7195493f84f4Smrg $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~ 7196493f84f4Smrg $RM $lib.exp' 7197a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7198a31a186aSmrg ;; 7199a31a186aSmrg esac 7200fe5e51b7Smrg 7201a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7202fe5e51b7Smrg 7203a31a186aSmrg # Commands to make compiler produce verbose output that lists 7204a31a186aSmrg # what "hidden" libraries, object files and flags are used when 7205a31a186aSmrg # linking a shared library. 7206a31a186aSmrg # 7207a31a186aSmrg # There doesn't appear to be a way to prevent this compiler from 7208a31a186aSmrg # explicitly linking system object files so we need to strip them 7209a31a186aSmrg # from the output so that they don't get included in the library 7210a31a186aSmrg # dependencies. 7211493f84f4Smrg 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"' 7212a31a186aSmrg ;; 7213a31a186aSmrg *) 7214493f84f4Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7215493f84f4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7216a31a186aSmrg case $host in 7217a31a186aSmrg osf3*) 7218493f84f4Smrg _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' 7219a31a186aSmrg ;; 7220a31a186aSmrg *) 7221493f84f4Smrg _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' 7222a31a186aSmrg ;; 7223a31a186aSmrg esac 7224a31a186aSmrg 7225493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7226a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7227a31a186aSmrg 7228a31a186aSmrg # Commands to make compiler produce verbose output that lists 7229a31a186aSmrg # what "hidden" libraries, object files and flags are used when 7230a31a186aSmrg # linking a shared library. 72310bb88ba4Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7232a31a186aSmrg 7233a31a186aSmrg else 7234a31a186aSmrg # FIXME: insert proper C++ library support 7235a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7236a31a186aSmrg fi 7237a31a186aSmrg ;; 7238a31a186aSmrg esac 7239a31a186aSmrg ;; 7240fe5e51b7Smrg 7241a31a186aSmrg psos*) 7242a31a186aSmrg # FIXME: insert proper C++ library support 7243a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7244a31a186aSmrg ;; 7245fe5e51b7Smrg 7246a31a186aSmrg sunos4*) 7247a31a186aSmrg case $cc_basename in 7248a31a186aSmrg CC*) 7249a31a186aSmrg # Sun C++ 4.x 7250a31a186aSmrg # FIXME: insert proper C++ library support 7251a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7252a31a186aSmrg ;; 7253a31a186aSmrg lcc*) 7254a31a186aSmrg # Lucid 7255a31a186aSmrg # FIXME: insert proper C++ library support 7256a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7257a31a186aSmrg ;; 7258a31a186aSmrg *) 7259a31a186aSmrg # FIXME: insert proper C++ library support 7260a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7261a31a186aSmrg ;; 7262a31a186aSmrg esac 7263a31a186aSmrg ;; 7264fe5e51b7Smrg 7265a31a186aSmrg solaris*) 7266a31a186aSmrg case $cc_basename in 72670bb88ba4Smrg CC* | sunCC*) 7268a31a186aSmrg # Sun C++ 4.2, 5.x and Centerline C++ 7269a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7270a31a186aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7271493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7272a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7273493f84f4Smrg $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' 7274a31a186aSmrg 7275a31a186aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7276a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7277a31a186aSmrg case $host_os in 7278a31a186aSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7279a31a186aSmrg *) 7280a31a186aSmrg # The compiler driver will combine and reorder linker options, 7281493f84f4Smrg # but understands '-z linker_flag'. 7282a31a186aSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7283a31a186aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7284a31a186aSmrg ;; 7285a31a186aSmrg esac 7286a31a186aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7287fe5e51b7Smrg 72880bb88ba4Smrg output_verbose_link_cmd='func_echo_all' 7289fe5e51b7Smrg 7290a31a186aSmrg # Archives containing C++ object files must be created using 7291a31a186aSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7292a31a186aSmrg # necessary to make sure instantiated templates are included 7293a31a186aSmrg # in the archive. 7294a31a186aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7295a31a186aSmrg ;; 7296a31a186aSmrg gcx*) 7297a31a186aSmrg # Green Hills C++ Compiler 7298493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7299fe5e51b7Smrg 7300a31a186aSmrg # The C++ compiler must be used to create the archive. 7301a31a186aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7302a31a186aSmrg ;; 7303a31a186aSmrg *) 7304a31a186aSmrg # GNU C++ compiler with Solaris linker 7305493f84f4Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7306493f84f4Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7307a31a186aSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7308493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7309a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7310493f84f4Smrg $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' 7311a31a186aSmrg 7312a31a186aSmrg # Commands to make compiler produce verbose output that lists 7313a31a186aSmrg # what "hidden" libraries, object files and flags are used when 7314a31a186aSmrg # linking a shared library. 73150bb88ba4Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7316a31a186aSmrg else 7317493f84f4Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 7318a31a186aSmrg # platform. 7319493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7320a31a186aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7321493f84f4Smrg $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' 7322a31a186aSmrg 7323a31a186aSmrg # Commands to make compiler produce verbose output that lists 7324a31a186aSmrg # what "hidden" libraries, object files and flags are used when 7325a31a186aSmrg # linking a shared library. 73260bb88ba4Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7327a31a186aSmrg fi 7328a31a186aSmrg 7329493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7330a31a186aSmrg case $host_os in 7331a31a186aSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7332a31a186aSmrg *) 7333493f84f4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7334a31a186aSmrg ;; 7335a31a186aSmrg esac 7336a31a186aSmrg fi 7337a31a186aSmrg ;; 7338a31a186aSmrg esac 7339a31a186aSmrg ;; 7340fe5e51b7Smrg 7341a31a186aSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7342493f84f4Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7343a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7344a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7345a31a186aSmrg runpath_var='LD_RUN_PATH' 7346fe5e51b7Smrg 7347a31a186aSmrg case $cc_basename in 7348a31a186aSmrg CC*) 7349493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7350493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7351a31a186aSmrg ;; 7352a31a186aSmrg *) 7353493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7354493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7355a31a186aSmrg ;; 7356a31a186aSmrg esac 7357a31a186aSmrg ;; 7358fe5e51b7Smrg 7359a31a186aSmrg sysv5* | sco3.2v5* | sco5v6*) 7360493f84f4Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 7361a31a186aSmrg # link with -lc, and that would cause any symbols used from libc to 7362a31a186aSmrg # always be unresolved, which means just about no library would 7363a31a186aSmrg # ever link correctly. If we're not using GNU ld we use -z text 7364a31a186aSmrg # though, which does catch some bad symbols but isn't as heavy-handed 7365a31a186aSmrg # as -z defs. 7366493f84f4Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7367493f84f4Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7368a31a186aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7369a31a186aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7370493f84f4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7371a31a186aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7372a31a186aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7373493f84f4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7374a31a186aSmrg runpath_var='LD_RUN_PATH' 7375fe5e51b7Smrg 7376a31a186aSmrg case $cc_basename in 7377a31a186aSmrg CC*) 7378493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7379493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73800bb88ba4Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7381493f84f4Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 73820bb88ba4Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7383493f84f4Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 7384a31a186aSmrg ;; 7385a31a186aSmrg *) 7386493f84f4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7387493f84f4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7388a31a186aSmrg ;; 7389a31a186aSmrg esac 7390a31a186aSmrg ;; 7391fe5e51b7Smrg 7392a31a186aSmrg tandem*) 7393a31a186aSmrg case $cc_basename in 7394a31a186aSmrg NCC*) 7395a31a186aSmrg # NonStop-UX NCC 3.20 7396a31a186aSmrg # FIXME: insert proper C++ library support 7397a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7398a31a186aSmrg ;; 7399a31a186aSmrg *) 7400a31a186aSmrg # FIXME: insert proper C++ library support 7401a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7402a31a186aSmrg ;; 7403a31a186aSmrg esac 7404a31a186aSmrg ;; 7405fe5e51b7Smrg 7406a31a186aSmrg vxworks*) 7407a31a186aSmrg # FIXME: insert proper C++ library support 7408a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7409a31a186aSmrg ;; 7410fe5e51b7Smrg 7411a31a186aSmrg *) 7412a31a186aSmrg # FIXME: insert proper C++ library support 7413a31a186aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7414a31a186aSmrg ;; 7415a31a186aSmrg esac 7416fe5e51b7Smrg 7417a31a186aSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7418493f84f4Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7419a31a186aSmrg 7420493f84f4Smrg _LT_TAGVAR(GCC, $1)=$GXX 7421493f84f4Smrg _LT_TAGVAR(LD, $1)=$LD 7422a31a186aSmrg 7423a31a186aSmrg ## CAVEAT EMPTOR: 7424a31a186aSmrg ## There is no encapsulation within the following macros, do not change 7425a31a186aSmrg ## the running order or otherwise move them around unless you know exactly 7426a31a186aSmrg ## what you are doing... 7427a31a186aSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7428a31a186aSmrg _LT_COMPILER_PIC($1) 7429a31a186aSmrg _LT_COMPILER_C_O($1) 7430a31a186aSmrg _LT_COMPILER_FILE_LOCKS($1) 7431a31a186aSmrg _LT_LINKER_SHLIBS($1) 7432a31a186aSmrg _LT_SYS_DYNAMIC_LINKER($1) 7433a31a186aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7434a31a186aSmrg 7435a31a186aSmrg _LT_CONFIG($1) 7436a31a186aSmrg fi # test -n "$compiler" 7437a31a186aSmrg 7438a31a186aSmrg CC=$lt_save_CC 74390bb88ba4Smrg CFLAGS=$lt_save_CFLAGS 7440a31a186aSmrg LDCXX=$LD 7441a31a186aSmrg LD=$lt_save_LD 7442a31a186aSmrg GCC=$lt_save_GCC 7443a31a186aSmrg with_gnu_ld=$lt_save_with_gnu_ld 7444a31a186aSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 7445a31a186aSmrg lt_cv_path_LD=$lt_save_path_LD 7446a31a186aSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7447a31a186aSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7448493f84f4Smrgfi # test yes != "$_lt_caught_CXX_error" 7449fe5e51b7Smrg 7450a31a186aSmrgAC_LANG_POP 7451a31a186aSmrg])# _LT_LANG_CXX_CONFIG 7452fe5e51b7Smrg 7453fe5e51b7Smrg 74540bb88ba4Smrg# _LT_FUNC_STRIPNAME_CNF 74550bb88ba4Smrg# ---------------------- 74560bb88ba4Smrg# func_stripname_cnf prefix suffix name 74570bb88ba4Smrg# strip PREFIX and SUFFIX off of NAME. 74580bb88ba4Smrg# PREFIX and SUFFIX must not contain globbing or regex special 74590bb88ba4Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 74600bb88ba4Smrg# dot (in which case that matches only a dot). 74610bb88ba4Smrg# 74620bb88ba4Smrg# This function is identical to the (non-XSI) version of func_stripname, 74630bb88ba4Smrg# except this one can be used by m4 code that may be executed by configure, 74640bb88ba4Smrg# rather than the libtool script. 74650bb88ba4Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74660bb88ba4SmrgAC_REQUIRE([_LT_DECL_SED]) 74670bb88ba4SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74680bb88ba4Smrgfunc_stripname_cnf () 74690bb88ba4Smrg{ 7470493f84f4Smrg case @S|@2 in 7471493f84f4Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7472493f84f4Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 74730bb88ba4Smrg esac 74740bb88ba4Smrg} # func_stripname_cnf 74750bb88ba4Smrg])# _LT_FUNC_STRIPNAME_CNF 74760bb88ba4Smrg 7477ee82cb62Smrg 7478a31a186aSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7479a31a186aSmrg# --------------------------------- 7480a31a186aSmrg# Figure out "hidden" library dependencies from verbose 7481a31a186aSmrg# compiler output when linking a shared library. 7482a31a186aSmrg# Parse the compiler output and extract the necessary 7483a31a186aSmrg# objects, libraries and library flags. 7484a31a186aSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7485a31a186aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 74860bb88ba4SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7487a31a186aSmrg# Dependencies to place before and after the object being linked: 7488a31a186aSmrg_LT_TAGVAR(predep_objects, $1)= 7489a31a186aSmrg_LT_TAGVAR(postdep_objects, $1)= 7490a31a186aSmrg_LT_TAGVAR(predeps, $1)= 7491a31a186aSmrg_LT_TAGVAR(postdeps, $1)= 7492a31a186aSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7493fe5e51b7Smrg 7494a31a186aSmrgdnl we can't use the lt_simple_compile_test_code here, 7495a31a186aSmrgdnl because it contains code intended for an executable, 7496a31a186aSmrgdnl not a library. It's possible we should let each 7497a31a186aSmrgdnl tag define a new lt_????_link_test_code variable, 7498a31a186aSmrgdnl but it's only used here... 7499a31a186aSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7500a31a186aSmrgint a; 7501a31a186aSmrgvoid foo (void) { a = 0; } 7502a31a186aSmrg_LT_EOF 7503a31a186aSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7504a31a186aSmrgclass Foo 7505a31a186aSmrg{ 7506a31a186aSmrgpublic: 7507a31a186aSmrg Foo (void) { a = 0; } 7508a31a186aSmrgprivate: 7509a31a186aSmrg int a; 7510a31a186aSmrg}; 7511a31a186aSmrg_LT_EOF 7512a31a186aSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7513a31a186aSmrg subroutine foo 7514a31a186aSmrg implicit none 7515a31a186aSmrg integer*4 a 7516a31a186aSmrg a=0 7517a31a186aSmrg return 7518a31a186aSmrg end 7519a31a186aSmrg_LT_EOF 7520a31a186aSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7521a31a186aSmrg subroutine foo 7522a31a186aSmrg implicit none 7523a31a186aSmrg integer a 7524a31a186aSmrg a=0 7525a31a186aSmrg return 7526a31a186aSmrg end 7527a31a186aSmrg_LT_EOF 7528a31a186aSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7529a31a186aSmrgpublic class foo { 7530a31a186aSmrg private int a; 7531a31a186aSmrg public void bar (void) { 7532a31a186aSmrg a = 0; 7533a31a186aSmrg } 7534a31a186aSmrg}; 7535a31a186aSmrg_LT_EOF 75360bb88ba4Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 75370bb88ba4Smrgpackage foo 75380bb88ba4Smrgfunc foo() { 75390bb88ba4Smrg} 75400bb88ba4Smrg_LT_EOF 7541a31a186aSmrg]) 75420bb88ba4Smrg 75430bb88ba4Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 75440bb88ba4Smrgcase "$CC $CFLAGS " in #( 75450bb88ba4Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75460bb88ba4Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 75470bb88ba4Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75480bb88ba4Smrgesac 75490bb88ba4Smrg 7550a31a186aSmrgdnl Parse the compiler output and extract the necessary 7551a31a186aSmrgdnl objects, libraries and library flags. 7552a31a186aSmrgif AC_TRY_EVAL(ac_compile); then 7553a31a186aSmrg # Parse the compiler output and extract the necessary 7554a31a186aSmrg # objects, libraries and library flags. 7555fe5e51b7Smrg 7556a31a186aSmrg # Sentinel used to keep track of whether or not we are before 7557a31a186aSmrg # the conftest object file. 7558a31a186aSmrg pre_test_object_deps_done=no 7559fe5e51b7Smrg 7560a31a186aSmrg for p in `eval "$output_verbose_link_cmd"`; do 7561493f84f4Smrg case $prev$p in 7562fe5e51b7Smrg 7563a31a186aSmrg -L* | -R* | -l*) 7564a31a186aSmrg # Some compilers place space between "-{L,R}" and the path. 7565a31a186aSmrg # Remove the space. 7566493f84f4Smrg if test x-L = "$p" || 7567493f84f4Smrg test x-R = "$p"; then 7568a31a186aSmrg prev=$p 7569a31a186aSmrg continue 7570a31a186aSmrg fi 7571fe5e51b7Smrg 75720bb88ba4Smrg # Expand the sysroot to ease extracting the directories later. 75730bb88ba4Smrg if test -z "$prev"; then 75740bb88ba4Smrg case $p in 75750bb88ba4Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75760bb88ba4Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75770bb88ba4Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 75780bb88ba4Smrg esac 75790bb88ba4Smrg fi 75800bb88ba4Smrg case $p in 75810bb88ba4Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 75820bb88ba4Smrg esac 7583493f84f4Smrg if test no = "$pre_test_object_deps_done"; then 7584493f84f4Smrg case $prev in 75850bb88ba4Smrg -L | -R) 7586a31a186aSmrg # Internal compiler library paths should come after those 7587a31a186aSmrg # provided the user. The postdeps already come after the 7588a31a186aSmrg # user supplied libs so there is no need to process them. 7589a31a186aSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7590493f84f4Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7591a31a186aSmrg else 7592493f84f4Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7593a31a186aSmrg fi 7594a31a186aSmrg ;; 7595a31a186aSmrg # The "-l" case would never come before the object being 7596a31a186aSmrg # linked, so don't bother handling this case. 7597a31a186aSmrg esac 7598a31a186aSmrg else 7599a31a186aSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7600493f84f4Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 7601a31a186aSmrg else 7602493f84f4Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7603a31a186aSmrg fi 7604a31a186aSmrg fi 76050bb88ba4Smrg prev= 7606a31a186aSmrg ;; 7607fe5e51b7Smrg 76080bb88ba4Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 7609a31a186aSmrg *.$objext) 7610a31a186aSmrg # This assumes that the test object file only shows up 7611a31a186aSmrg # once in the compiler output. 7612a31a186aSmrg if test "$p" = "conftest.$objext"; then 7613a31a186aSmrg pre_test_object_deps_done=yes 7614a31a186aSmrg continue 7615a31a186aSmrg fi 7616fe5e51b7Smrg 7617493f84f4Smrg if test no = "$pre_test_object_deps_done"; then 7618a31a186aSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7619493f84f4Smrg _LT_TAGVAR(predep_objects, $1)=$p 7620a31a186aSmrg else 7621a31a186aSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7622a31a186aSmrg fi 7623a31a186aSmrg else 7624a31a186aSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7625493f84f4Smrg _LT_TAGVAR(postdep_objects, $1)=$p 7626a31a186aSmrg else 7627a31a186aSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7628a31a186aSmrg fi 7629a31a186aSmrg fi 7630a31a186aSmrg ;; 7631fe5e51b7Smrg 7632a31a186aSmrg *) ;; # Ignore the rest. 7633fe5e51b7Smrg 7634a31a186aSmrg esac 7635a31a186aSmrg done 7636fe5e51b7Smrg 7637a31a186aSmrg # Clean up. 7638a31a186aSmrg rm -f a.out a.exe 7639eda3803bSmrgelse 7640a31a186aSmrg echo "libtool.m4: error: problem compiling $1 test program" 7641fe5e51b7Smrgfi 7642fe5e51b7Smrg 7643a31a186aSmrg$RM -f confest.$objext 76440bb88ba4SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7645fe5e51b7Smrg 7646a31a186aSmrg# PORTME: override above test on systems where it is broken 7647a31a186aSmrgm4_if([$1], [CXX], 7648a31a186aSmrg[case $host_os in 7649a31a186aSmrginterix[[3-9]]*) 7650a31a186aSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7651a31a186aSmrg # hack all around it, let's just trust "g++" to DTRT. 7652a31a186aSmrg _LT_TAGVAR(predep_objects,$1)= 7653a31a186aSmrg _LT_TAGVAR(postdep_objects,$1)= 7654a31a186aSmrg _LT_TAGVAR(postdeps,$1)= 7655a31a186aSmrg ;; 7656a31a186aSmrgesac 7657a31a186aSmrg]) 7658fe5e51b7Smrg 7659a31a186aSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 7660a31a186aSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7661a31a186aSmrgesac 7662a31a186aSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7663a31a186aSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7664493f84f4Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7665a31a186aSmrgfi 7666a31a186aSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7667a31a186aSmrg [The directories searched by this compiler when creating a shared library]) 7668a31a186aSmrg_LT_TAGDECL([], [predep_objects], [1], 7669a31a186aSmrg [Dependencies to place before and after the objects being linked to 7670a31a186aSmrg create a shared library]) 7671a31a186aSmrg_LT_TAGDECL([], [postdep_objects], [1]) 7672a31a186aSmrg_LT_TAGDECL([], [predeps], [1]) 7673a31a186aSmrg_LT_TAGDECL([], [postdeps], [1]) 7674a31a186aSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7675a31a186aSmrg [The library search path used internally by the compiler when linking 7676a31a186aSmrg a shared library]) 7677a31a186aSmrg])# _LT_SYS_HIDDEN_LIBDEPS 7678a31a186aSmrg 7679a31a186aSmrg 7680a31a186aSmrg# _LT_LANG_F77_CONFIG([TAG]) 7681a31a186aSmrg# -------------------------- 7682a31a186aSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 7683a31a186aSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7684493f84f4Smrg# to write the compiler configuration to 'libtool'. 7685a31a186aSmrgm4_defun([_LT_LANG_F77_CONFIG], 76860bb88ba4Smrg[AC_LANG_PUSH(Fortran 77) 7687493f84f4Smrgif test -z "$F77" || test no = "$F77"; then 76880bb88ba4Smrg _lt_disable_F77=yes 76890bb88ba4Smrgfi 7690eda3803bSmrg 7691a31a186aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7692a31a186aSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7693a31a186aSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7694a31a186aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7695a31a186aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7696a31a186aSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7697a31a186aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7698a31a186aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7699a31a186aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7700a31a186aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7701a31a186aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7702a31a186aSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7703a31a186aSmrg_LT_TAGVAR(module_cmds, $1)= 7704a31a186aSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7705a31a186aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7706a31a186aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 77070bb88ba4Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 77080bb88ba4Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7709a31a186aSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7710a31a186aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7711a31a186aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7712fe5e51b7Smrg 7713a31a186aSmrg# Source file extension for f77 test sources. 7714a31a186aSmrgac_ext=f 7715eda3803bSmrg 7716a31a186aSmrg# Object file extension for compiled f77 test sources. 7717a31a186aSmrgobjext=o 7718a31a186aSmrg_LT_TAGVAR(objext, $1)=$objext 7719a31a186aSmrg 7720a31a186aSmrg# No sense in running all these tests if we already determined that 7721a31a186aSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 7722a31a186aSmrg# are currently assumed to apply to all compilers on this platform, 7723a31a186aSmrg# and will be corrupted by setting them based on a non-working compiler. 7724493f84f4Smrgif test yes != "$_lt_disable_F77"; then 7725a31a186aSmrg # Code to be used in simple compile tests 7726a31a186aSmrg lt_simple_compile_test_code="\ 7727a31a186aSmrg subroutine t 7728a31a186aSmrg return 7729a31a186aSmrg end 7730a31a186aSmrg" 7731eda3803bSmrg 7732a31a186aSmrg # Code to be used in simple link tests 7733a31a186aSmrg lt_simple_link_test_code="\ 7734a31a186aSmrg program t 7735a31a186aSmrg end 7736a31a186aSmrg" 7737fe5e51b7Smrg 7738a31a186aSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7739a31a186aSmrg _LT_TAG_COMPILER 7740fe5e51b7Smrg 7741a31a186aSmrg # save warnings/boilerplate of simple test code 7742a31a186aSmrg _LT_COMPILER_BOILERPLATE 7743a31a186aSmrg _LT_LINKER_BOILERPLATE 7744fe5e51b7Smrg 7745a31a186aSmrg # Allow CC to be a program name with arguments. 7746493f84f4Smrg lt_save_CC=$CC 7747a31a186aSmrg lt_save_GCC=$GCC 77480bb88ba4Smrg lt_save_CFLAGS=$CFLAGS 7749a31a186aSmrg CC=${F77-"f77"} 77500bb88ba4Smrg CFLAGS=$FFLAGS 7751a31a186aSmrg compiler=$CC 7752a31a186aSmrg _LT_TAGVAR(compiler, $1)=$CC 7753a31a186aSmrg _LT_CC_BASENAME([$compiler]) 7754a31a186aSmrg GCC=$G77 7755a31a186aSmrg if test -n "$compiler"; then 7756a31a186aSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7757a31a186aSmrg AC_MSG_RESULT([$can_build_shared]) 7758eda3803bSmrg 7759a31a186aSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7760493f84f4Smrg test no = "$can_build_shared" && enable_shared=no 7761eda3803bSmrg 7762a31a186aSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7763a31a186aSmrg # are all built from PIC. 7764a31a186aSmrg case $host_os in 7765a31a186aSmrg aix3*) 7766493f84f4Smrg test yes = "$enable_shared" && enable_static=no 7767a31a186aSmrg if test -n "$RANLIB"; then 7768a31a186aSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7769a31a186aSmrg postinstall_cmds='$RANLIB $lib' 7770a31a186aSmrg fi 7771a31a186aSmrg ;; 7772a31a186aSmrg aix[[4-9]]*) 7773493f84f4Smrg if test ia64 != "$host_cpu"; then 7774493f84f4Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7775493f84f4Smrg yes,aix,yes) ;; # shared object as lib.so file only 7776493f84f4Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7777493f84f4Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7778493f84f4Smrg esac 7779a31a186aSmrg fi 7780a31a186aSmrg ;; 7781a31a186aSmrg esac 7782a31a186aSmrg AC_MSG_RESULT([$enable_shared]) 7783a31a186aSmrg 7784a31a186aSmrg AC_MSG_CHECKING([whether to build static libraries]) 7785a31a186aSmrg # Make sure either enable_shared or enable_static is yes. 7786493f84f4Smrg test yes = "$enable_shared" || enable_static=yes 7787a31a186aSmrg AC_MSG_RESULT([$enable_static]) 7788a31a186aSmrg 7789493f84f4Smrg _LT_TAGVAR(GCC, $1)=$G77 7790493f84f4Smrg _LT_TAGVAR(LD, $1)=$LD 7791a31a186aSmrg 7792a31a186aSmrg ## CAVEAT EMPTOR: 7793a31a186aSmrg ## There is no encapsulation within the following macros, do not change 7794a31a186aSmrg ## the running order or otherwise move them around unless you know exactly 7795a31a186aSmrg ## what you are doing... 7796a31a186aSmrg _LT_COMPILER_PIC($1) 7797a31a186aSmrg _LT_COMPILER_C_O($1) 7798a31a186aSmrg _LT_COMPILER_FILE_LOCKS($1) 7799a31a186aSmrg _LT_LINKER_SHLIBS($1) 7800a31a186aSmrg _LT_SYS_DYNAMIC_LINKER($1) 7801a31a186aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7802a31a186aSmrg 7803a31a186aSmrg _LT_CONFIG($1) 7804a31a186aSmrg fi # test -n "$compiler" 7805a31a186aSmrg 7806a31a186aSmrg GCC=$lt_save_GCC 7807493f84f4Smrg CC=$lt_save_CC 7808493f84f4Smrg CFLAGS=$lt_save_CFLAGS 7809493f84f4Smrgfi # test yes != "$_lt_disable_F77" 7810eda3803bSmrg 7811a31a186aSmrgAC_LANG_POP 7812a31a186aSmrg])# _LT_LANG_F77_CONFIG 7813eda3803bSmrg 7814fe5e51b7Smrg 7815a31a186aSmrg# _LT_LANG_FC_CONFIG([TAG]) 7816a31a186aSmrg# ------------------------- 7817a31a186aSmrg# Ensure that the configuration variables for a Fortran compiler are 7818a31a186aSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7819493f84f4Smrg# to write the compiler configuration to 'libtool'. 7820a31a186aSmrgm4_defun([_LT_LANG_FC_CONFIG], 78210bb88ba4Smrg[AC_LANG_PUSH(Fortran) 78220bb88ba4Smrg 7823493f84f4Smrgif test -z "$FC" || test no = "$FC"; then 78240bb88ba4Smrg _lt_disable_FC=yes 78250bb88ba4Smrgfi 7826a31a186aSmrg 7827a31a186aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7828a31a186aSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7829a31a186aSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7830a31a186aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7831a31a186aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7832a31a186aSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7833a31a186aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7834a31a186aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7835a31a186aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7836a31a186aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7837a31a186aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7838a31a186aSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7839a31a186aSmrg_LT_TAGVAR(module_cmds, $1)= 7840a31a186aSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7841a31a186aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7842a31a186aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78430bb88ba4Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78440bb88ba4Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7845a31a186aSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7846a31a186aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7847a31a186aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7848a31a186aSmrg 7849a31a186aSmrg# Source file extension for fc test sources. 7850a31a186aSmrgac_ext=${ac_fc_srcext-f} 7851a31a186aSmrg 7852a31a186aSmrg# Object file extension for compiled fc test sources. 7853a31a186aSmrgobjext=o 7854a31a186aSmrg_LT_TAGVAR(objext, $1)=$objext 7855a31a186aSmrg 7856a31a186aSmrg# No sense in running all these tests if we already determined that 7857a31a186aSmrg# the FC compiler isn't working. Some variables (like enable_shared) 7858a31a186aSmrg# are currently assumed to apply to all compilers on this platform, 7859a31a186aSmrg# and will be corrupted by setting them based on a non-working compiler. 7860493f84f4Smrgif test yes != "$_lt_disable_FC"; then 7861a31a186aSmrg # Code to be used in simple compile tests 7862a31a186aSmrg lt_simple_compile_test_code="\ 7863a31a186aSmrg subroutine t 7864a31a186aSmrg return 7865a31a186aSmrg end 7866a31a186aSmrg" 7867fe5e51b7Smrg 7868a31a186aSmrg # Code to be used in simple link tests 7869a31a186aSmrg lt_simple_link_test_code="\ 7870a31a186aSmrg program t 7871a31a186aSmrg end 7872a31a186aSmrg" 7873fe5e51b7Smrg 7874a31a186aSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7875a31a186aSmrg _LT_TAG_COMPILER 7876fe5e51b7Smrg 7877a31a186aSmrg # save warnings/boilerplate of simple test code 7878a31a186aSmrg _LT_COMPILER_BOILERPLATE 7879a31a186aSmrg _LT_LINKER_BOILERPLATE 7880fe5e51b7Smrg 7881a31a186aSmrg # Allow CC to be a program name with arguments. 7882493f84f4Smrg lt_save_CC=$CC 7883a31a186aSmrg lt_save_GCC=$GCC 78840bb88ba4Smrg lt_save_CFLAGS=$CFLAGS 7885a31a186aSmrg CC=${FC-"f95"} 78860bb88ba4Smrg CFLAGS=$FCFLAGS 7887a31a186aSmrg compiler=$CC 7888a31a186aSmrg GCC=$ac_cv_fc_compiler_gnu 7889a31a186aSmrg 7890a31a186aSmrg _LT_TAGVAR(compiler, $1)=$CC 7891a31a186aSmrg _LT_CC_BASENAME([$compiler]) 7892fe5e51b7Smrg 7893a31a186aSmrg if test -n "$compiler"; then 7894a31a186aSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7895a31a186aSmrg AC_MSG_RESULT([$can_build_shared]) 7896a31a186aSmrg 7897a31a186aSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7898493f84f4Smrg test no = "$can_build_shared" && enable_shared=no 7899a31a186aSmrg 7900a31a186aSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7901a31a186aSmrg # are all built from PIC. 7902643b027fSmrg case $host_os in 7903a31a186aSmrg aix3*) 7904493f84f4Smrg test yes = "$enable_shared" && enable_static=no 7905a31a186aSmrg if test -n "$RANLIB"; then 7906a31a186aSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7907a31a186aSmrg postinstall_cmds='$RANLIB $lib' 7908a31a186aSmrg fi 7909a31a186aSmrg ;; 7910643b027fSmrg aix[[4-9]]*) 7911493f84f4Smrg if test ia64 != "$host_cpu"; then 7912493f84f4Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7913493f84f4Smrg yes,aix,yes) ;; # shared object as lib.so file only 7914493f84f4Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7915493f84f4Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7916493f84f4Smrg esac 7917643b027fSmrg fi 7918a31a186aSmrg ;; 7919643b027fSmrg esac 7920a31a186aSmrg AC_MSG_RESULT([$enable_shared]) 7921a31a186aSmrg 7922a31a186aSmrg AC_MSG_CHECKING([whether to build static libraries]) 7923a31a186aSmrg # Make sure either enable_shared or enable_static is yes. 7924493f84f4Smrg test yes = "$enable_shared" || enable_static=yes 7925a31a186aSmrg AC_MSG_RESULT([$enable_static]) 7926a31a186aSmrg 7927493f84f4Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7928493f84f4Smrg _LT_TAGVAR(LD, $1)=$LD 7929a31a186aSmrg 7930a31a186aSmrg ## CAVEAT EMPTOR: 7931a31a186aSmrg ## There is no encapsulation within the following macros, do not change 7932a31a186aSmrg ## the running order or otherwise move them around unless you know exactly 7933a31a186aSmrg ## what you are doing... 7934a31a186aSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7935a31a186aSmrg _LT_COMPILER_PIC($1) 7936a31a186aSmrg _LT_COMPILER_C_O($1) 7937a31a186aSmrg _LT_COMPILER_FILE_LOCKS($1) 7938a31a186aSmrg _LT_LINKER_SHLIBS($1) 7939a31a186aSmrg _LT_SYS_DYNAMIC_LINKER($1) 7940a31a186aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7941a31a186aSmrg 7942a31a186aSmrg _LT_CONFIG($1) 7943a31a186aSmrg fi # test -n "$compiler" 7944a31a186aSmrg 7945a31a186aSmrg GCC=$lt_save_GCC 79460bb88ba4Smrg CC=$lt_save_CC 79470bb88ba4Smrg CFLAGS=$lt_save_CFLAGS 7948493f84f4Smrgfi # test yes != "$_lt_disable_FC" 7949eda3803bSmrg 7950a31a186aSmrgAC_LANG_POP 7951a31a186aSmrg])# _LT_LANG_FC_CONFIG 7952eda3803bSmrg 7953eda3803bSmrg 7954a31a186aSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 7955a31a186aSmrg# -------------------------- 7956a31a186aSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7957a31a186aSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7958493f84f4Smrg# to write the compiler configuration to 'libtool'. 7959a31a186aSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 7960a31a186aSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7961a31a186aSmrgAC_LANG_SAVE 7962eda3803bSmrg 7963a31a186aSmrg# Source file extension for Java test sources. 7964a31a186aSmrgac_ext=java 7965eda3803bSmrg 7966a31a186aSmrg# Object file extension for compiled Java test sources. 7967a31a186aSmrgobjext=o 7968a31a186aSmrg_LT_TAGVAR(objext, $1)=$objext 7969eda3803bSmrg 7970a31a186aSmrg# Code to be used in simple compile tests 7971a31a186aSmrglt_simple_compile_test_code="class foo {}" 7972eda3803bSmrg 7973a31a186aSmrg# Code to be used in simple link tests 7974a31a186aSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7975fe5e51b7Smrg 7976a31a186aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7977a31a186aSmrg_LT_TAG_COMPILER 7978fe5e51b7Smrg 7979a31a186aSmrg# save warnings/boilerplate of simple test code 7980a31a186aSmrg_LT_COMPILER_BOILERPLATE 7981a31a186aSmrg_LT_LINKER_BOILERPLATE 7982fe5e51b7Smrg 7983a31a186aSmrg# Allow CC to be a program name with arguments. 79840bb88ba4Smrglt_save_CC=$CC 79850bb88ba4Smrglt_save_CFLAGS=$CFLAGS 7986a31a186aSmrglt_save_GCC=$GCC 7987a31a186aSmrgGCC=yes 7988a31a186aSmrgCC=${GCJ-"gcj"} 79890bb88ba4SmrgCFLAGS=$GCJFLAGS 7990a31a186aSmrgcompiler=$CC 7991a31a186aSmrg_LT_TAGVAR(compiler, $1)=$CC 7992493f84f4Smrg_LT_TAGVAR(LD, $1)=$LD 7993a31a186aSmrg_LT_CC_BASENAME([$compiler]) 7994a31a186aSmrg 7995a31a186aSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7996a31a186aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7997a31a186aSmrg 7998a31a186aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 79990bb88ba4Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80000bb88ba4Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8001a31a186aSmrg 8002a31a186aSmrgif test -n "$compiler"; then 8003a31a186aSmrg _LT_COMPILER_NO_RTTI($1) 8004a31a186aSmrg _LT_COMPILER_PIC($1) 8005a31a186aSmrg _LT_COMPILER_C_O($1) 8006a31a186aSmrg _LT_COMPILER_FILE_LOCKS($1) 8007a31a186aSmrg _LT_LINKER_SHLIBS($1) 8008a31a186aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8009a31a186aSmrg 8010a31a186aSmrg _LT_CONFIG($1) 8011a31a186aSmrgfi 8012a31a186aSmrg 8013a31a186aSmrgAC_LANG_RESTORE 8014a31a186aSmrg 8015a31a186aSmrgGCC=$lt_save_GCC 80160bb88ba4SmrgCC=$lt_save_CC 80170bb88ba4SmrgCFLAGS=$lt_save_CFLAGS 8018a31a186aSmrg])# _LT_LANG_GCJ_CONFIG 8019a31a186aSmrg 8020a31a186aSmrg 80210bb88ba4Smrg# _LT_LANG_GO_CONFIG([TAG]) 80220bb88ba4Smrg# -------------------------- 80230bb88ba4Smrg# Ensure that the configuration variables for the GNU Go compiler 8024a31a186aSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8025493f84f4Smrg# to write the compiler configuration to 'libtool'. 80260bb88ba4Smrgm4_defun([_LT_LANG_GO_CONFIG], 80270bb88ba4Smrg[AC_REQUIRE([LT_PROG_GO])dnl 8028a31a186aSmrgAC_LANG_SAVE 8029a31a186aSmrg 80300bb88ba4Smrg# Source file extension for Go test sources. 80310bb88ba4Smrgac_ext=go 8032a31a186aSmrg 80330bb88ba4Smrg# Object file extension for compiled Go test sources. 8034a31a186aSmrgobjext=o 8035a31a186aSmrg_LT_TAGVAR(objext, $1)=$objext 8036a31a186aSmrg 8037a31a186aSmrg# Code to be used in simple compile tests 80380bb88ba4Smrglt_simple_compile_test_code="package main; func main() { }" 8039a31a186aSmrg 8040a31a186aSmrg# Code to be used in simple link tests 80410bb88ba4Smrglt_simple_link_test_code='package main; func main() { }' 8042a31a186aSmrg 8043a31a186aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8044a31a186aSmrg_LT_TAG_COMPILER 8045a31a186aSmrg 8046a31a186aSmrg# save warnings/boilerplate of simple test code 8047a31a186aSmrg_LT_COMPILER_BOILERPLATE 8048a31a186aSmrg_LT_LINKER_BOILERPLATE 8049fe5e51b7Smrg 8050a31a186aSmrg# Allow CC to be a program name with arguments. 80510bb88ba4Smrglt_save_CC=$CC 80520bb88ba4Smrglt_save_CFLAGS=$CFLAGS 8053a31a186aSmrglt_save_GCC=$GCC 80540bb88ba4SmrgGCC=yes 80550bb88ba4SmrgCC=${GOC-"gccgo"} 80560bb88ba4SmrgCFLAGS=$GOFLAGS 8057a31a186aSmrgcompiler=$CC 8058a31a186aSmrg_LT_TAGVAR(compiler, $1)=$CC 8059493f84f4Smrg_LT_TAGVAR(LD, $1)=$LD 8060a31a186aSmrg_LT_CC_BASENAME([$compiler]) 80610bb88ba4Smrg 80620bb88ba4Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 80630bb88ba4Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80640bb88ba4Smrg 80650bb88ba4Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80660bb88ba4Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80670bb88ba4Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8068fe5e51b7Smrg 8069a31a186aSmrgif test -n "$compiler"; then 80700bb88ba4Smrg _LT_COMPILER_NO_RTTI($1) 80710bb88ba4Smrg _LT_COMPILER_PIC($1) 80720bb88ba4Smrg _LT_COMPILER_C_O($1) 80730bb88ba4Smrg _LT_COMPILER_FILE_LOCKS($1) 80740bb88ba4Smrg _LT_LINKER_SHLIBS($1) 80750bb88ba4Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80760bb88ba4Smrg 8077a31a186aSmrg _LT_CONFIG($1) 8078a31a186aSmrgfi 8079fe5e51b7Smrg 8080a31a186aSmrgAC_LANG_RESTORE 8081fe5e51b7Smrg 80820bb88ba4SmrgGCC=$lt_save_GCC 80830bb88ba4SmrgCC=$lt_save_CC 80840bb88ba4SmrgCFLAGS=$lt_save_CFLAGS 80850bb88ba4Smrg])# _LT_LANG_GO_CONFIG 8086fe5e51b7Smrg 80870bb88ba4Smrg 80880bb88ba4Smrg# _LT_LANG_RC_CONFIG([TAG]) 80890bb88ba4Smrg# ------------------------- 80900bb88ba4Smrg# Ensure that the configuration variables for the Windows resource compiler 80910bb88ba4Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8092493f84f4Smrg# to write the compiler configuration to 'libtool'. 80930bb88ba4Smrgm4_defun([_LT_LANG_RC_CONFIG], 80940bb88ba4Smrg[AC_REQUIRE([LT_PROG_RC])dnl 80950bb88ba4SmrgAC_LANG_SAVE 80960bb88ba4Smrg 80970bb88ba4Smrg# Source file extension for RC test sources. 80980bb88ba4Smrgac_ext=rc 80990bb88ba4Smrg 81000bb88ba4Smrg# Object file extension for compiled RC test sources. 81010bb88ba4Smrgobjext=o 81020bb88ba4Smrg_LT_TAGVAR(objext, $1)=$objext 81030bb88ba4Smrg 81040bb88ba4Smrg# Code to be used in simple compile tests 81050bb88ba4Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 81060bb88ba4Smrg 81070bb88ba4Smrg# Code to be used in simple link tests 8108493f84f4Smrglt_simple_link_test_code=$lt_simple_compile_test_code 81090bb88ba4Smrg 81100bb88ba4Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 81110bb88ba4Smrg_LT_TAG_COMPILER 81120bb88ba4Smrg 81130bb88ba4Smrg# save warnings/boilerplate of simple test code 81140bb88ba4Smrg_LT_COMPILER_BOILERPLATE 81150bb88ba4Smrg_LT_LINKER_BOILERPLATE 81160bb88ba4Smrg 81170bb88ba4Smrg# Allow CC to be a program name with arguments. 8118493f84f4Smrglt_save_CC=$CC 81190bb88ba4Smrglt_save_CFLAGS=$CFLAGS 81200bb88ba4Smrglt_save_GCC=$GCC 81210bb88ba4SmrgGCC= 81220bb88ba4SmrgCC=${RC-"windres"} 81230bb88ba4SmrgCFLAGS= 81240bb88ba4Smrgcompiler=$CC 81250bb88ba4Smrg_LT_TAGVAR(compiler, $1)=$CC 81260bb88ba4Smrg_LT_CC_BASENAME([$compiler]) 81270bb88ba4Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81280bb88ba4Smrg 81290bb88ba4Smrgif test -n "$compiler"; then 81300bb88ba4Smrg : 81310bb88ba4Smrg _LT_CONFIG($1) 81320bb88ba4Smrgfi 81330bb88ba4Smrg 81340bb88ba4SmrgGCC=$lt_save_GCC 81350bb88ba4SmrgAC_LANG_RESTORE 81360bb88ba4SmrgCC=$lt_save_CC 81370bb88ba4SmrgCFLAGS=$lt_save_CFLAGS 81380bb88ba4Smrg])# _LT_LANG_RC_CONFIG 81390bb88ba4Smrg 81400bb88ba4Smrg 81410bb88ba4Smrg# LT_PROG_GCJ 81420bb88ba4Smrg# ----------- 81430bb88ba4SmrgAC_DEFUN([LT_PROG_GCJ], 81440bb88ba4Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8145a31a186aSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8146a31a186aSmrg [AC_CHECK_TOOL(GCJ, gcj,) 8147493f84f4Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8148a31a186aSmrg AC_SUBST(GCJFLAGS)])])[]dnl 8149a31a186aSmrg]) 8150fe5e51b7Smrg 8151a31a186aSmrg# Old name: 8152a31a186aSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8153a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 8154a31a186aSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8155fe5e51b7Smrg 8156fe5e51b7Smrg 81570bb88ba4Smrg# LT_PROG_GO 81580bb88ba4Smrg# ---------- 81590bb88ba4SmrgAC_DEFUN([LT_PROG_GO], 81600bb88ba4Smrg[AC_CHECK_TOOL(GOC, gccgo,) 81610bb88ba4Smrg]) 81620bb88ba4Smrg 81630bb88ba4Smrg 8164a31a186aSmrg# LT_PROG_RC 8165a31a186aSmrg# ---------- 8166a31a186aSmrgAC_DEFUN([LT_PROG_RC], 8167a31a186aSmrg[AC_CHECK_TOOL(RC, windres,) 8168a31a186aSmrg]) 8169fe5e51b7Smrg 8170a31a186aSmrg# Old name: 8171a31a186aSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8172a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 8173a31a186aSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8174fe5e51b7Smrg 8175fe5e51b7Smrg 8176a31a186aSmrg# _LT_DECL_EGREP 8177a31a186aSmrg# -------------- 8178a31a186aSmrg# If we don't have a new enough Autoconf to choose the best grep 8179a31a186aSmrg# available, choose the one first in the user's PATH. 8180a31a186aSmrgm4_defun([_LT_DECL_EGREP], 8181a31a186aSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8182a31a186aSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8183a31a186aSmrgtest -z "$GREP" && GREP=grep 8184a31a186aSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8185a31a186aSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8186a31a186aSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8187a31a186aSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8188a31a186aSmrgAC_SUBST([GREP]) 8189a31a186aSmrg]) 8190fe5e51b7Smrg 8191eda3803bSmrg 8192a31a186aSmrg# _LT_DECL_OBJDUMP 8193a31a186aSmrg# -------------- 8194a31a186aSmrg# If we don't have a new enough Autoconf to choose the best objdump 8195a31a186aSmrg# available, choose the one first in the user's PATH. 8196a31a186aSmrgm4_defun([_LT_DECL_OBJDUMP], 8197a31a186aSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8198a31a186aSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8199a31a186aSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8200a31a186aSmrgAC_SUBST([OBJDUMP]) 8201a31a186aSmrg]) 8202eda3803bSmrg 82030bb88ba4Smrg# _LT_DECL_DLLTOOL 82040bb88ba4Smrg# ---------------- 82050bb88ba4Smrg# Ensure DLLTOOL variable is set. 82060bb88ba4Smrgm4_defun([_LT_DECL_DLLTOOL], 82070bb88ba4Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 82080bb88ba4Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 82090bb88ba4Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 82100bb88ba4SmrgAC_SUBST([DLLTOOL]) 82110bb88ba4Smrg]) 8212eda3803bSmrg 8213a31a186aSmrg# _LT_DECL_SED 8214a31a186aSmrg# ------------ 8215a31a186aSmrg# Check for a fully-functional sed program, that truncates 8216a31a186aSmrg# as few characters as possible. Prefer GNU sed if found. 8217a31a186aSmrgm4_defun([_LT_DECL_SED], 8218a31a186aSmrg[AC_PROG_SED 8219a31a186aSmrgtest -z "$SED" && SED=sed 8220a31a186aSmrgXsed="$SED -e 1s/^X//" 8221a31a186aSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8222a31a186aSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8223a31a186aSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8224a31a186aSmrg])# _LT_DECL_SED 8225a31a186aSmrg 8226a31a186aSmrgm4_ifndef([AC_PROG_SED], [ 8227a31a186aSmrg# NOTE: This macro has been submitted for inclusion into # 8228a31a186aSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8229a31a186aSmrg# a released version of Autoconf we should remove this # 8230a31a186aSmrg# macro and use it instead. # 8231a31a186aSmrg 8232a31a186aSmrgm4_defun([AC_PROG_SED], 8233a31a186aSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8234a31a186aSmrgAC_CACHE_VAL(lt_cv_path_SED, 8235a31a186aSmrg[# Loop through the user's path and test for sed and gsed. 8236a31a186aSmrg# Then use that list of sed's as ones to test for truncation. 8237a31a186aSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8238a31a186aSmrgfor as_dir in $PATH 8239a31a186aSmrgdo 8240a31a186aSmrg IFS=$as_save_IFS 8241a31a186aSmrg test -z "$as_dir" && as_dir=. 8242a31a186aSmrg for lt_ac_prog in sed gsed; do 8243a31a186aSmrg for ac_exec_ext in '' $ac_executable_extensions; do 8244a31a186aSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8245a31a186aSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8246a31a186aSmrg fi 8247a31a186aSmrg done 8248a31a186aSmrg done 8249a31a186aSmrgdone 8250a31a186aSmrgIFS=$as_save_IFS 8251a31a186aSmrglt_ac_max=0 8252a31a186aSmrglt_ac_count=0 8253a31a186aSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8254a31a186aSmrg# along with /bin/sed that truncates output. 8255a31a186aSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8256493f84f4Smrg test ! -f "$lt_ac_sed" && continue 8257a31a186aSmrg cat /dev/null > conftest.in 8258a31a186aSmrg lt_ac_count=0 8259a31a186aSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8260a31a186aSmrg # Check for GNU sed and select it if it is found. 8261a31a186aSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8262a31a186aSmrg lt_cv_path_SED=$lt_ac_sed 8263a31a186aSmrg break 8264fe5e51b7Smrg fi 8265a31a186aSmrg while true; do 8266a31a186aSmrg cat conftest.in conftest.in >conftest.tmp 8267a31a186aSmrg mv conftest.tmp conftest.in 8268a31a186aSmrg cp conftest.in conftest.nl 8269a31a186aSmrg echo >>conftest.nl 8270a31a186aSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8271a31a186aSmrg cmp -s conftest.out conftest.nl || break 8272a31a186aSmrg # 10000 chars as input seems more than enough 8273493f84f4Smrg test 10 -lt "$lt_ac_count" && break 8274a31a186aSmrg lt_ac_count=`expr $lt_ac_count + 1` 8275493f84f4Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 8276a31a186aSmrg lt_ac_max=$lt_ac_count 8277a31a186aSmrg lt_cv_path_SED=$lt_ac_sed 8278a31a186aSmrg fi 8279a31a186aSmrg done 8280a31a186aSmrgdone 8281fe5e51b7Smrg]) 8282a31a186aSmrgSED=$lt_cv_path_SED 8283a31a186aSmrgAC_SUBST([SED]) 8284a31a186aSmrgAC_MSG_RESULT([$SED]) 8285a31a186aSmrg])#AC_PROG_SED 8286a31a186aSmrg])#m4_ifndef 8287fe5e51b7Smrg 8288a31a186aSmrg# Old name: 8289a31a186aSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8290a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 8291a31a186aSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8292a31a186aSmrg 8293a31a186aSmrg 8294a31a186aSmrg# _LT_CHECK_SHELL_FEATURES 8295a31a186aSmrg# ------------------------ 8296a31a186aSmrg# Find out whether the shell is Bourne or XSI compatible, 8297a31a186aSmrg# or has some other useful features. 8298a31a186aSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8299493f84f4Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8300a31a186aSmrg lt_unset=unset 8301a31a186aSmrgelse 8302a31a186aSmrg lt_unset=false 8303fe5e51b7Smrgfi 8304a31a186aSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8305a31a186aSmrg 8306a31a186aSmrg# test EBCDIC or ASCII 8307a31a186aSmrgcase `echo X|tr X '\101'` in 8308a31a186aSmrg A) # ASCII based system 8309a31a186aSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8310a31a186aSmrg lt_SP2NL='tr \040 \012' 8311a31a186aSmrg lt_NL2SP='tr \015\012 \040\040' 8312a31a186aSmrg ;; 8313a31a186aSmrg *) # EBCDIC based system 8314a31a186aSmrg lt_SP2NL='tr \100 \n' 8315a31a186aSmrg lt_NL2SP='tr \r\n \100\100' 8316a31a186aSmrg ;; 8317fe5e51b7Smrgesac 8318a31a186aSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8319a31a186aSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8320a31a186aSmrg])# _LT_CHECK_SHELL_FEATURES 8321eda3803bSmrg 8322eda3803bSmrg 83230bb88ba4Smrg# _LT_PATH_CONVERSION_FUNCTIONS 83240bb88ba4Smrg# ----------------------------- 8325493f84f4Smrg# Determine what file name conversion functions should be used by 83260bb88ba4Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 83270bb88ba4Smrg# for certain cross-compile configurations and native mingw. 83280bb88ba4Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 83290bb88ba4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 83300bb88ba4SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 83310bb88ba4SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 83320bb88ba4SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 83330bb88ba4Smrg[case $host in 83340bb88ba4Smrg *-*-mingw* ) 83350bb88ba4Smrg case $build in 83360bb88ba4Smrg *-*-mingw* ) # actually msys 83370bb88ba4Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 83380bb88ba4Smrg ;; 83390bb88ba4Smrg *-*-cygwin* ) 83400bb88ba4Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 83410bb88ba4Smrg ;; 83420bb88ba4Smrg * ) # otherwise, assume *nix 83430bb88ba4Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 83440bb88ba4Smrg ;; 83450bb88ba4Smrg esac 8346a31a186aSmrg ;; 83470bb88ba4Smrg *-*-cygwin* ) 83480bb88ba4Smrg case $build in 83490bb88ba4Smrg *-*-mingw* ) # actually msys 83500bb88ba4Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 83510bb88ba4Smrg ;; 83520bb88ba4Smrg *-*-cygwin* ) 83530bb88ba4Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83540bb88ba4Smrg ;; 83550bb88ba4Smrg * ) # otherwise, assume *nix 83560bb88ba4Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 83570bb88ba4Smrg ;; 83580bb88ba4Smrg esac 8359a31a186aSmrg ;; 83600bb88ba4Smrg * ) # unhandled hosts (and "normal" native builds) 83610bb88ba4Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83620bb88ba4Smrg ;; 83630bb88ba4Smrgesac 83640bb88ba4Smrg]) 83650bb88ba4Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 83660bb88ba4SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 83670bb88ba4Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 83680bb88ba4Smrg [0], [convert $build file names to $host format])dnl 83690bb88ba4Smrg 83700bb88ba4SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 83710bb88ba4SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 83720bb88ba4Smrg[#assume ordinary cross tools, or native build. 83730bb88ba4Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 83740bb88ba4Smrgcase $host in 83750bb88ba4Smrg *-*-mingw* ) 83760bb88ba4Smrg case $build in 83770bb88ba4Smrg *-*-mingw* ) # actually msys 83780bb88ba4Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 83790bb88ba4Smrg ;; 83800bb88ba4Smrg esac 83810bb88ba4Smrg ;; 83820bb88ba4Smrgesac 8383a31a186aSmrg]) 83840bb88ba4Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 83850bb88ba4SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 83860bb88ba4Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 83870bb88ba4Smrg [0], [convert $build files to toolchain format])dnl 83880bb88ba4Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8389fe5e51b7Smrg 8390a31a186aSmrg# Helper functions for option handling. -*- Autoconf -*- 8391a31a186aSmrg# 8392ee82cb62Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 8393493f84f4Smrg# Foundation, Inc. 8394a31a186aSmrg# Written by Gary V. Vaughan, 2004 8395a31a186aSmrg# 8396a31a186aSmrg# This file is free software; the Free Software Foundation gives 8397a31a186aSmrg# unlimited permission to copy and/or distribute it, with or without 8398a31a186aSmrg# modifications, as long as this notice is preserved. 8399fe5e51b7Smrg 8400493f84f4Smrg# serial 8 ltoptions.m4 8401fe5e51b7Smrg 8402a31a186aSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8403a31a186aSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8404fe5e51b7Smrg 8405fe5e51b7Smrg 8406a31a186aSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8407a31a186aSmrg# ------------------------------------------ 8408a31a186aSmrgm4_define([_LT_MANGLE_OPTION], 8409a31a186aSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8410fe5e51b7Smrg 8411fe5e51b7Smrg 8412a31a186aSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8413a31a186aSmrg# --------------------------------------- 8414a31a186aSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8415a31a186aSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8416a31a186aSmrg# saved as a flag. 8417a31a186aSmrgm4_define([_LT_SET_OPTION], 8418a31a186aSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8419a31a186aSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8420a31a186aSmrg _LT_MANGLE_DEFUN([$1], [$2]), 8421493f84f4Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 8422a31a186aSmrg]) 8423fe5e51b7Smrg 8424fe5e51b7Smrg 8425a31a186aSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8426a31a186aSmrg# ------------------------------------------------------------ 8427a31a186aSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8428a31a186aSmrgm4_define([_LT_IF_OPTION], 8429a31a186aSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8430a31a186aSmrg 8431a31a186aSmrg 8432a31a186aSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8433a31a186aSmrg# ------------------------------------------------------- 8434a31a186aSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8435a31a186aSmrg# are set. 8436a31a186aSmrgm4_define([_LT_UNLESS_OPTIONS], 8437a31a186aSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8438a31a186aSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8439a31a186aSmrg [m4_define([$0_found])])])[]dnl 8440a31a186aSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8441a31a186aSmrg])[]dnl 8442a31a186aSmrg]) 8443fe5e51b7Smrg 8444fe5e51b7Smrg 8445a31a186aSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8446a31a186aSmrg# ---------------------------------------- 8447a31a186aSmrg# OPTION-LIST is a space-separated list of Libtool options associated 8448a31a186aSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8449a31a186aSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8450a31a186aSmrg# the unknown option and exit. 8451a31a186aSmrgm4_defun([_LT_SET_OPTIONS], 8452a31a186aSmrg[# Set options 8453a31a186aSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8454a31a186aSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 8455a31a186aSmrg 8456a31a186aSmrgm4_if([$1],[LT_INIT],[ 8457a31a186aSmrg dnl 8458a31a186aSmrg dnl Simply set some default values (i.e off) if boolean options were not 8459a31a186aSmrg dnl specified: 8460a31a186aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8461a31a186aSmrg ]) 8462a31a186aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8463a31a186aSmrg ]) 8464a31a186aSmrg dnl 8465a31a186aSmrg dnl If no reference was made to various pairs of opposing options, then 8466a31a186aSmrg dnl we run the default mode handler for the pair. For example, if neither 8467493f84f4Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8468a31a186aSmrg dnl archives by default: 8469a31a186aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8470a31a186aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8471a31a186aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8472a31a186aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8473493f84f4Smrg [_LT_ENABLE_FAST_INSTALL]) 8474493f84f4Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8475493f84f4Smrg [_LT_WITH_AIX_SONAME([aix])]) 8476a31a186aSmrg ]) 8477a31a186aSmrg])# _LT_SET_OPTIONS 8478fe5e51b7Smrg 8479fe5e51b7Smrg 8480fe5e51b7Smrg 8481a31a186aSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8482a31a186aSmrg# ----------------------------------------- 8483a31a186aSmrgm4_define([_LT_MANGLE_DEFUN], 8484a31a186aSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8485eda3803bSmrg 8486eda3803bSmrg 8487a31a186aSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8488a31a186aSmrg# ----------------------------------------------- 8489a31a186aSmrgm4_define([LT_OPTION_DEFINE], 8490a31a186aSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8491a31a186aSmrg])# LT_OPTION_DEFINE 8492eda3803bSmrg 8493eda3803bSmrg 8494a31a186aSmrg# dlopen 8495a31a186aSmrg# ------ 8496a31a186aSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8497a31a186aSmrg]) 8498a31a186aSmrg 8499a31a186aSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8500a31a186aSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8501a31a186aSmrgAC_DIAGNOSE([obsolete], 8502a31a186aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8503493f84f4Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 8504a31a186aSmrg]) 8505a31a186aSmrg 8506a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 8507a31a186aSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8508a31a186aSmrg 8509a31a186aSmrg 8510a31a186aSmrg# win32-dll 8511a31a186aSmrg# --------- 8512a31a186aSmrg# Declare package support for building win32 dll's. 8513a31a186aSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8514a31a186aSmrg[enable_win32_dll=yes 8515a31a186aSmrg 8516a31a186aSmrgcase $host in 85170bb88ba4Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8518a31a186aSmrg AC_CHECK_TOOL(AS, as, false) 8519a31a186aSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8520a31a186aSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8521a31a186aSmrg ;; 8522a31a186aSmrgesac 8523fe5e51b7Smrg 8524a31a186aSmrgtest -z "$AS" && AS=as 85250bb88ba4Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8526fe5e51b7Smrg 8527a31a186aSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 85280bb88ba4Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8529fe5e51b7Smrg 8530a31a186aSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 85310bb88ba4Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8532a31a186aSmrg])# win32-dll 8533fe5e51b7Smrg 8534a31a186aSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8535a31a186aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8536a31a186aSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8537a31a186aSmrgAC_DIAGNOSE([obsolete], 8538a31a186aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8539493f84f4Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 8540a31a186aSmrg]) 8541fe5e51b7Smrg 8542a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 8543a31a186aSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8544fe5e51b7Smrg 8545fe5e51b7Smrg 8546a31a186aSmrg# _LT_ENABLE_SHARED([DEFAULT]) 8547a31a186aSmrg# ---------------------------- 8548493f84f4Smrg# implement the --enable-shared flag, and supports the 'shared' and 8549493f84f4Smrg# 'disable-shared' LT_INIT options. 8550493f84f4Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8551a31a186aSmrgm4_define([_LT_ENABLE_SHARED], 8552a31a186aSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8553a31a186aSmrgAC_ARG_ENABLE([shared], 8554a31a186aSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8555a31a186aSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8556a31a186aSmrg [p=${PACKAGE-default} 8557a31a186aSmrg case $enableval in 8558a31a186aSmrg yes) enable_shared=yes ;; 8559a31a186aSmrg no) enable_shared=no ;; 8560a31a186aSmrg *) 8561a31a186aSmrg enable_shared=no 8562a31a186aSmrg # Look at the argument we got. We use all the common list separators. 8563493f84f4Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8564a31a186aSmrg for pkg in $enableval; do 8565493f84f4Smrg IFS=$lt_save_ifs 8566a31a186aSmrg if test "X$pkg" = "X$p"; then 8567a31a186aSmrg enable_shared=yes 8568a31a186aSmrg fi 8569a31a186aSmrg done 8570493f84f4Smrg IFS=$lt_save_ifs 8571fe5e51b7Smrg ;; 8572a31a186aSmrg esac], 8573a31a186aSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8574fe5e51b7Smrg 8575a31a186aSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8576a31a186aSmrg [Whether or not to build shared libraries]) 8577a31a186aSmrg])# _LT_ENABLE_SHARED 8578fe5e51b7Smrg 8579a31a186aSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8580a31a186aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8581fe5e51b7Smrg 8582a31a186aSmrg# Old names: 8583a31a186aSmrgAC_DEFUN([AC_ENABLE_SHARED], 8584a31a186aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8585a31a186aSmrg]) 8586fe5e51b7Smrg 8587a31a186aSmrgAC_DEFUN([AC_DISABLE_SHARED], 8588a31a186aSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8589a31a186aSmrg]) 8590fe5e51b7Smrg 8591a31a186aSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8592a31a186aSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8593fe5e51b7Smrg 8594a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 8595a31a186aSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8596a31a186aSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8597fe5e51b7Smrg 8598fe5e51b7Smrg 8599fe5e51b7Smrg 8600a31a186aSmrg# _LT_ENABLE_STATIC([DEFAULT]) 8601a31a186aSmrg# ---------------------------- 8602493f84f4Smrg# implement the --enable-static flag, and support the 'static' and 8603493f84f4Smrg# 'disable-static' LT_INIT options. 8604493f84f4Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8605a31a186aSmrgm4_define([_LT_ENABLE_STATIC], 8606a31a186aSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8607a31a186aSmrgAC_ARG_ENABLE([static], 8608a31a186aSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8609a31a186aSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8610a31a186aSmrg [p=${PACKAGE-default} 8611a31a186aSmrg case $enableval in 8612a31a186aSmrg yes) enable_static=yes ;; 8613a31a186aSmrg no) enable_static=no ;; 8614a31a186aSmrg *) 8615a31a186aSmrg enable_static=no 8616a31a186aSmrg # Look at the argument we got. We use all the common list separators. 8617493f84f4Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8618a31a186aSmrg for pkg in $enableval; do 8619493f84f4Smrg IFS=$lt_save_ifs 8620a31a186aSmrg if test "X$pkg" = "X$p"; then 8621a31a186aSmrg enable_static=yes 8622a31a186aSmrg fi 8623a31a186aSmrg done 8624493f84f4Smrg IFS=$lt_save_ifs 8625fe5e51b7Smrg ;; 8626a31a186aSmrg esac], 8627a31a186aSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8628fe5e51b7Smrg 8629a31a186aSmrg _LT_DECL([build_old_libs], [enable_static], [0], 8630a31a186aSmrg [Whether or not to build static libraries]) 8631a31a186aSmrg])# _LT_ENABLE_STATIC 8632fe5e51b7Smrg 8633a31a186aSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8634a31a186aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8635fe5e51b7Smrg 8636a31a186aSmrg# Old names: 8637a31a186aSmrgAC_DEFUN([AC_ENABLE_STATIC], 8638a31a186aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8639a31a186aSmrg]) 8640fe5e51b7Smrg 8641a31a186aSmrgAC_DEFUN([AC_DISABLE_STATIC], 8642a31a186aSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8643a31a186aSmrg]) 8644fe5e51b7Smrg 8645a31a186aSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8646a31a186aSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8647fe5e51b7Smrg 8648a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 8649a31a186aSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8650a31a186aSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8651fe5e51b7Smrg 8652fe5e51b7Smrg 8653fe5e51b7Smrg 8654a31a186aSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8655a31a186aSmrg# ---------------------------------- 8656493f84f4Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 8657493f84f4Smrg# and 'disable-fast-install' LT_INIT options. 8658493f84f4Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8659a31a186aSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 8660a31a186aSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8661a31a186aSmrgAC_ARG_ENABLE([fast-install], 8662a31a186aSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8663a31a186aSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8664a31a186aSmrg [p=${PACKAGE-default} 8665a31a186aSmrg case $enableval in 8666a31a186aSmrg yes) enable_fast_install=yes ;; 8667a31a186aSmrg no) enable_fast_install=no ;; 8668a31a186aSmrg *) 8669a31a186aSmrg enable_fast_install=no 8670a31a186aSmrg # Look at the argument we got. We use all the common list separators. 8671493f84f4Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8672a31a186aSmrg for pkg in $enableval; do 8673493f84f4Smrg IFS=$lt_save_ifs 8674a31a186aSmrg if test "X$pkg" = "X$p"; then 8675a31a186aSmrg enable_fast_install=yes 8676eda3803bSmrg fi 8677a31a186aSmrg done 8678493f84f4Smrg IFS=$lt_save_ifs 8679fe5e51b7Smrg ;; 8680a31a186aSmrg esac], 8681a31a186aSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8682fe5e51b7Smrg 8683a31a186aSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 8684a31a186aSmrg [Whether or not to optimize for fast installation])dnl 8685a31a186aSmrg])# _LT_ENABLE_FAST_INSTALL 8686fe5e51b7Smrg 8687a31a186aSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8688a31a186aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8689fe5e51b7Smrg 8690a31a186aSmrg# Old names: 8691a31a186aSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8692a31a186aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8693a31a186aSmrgAC_DIAGNOSE([obsolete], 8694a31a186aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8695493f84f4Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 8696a31a186aSmrg]) 8697fe5e51b7Smrg 8698a31a186aSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8699a31a186aSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8700a31a186aSmrgAC_DIAGNOSE([obsolete], 8701a31a186aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8702493f84f4Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 8703a31a186aSmrg]) 8704fe5e51b7Smrg 8705a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 8706a31a186aSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8707a31a186aSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8708fe5e51b7Smrg 8709fe5e51b7Smrg 8710493f84f4Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 8711493f84f4Smrg# ---------------------------------- 8712493f84f4Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8713493f84f4Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8714493f84f4Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8715493f84f4Smrgm4_define([_LT_WITH_AIX_SONAME], 8716493f84f4Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8717493f84f4Smrgshared_archive_member_spec= 8718493f84f4Smrgcase $host,$enable_shared in 8719493f84f4Smrgpower*-*-aix[[5-9]]*,yes) 8720493f84f4Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8721493f84f4Smrg AC_ARG_WITH([aix-soname], 8722493f84f4Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8723493f84f4Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8724493f84f4Smrg [case $withval in 8725493f84f4Smrg aix|svr4|both) 8726493f84f4Smrg ;; 8727493f84f4Smrg *) 8728493f84f4Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8729493f84f4Smrg ;; 8730493f84f4Smrg esac 8731493f84f4Smrg lt_cv_with_aix_soname=$with_aix_soname], 8732493f84f4Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 8733493f84f4Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8734493f84f4Smrg with_aix_soname=$lt_cv_with_aix_soname]) 8735493f84f4Smrg AC_MSG_RESULT([$with_aix_soname]) 8736493f84f4Smrg if test aix != "$with_aix_soname"; then 8737493f84f4Smrg # For the AIX way of multilib, we name the shared archive member 8738493f84f4Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8739493f84f4Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8740493f84f4Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8741493f84f4Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 8742493f84f4Smrg if test 64 = "${OBJECT_MODE-32}"; then 8743493f84f4Smrg shared_archive_member_spec=shr_64 8744493f84f4Smrg else 8745493f84f4Smrg shared_archive_member_spec=shr 8746493f84f4Smrg fi 8747493f84f4Smrg fi 8748493f84f4Smrg ;; 8749493f84f4Smrg*) 8750493f84f4Smrg with_aix_soname=aix 8751493f84f4Smrg ;; 8752493f84f4Smrgesac 8753493f84f4Smrg 8754493f84f4Smrg_LT_DECL([], [shared_archive_member_spec], [0], 8755493f84f4Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8756493f84f4Smrg])# _LT_WITH_AIX_SONAME 8757493f84f4Smrg 8758493f84f4SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8759493f84f4SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8760493f84f4SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8761493f84f4Smrg 8762493f84f4Smrg 8763a31a186aSmrg# _LT_WITH_PIC([MODE]) 8764a31a186aSmrg# -------------------- 8765493f84f4Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8766a31a186aSmrg# LT_INIT options. 8767493f84f4Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8768a31a186aSmrgm4_define([_LT_WITH_PIC], 8769a31a186aSmrg[AC_ARG_WITH([pic], 87700bb88ba4Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8771a31a186aSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 87720bb88ba4Smrg [lt_p=${PACKAGE-default} 87730bb88ba4Smrg case $withval in 87740bb88ba4Smrg yes|no) pic_mode=$withval ;; 87750bb88ba4Smrg *) 87760bb88ba4Smrg pic_mode=default 87770bb88ba4Smrg # Look at the argument we got. We use all the common list separators. 8778493f84f4Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 87790bb88ba4Smrg for lt_pkg in $withval; do 8780493f84f4Smrg IFS=$lt_save_ifs 87810bb88ba4Smrg if test "X$lt_pkg" = "X$lt_p"; then 87820bb88ba4Smrg pic_mode=yes 87830bb88ba4Smrg fi 87840bb88ba4Smrg done 8785493f84f4Smrg IFS=$lt_save_ifs 87860bb88ba4Smrg ;; 87870bb88ba4Smrg esac], 8788493f84f4Smrg [pic_mode=m4_default([$1], [default])]) 8789fe5e51b7Smrg 8790a31a186aSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8791a31a186aSmrg])# _LT_WITH_PIC 8792eda3803bSmrg 8793a31a186aSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8794a31a186aSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8795eda3803bSmrg 8796a31a186aSmrg# Old name: 8797a31a186aSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8798a31a186aSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8799a31a186aSmrgAC_DIAGNOSE([obsolete], 8800a31a186aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8801493f84f4Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 8802fe5e51b7Smrg]) 8803fe5e51b7Smrg 8804a31a186aSmrgdnl aclocal-1.4 backwards compatibility: 8805a31a186aSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8806fe5e51b7Smrg 8807fe5e51b7Smrg 8808a31a186aSmrgm4_define([_LTDL_MODE], []) 8809a31a186aSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8810a31a186aSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8811a31a186aSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8812a31a186aSmrg [m4_define([_LTDL_MODE], [recursive])]) 8813a31a186aSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8814a31a186aSmrg [m4_define([_LTDL_MODE], [subproject])]) 8815fe5e51b7Smrg 8816a31a186aSmrgm4_define([_LTDL_TYPE], []) 8817a31a186aSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8818a31a186aSmrg [m4_define([_LTDL_TYPE], [installable])]) 8819a31a186aSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8820a31a186aSmrg [m4_define([_LTDL_TYPE], [convenience])]) 8821fe5e51b7Smrg 8822a31a186aSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8823fe5e51b7Smrg# 8824ee82cb62Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 8825493f84f4Smrg# Foundation, Inc. 8826a31a186aSmrg# Written by Gary V. Vaughan, 2004 8827fe5e51b7Smrg# 8828a31a186aSmrg# This file is free software; the Free Software Foundation gives 8829a31a186aSmrg# unlimited permission to copy and/or distribute it, with or without 8830a31a186aSmrg# modifications, as long as this notice is preserved. 8831a31a186aSmrg 8832a31a186aSmrg# serial 6 ltsugar.m4 8833a31a186aSmrg 8834a31a186aSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8835a31a186aSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8836a31a186aSmrg 8837a31a186aSmrg 8838a31a186aSmrg# lt_join(SEP, ARG1, [ARG2...]) 8839a31a186aSmrg# ----------------------------- 8840a31a186aSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8841a31a186aSmrg# associated separator. 8842a31a186aSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8843a31a186aSmrg# versions in m4sugar had bugs. 8844a31a186aSmrgm4_define([lt_join], 8845a31a186aSmrg[m4_if([$#], [1], [], 8846a31a186aSmrg [$#], [2], [[$2]], 8847a31a186aSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8848a31a186aSmrgm4_define([_lt_join], 8849a31a186aSmrg[m4_if([$#$2], [2], [], 8850a31a186aSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8851a31a186aSmrg 8852a31a186aSmrg 8853a31a186aSmrg# lt_car(LIST) 8854a31a186aSmrg# lt_cdr(LIST) 8855a31a186aSmrg# ------------ 8856a31a186aSmrg# Manipulate m4 lists. 8857a31a186aSmrg# These macros are necessary as long as will still need to support 8858493f84f4Smrg# Autoconf-2.59, which quotes differently. 8859a31a186aSmrgm4_define([lt_car], [[$1]]) 8860a31a186aSmrgm4_define([lt_cdr], 8861a31a186aSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8862a31a186aSmrg [$#], 1, [], 8863a31a186aSmrg [m4_dquote(m4_shift($@))])]) 8864a31a186aSmrgm4_define([lt_unquote], $1) 8865a31a186aSmrg 8866a31a186aSmrg 8867a31a186aSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8868a31a186aSmrg# ------------------------------------------ 8869493f84f4Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8870a31a186aSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8871a31a186aSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8872a31a186aSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8873a31a186aSmrg# than defined and empty). 8874643b027fSmrg# 8875a31a186aSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8876a31a186aSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8877a31a186aSmrgm4_define([lt_append], 8878a31a186aSmrg[m4_define([$1], 8879a31a186aSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8880a31a186aSmrg 8881a31a186aSmrg 8882a31a186aSmrg 8883a31a186aSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8884a31a186aSmrg# ---------------------------------------------------------- 8885a31a186aSmrg# Produce a SEP delimited list of all paired combinations of elements of 8886a31a186aSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8887a31a186aSmrg# has the form PREFIXmINFIXSUFFIXn. 8888a31a186aSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8889a31a186aSmrgm4_define([lt_combine], 8890a31a186aSmrg[m4_if(m4_eval([$# > 3]), [1], 8891a31a186aSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8892a31a186aSmrg[[m4_foreach([_Lt_prefix], [$2], 8893a31a186aSmrg [m4_foreach([_Lt_suffix], 8894a31a186aSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8895a31a186aSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8896a31a186aSmrg 8897a31a186aSmrg 8898a31a186aSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8899a31a186aSmrg# ----------------------------------------------------------------------- 8900a31a186aSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8901a31a186aSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8902a31a186aSmrgm4_define([lt_if_append_uniq], 8903a31a186aSmrg[m4_ifdef([$1], 8904a31a186aSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8905a31a186aSmrg [lt_append([$1], [$2], [$3])$4], 8906a31a186aSmrg [$5])], 8907a31a186aSmrg [lt_append([$1], [$2], [$3])$4])]) 8908a31a186aSmrg 8909a31a186aSmrg 8910a31a186aSmrg# lt_dict_add(DICT, KEY, VALUE) 8911a31a186aSmrg# ----------------------------- 8912a31a186aSmrgm4_define([lt_dict_add], 8913a31a186aSmrg[m4_define([$1($2)], [$3])]) 8914fe5e51b7Smrg 8915eda3803bSmrg 8916a31a186aSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8917a31a186aSmrg# -------------------------------------------- 8918a31a186aSmrgm4_define([lt_dict_add_subkey], 8919a31a186aSmrg[m4_define([$1($2:$3)], [$4])]) 8920fe5e51b7Smrg 8921fe5e51b7Smrg 8922a31a186aSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8923a31a186aSmrg# ---------------------------------- 8924a31a186aSmrgm4_define([lt_dict_fetch], 8925a31a186aSmrg[m4_ifval([$3], 8926a31a186aSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8927a31a186aSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8928fe5e51b7Smrg 8929fe5e51b7Smrg 8930a31a186aSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8931a31a186aSmrg# ----------------------------------------------------------------- 8932a31a186aSmrgm4_define([lt_if_dict_fetch], 8933a31a186aSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8934a31a186aSmrg [$5], 8935a31a186aSmrg [$6])]) 8936fe5e51b7Smrg 8937a31a186aSmrg 8938a31a186aSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8939a31a186aSmrg# -------------------------------------------------------------- 8940a31a186aSmrgm4_define([lt_dict_filter], 8941a31a186aSmrg[m4_if([$5], [], [], 8942a31a186aSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8943a31a186aSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8944a31a186aSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8945fe5e51b7Smrg]) 8946fe5e51b7Smrg 8947a31a186aSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8948a31a186aSmrg# 8949ee82cb62Smrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 8950a31a186aSmrg# Written by Scott James Remnant, 2004 8951a31a186aSmrg# 8952a31a186aSmrg# This file is free software; the Free Software Foundation gives 8953a31a186aSmrg# unlimited permission to copy and/or distribute it, with or without 8954a31a186aSmrg# modifications, as long as this notice is preserved. 8955fe5e51b7Smrg 89560bb88ba4Smrg# @configure_input@ 8957fe5e51b7Smrg 8958ee82cb62Smrg# serial 4179 ltversion.m4 8959a31a186aSmrg# This file is part of GNU Libtool 8960fe5e51b7Smrg 8961ee82cb62Smrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 8962ee82cb62Smrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 8963fe5e51b7Smrg 8964a31a186aSmrgAC_DEFUN([LTVERSION_VERSION], 8965ee82cb62Smrg[macro_version='2.4.6' 8966ee82cb62Smrgmacro_revision='2.4.6' 8967a31a186aSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8968a31a186aSmrg_LT_DECL(, macro_revision, 0) 8969fe5e51b7Smrg]) 8970eda3803bSmrg 8971a31a186aSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8972a31a186aSmrg# 8973ee82cb62Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 8974493f84f4Smrg# Foundation, Inc. 8975a31a186aSmrg# Written by Scott James Remnant, 2004. 8976a31a186aSmrg# 8977a31a186aSmrg# This file is free software; the Free Software Foundation gives 8978a31a186aSmrg# unlimited permission to copy and/or distribute it, with or without 8979a31a186aSmrg# modifications, as long as this notice is preserved. 8980a31a186aSmrg 89810bb88ba4Smrg# serial 5 lt~obsolete.m4 8982a31a186aSmrg 8983a31a186aSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 8984a31a186aSmrg# 8985493f84f4Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8986a31a186aSmrg# which have later been changed to m4_define as they aren't part of the 8987a31a186aSmrg# exported API, or moved to Autoconf or Automake where they belong. 8988a31a186aSmrg# 8989a31a186aSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8990a31a186aSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8991a31a186aSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 8992a31a186aSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8993a31a186aSmrg# and doesn't know about Autoconf macros at all.) 8994a31a186aSmrg# 8995a31a186aSmrg# So we provide this file, which has a silly filename so it's always 8996a31a186aSmrg# included after everything else. This provides aclocal with the 8997a31a186aSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8998a31a186aSmrg# because those macros already exist, or will be overwritten later. 8999493f84f4Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9000a31a186aSmrg# 9001a31a186aSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9002a31a186aSmrg# Yes, that means every name once taken will need to remain here until 9003a31a186aSmrg# we give up compatibility with versions before 1.7, at which point 9004a31a186aSmrg# we need to keep only those names which we still refer to. 9005a31a186aSmrg 9006a31a186aSmrg# This is to help aclocal find these macros, as it can't see m4_define. 9007a31a186aSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9008a31a186aSmrg 9009a31a186aSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9010a31a186aSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9011a31a186aSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9012a31a186aSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9013a31a186aSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9014a31a186aSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9015a31a186aSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9016a31a186aSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9017a31a186aSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9018a31a186aSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9019a31a186aSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9020a31a186aSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9021a31a186aSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9022a31a186aSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9023a31a186aSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9024a31a186aSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9025a31a186aSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9026a31a186aSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9027a31a186aSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9028a31a186aSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9029a31a186aSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9030a31a186aSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9031a31a186aSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9032a31a186aSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9033a31a186aSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9034a31a186aSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9035a31a186aSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9036a31a186aSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9037a31a186aSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9038a31a186aSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9039a31a186aSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9040a31a186aSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9041a31a186aSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9042a31a186aSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9043a31a186aSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9044a31a186aSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9045a31a186aSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9046a31a186aSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9047a31a186aSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9048a31a186aSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9049a31a186aSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9050a31a186aSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9051a31a186aSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9052a31a186aSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9053a31a186aSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9054a31a186aSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9055a31a186aSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9056a31a186aSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9057a31a186aSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9058a31a186aSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9059a31a186aSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9060a31a186aSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9061a31a186aSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9062a31a186aSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 90630bb88ba4Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 90640bb88ba4Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 90650bb88ba4Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 90660bb88ba4Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 90670bb88ba4Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 90680bb88ba4Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 90690bb88ba4Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9070a31a186aSmrg 9071b0de6900Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9072b0de6900Smrgdnl serial 11 (pkg-config-0.29.1) 9073b0de6900Smrgdnl 9074b0de6900Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9075b0de6900Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9076b0de6900Smrgdnl 9077b0de6900Smrgdnl This program is free software; you can redistribute it and/or modify 9078b0de6900Smrgdnl it under the terms of the GNU General Public License as published by 9079b0de6900Smrgdnl the Free Software Foundation; either version 2 of the License, or 9080b0de6900Smrgdnl (at your option) any later version. 9081b0de6900Smrgdnl 9082b0de6900Smrgdnl This program is distributed in the hope that it will be useful, but 9083b0de6900Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 9084b0de6900Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9085b0de6900Smrgdnl General Public License for more details. 9086b0de6900Smrgdnl 9087b0de6900Smrgdnl You should have received a copy of the GNU General Public License 9088b0de6900Smrgdnl along with this program; if not, write to the Free Software 9089b0de6900Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9090b0de6900Smrgdnl 02111-1307, USA. 9091b0de6900Smrgdnl 9092b0de6900Smrgdnl As a special exception to the GNU General Public License, if you 9093b0de6900Smrgdnl distribute this file as part of a program that contains a 9094b0de6900Smrgdnl configuration script generated by Autoconf, you may include it under 9095b0de6900Smrgdnl the same distribution terms that you use for the rest of that 9096b0de6900Smrgdnl program. 9097b0de6900Smrg 9098b0de6900Smrgdnl PKG_PREREQ(MIN-VERSION) 9099b0de6900Smrgdnl ----------------------- 9100b0de6900Smrgdnl Since: 0.29 9101b0de6900Smrgdnl 9102b0de6900Smrgdnl Verify that the version of the pkg-config macros are at least 9103b0de6900Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9104b0de6900Smrgdnl installed version of pkg-config, this checks the developer's version 9105b0de6900Smrgdnl of pkg.m4 when generating configure. 9106b0de6900Smrgdnl 9107b0de6900Smrgdnl To ensure that this macro is defined, also add: 9108b0de6900Smrgdnl m4_ifndef([PKG_PREREQ], 9109b0de6900Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9110b0de6900Smrgdnl 9111b0de6900Smrgdnl See the "Since" comment for each macro you use to see what version 9112b0de6900Smrgdnl of the macros you require. 9113b0de6900Smrgm4_defun([PKG_PREREQ], 9114b0de6900Smrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 9115b0de6900Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9116b0de6900Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9117b0de6900Smrg])dnl PKG_PREREQ 9118b0de6900Smrg 9119b0de6900Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9120b0de6900Smrgdnl ---------------------------------- 9121b0de6900Smrgdnl Since: 0.16 9122b0de6900Smrgdnl 9123b0de6900Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9124b0de6900Smrgdnl first found in the path. Checks that the version of pkg-config found 9125b0de6900Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9126b0de6900Smrgdnl used since that's the first version where most current features of 9127b0de6900Smrgdnl pkg-config existed. 9128fe5e51b7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9129fe5e51b7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9130acd6767fSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9131acd6767fSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 91320bb88ba4SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 91330bb88ba4SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 91340bb88ba4SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 91350bb88ba4Smrg 9136fe5e51b7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9137fe5e51b7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9138fe5e51b7Smrgfi 9139fe5e51b7Smrgif test -n "$PKG_CONFIG"; then 9140fe5e51b7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 9141fe5e51b7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9142fe5e51b7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9143fe5e51b7Smrg AC_MSG_RESULT([yes]) 9144fe5e51b7Smrg else 9145fe5e51b7Smrg AC_MSG_RESULT([no]) 9146fe5e51b7Smrg PKG_CONFIG="" 9147fe5e51b7Smrg fi 9148fe5e51b7Smrgfi[]dnl 9149b0de6900Smrg])dnl PKG_PROG_PKG_CONFIG 9150fe5e51b7Smrg 9151b0de6900Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9152b0de6900Smrgdnl ------------------------------------------------------------------- 9153b0de6900Smrgdnl Since: 0.18 9154b0de6900Smrgdnl 9155b0de6900Smrgdnl Check to see whether a particular set of modules exists. Similar to 9156b0de6900Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9157b0de6900Smrgdnl 9158b0de6900Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9159b0de6900Smrgdnl only at the first occurence in configure.ac, so if the first place 9160b0de6900Smrgdnl it's called might be skipped (such as if it is within an "if", you 9161b0de6900Smrgdnl have to call PKG_CHECK_EXISTS manually 9162fe5e51b7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 9163fe5e51b7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9164fe5e51b7Smrgif test -n "$PKG_CONFIG" && \ 9165fe5e51b7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 91660bb88ba4Smrg m4_default([$2], [:]) 9167fe5e51b7Smrgm4_ifvaln([$3], [else 9168fe5e51b7Smrg $3])dnl 9169fe5e51b7Smrgfi]) 9170fe5e51b7Smrg 9171b0de6900Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9172b0de6900Smrgdnl --------------------------------------------- 9173b0de6900Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9174b0de6900Smrgdnl pkg_failed based on the result. 9175fe5e51b7Smrgm4_define([_PKG_CONFIG], 9176eda3803bSmrg[if test -n "$$1"; then 9177eda3803bSmrg pkg_cv_[]$1="$$1" 9178eda3803bSmrg elif test -n "$PKG_CONFIG"; then 9179eda3803bSmrg PKG_CHECK_EXISTS([$3], 9180acd6767fSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9181acd6767fSmrg test "x$?" != "x0" && pkg_failed=yes ], 9182eda3803bSmrg [pkg_failed=yes]) 9183eda3803bSmrg else 9184eda3803bSmrg pkg_failed=untried 9185fe5e51b7Smrgfi[]dnl 9186b0de6900Smrg])dnl _PKG_CONFIG 9187fe5e51b7Smrg 9188b0de6900Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 9189b0de6900Smrgdnl --------------------------- 9190b0de6900Smrgdnl Internal check to see if pkg-config supports short errors. 9191fe5e51b7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9192fe5e51b7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9193fe5e51b7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9194fe5e51b7Smrg _pkg_short_errors_supported=yes 9195fe5e51b7Smrgelse 9196fe5e51b7Smrg _pkg_short_errors_supported=no 9197fe5e51b7Smrgfi[]dnl 9198b0de6900Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 9199fe5e51b7Smrg 9200fe5e51b7Smrg 9201b0de6900Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9202b0de6900Smrgdnl [ACTION-IF-NOT-FOUND]) 9203b0de6900Smrgdnl -------------------------------------------------------------- 9204b0de6900Smrgdnl Since: 0.4.0 9205b0de6900Smrgdnl 9206b0de6900Smrgdnl Note that if there is a possibility the first call to 9207b0de6900Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9208b0de6900Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9209fe5e51b7SmrgAC_DEFUN([PKG_CHECK_MODULES], 9210fe5e51b7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9211fe5e51b7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9212fe5e51b7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9213fe5e51b7Smrg 9214fe5e51b7Smrgpkg_failed=no 9215fe5e51b7SmrgAC_MSG_CHECKING([for $1]) 9216fe5e51b7Smrg 9217fe5e51b7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9218fe5e51b7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9219fe5e51b7Smrg 9220fe5e51b7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9221fe5e51b7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 9222fe5e51b7SmrgSee the pkg-config man page for more details.]) 9223fe5e51b7Smrg 9224fe5e51b7Smrgif test $pkg_failed = yes; then 92250bb88ba4Smrg AC_MSG_RESULT([no]) 9226fe5e51b7Smrg _PKG_SHORT_ERRORS_SUPPORTED 9227fe5e51b7Smrg if test $_pkg_short_errors_supported = yes; then 9228acd6767fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9229fe5e51b7Smrg else 9230acd6767fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9231fe5e51b7Smrg fi 9232fe5e51b7Smrg # Put the nasty error message in config.log where it belongs 9233fe5e51b7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9234fe5e51b7Smrg 92350bb88ba4Smrg m4_default([$4], [AC_MSG_ERROR( 9236fe5e51b7Smrg[Package requirements ($2) were not met: 9237fe5e51b7Smrg 9238fe5e51b7Smrg$$1_PKG_ERRORS 9239fe5e51b7Smrg 9240fe5e51b7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9241fe5e51b7Smrginstalled software in a non-standard prefix. 9242fe5e51b7Smrg 9243acd6767fSmrg_PKG_TEXT])[]dnl 92440bb88ba4Smrg ]) 9245fe5e51b7Smrgelif test $pkg_failed = untried; then 92460bb88ba4Smrg AC_MSG_RESULT([no]) 92470bb88ba4Smrg m4_default([$4], [AC_MSG_FAILURE( 9248fe5e51b7Smrg[The pkg-config script could not be found or is too old. Make sure it 9249fe5e51b7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 9250fe5e51b7Smrgpath to pkg-config. 9251fe5e51b7Smrg 9252fe5e51b7Smrg_PKG_TEXT 9253fe5e51b7Smrg 9254acd6767fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 92550bb88ba4Smrg ]) 9256fe5e51b7Smrgelse 9257fe5e51b7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9258fe5e51b7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9259fe5e51b7Smrg AC_MSG_RESULT([yes]) 92600bb88ba4Smrg $3 9261fe5e51b7Smrgfi[]dnl 9262b0de6900Smrg])dnl PKG_CHECK_MODULES 9263fe5e51b7Smrg 9264acd6767fSmrg 9265b0de6900Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9266b0de6900Smrgdnl [ACTION-IF-NOT-FOUND]) 9267b0de6900Smrgdnl --------------------------------------------------------------------- 9268b0de6900Smrgdnl Since: 0.29 9269b0de6900Smrgdnl 9270b0de6900Smrgdnl Checks for existence of MODULES and gathers its build flags with 9271b0de6900Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9272b0de6900Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 9273b0de6900Smrgdnl 9274b0de6900Smrgdnl Note that if there is a possibility the first call to 9275b0de6900Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9276b0de6900Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9277b0de6900Smrgdnl configure.ac. 9278b0de6900SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 9279b0de6900Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9280b0de6900Smrg_save_PKG_CONFIG=$PKG_CONFIG 9281b0de6900SmrgPKG_CONFIG="$PKG_CONFIG --static" 9282b0de6900SmrgPKG_CHECK_MODULES($@) 9283b0de6900SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 9284b0de6900Smrg])dnl PKG_CHECK_MODULES_STATIC 9285b0de6900Smrg 9286b0de6900Smrg 9287b0de6900Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 9288b0de6900Smrgdnl ------------------------- 9289b0de6900Smrgdnl Since: 0.27 9290b0de6900Smrgdnl 9291b0de6900Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 9292b0de6900Smrgdnl should install pkg-config .pc files. By default the directory is 9293b0de6900Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 9294b0de6900Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 9295b0de6900Smrgdnl parameter. 9296acd6767fSmrgAC_DEFUN([PKG_INSTALLDIR], 9297acd6767fSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9298acd6767fSmrgm4_pushdef([pkg_description], 9299acd6767fSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 9300acd6767fSmrgAC_ARG_WITH([pkgconfigdir], 9301acd6767fSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9302acd6767fSmrg [with_pkgconfigdir=]pkg_default) 9303acd6767fSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9304acd6767fSmrgm4_popdef([pkg_default]) 9305acd6767fSmrgm4_popdef([pkg_description]) 9306b0de6900Smrg])dnl PKG_INSTALLDIR 9307acd6767fSmrg 9308acd6767fSmrg 9309b0de6900Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9310b0de6900Smrgdnl -------------------------------- 9311b0de6900Smrgdnl Since: 0.27 9312b0de6900Smrgdnl 9313b0de6900Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 9314b0de6900Smrgdnl module should install arch-independent pkg-config .pc files. By 9315b0de6900Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 9316b0de6900Smrgdnl changed by passing DIRECTORY. The user can override through the 9317b0de6900Smrgdnl --with-noarch-pkgconfigdir parameter. 9318acd6767fSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 9319acd6767fSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9320acd6767fSmrgm4_pushdef([pkg_description], 9321acd6767fSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9322acd6767fSmrgAC_ARG_WITH([noarch-pkgconfigdir], 9323acd6767fSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9324acd6767fSmrg [with_noarch_pkgconfigdir=]pkg_default) 9325acd6767fSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9326acd6767fSmrgm4_popdef([pkg_default]) 9327acd6767fSmrgm4_popdef([pkg_description]) 9328b0de6900Smrg])dnl PKG_NOARCH_INSTALLDIR 9329acd6767fSmrg 9330493f84f4Smrg 9331b0de6900Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9332b0de6900Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9333b0de6900Smrgdnl ------------------------------------------- 9334b0de6900Smrgdnl Since: 0.28 9335b0de6900Smrgdnl 9336b0de6900Smrgdnl Retrieves the value of the pkg-config variable for the given module. 9337493f84f4SmrgAC_DEFUN([PKG_CHECK_VAR], 9338493f84f4Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9339493f84f4SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9340493f84f4Smrg 9341493f84f4Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9342493f84f4SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 9343493f84f4Smrg 9344493f84f4SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 9345b0de6900Smrg])dnl PKG_CHECK_VAR 9346493f84f4Smrg 9347eda3803bSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9348fe5e51b7Smrgdnl 93490bb88ba4Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9350493f84f4Smrgdnl 9351fe5e51b7Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9352d7be9c72Smrgdnl copy of this software and associated documentation files (the "Software"), 9353d7be9c72Smrgdnl to deal in the Software without restriction, including without limitation 9354d7be9c72Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9355d7be9c72Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 9356d7be9c72Smrgdnl Software is furnished to do so, subject to the following conditions: 9357fe5e51b7Smrgdnl 9358d7be9c72Smrgdnl The above copyright notice and this permission notice (including the next 9359d7be9c72Smrgdnl paragraph) shall be included in all copies or substantial portions of the 9360d7be9c72Smrgdnl Software. 9361fe5e51b7Smrgdnl 9362d7be9c72Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9363d7be9c72Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9364d7be9c72Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9365d7be9c72Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9366d7be9c72Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9367d7be9c72Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9368d7be9c72Smrgdnl DEALINGS IN THE SOFTWARE. 9369fe5e51b7Smrg 9370fe5e51b7Smrg# XORG_MACROS_VERSION(required-version) 9371fe5e51b7Smrg# ------------------------------------- 9372fe5e51b7Smrg# Minimum version: 1.1.0 9373fe5e51b7Smrg# 9374fe5e51b7Smrg# If you're using a macro added in Version 1.1 or newer, include this in 9375fe5e51b7Smrg# your configure.ac with the minimum required version, such as: 9376fe5e51b7Smrg# XORG_MACROS_VERSION(1.1) 9377fe5e51b7Smrg# 9378a31a186aSmrg# To ensure that this macro is defined, also add: 9379a31a186aSmrg# m4_ifndef([XORG_MACROS_VERSION], 9380a31a186aSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9381fe5e51b7Smrg# 9382fe5e51b7Smrg# 9383493f84f4Smrg# See the "minimum version" comment for each macro you use to see what 9384fe5e51b7Smrg# version you require. 9385a31a186aSmrgm4_defun([XORG_MACROS_VERSION],[ 9386ee82cb62Smrgm4_define([vers_have], [1.19.0]) 9387a31a186aSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9388a31a186aSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9389a31a186aSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9390a31a186aSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9391a31a186aSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9392a31a186aSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9393a31a186aSmrgm4_undefine([vers_have]) 9394a31a186aSmrgm4_undefine([maj_have]) 9395a31a186aSmrgm4_undefine([maj_needed]) 9396fe5e51b7Smrg]) # XORG_MACROS_VERSION 9397fe5e51b7Smrg 9398fe5e51b7Smrg# XORG_PROG_RAWCPP() 9399fe5e51b7Smrg# ------------------ 9400fe5e51b7Smrg# Minimum version: 1.0.0 9401fe5e51b7Smrg# 9402fe5e51b7Smrg# Find cpp program and necessary flags for use in pre-processing text files 9403fe5e51b7Smrg# such as man pages and config files 9404fe5e51b7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9405fe5e51b7SmrgAC_REQUIRE([AC_PROG_CPP]) 9406493f84f4SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9407fe5e51b7Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9408fe5e51b7Smrg 9409fe5e51b7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9410fe5e51b7Smrg# which is not the best choice for supporting other OS'es, but covers most 9411fe5e51b7Smrg# of the ones we need for now. 9412fe5e51b7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 94130bb88ba4SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9414fe5e51b7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9415fe5e51b7Smrg AC_MSG_RESULT([no]) 9416fe5e51b7Smrgelse 9417fe5e51b7Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9418fe5e51b7Smrg RAWCPPFLAGS=-undef 9419fe5e51b7Smrg AC_MSG_RESULT([yes]) 9420eda3803bSmrg # under Cygwin unix is still defined even with -undef 9421eda3803bSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9422eda3803bSmrg RAWCPPFLAGS="-undef -ansi" 9423eda3803bSmrg AC_MSG_RESULT([yes, with -ansi]) 9424fe5e51b7Smrg else 9425fe5e51b7Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9426fe5e51b7Smrg fi 9427fe5e51b7Smrgfi 9428fe5e51b7Smrgrm -f conftest.$ac_ext 9429fe5e51b7Smrg 9430fe5e51b7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 94310bb88ba4SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9432fe5e51b7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9433fe5e51b7Smrg AC_MSG_RESULT([no]) 9434fe5e51b7Smrgelse 9435fe5e51b7Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9436ee82cb62Smrg TRADITIONALCPPFLAGS="-traditional" 9437fe5e51b7Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9438fe5e51b7Smrg AC_MSG_RESULT([yes]) 9439fe5e51b7Smrg else 9440fe5e51b7Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9441fe5e51b7Smrg fi 9442fe5e51b7Smrgfi 9443fe5e51b7Smrgrm -f conftest.$ac_ext 9444fe5e51b7SmrgAC_SUBST(RAWCPPFLAGS) 9445ee82cb62SmrgAC_SUBST(TRADITIONALCPPFLAGS) 9446fe5e51b7Smrg]) # XORG_PROG_RAWCPP 9447fe5e51b7Smrg 9448fe5e51b7Smrg# XORG_MANPAGE_SECTIONS() 9449fe5e51b7Smrg# ----------------------- 9450fe5e51b7Smrg# Minimum version: 1.0.0 9451fe5e51b7Smrg# 9452fe5e51b7Smrg# Determine which sections man pages go in for the different man page types 9453fe5e51b7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9454fe5e51b7Smrg# Not sure if there's any better way than just hardcoding by OS name. 9455fe5e51b7Smrg# Override default settings by setting environment variables 9456d7be9c72Smrg# Added MAN_SUBSTS in version 1.8 9457d7be9c72Smrg# Added AC_PROG_SED in version 1.8 9458fe5e51b7Smrg 9459fe5e51b7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9460fe5e51b7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9461d7be9c72SmrgAC_REQUIRE([AC_PROG_SED]) 9462fe5e51b7Smrg 9463fe5e51b7Smrgif test x$APP_MAN_SUFFIX = x ; then 9464fe5e51b7Smrg APP_MAN_SUFFIX=1 9465fe5e51b7Smrgfi 9466fe5e51b7Smrgif test x$APP_MAN_DIR = x ; then 9467fe5e51b7Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9468fe5e51b7Smrgfi 9469fe5e51b7Smrg 9470fe5e51b7Smrgif test x$LIB_MAN_SUFFIX = x ; then 9471fe5e51b7Smrg LIB_MAN_SUFFIX=3 9472fe5e51b7Smrgfi 9473fe5e51b7Smrgif test x$LIB_MAN_DIR = x ; then 9474fe5e51b7Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9475fe5e51b7Smrgfi 9476fe5e51b7Smrg 9477fe5e51b7Smrgif test x$FILE_MAN_SUFFIX = x ; then 9478fe5e51b7Smrg case $host_os in 9479fe5e51b7Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 9480fe5e51b7Smrg *) FILE_MAN_SUFFIX=5 ;; 9481fe5e51b7Smrg esac 9482fe5e51b7Smrgfi 9483fe5e51b7Smrgif test x$FILE_MAN_DIR = x ; then 9484fe5e51b7Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9485fe5e51b7Smrgfi 9486fe5e51b7Smrg 9487fe5e51b7Smrgif test x$MISC_MAN_SUFFIX = x ; then 9488fe5e51b7Smrg case $host_os in 9489fe5e51b7Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 9490fe5e51b7Smrg *) MISC_MAN_SUFFIX=7 ;; 9491fe5e51b7Smrg esac 9492fe5e51b7Smrgfi 9493fe5e51b7Smrgif test x$MISC_MAN_DIR = x ; then 9494fe5e51b7Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9495fe5e51b7Smrgfi 9496fe5e51b7Smrg 9497fe5e51b7Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 9498fe5e51b7Smrg case $host_os in 9499fe5e51b7Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9500fe5e51b7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 9501fe5e51b7Smrg esac 9502fe5e51b7Smrgfi 9503fe5e51b7Smrgif test x$DRIVER_MAN_DIR = x ; then 9504fe5e51b7Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9505fe5e51b7Smrgfi 9506fe5e51b7Smrg 9507fe5e51b7Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 9508fe5e51b7Smrg case $host_os in 9509fe5e51b7Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9510fe5e51b7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 9511fe5e51b7Smrg esac 9512fe5e51b7Smrgfi 9513fe5e51b7Smrgif test x$ADMIN_MAN_DIR = x ; then 9514fe5e51b7Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9515fe5e51b7Smrgfi 9516fe5e51b7Smrg 9517fe5e51b7Smrg 9518fe5e51b7SmrgAC_SUBST([APP_MAN_SUFFIX]) 9519fe5e51b7SmrgAC_SUBST([LIB_MAN_SUFFIX]) 9520fe5e51b7SmrgAC_SUBST([FILE_MAN_SUFFIX]) 9521fe5e51b7SmrgAC_SUBST([MISC_MAN_SUFFIX]) 9522fe5e51b7SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9523fe5e51b7SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9524fe5e51b7SmrgAC_SUBST([APP_MAN_DIR]) 9525fe5e51b7SmrgAC_SUBST([LIB_MAN_DIR]) 9526fe5e51b7SmrgAC_SUBST([FILE_MAN_DIR]) 9527fe5e51b7SmrgAC_SUBST([MISC_MAN_DIR]) 9528fe5e51b7SmrgAC_SUBST([DRIVER_MAN_DIR]) 9529fe5e51b7SmrgAC_SUBST([ADMIN_MAN_DIR]) 9530d7be9c72Smrg 9531d7be9c72SmrgXORG_MAN_PAGE="X Version 11" 9532d7be9c72SmrgAC_SUBST([XORG_MAN_PAGE]) 9533d7be9c72SmrgMAN_SUBSTS="\ 9534d7be9c72Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9535d7be9c72Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9536d7be9c72Smrg -e 's|__xservername__|Xorg|g' \ 9537d7be9c72Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 9538d7be9c72Smrg -e 's|__projectroot__|\$(prefix)|g' \ 95390bb88ba4Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9540d7be9c72Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9541d7be9c72Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9542d7be9c72Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9543d7be9c72Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9544d7be9c72Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9545d7be9c72Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9546d7be9c72SmrgAC_SUBST([MAN_SUBSTS]) 9547d7be9c72Smrg 9548fe5e51b7Smrg]) # XORG_MANPAGE_SECTIONS 9549fe5e51b7Smrg 9550d7be9c72Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9551d7be9c72Smrg# ------------------------ 9552d7be9c72Smrg# Minimum version: 1.7.0 9553d7be9c72Smrg# 9554d7be9c72Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9555d7be9c72Smrg# provided by xorg-sgml-doctools, if installed. 9556d7be9c72SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9557d7be9c72SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9558d7be9c72SmrgXORG_SGML_PATH= 9559d7be9c72SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9560d7be9c72Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9561d7be9c72Smrg [m4_ifval([$1],[:], 9562d7be9c72Smrg [if test x"$cross_compiling" != x"yes" ; then 9563d7be9c72Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9564d7be9c72Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 9565d7be9c72Smrg fi]) 9566d7be9c72Smrg ]) 9567d7be9c72Smrg 9568d7be9c72Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9569d7be9c72Smrg# the path and the name of the doc stylesheet 9570d7be9c72Smrgif test "x$XORG_SGML_PATH" != "x" ; then 9571d7be9c72Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9572d7be9c72Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9573d7be9c72Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9574d7be9c72Smrgelse 9575d7be9c72Smrg AC_MSG_RESULT([no]) 9576d7be9c72Smrgfi 9577d7be9c72Smrg 9578d7be9c72SmrgAC_SUBST(XORG_SGML_PATH) 9579d7be9c72SmrgAC_SUBST(STYLESHEET_SRCDIR) 9580d7be9c72SmrgAC_SUBST(XSL_STYLESHEET) 9581d7be9c72SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9582d7be9c72Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9583d7be9c72Smrg 9584fe5e51b7Smrg# XORG_CHECK_LINUXDOC 9585fe5e51b7Smrg# ------------------- 9586fe5e51b7Smrg# Minimum version: 1.0.0 9587fe5e51b7Smrg# 9588fe5e51b7Smrg# Defines the variable MAKE_TEXT if the necessary tools and 9589fe5e51b7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9590fe5e51b7Smrg# Whether or not the necessary tools and files are found can be checked 9591fe5e51b7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9592fe5e51b7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9593d7be9c72SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9594d7be9c72SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9595fe5e51b7Smrg 9596fe5e51b7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9597fe5e51b7Smrg 9598d7be9c72SmrgAC_MSG_CHECKING([whether to build documentation]) 9599fe5e51b7Smrg 9600d7be9c72Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9601fe5e51b7Smrg BUILDDOC=yes 9602fe5e51b7Smrgelse 9603fe5e51b7Smrg BUILDDOC=no 9604fe5e51b7Smrgfi 9605fe5e51b7Smrg 9606fe5e51b7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9607fe5e51b7Smrg 9608fe5e51b7SmrgAC_MSG_RESULT([$BUILDDOC]) 9609fe5e51b7Smrg 9610d7be9c72SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9611fe5e51b7Smrg 9612d7be9c72Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9613fe5e51b7Smrg BUILDPDFDOC=yes 9614fe5e51b7Smrgelse 9615fe5e51b7Smrg BUILDPDFDOC=no 9616fe5e51b7Smrgfi 9617fe5e51b7Smrg 9618fe5e51b7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9619fe5e51b7Smrg 9620fe5e51b7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9621fe5e51b7Smrg 9622d7be9c72SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9623fe5e51b7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9624fe5e51b7SmrgMAKE_PDF="$PS2PDF" 9625fe5e51b7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9626fe5e51b7Smrg 9627fe5e51b7SmrgAC_SUBST(MAKE_TEXT) 9628fe5e51b7SmrgAC_SUBST(MAKE_PS) 9629fe5e51b7SmrgAC_SUBST(MAKE_PDF) 9630fe5e51b7SmrgAC_SUBST(MAKE_HTML) 9631fe5e51b7Smrg]) # XORG_CHECK_LINUXDOC 9632fe5e51b7Smrg 9633fe5e51b7Smrg# XORG_CHECK_DOCBOOK 9634fe5e51b7Smrg# ------------------- 9635fe5e51b7Smrg# Minimum version: 1.0.0 9636fe5e51b7Smrg# 9637fe5e51b7Smrg# Checks for the ability to build output formats from SGML DocBook source. 9638fe5e51b7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9639fe5e51b7Smrg# indicates whether the necessary tools and files are found and, if set, 9640fe5e51b7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9641fe5e51b7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9642d7be9c72SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9643d7be9c72Smrg 9644fe5e51b7SmrgBUILDTXTDOC=no 9645fe5e51b7SmrgBUILDPDFDOC=no 9646fe5e51b7SmrgBUILDPSDOC=no 9647fe5e51b7SmrgBUILDHTMLDOC=no 9648fe5e51b7Smrg 9649fe5e51b7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9650fe5e51b7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9651fe5e51b7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9652fe5e51b7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9653fe5e51b7Smrg 9654d7be9c72SmrgAC_MSG_CHECKING([whether to build text documentation]) 9655d7be9c72Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9656fe5e51b7Smrg test x$BUILD_TXTDOC != xno; then 9657fe5e51b7Smrg BUILDTXTDOC=yes 9658fe5e51b7Smrgfi 9659fe5e51b7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9660fe5e51b7SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9661fe5e51b7Smrg 9662d7be9c72SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9663d7be9c72Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9664fe5e51b7Smrg test x$BUILD_PDFDOC != xno; then 9665fe5e51b7Smrg BUILDPDFDOC=yes 9666fe5e51b7Smrgfi 9667fe5e51b7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9668fe5e51b7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9669fe5e51b7Smrg 9670d7be9c72SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9671d7be9c72Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9672fe5e51b7Smrg test x$BUILD_PSDOC != xno; then 9673fe5e51b7Smrg BUILDPSDOC=yes 9674fe5e51b7Smrgfi 9675fe5e51b7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9676fe5e51b7SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9677fe5e51b7Smrg 9678d7be9c72SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9679d7be9c72Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9680fe5e51b7Smrg test x$BUILD_HTMLDOC != xno; then 9681fe5e51b7Smrg BUILDHTMLDOC=yes 9682fe5e51b7Smrgfi 9683fe5e51b7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9684fe5e51b7SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9685fe5e51b7Smrg 9686fe5e51b7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9687fe5e51b7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9688fe5e51b7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9689fe5e51b7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9690fe5e51b7Smrg 9691fe5e51b7SmrgAC_SUBST(MAKE_TEXT) 9692fe5e51b7SmrgAC_SUBST(MAKE_PS) 9693fe5e51b7SmrgAC_SUBST(MAKE_PDF) 9694fe5e51b7SmrgAC_SUBST(MAKE_HTML) 9695fe5e51b7Smrg]) # XORG_CHECK_DOCBOOK 9696fe5e51b7Smrg 96970bb88ba4Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9698d7be9c72Smrg# ---------------- 9699d7be9c72Smrg# Minimum version: 1.5.0 97000bb88ba4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9701d7be9c72Smrg# 9702d7be9c72Smrg# Documentation tools are not always available on all platforms and sometimes 9703d7be9c72Smrg# not at the appropriate level. This macro enables a module to test for the 9704d7be9c72Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9705d7be9c72Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 97060bb88ba4Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 97070bb88ba4Smrg# --with-xmlto assumes 'auto'. 9708d7be9c72Smrg# 9709d7be9c72Smrg# Interface to module: 9710d7be9c72Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9711d7be9c72Smrg# XMLTO: returns the path of the xmlto program found 9712d7be9c72Smrg# returns the path set by the user in the environment 9713d7be9c72Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9714d7be9c72Smrg# 'no' user instructs the module not to use xmlto 9715d7be9c72Smrg# 9716d7be9c72Smrg# Added in version 1.10.0 9717d7be9c72Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9718d7be9c72Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9719d7be9c72Smrg# 9720d7be9c72Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9721d7be9c72Smrg# 9722d7be9c72SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9723d7be9c72SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 97240bb88ba4Smrgm4_define([_defopt], m4_default([$2], [auto])) 9725d7be9c72SmrgAC_ARG_WITH(xmlto, 9726d7be9c72Smrg AS_HELP_STRING([--with-xmlto], 97270bb88ba4Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 97280bb88ba4Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 97290bb88ba4Smrgm4_undefine([_defopt]) 9730d7be9c72Smrg 9731d7be9c72Smrgif test "x$use_xmlto" = x"auto"; then 9732d7be9c72Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9733d7be9c72Smrg if test "x$XMLTO" = "x"; then 9734d7be9c72Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9735d7be9c72Smrg have_xmlto=no 9736d7be9c72Smrg else 9737d7be9c72Smrg have_xmlto=yes 9738d7be9c72Smrg fi 9739d7be9c72Smrgelif test "x$use_xmlto" = x"yes" ; then 9740d7be9c72Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9741d7be9c72Smrg if test "x$XMLTO" = "x"; then 9742d7be9c72Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9743d7be9c72Smrg fi 9744d7be9c72Smrg have_xmlto=yes 9745d7be9c72Smrgelif test "x$use_xmlto" = x"no" ; then 9746d7be9c72Smrg if test "x$XMLTO" != "x"; then 9747d7be9c72Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9748d7be9c72Smrg fi 9749d7be9c72Smrg have_xmlto=no 9750d7be9c72Smrgelse 9751d7be9c72Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9752d7be9c72Smrgfi 9753d7be9c72Smrg 9754d7be9c72Smrg# Test for a minimum version of xmlto, if provided. 9755d7be9c72Smrgm4_ifval([$1], 9756d7be9c72Smrg[if test "$have_xmlto" = yes; then 9757d7be9c72Smrg # scrape the xmlto version 9758d7be9c72Smrg AC_MSG_CHECKING([the xmlto version]) 9759d7be9c72Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9760d7be9c72Smrg AC_MSG_RESULT([$xmlto_version]) 9761d7be9c72Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9762d7be9c72Smrg [if test "x$use_xmlto" = xauto; then 9763d7be9c72Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9764d7be9c72Smrg have_xmlto=no 9765d7be9c72Smrg else 9766d7be9c72Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9767d7be9c72Smrg fi]) 9768d7be9c72Smrgfi]) 9769d7be9c72Smrg 9770d7be9c72Smrg# Test for the ability of xmlto to generate a text target 9771d7be9c72Smrghave_xmlto_text=no 9772d7be9c72Smrgcat > conftest.xml << "EOF" 9773b0de6900Smrg<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 9774b0de6900Smrg "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> 9775b0de6900Smrg<book id="saver"> 9776b0de6900Smrg</book> 9777d7be9c72SmrgEOF 9778d7be9c72SmrgAS_IF([test "$have_xmlto" = yes], 9779d7be9c72Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9780d7be9c72Smrg [have_xmlto_text=yes], 9781d7be9c72Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9782d7be9c72Smrgrm -f conftest.xml 9783d7be9c72SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9784d7be9c72SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9785d7be9c72Smrg]) # XORG_WITH_XMLTO 9786d7be9c72Smrg 97870bb88ba4Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 97880bb88ba4Smrg# -------------------------------------------- 97890bb88ba4Smrg# Minimum version: 1.12.0 97900bb88ba4Smrg# Minimum version for optional DEFAULT argument: 1.12.0 97910bb88ba4Smrg# 97920bb88ba4Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 97930bb88ba4Smrg# XML-based language used for the transformation of XML documents. 97940bb88ba4Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 97950bb88ba4Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 97960bb88ba4Smrg# The XSLT processor is often used as a standalone tool for transformations. 97970bb88ba4Smrg# It should not be assumed that this tool is used only to work with documnetation. 97980bb88ba4Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 97990bb88ba4Smrg# 98000bb88ba4Smrg# Interface to module: 98010bb88ba4Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 98020bb88ba4Smrg# XSLTPROC: returns the path of the xsltproc program found 98030bb88ba4Smrg# returns the path set by the user in the environment 98040bb88ba4Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 98050bb88ba4Smrg# 'no' user instructs the module not to use xsltproc 98060bb88ba4Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 98070bb88ba4Smrg# 98080bb88ba4Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 98090bb88ba4Smrg# 98100bb88ba4SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 98110bb88ba4SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 98120bb88ba4Smrg# Preserves the interface, should it be implemented later 98130bb88ba4Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 98140bb88ba4Smrgm4_define([_defopt], m4_default([$2], [auto])) 98150bb88ba4SmrgAC_ARG_WITH(xsltproc, 98160bb88ba4Smrg AS_HELP_STRING([--with-xsltproc], 98170bb88ba4Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 98180bb88ba4Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 98190bb88ba4Smrgm4_undefine([_defopt]) 98200bb88ba4Smrg 98210bb88ba4Smrgif test "x$use_xsltproc" = x"auto"; then 98220bb88ba4Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 98230bb88ba4Smrg if test "x$XSLTPROC" = "x"; then 98240bb88ba4Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 98250bb88ba4Smrg have_xsltproc=no 98260bb88ba4Smrg else 98270bb88ba4Smrg have_xsltproc=yes 98280bb88ba4Smrg fi 98290bb88ba4Smrgelif test "x$use_xsltproc" = x"yes" ; then 98300bb88ba4Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 98310bb88ba4Smrg if test "x$XSLTPROC" = "x"; then 98320bb88ba4Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 98330bb88ba4Smrg fi 98340bb88ba4Smrg have_xsltproc=yes 98350bb88ba4Smrgelif test "x$use_xsltproc" = x"no" ; then 98360bb88ba4Smrg if test "x$XSLTPROC" != "x"; then 98370bb88ba4Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 98380bb88ba4Smrg fi 98390bb88ba4Smrg have_xsltproc=no 98400bb88ba4Smrgelse 98410bb88ba4Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 98420bb88ba4Smrgfi 98430bb88ba4Smrg 98440bb88ba4SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 98450bb88ba4Smrg]) # XORG_WITH_XSLTPROC 98460bb88ba4Smrg 98470bb88ba4Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 98480bb88ba4Smrg# ---------------------------------------- 98490bb88ba4Smrg# Minimum version: 1.15.0 98500bb88ba4Smrg# 98510bb88ba4Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 98520bb88ba4Smrg# scanning arbitrary text files, extracting information from those text files, 98530bb88ba4Smrg# and printing reports based on that information. 98540bb88ba4Smrg# 98550bb88ba4Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 98560bb88ba4Smrg# 98570bb88ba4Smrg# Interface to module: 98580bb88ba4Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 98590bb88ba4Smrg# PERL: returns the path of the perl program found 98600bb88ba4Smrg# returns the path set by the user in the environment 98610bb88ba4Smrg# --with-perl: 'yes' user instructs the module to use perl 98620bb88ba4Smrg# 'no' user instructs the module not to use perl 98630bb88ba4Smrg# have_perl: returns yes if perl found in PATH or no 98640bb88ba4Smrg# 98650bb88ba4Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 98660bb88ba4Smrg# 98670bb88ba4SmrgAC_DEFUN([XORG_WITH_PERL],[ 98680bb88ba4SmrgAC_ARG_VAR([PERL], [Path to perl command]) 98690bb88ba4Smrg# Preserves the interface, should it be implemented later 98700bb88ba4Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 98710bb88ba4Smrgm4_define([_defopt], m4_default([$2], [auto])) 98720bb88ba4SmrgAC_ARG_WITH(perl, 98730bb88ba4Smrg AS_HELP_STRING([--with-perl], 98740bb88ba4Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 98750bb88ba4Smrg [use_perl=$withval], [use_perl=]_defopt) 98760bb88ba4Smrgm4_undefine([_defopt]) 98770bb88ba4Smrg 98780bb88ba4Smrgif test "x$use_perl" = x"auto"; then 98790bb88ba4Smrg AC_PATH_PROG([PERL], [perl]) 98800bb88ba4Smrg if test "x$PERL" = "x"; then 98810bb88ba4Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 98820bb88ba4Smrg have_perl=no 98830bb88ba4Smrg else 98840bb88ba4Smrg have_perl=yes 98850bb88ba4Smrg fi 98860bb88ba4Smrgelif test "x$use_perl" = x"yes" ; then 98870bb88ba4Smrg AC_PATH_PROG([PERL], [perl]) 98880bb88ba4Smrg if test "x$PERL" = "x"; then 98890bb88ba4Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 98900bb88ba4Smrg fi 98910bb88ba4Smrg have_perl=yes 98920bb88ba4Smrgelif test "x$use_perl" = x"no" ; then 98930bb88ba4Smrg if test "x$PERL" != "x"; then 98940bb88ba4Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 98950bb88ba4Smrg fi 98960bb88ba4Smrg have_perl=no 98970bb88ba4Smrgelse 98980bb88ba4Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 98990bb88ba4Smrgfi 99000bb88ba4Smrg 99010bb88ba4SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 99020bb88ba4Smrg]) # XORG_WITH_PERL 99030bb88ba4Smrg 99040bb88ba4Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9905d7be9c72Smrg# ---------------- 9906d7be9c72Smrg# Minimum version: 1.5.0 99070bb88ba4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9908d7be9c72Smrg# 9909d7be9c72Smrg# Documentation tools are not always available on all platforms and sometimes 9910d7be9c72Smrg# not at the appropriate level. This macro enables a module to test for the 9911d7be9c72Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9912d7be9c72Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 99130bb88ba4Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 99140bb88ba4Smrg# --with-asciidoc assumes 'auto'. 9915d7be9c72Smrg# 9916d7be9c72Smrg# Interface to module: 9917d7be9c72Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9918d7be9c72Smrg# ASCIIDOC: returns the path of the asciidoc program found 9919d7be9c72Smrg# returns the path set by the user in the environment 9920d7be9c72Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9921d7be9c72Smrg# 'no' user instructs the module not to use asciidoc 9922d7be9c72Smrg# 9923d7be9c72Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9924d7be9c72Smrg# 9925d7be9c72SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9926d7be9c72SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 99270bb88ba4Smrgm4_define([_defopt], m4_default([$2], [auto])) 9928d7be9c72SmrgAC_ARG_WITH(asciidoc, 9929d7be9c72Smrg AS_HELP_STRING([--with-asciidoc], 99300bb88ba4Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 99310bb88ba4Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 99320bb88ba4Smrgm4_undefine([_defopt]) 9933d7be9c72Smrg 9934d7be9c72Smrgif test "x$use_asciidoc" = x"auto"; then 9935d7be9c72Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9936d7be9c72Smrg if test "x$ASCIIDOC" = "x"; then 9937d7be9c72Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9938d7be9c72Smrg have_asciidoc=no 9939d7be9c72Smrg else 9940d7be9c72Smrg have_asciidoc=yes 9941d7be9c72Smrg fi 9942d7be9c72Smrgelif test "x$use_asciidoc" = x"yes" ; then 9943d7be9c72Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9944d7be9c72Smrg if test "x$ASCIIDOC" = "x"; then 9945d7be9c72Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9946d7be9c72Smrg fi 9947d7be9c72Smrg have_asciidoc=yes 9948d7be9c72Smrgelif test "x$use_asciidoc" = x"no" ; then 9949d7be9c72Smrg if test "x$ASCIIDOC" != "x"; then 9950d7be9c72Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9951d7be9c72Smrg fi 9952d7be9c72Smrg have_asciidoc=no 9953d7be9c72Smrgelse 9954d7be9c72Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9955d7be9c72Smrgfi 9956d7be9c72Smrgm4_ifval([$1], 9957d7be9c72Smrg[if test "$have_asciidoc" = yes; then 9958d7be9c72Smrg # scrape the asciidoc version 9959d7be9c72Smrg AC_MSG_CHECKING([the asciidoc version]) 9960d7be9c72Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9961d7be9c72Smrg AC_MSG_RESULT([$asciidoc_version]) 9962d7be9c72Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9963d7be9c72Smrg [if test "x$use_asciidoc" = xauto; then 9964d7be9c72Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9965d7be9c72Smrg have_asciidoc=no 9966d7be9c72Smrg else 9967d7be9c72Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9968d7be9c72Smrg fi]) 9969d7be9c72Smrgfi]) 9970d7be9c72SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9971d7be9c72Smrg]) # XORG_WITH_ASCIIDOC 9972d7be9c72Smrg 99730bb88ba4Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9974493f84f4Smrg# ------------------------------------------- 9975d7be9c72Smrg# Minimum version: 1.5.0 99760bb88ba4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9977493f84f4Smrg# Minimum version for optional DOT checking: 1.18.0 9978d7be9c72Smrg# 9979d7be9c72Smrg# Documentation tools are not always available on all platforms and sometimes 9980d7be9c72Smrg# not at the appropriate level. This macro enables a module to test for the 9981d7be9c72Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9982d7be9c72Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 99830bb88ba4Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 99840bb88ba4Smrg# --with-doxygen assumes 'auto'. 9985d7be9c72Smrg# 9986d7be9c72Smrg# Interface to module: 9987d7be9c72Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9988d7be9c72Smrg# DOXYGEN: returns the path of the doxygen program found 9989d7be9c72Smrg# returns the path set by the user in the environment 9990d7be9c72Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9991d7be9c72Smrg# 'no' user instructs the module not to use doxygen 9992d7be9c72Smrg# 9993d7be9c72Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9994d7be9c72Smrg# 9995d7be9c72SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9996d7be9c72SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9997493f84f4SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 99980bb88ba4Smrgm4_define([_defopt], m4_default([$2], [auto])) 9999d7be9c72SmrgAC_ARG_WITH(doxygen, 10000d7be9c72Smrg AS_HELP_STRING([--with-doxygen], 100010bb88ba4Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 100020bb88ba4Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 100030bb88ba4Smrgm4_undefine([_defopt]) 10004d7be9c72Smrg 10005d7be9c72Smrgif test "x$use_doxygen" = x"auto"; then 10006d7be9c72Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10007d7be9c72Smrg if test "x$DOXYGEN" = "x"; then 10008d7be9c72Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10009d7be9c72Smrg have_doxygen=no 10010d7be9c72Smrg else 10011d7be9c72Smrg have_doxygen=yes 10012d7be9c72Smrg fi 10013d7be9c72Smrgelif test "x$use_doxygen" = x"yes" ; then 10014d7be9c72Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10015d7be9c72Smrg if test "x$DOXYGEN" = "x"; then 10016d7be9c72Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10017d7be9c72Smrg fi 10018d7be9c72Smrg have_doxygen=yes 10019d7be9c72Smrgelif test "x$use_doxygen" = x"no" ; then 10020d7be9c72Smrg if test "x$DOXYGEN" != "x"; then 10021d7be9c72Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10022d7be9c72Smrg fi 10023d7be9c72Smrg have_doxygen=no 10024d7be9c72Smrgelse 10025d7be9c72Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10026d7be9c72Smrgfi 10027d7be9c72Smrgm4_ifval([$1], 10028d7be9c72Smrg[if test "$have_doxygen" = yes; then 10029d7be9c72Smrg # scrape the doxygen version 10030d7be9c72Smrg AC_MSG_CHECKING([the doxygen version]) 10031d7be9c72Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10032d7be9c72Smrg AC_MSG_RESULT([$doxygen_version]) 10033d7be9c72Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10034d7be9c72Smrg [if test "x$use_doxygen" = xauto; then 10035d7be9c72Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10036d7be9c72Smrg have_doxygen=no 10037d7be9c72Smrg else 10038d7be9c72Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10039d7be9c72Smrg fi]) 10040d7be9c72Smrgfi]) 10041493f84f4Smrg 10042493f84f4Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10043493f84f4Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10044493f84f4Smrgdnl HAVE_DOT = @HAVE_DOT@ 10045493f84f4SmrgHAVE_DOT=no 10046493f84f4Smrgif test "x$have_doxygen" = "xyes"; then 10047493f84f4Smrg AC_PATH_PROG([DOT], [dot]) 10048493f84f4Smrg if test "x$DOT" != "x"; then 10049493f84f4Smrg HAVE_DOT=yes 10050493f84f4Smrg fi 10051493f84f4Smrgfi 10052493f84f4Smrg 10053493f84f4SmrgAC_SUBST([HAVE_DOT]) 10054493f84f4SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10055d7be9c72SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10056d7be9c72Smrg]) # XORG_WITH_DOXYGEN 10057d7be9c72Smrg 100580bb88ba4Smrg# XORG_WITH_GROFF([DEFAULT]) 10059d7be9c72Smrg# ---------------- 10060d7be9c72Smrg# Minimum version: 1.6.0 100610bb88ba4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10062d7be9c72Smrg# 10063d7be9c72Smrg# Documentation tools are not always available on all platforms and sometimes 10064d7be9c72Smrg# not at the appropriate level. This macro enables a module to test for the 10065d7be9c72Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10066d7be9c72Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 100670bb88ba4Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 100680bb88ba4Smrg# --with-groff assumes 'auto'. 10069d7be9c72Smrg# 10070d7be9c72Smrg# Interface to module: 10071d7be9c72Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10072d7be9c72Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10073d7be9c72Smrg# HAVE_GROFF_MS: the -ms macros package 10074d7be9c72Smrg# GROFF: returns the path of the groff program found 10075d7be9c72Smrg# returns the path set by the user in the environment 10076d7be9c72Smrg# --with-groff: 'yes' user instructs the module to use groff 10077d7be9c72Smrg# 'no' user instructs the module not to use groff 10078d7be9c72Smrg# 10079d7be9c72Smrg# Added in version 1.9.0: 10080d7be9c72Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10081d7be9c72Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10082d7be9c72Smrg# psselect from the psutils package. 10083d7be9c72Smrg# the ghostcript package. Refer to the grohtml man pages 10084d7be9c72Smrg# 10085d7be9c72Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10086d7be9c72Smrg# 10087d7be9c72Smrg# OS and distros often splits groff in a basic and full package, the former 10088d7be9c72Smrg# having the groff program and the later having devices, fonts and macros 10089d7be9c72Smrg# Checking for the groff executable is not enough. 10090d7be9c72Smrg# 10091d7be9c72Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 10092d7be9c72Smrg# unset HAVE_GROFF or GROFF env variables. 10093d7be9c72Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10094d7be9c72Smrg# 10095d7be9c72SmrgAC_DEFUN([XORG_WITH_GROFF],[ 10096d7be9c72SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 100970bb88ba4Smrgm4_define([_defopt], m4_default([$1], [auto])) 10098d7be9c72SmrgAC_ARG_WITH(groff, 10099d7be9c72Smrg AS_HELP_STRING([--with-groff], 101000bb88ba4Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 101010bb88ba4Smrg [use_groff=$withval], [use_groff=]_defopt) 101020bb88ba4Smrgm4_undefine([_defopt]) 10103d7be9c72Smrg 10104d7be9c72Smrgif test "x$use_groff" = x"auto"; then 10105d7be9c72Smrg AC_PATH_PROG([GROFF], [groff]) 10106d7be9c72Smrg if test "x$GROFF" = "x"; then 10107d7be9c72Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10108d7be9c72Smrg have_groff=no 10109d7be9c72Smrg else 10110d7be9c72Smrg have_groff=yes 10111d7be9c72Smrg fi 10112d7be9c72Smrgelif test "x$use_groff" = x"yes" ; then 10113d7be9c72Smrg AC_PATH_PROG([GROFF], [groff]) 10114d7be9c72Smrg if test "x$GROFF" = "x"; then 10115d7be9c72Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10116d7be9c72Smrg fi 10117d7be9c72Smrg have_groff=yes 10118d7be9c72Smrgelif test "x$use_groff" = x"no" ; then 10119d7be9c72Smrg if test "x$GROFF" != "x"; then 10120d7be9c72Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10121d7be9c72Smrg fi 10122d7be9c72Smrg have_groff=no 10123d7be9c72Smrgelse 10124d7be9c72Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10125d7be9c72Smrgfi 10126d7be9c72Smrg 10127d7be9c72Smrg# We have groff, test for the presence of the macro packages 10128d7be9c72Smrgif test "x$have_groff" = x"yes"; then 10129d7be9c72Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10130d7be9c72Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10131d7be9c72Smrg groff_ms_works=yes 10132d7be9c72Smrg else 10133d7be9c72Smrg groff_ms_works=no 10134d7be9c72Smrg fi 10135d7be9c72Smrg AC_MSG_RESULT([$groff_ms_works]) 10136d7be9c72Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10137d7be9c72Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10138d7be9c72Smrg groff_mm_works=yes 10139d7be9c72Smrg else 10140d7be9c72Smrg groff_mm_works=no 10141d7be9c72Smrg fi 10142d7be9c72Smrg AC_MSG_RESULT([$groff_mm_works]) 10143d7be9c72Smrgfi 10144d7be9c72Smrg 10145d7be9c72Smrg# We have groff, test for HTML dependencies, one command per package 10146d7be9c72Smrgif test "x$have_groff" = x"yes"; then 10147d7be9c72Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10148d7be9c72Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10149d7be9c72Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10150d7be9c72Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10151d7be9c72Smrg have_groff_html=yes 10152d7be9c72Smrg else 10153d7be9c72Smrg have_groff_html=no 10154d7be9c72Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10155d7be9c72Smrg fi 10156d7be9c72Smrgfi 10157d7be9c72Smrg 10158d7be9c72Smrg# Set Automake conditionals for Makefiles 10159d7be9c72SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10160d7be9c72SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10161d7be9c72SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10162d7be9c72SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10163d7be9c72Smrg]) # XORG_WITH_GROFF 10164d7be9c72Smrg 101650bb88ba4Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 101660bb88ba4Smrg# --------------------------------------- 10167d7be9c72Smrg# Minimum version: 1.6.0 101680bb88ba4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 101690bb88ba4Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10170d7be9c72Smrg# 10171d7be9c72Smrg# Documentation tools are not always available on all platforms and sometimes 10172d7be9c72Smrg# not at the appropriate level. This macro enables a module to test for the 10173d7be9c72Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10174d7be9c72Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 101750bb88ba4Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 101760bb88ba4Smrg# --with-fop assumes 'auto'. 10177d7be9c72Smrg# 10178d7be9c72Smrg# Interface to module: 10179d7be9c72Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10180d7be9c72Smrg# FOP: returns the path of the fop program found 10181d7be9c72Smrg# returns the path set by the user in the environment 10182d7be9c72Smrg# --with-fop: 'yes' user instructs the module to use fop 10183d7be9c72Smrg# 'no' user instructs the module not to use fop 10184d7be9c72Smrg# 10185d7be9c72Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10186d7be9c72Smrg# 10187d7be9c72SmrgAC_DEFUN([XORG_WITH_FOP],[ 10188d7be9c72SmrgAC_ARG_VAR([FOP], [Path to fop command]) 101890bb88ba4Smrgm4_define([_defopt], m4_default([$2], [auto])) 10190d7be9c72SmrgAC_ARG_WITH(fop, 10191d7be9c72Smrg AS_HELP_STRING([--with-fop], 101920bb88ba4Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 101930bb88ba4Smrg [use_fop=$withval], [use_fop=]_defopt) 101940bb88ba4Smrgm4_undefine([_defopt]) 10195d7be9c72Smrg 10196d7be9c72Smrgif test "x$use_fop" = x"auto"; then 10197d7be9c72Smrg AC_PATH_PROG([FOP], [fop]) 10198d7be9c72Smrg if test "x$FOP" = "x"; then 10199d7be9c72Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10200d7be9c72Smrg have_fop=no 10201d7be9c72Smrg else 10202d7be9c72Smrg have_fop=yes 10203d7be9c72Smrg fi 10204d7be9c72Smrgelif test "x$use_fop" = x"yes" ; then 10205d7be9c72Smrg AC_PATH_PROG([FOP], [fop]) 10206d7be9c72Smrg if test "x$FOP" = "x"; then 10207d7be9c72Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10208d7be9c72Smrg fi 10209d7be9c72Smrg have_fop=yes 10210d7be9c72Smrgelif test "x$use_fop" = x"no" ; then 10211d7be9c72Smrg if test "x$FOP" != "x"; then 10212d7be9c72Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10213d7be9c72Smrg fi 10214d7be9c72Smrg have_fop=no 10215d7be9c72Smrgelse 10216d7be9c72Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10217d7be9c72Smrgfi 102180bb88ba4Smrg 102190bb88ba4Smrg# Test for a minimum version of fop, if provided. 102200bb88ba4Smrgm4_ifval([$1], 102210bb88ba4Smrg[if test "$have_fop" = yes; then 102220bb88ba4Smrg # scrape the fop version 102230bb88ba4Smrg AC_MSG_CHECKING([for fop minimum version]) 102240bb88ba4Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 102250bb88ba4Smrg AC_MSG_RESULT([$fop_version]) 102260bb88ba4Smrg AS_VERSION_COMPARE([$fop_version], [$1], 102270bb88ba4Smrg [if test "x$use_fop" = xauto; then 102280bb88ba4Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 102290bb88ba4Smrg have_fop=no 102300bb88ba4Smrg else 102310bb88ba4Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 102320bb88ba4Smrg fi]) 102330bb88ba4Smrgfi]) 10234d7be9c72SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10235d7be9c72Smrg]) # XORG_WITH_FOP 10236d7be9c72Smrg 10237ee82cb62Smrg# XORG_WITH_M4([MIN-VERSION]) 10238ee82cb62Smrg# --------------------------- 10239ee82cb62Smrg# Minimum version: 1.19.0 10240ee82cb62Smrg# 10241ee82cb62Smrg# This macro attempts to locate an m4 macro processor which supports 10242ee82cb62Smrg# -I option and is only useful for modules relying on M4 in order to 10243ee82cb62Smrg# expand macros in source code files. 10244ee82cb62Smrg# 10245ee82cb62Smrg# Interface to module: 10246ee82cb62Smrg# M4: returns the path of the m4 program found 10247ee82cb62Smrg# returns the path set by the user in the environment 10248ee82cb62Smrg# 10249ee82cb62SmrgAC_DEFUN([XORG_WITH_M4], [ 10250ee82cb62SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10251ee82cb62Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10252ee82cb62Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10253ee82cb62Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10254ee82cb62Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 10255ee82cb62Smrg [$PATH:/usr/gnu/bin])]) 10256ee82cb62Smrg 10257ee82cb62SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 10258ee82cb62Smrg]) # XORG_WITH_M4 10259ee82cb62Smrg 102600bb88ba4Smrg# XORG_WITH_PS2PDF([DEFAULT]) 10261d7be9c72Smrg# ---------------- 10262d7be9c72Smrg# Minimum version: 1.6.0 102630bb88ba4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10264d7be9c72Smrg# 10265d7be9c72Smrg# Documentation tools are not always available on all platforms and sometimes 10266d7be9c72Smrg# not at the appropriate level. This macro enables a module to test for the 10267d7be9c72Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10268d7be9c72Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 102690bb88ba4Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 102700bb88ba4Smrg# --with-ps2pdf assumes 'auto'. 10271d7be9c72Smrg# 10272d7be9c72Smrg# Interface to module: 10273d7be9c72Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10274d7be9c72Smrg# PS2PDF: returns the path of the ps2pdf program found 10275d7be9c72Smrg# returns the path set by the user in the environment 10276d7be9c72Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10277d7be9c72Smrg# 'no' user instructs the module not to use ps2pdf 10278d7be9c72Smrg# 10279d7be9c72Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10280d7be9c72Smrg# 10281d7be9c72SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10282d7be9c72SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 102830bb88ba4Smrgm4_define([_defopt], m4_default([$1], [auto])) 10284d7be9c72SmrgAC_ARG_WITH(ps2pdf, 10285d7be9c72Smrg AS_HELP_STRING([--with-ps2pdf], 102860bb88ba4Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 102870bb88ba4Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 102880bb88ba4Smrgm4_undefine([_defopt]) 10289d7be9c72Smrg 10290d7be9c72Smrgif test "x$use_ps2pdf" = x"auto"; then 10291d7be9c72Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10292d7be9c72Smrg if test "x$PS2PDF" = "x"; then 10293d7be9c72Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10294d7be9c72Smrg have_ps2pdf=no 10295d7be9c72Smrg else 10296d7be9c72Smrg have_ps2pdf=yes 10297d7be9c72Smrg fi 10298d7be9c72Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10299d7be9c72Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10300d7be9c72Smrg if test "x$PS2PDF" = "x"; then 10301d7be9c72Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10302d7be9c72Smrg fi 10303d7be9c72Smrg have_ps2pdf=yes 10304d7be9c72Smrgelif test "x$use_ps2pdf" = x"no" ; then 10305d7be9c72Smrg if test "x$PS2PDF" != "x"; then 10306d7be9c72Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10307d7be9c72Smrg fi 10308d7be9c72Smrg have_ps2pdf=no 10309d7be9c72Smrgelse 10310d7be9c72Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10311d7be9c72Smrgfi 10312d7be9c72SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10313d7be9c72Smrg]) # XORG_WITH_PS2PDF 10314d7be9c72Smrg 10315d7be9c72Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10316d7be9c72Smrg# ---------------- 10317d7be9c72Smrg# Minimum version: 1.6.0 10318d7be9c72Smrg# 10319d7be9c72Smrg# Documentation tools are not always available on all platforms and sometimes 10320d7be9c72Smrg# not at the appropriate level. This macro enables a builder to skip all 10321d7be9c72Smrg# documentation targets except traditional man pages. 10322d7be9c72Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10323d7be9c72Smrg# maximum flexibilty in controlling documentation building. 10324d7be9c72Smrg# Refer to: 10325d7be9c72Smrg# XORG_WITH_XMLTO --with-xmlto 10326d7be9c72Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10327d7be9c72Smrg# XORG_WITH_DOXYGEN --with-doxygen 10328d7be9c72Smrg# XORG_WITH_FOP --with-fop 10329d7be9c72Smrg# XORG_WITH_GROFF --with-groff 10330d7be9c72Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10331d7be9c72Smrg# 10332d7be9c72Smrg# Interface to module: 10333d7be9c72Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10334d7be9c72Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10335d7be9c72Smrg# 'no' user instructs the module not to generate docs 10336d7be9c72Smrg# parm1: specify the default value, yes or no. 10337d7be9c72Smrg# 10338d7be9c72SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 103390bb88ba4Smrgm4_define([docs_default], m4_default([$1], [yes])) 10340d7be9c72SmrgAC_ARG_ENABLE(docs, 10341d7be9c72Smrg AS_HELP_STRING([--enable-docs], 103420bb88ba4Smrg [Enable building the documentation (default: ]docs_default[)]), 103430bb88ba4Smrg [build_docs=$enableval], [build_docs=]docs_default) 103440bb88ba4Smrgm4_undefine([docs_default]) 10345d7be9c72SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10346d7be9c72SmrgAC_MSG_CHECKING([whether to build documentation]) 10347d7be9c72SmrgAC_MSG_RESULT([$build_docs]) 10348d7be9c72Smrg]) # XORG_ENABLE_DOCS 10349d7be9c72Smrg 10350d7be9c72Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10351d7be9c72Smrg# ---------------- 10352d7be9c72Smrg# Minimum version: 1.6.0 10353d7be9c72Smrg# 10354d7be9c72Smrg# This macro enables a builder to skip all developer documentation. 10355d7be9c72Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10356d7be9c72Smrg# maximum flexibilty in controlling documentation building. 10357d7be9c72Smrg# Refer to: 10358d7be9c72Smrg# XORG_WITH_XMLTO --with-xmlto 10359d7be9c72Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10360d7be9c72Smrg# XORG_WITH_DOXYGEN --with-doxygen 10361d7be9c72Smrg# XORG_WITH_FOP --with-fop 10362d7be9c72Smrg# XORG_WITH_GROFF --with-groff 10363d7be9c72Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10364d7be9c72Smrg# 10365d7be9c72Smrg# Interface to module: 10366d7be9c72Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10367d7be9c72Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10368d7be9c72Smrg# 'no' user instructs the module not to generate developer docs 10369d7be9c72Smrg# parm1: specify the default value, yes or no. 10370d7be9c72Smrg# 10371d7be9c72SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 103720bb88ba4Smrgm4_define([devel_default], m4_default([$1], [yes])) 10373d7be9c72SmrgAC_ARG_ENABLE(devel-docs, 10374d7be9c72Smrg AS_HELP_STRING([--enable-devel-docs], 103750bb88ba4Smrg [Enable building the developer documentation (default: ]devel_default[)]), 103760bb88ba4Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 103770bb88ba4Smrgm4_undefine([devel_default]) 10378d7be9c72SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10379d7be9c72SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10380d7be9c72SmrgAC_MSG_RESULT([$build_devel_docs]) 10381d7be9c72Smrg]) # XORG_ENABLE_DEVEL_DOCS 10382d7be9c72Smrg 10383d7be9c72Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10384d7be9c72Smrg# ---------------- 10385d7be9c72Smrg# Minimum version: 1.6.0 10386d7be9c72Smrg# 10387d7be9c72Smrg# This macro enables a builder to skip all functional specification targets. 10388d7be9c72Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10389d7be9c72Smrg# maximum flexibilty in controlling documentation building. 10390d7be9c72Smrg# Refer to: 10391d7be9c72Smrg# XORG_WITH_XMLTO --with-xmlto 10392d7be9c72Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10393d7be9c72Smrg# XORG_WITH_DOXYGEN --with-doxygen 10394d7be9c72Smrg# XORG_WITH_FOP --with-fop 10395d7be9c72Smrg# XORG_WITH_GROFF --with-groff 10396d7be9c72Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10397d7be9c72Smrg# 10398d7be9c72Smrg# Interface to module: 10399d7be9c72Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10400d7be9c72Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10401d7be9c72Smrg# 'no' user instructs the module not to generate specs 10402d7be9c72Smrg# parm1: specify the default value, yes or no. 10403d7be9c72Smrg# 10404d7be9c72SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 104050bb88ba4Smrgm4_define([spec_default], m4_default([$1], [yes])) 10406d7be9c72SmrgAC_ARG_ENABLE(specs, 10407d7be9c72Smrg AS_HELP_STRING([--enable-specs], 104080bb88ba4Smrg [Enable building the specs (default: ]spec_default[)]), 104090bb88ba4Smrg [build_specs=$enableval], [build_specs=]spec_default) 104100bb88ba4Smrgm4_undefine([spec_default]) 10411d7be9c72SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10412d7be9c72SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10413d7be9c72SmrgAC_MSG_RESULT([$build_specs]) 10414d7be9c72Smrg]) # XORG_ENABLE_SPECS 10415d7be9c72Smrg 104160bb88ba4Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 104170bb88ba4Smrg# ---------------------------------------------- 104180bb88ba4Smrg# Minimum version: 1.13.0 104190bb88ba4Smrg# 104200bb88ba4Smrg# This macro enables a builder to enable/disable unit testing 104210bb88ba4Smrg# It makes no assumption about the test cases implementation 104220bb88ba4Smrg# Test cases may or may not use Automake "Support for test suites" 104230bb88ba4Smrg# They may or may not use the software utility library GLib 104240bb88ba4Smrg# 104250bb88ba4Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 104260bb88ba4Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 104270bb88ba4Smrg# The variable enable_unit_tests is used by other macros in this file. 104280bb88ba4Smrg# 104290bb88ba4Smrg# Interface to module: 104300bb88ba4Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 104310bb88ba4Smrg# enable_unit_tests: used in configure.ac for additional configuration 104320bb88ba4Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 104330bb88ba4Smrg# 'no' user instructs the module not to build tests 104340bb88ba4Smrg# parm1: specify the default value, yes or no. 104350bb88ba4Smrg# 104360bb88ba4SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 104370bb88ba4SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 104380bb88ba4SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 104390bb88ba4SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 104400bb88ba4Smrgm4_define([_defopt], m4_default([$1], [auto])) 104410bb88ba4SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 104420bb88ba4Smrg [Enable building unit test cases (default: ]_defopt[)]), 104430bb88ba4Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 104440bb88ba4Smrgm4_undefine([_defopt]) 104450bb88ba4SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 104460bb88ba4SmrgAC_MSG_CHECKING([whether to build unit test cases]) 104470bb88ba4SmrgAC_MSG_RESULT([$enable_unit_tests]) 104480bb88ba4Smrg]) # XORG_ENABLE_UNIT_TESTS 104490bb88ba4Smrg 104500bb88ba4Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 104510bb88ba4Smrg# ------------------------------------------------------ 104520bb88ba4Smrg# Minimum version: 1.17.0 104530bb88ba4Smrg# 104540bb88ba4Smrg# This macro enables a builder to enable/disable integration testing 104550bb88ba4Smrg# It makes no assumption about the test cases' implementation 104560bb88ba4Smrg# Test cases may or may not use Automake "Support for test suites" 104570bb88ba4Smrg# 104580bb88ba4Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 104590bb88ba4Smrg# usually requires less dependencies and may be built and run under less 104600bb88ba4Smrg# stringent environments than integration tests. 104610bb88ba4Smrg# 104620bb88ba4Smrg# Interface to module: 104630bb88ba4Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 104640bb88ba4Smrg# enable_integration_tests: used in configure.ac for additional configuration 104650bb88ba4Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 104660bb88ba4Smrg# 'no' user instructs the module not to build tests 104670bb88ba4Smrg# parm1: specify the default value, yes or no. 104680bb88ba4Smrg# 104690bb88ba4SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 104700bb88ba4SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 104710bb88ba4Smrgm4_define([_defopt], m4_default([$1], [auto])) 104720bb88ba4SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 104730bb88ba4Smrg [Enable building integration test cases (default: ]_defopt[)]), 104740bb88ba4Smrg [enable_integration_tests=$enableval], 104750bb88ba4Smrg [enable_integration_tests=]_defopt) 104760bb88ba4Smrgm4_undefine([_defopt]) 104770bb88ba4SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 104780bb88ba4Smrg [test "x$enable_integration_tests" != xno]) 104790bb88ba4SmrgAC_MSG_CHECKING([whether to build unit test cases]) 104800bb88ba4SmrgAC_MSG_RESULT([$enable_integration_tests]) 104810bb88ba4Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 104820bb88ba4Smrg 104830bb88ba4Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 104840bb88ba4Smrg# ---------------------------------------- 104850bb88ba4Smrg# Minimum version: 1.13.0 104860bb88ba4Smrg# 104870bb88ba4Smrg# GLib is a library which provides advanced data structures and functions. 104880bb88ba4Smrg# This macro enables a module to test for the presence of Glib. 104890bb88ba4Smrg# 104900bb88ba4Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 104910bb88ba4Smrg# Otherwise the value of $enable_unit_tests is blank. 104920bb88ba4Smrg# 104930bb88ba4Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 104940bb88ba4Smrg# test support usually requires less dependencies and may be built and run under 104950bb88ba4Smrg# less stringent environments than integration tests. 104960bb88ba4Smrg# 104970bb88ba4Smrg# Interface to module: 104980bb88ba4Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 104990bb88ba4Smrg# with_glib: used in configure.ac to know if GLib has been found 105000bb88ba4Smrg# --with-glib: 'yes' user instructs the module to use glib 105010bb88ba4Smrg# 'no' user instructs the module not to use glib 105020bb88ba4Smrg# 105030bb88ba4SmrgAC_DEFUN([XORG_WITH_GLIB],[ 105040bb88ba4SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 105050bb88ba4Smrgm4_define([_defopt], m4_default([$2], [auto])) 105060bb88ba4SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 105070bb88ba4Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 105080bb88ba4Smrg [with_glib=$withval], [with_glib=]_defopt) 105090bb88ba4Smrgm4_undefine([_defopt]) 105100bb88ba4Smrg 105110bb88ba4Smrghave_glib=no 105120bb88ba4Smrg# Do not probe GLib if user explicitly disabled unit testing 105130bb88ba4Smrgif test "x$enable_unit_tests" != x"no"; then 105140bb88ba4Smrg # Do not probe GLib if user explicitly disabled it 105150bb88ba4Smrg if test "x$with_glib" != x"no"; then 105160bb88ba4Smrg m4_ifval( 105170bb88ba4Smrg [$1], 105180bb88ba4Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 105190bb88ba4Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 105200bb88ba4Smrg ) 105210bb88ba4Smrg fi 105220bb88ba4Smrgfi 105230bb88ba4Smrg 105240bb88ba4Smrg# Not having GLib when unit testing has been explicitly requested is an error 105250bb88ba4Smrgif test "x$enable_unit_tests" = x"yes"; then 105260bb88ba4Smrg if test "x$have_glib" = x"no"; then 105270bb88ba4Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 105280bb88ba4Smrg fi 105290bb88ba4Smrgfi 105300bb88ba4Smrg 105310bb88ba4Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 105320bb88ba4Smrgif test "x$enable_unit_tests" = x"no"; then 105330bb88ba4Smrg if test "x$with_glib" = x"yes"; then 105340bb88ba4Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 105350bb88ba4Smrg fi 105360bb88ba4Smrgfi 105370bb88ba4Smrg 105380bb88ba4Smrg# Not having GLib when it has been explicitly requested is an error 105390bb88ba4Smrgif test "x$with_glib" = x"yes"; then 105400bb88ba4Smrg if test "x$have_glib" = x"no"; then 105410bb88ba4Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 105420bb88ba4Smrg fi 105430bb88ba4Smrgfi 105440bb88ba4Smrg 105450bb88ba4SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 105460bb88ba4Smrg]) # XORG_WITH_GLIB 105470bb88ba4Smrg 105480bb88ba4Smrg# XORG_LD_WRAP([required|optional]) 105490bb88ba4Smrg# --------------------------------- 105500bb88ba4Smrg# Minimum version: 1.13.0 105510bb88ba4Smrg# 105520bb88ba4Smrg# Check if linker supports -wrap, passed via compiler flags 105530bb88ba4Smrg# 105540bb88ba4Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 105550bb88ba4Smrg# Otherwise the value of $enable_unit_tests is blank. 105560bb88ba4Smrg# 105570bb88ba4Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 105580bb88ba4Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 105590bb88ba4Smrg# available, an argument of "optional" allows use when some unit tests require 105600bb88ba4Smrg# ld -wrap and others do not. 105610bb88ba4Smrg# 105620bb88ba4SmrgAC_DEFUN([XORG_LD_WRAP],[ 105630bb88ba4SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 105640bb88ba4Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 105650bb88ba4Smrg void __wrap_exit(int status) { return; }], 105660bb88ba4Smrg [exit(0);])]) 105670bb88ba4Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 105680bb88ba4Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 105690bb88ba4Smrg if test "x$have_ld_wrap" = x"no"; then 105700bb88ba4Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 105710bb88ba4Smrg fi 105720bb88ba4Smrgfi 105730bb88ba4SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 105740bb88ba4Smrg# 105750bb88ba4Smrg]) # XORG_LD_WRAP 105760bb88ba4Smrg 105770bb88ba4Smrg# XORG_CHECK_LINKER_FLAGS 105780bb88ba4Smrg# ----------------------- 105790bb88ba4Smrg# SYNOPSIS 105800bb88ba4Smrg# 105810bb88ba4Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 105820bb88ba4Smrg# 105830bb88ba4Smrg# DESCRIPTION 105840bb88ba4Smrg# 105850bb88ba4Smrg# Check whether the given linker FLAGS work with the current language's 105860bb88ba4Smrg# linker, or whether they give an error. 105870bb88ba4Smrg# 105880bb88ba4Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 105890bb88ba4Smrg# success/failure. 105900bb88ba4Smrg# 105910bb88ba4Smrg# PROGRAM-SOURCE is the program source to link with, if needed 105920bb88ba4Smrg# 105930bb88ba4Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 105940bb88ba4Smrg# 105950bb88ba4Smrg# LICENSE 105960bb88ba4Smrg# 105970bb88ba4Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 105980bb88ba4Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 105990bb88ba4Smrg# Copyright (c) 2009 Matteo Frigo 106000bb88ba4Smrg# 106010bb88ba4Smrg# This program is free software: you can redistribute it and/or modify it 106020bb88ba4Smrg# under the terms of the GNU General Public License as published by the 106030bb88ba4Smrg# Free Software Foundation, either version 3 of the License, or (at your 106040bb88ba4Smrg# option) any later version. 106050bb88ba4Smrg# 106060bb88ba4Smrg# This program is distributed in the hope that it will be useful, but 106070bb88ba4Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 106080bb88ba4Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 106090bb88ba4Smrg# Public License for more details. 106100bb88ba4Smrg# 106110bb88ba4Smrg# You should have received a copy of the GNU General Public License along 106120bb88ba4Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 106130bb88ba4Smrg# 106140bb88ba4Smrg# As a special exception, the respective Autoconf Macro's copyright owner 106150bb88ba4Smrg# gives unlimited permission to copy, distribute and modify the configure 106160bb88ba4Smrg# scripts that are the output of Autoconf when processing the Macro. You 106170bb88ba4Smrg# need not follow the terms of the GNU General Public License when using 106180bb88ba4Smrg# or distributing such scripts, even though portions of the text of the 106190bb88ba4Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 106200bb88ba4Smrg# all other use of the material that constitutes the Autoconf Macro. 106210bb88ba4Smrg# 106220bb88ba4Smrg# This special exception to the GPL applies to versions of the Autoconf 106230bb88ba4Smrg# Macro released by the Autoconf Archive. When you make and distribute a 106240bb88ba4Smrg# modified version of the Autoconf Macro, you may extend this special 106250bb88ba4Smrg# exception to the GPL to apply to your modified version as well.# 106260bb88ba4SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 106270bb88ba4Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 106280bb88ba4Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 106290bb88ba4SmrgAS_LITERAL_IF([$1], 106300bb88ba4Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 106310bb88ba4Smrg ax_save_FLAGS=$LDFLAGS 106320bb88ba4Smrg LDFLAGS="$1" 106330bb88ba4Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 106340bb88ba4Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 106350bb88ba4Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 106360bb88ba4Smrg LDFLAGS=$ax_save_FLAGS])], 106370bb88ba4Smrg [ax_save_FLAGS=$LDFLAGS 106380bb88ba4Smrg LDFLAGS="$1" 106390bb88ba4Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 106400bb88ba4Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 106410bb88ba4Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 106420bb88ba4Smrg LDFLAGS=$ax_save_FLAGS]) 106430bb88ba4Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 106440bb88ba4SmrgAC_MSG_RESULT($xorg_check_linker_flags) 106450bb88ba4Smrgif test "x$xorg_check_linker_flags" = xyes; then 106460bb88ba4Smrg m4_default([$2], :) 106470bb88ba4Smrgelse 106480bb88ba4Smrg m4_default([$3], :) 106490bb88ba4Smrgfi 106500bb88ba4Smrg]) # XORG_CHECK_LINKER_FLAGS 106510bb88ba4Smrg 106520bb88ba4Smrg# XORG_MEMORY_CHECK_FLAGS 106530bb88ba4Smrg# ----------------------- 106540bb88ba4Smrg# Minimum version: 1.16.0 106550bb88ba4Smrg# 106560bb88ba4Smrg# This macro attempts to find appropriate memory checking functionality 106570bb88ba4Smrg# for various platforms which unit testing code may use to catch various 106580bb88ba4Smrg# forms of memory allocation and access errors in testing. 106590bb88ba4Smrg# 106600bb88ba4Smrg# Interface to module: 106610bb88ba4Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 106620bb88ba4Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 106630bb88ba4Smrg# 106640bb88ba4Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 106650bb88ba4Smrg# 106660bb88ba4SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 106670bb88ba4Smrg 106680bb88ba4SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 106690bb88ba4SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 106700bb88ba4Smrg [Environment variables to enable memory checking in tests]) 106710bb88ba4Smrg 106720bb88ba4Smrg# Check for different types of support on different platforms 106730bb88ba4Smrgcase $host_os in 106740bb88ba4Smrg solaris*) 106750bb88ba4Smrg AC_CHECK_LIB([umem], [umem_alloc], 106760bb88ba4Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 106770bb88ba4Smrg ;; 106780bb88ba4Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 106790bb88ba4Smrg # both directly and inverted, so should not be 0 or 255. 106800bb88ba4Smrg malloc_debug_env='MALLOC_PERTURB_=15' 106810bb88ba4Smrg ;; 106820bb88ba4Smrg darwin*) 106830bb88ba4Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 106840bb88ba4Smrg ;; 106850bb88ba4Smrg *bsd*) 106860bb88ba4Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 106870bb88ba4Smrg ;; 106880bb88ba4Smrgesac 106890bb88ba4Smrg 106900bb88ba4Smrg# User supplied flags override default flags 106910bb88ba4Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 106920bb88ba4Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 106930bb88ba4Smrgfi 106940bb88ba4Smrg 106950bb88ba4SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 106960bb88ba4Smrg]) # XORG_WITH_LINT 106970bb88ba4Smrg 10698fe5e51b7Smrg# XORG_CHECK_MALLOC_ZERO 10699fe5e51b7Smrg# ---------------------- 10700fe5e51b7Smrg# Minimum version: 1.0.0 10701fe5e51b7Smrg# 10702fe5e51b7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10703fe5e51b7Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 10704fe5e51b7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10705fe5e51b7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10706fe5e51b7SmrgAC_ARG_ENABLE(malloc0returnsnull, 10707a31a186aSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 10708fe5e51b7Smrg [malloc(0) returns NULL (default: auto)]), 10709fe5e51b7Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10710fe5e51b7Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10711fe5e51b7Smrg 10712fe5e51b7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10713fe5e51b7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10714493f84f4SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10715493f84f4Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 107160bb88ba4Smrg#include <stdlib.h> 107170bb88ba4Smrg],[ 10718fe5e51b7Smrg char *m0, *r0, *c0, *p; 10719fe5e51b7Smrg m0 = malloc(0); 10720fe5e51b7Smrg p = malloc(10); 10721fe5e51b7Smrg r0 = realloc(p,0); 107220bb88ba4Smrg c0 = calloc(0,10); 107230bb88ba4Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 107240bb88ba4Smrg])], 10725493f84f4Smrg [xorg_cv_malloc0_returns_null=yes], 10726493f84f4Smrg [xorg_cv_malloc0_returns_null=no])]) 10727493f84f4SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10728fe5e51b7Smrgfi 10729fe5e51b7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10730fe5e51b7Smrg 10731fe5e51b7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10732fe5e51b7Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10733fe5e51b7Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10734fe5e51b7Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10735fe5e51b7Smrgelse 10736fe5e51b7Smrg MALLOC_ZERO_CFLAGS="" 10737fe5e51b7Smrg XMALLOC_ZERO_CFLAGS="" 10738fe5e51b7Smrg XTMALLOC_ZERO_CFLAGS="" 10739fe5e51b7Smrgfi 10740fe5e51b7Smrg 10741fe5e51b7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10742fe5e51b7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10743fe5e51b7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10744fe5e51b7Smrg]) # XORG_CHECK_MALLOC_ZERO 10745fe5e51b7Smrg 10746fe5e51b7Smrg# XORG_WITH_LINT() 10747fe5e51b7Smrg# ---------------- 10748fe5e51b7Smrg# Minimum version: 1.1.0 10749fe5e51b7Smrg# 10750d7be9c72Smrg# This macro enables the use of a tool that flags some suspicious and 10751d7be9c72Smrg# non-portable constructs (likely to be bugs) in C language source code. 10752d7be9c72Smrg# It will attempt to locate the tool and use appropriate options. 10753d7be9c72Smrg# There are various lint type tools on different platforms. 10754d7be9c72Smrg# 10755d7be9c72Smrg# Interface to module: 10756d7be9c72Smrg# LINT: returns the path to the tool found on the platform 10757d7be9c72Smrg# or the value set to LINT on the configure cmd line 10758d7be9c72Smrg# also an Automake conditional 10759d7be9c72Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10760d7be9c72Smrg# 10761d7be9c72Smrg# --with-lint: 'yes' user instructs the module to use lint 10762d7be9c72Smrg# 'no' user instructs the module not to use lint (default) 10763d7be9c72Smrg# 10764d7be9c72Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10765d7be9c72Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10766fe5e51b7Smrg# 10767fe5e51b7SmrgAC_DEFUN([XORG_WITH_LINT],[ 10768fe5e51b7Smrg 10769d7be9c72SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10770d7be9c72SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10771a31a186aSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10772fe5e51b7Smrg [Use a lint-style source code checker (default: disabled)])], 10773fe5e51b7Smrg [use_lint=$withval], [use_lint=no]) 10774d7be9c72Smrg 10775d7be9c72Smrg# Obtain platform specific info like program name and options 10776d7be9c72Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10777d7be9c72Smrgcase $host_os in 10778d7be9c72Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10779d7be9c72Smrg lint_name=splint 10780d7be9c72Smrg lint_options="-badflag" 10781d7be9c72Smrg ;; 10782d7be9c72Smrg *freebsd* | *netbsd*) 10783d7be9c72Smrg lint_name=lint 10784d7be9c72Smrg lint_options="-u -b" 10785d7be9c72Smrg ;; 10786d7be9c72Smrg *solaris*) 10787d7be9c72Smrg lint_name=lint 10788d7be9c72Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10789d7be9c72Smrg ;; 10790d7be9c72Smrgesac 10791d7be9c72Smrg 10792d7be9c72Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10793d7be9c72Smrgif test "x$use_lint" = x"yes" ; then 10794d7be9c72Smrg AC_PATH_PROG([LINT], [$lint_name]) 10795d7be9c72Smrg if test "x$LINT" = "x"; then 10796d7be9c72Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10797d7be9c72Smrg fi 10798d7be9c72Smrgelif test "x$use_lint" = x"no" ; then 10799d7be9c72Smrg if test "x$LINT" != "x"; then 10800d7be9c72Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10801d7be9c72Smrg fi 10802fe5e51b7Smrgelse 10803d7be9c72Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10804fe5e51b7Smrgfi 10805d7be9c72Smrg 10806d7be9c72Smrg# User supplied flags override default flags 10807d7be9c72Smrgif test "x$LINT_FLAGS" != "x"; then 10808d7be9c72Smrg lint_options=$LINT_FLAGS 10809fe5e51b7Smrgfi 10810fe5e51b7Smrg 10811d7be9c72SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10812d7be9c72SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10813fe5e51b7Smrg 10814fe5e51b7Smrg]) # XORG_WITH_LINT 10815fe5e51b7Smrg 10816fe5e51b7Smrg# XORG_LINT_LIBRARY(LIBNAME) 10817fe5e51b7Smrg# -------------------------- 10818fe5e51b7Smrg# Minimum version: 1.1.0 10819fe5e51b7Smrg# 10820fe5e51b7Smrg# Sets up flags for building lint libraries for checking programs that call 10821fe5e51b7Smrg# functions in the library. 10822fe5e51b7Smrg# 10823d7be9c72Smrg# Interface to module: 10824d7be9c72Smrg# LINTLIB - Automake variable with the name of lint library file to make 10825d7be9c72Smrg# MAKE_LINT_LIB - Automake conditional 10826d7be9c72Smrg# 10827d7be9c72Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10828d7be9c72Smrg# - 'no' user instructs the module not to create a lint library (default) 10829fe5e51b7Smrg 10830fe5e51b7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10831fe5e51b7SmrgAC_REQUIRE([XORG_WITH_LINT]) 10832a31a186aSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10833fe5e51b7Smrg [Create lint library (default: disabled)])], 10834fe5e51b7Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10835d7be9c72Smrg 10836d7be9c72Smrgif test "x$make_lint_lib" = x"yes" ; then 10837d7be9c72Smrg LINTLIB=llib-l$1.ln 10838d7be9c72Smrg if test "x$LINT" = "x"; then 10839d7be9c72Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10840d7be9c72Smrg fi 10841d7be9c72Smrgelif test "x$make_lint_lib" != x"no" ; then 10842d7be9c72Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10843fe5e51b7Smrgfi 10844d7be9c72Smrg 10845fe5e51b7SmrgAC_SUBST(LINTLIB) 10846fe5e51b7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10847fe5e51b7Smrg 10848fe5e51b7Smrg]) # XORG_LINT_LIBRARY 10849fe5e51b7Smrg 108500bb88ba4Smrg# XORG_COMPILER_BRAND 108510bb88ba4Smrg# ------------------- 108520bb88ba4Smrg# Minimum version: 1.14.0 108530bb88ba4Smrg# 108540bb88ba4Smrg# Checks for various brands of compilers and sets flags as appropriate: 108550bb88ba4Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 108560bb88ba4Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 108570bb88ba4Smrg# clang compiler - sets CLANGCC to "yes" 108580bb88ba4Smrg# Intel compiler - sets INTELCC to "yes" 108590bb88ba4Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 108600bb88ba4Smrg# 108610bb88ba4SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 108620bb88ba4SmrgAC_LANG_CASE( 108630bb88ba4Smrg [C], [ 108640bb88ba4Smrg AC_REQUIRE([AC_PROG_CC_C99]) 108650bb88ba4Smrg ], 108660bb88ba4Smrg [C++], [ 108670bb88ba4Smrg AC_REQUIRE([AC_PROG_CXX]) 108680bb88ba4Smrg ] 108690bb88ba4Smrg) 108700bb88ba4SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 108710bb88ba4SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 108720bb88ba4SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 108730bb88ba4Smrg]) # XORG_COMPILER_BRAND 108740bb88ba4Smrg 108750bb88ba4Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 108760bb88ba4Smrg# --------------- 108770bb88ba4Smrg# Minimum version: 1.16.0 108780bb88ba4Smrg# 108790bb88ba4Smrg# Test if the compiler works when passed the given flag as a command line argument. 108800bb88ba4Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 108810bb88ba4Smrg# next flag in the list until there are no more options. 108820bb88ba4Smrg# 108830bb88ba4Smrg# Note that this does not guarantee that the compiler supports the flag as some 108840bb88ba4Smrg# compilers will simply ignore arguments that they do not understand, but we do 108850bb88ba4Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 108860bb88ba4Smrg# -Werror=unused-command-line-argument 108870bb88ba4Smrg# 108880bb88ba4SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 108890bb88ba4Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 108900bb88ba4Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 108910bb88ba4Smrg 108920bb88ba4SmrgAC_LANG_COMPILER_REQUIRE 108930bb88ba4Smrg 108940bb88ba4SmrgAC_LANG_CASE( 108950bb88ba4Smrg [C], [ 108960bb88ba4Smrg AC_REQUIRE([AC_PROG_CC_C99]) 108970bb88ba4Smrg define([PREFIX], [C]) 108980bb88ba4Smrg define([CACHE_PREFIX], [cc]) 108990bb88ba4Smrg define([COMPILER], [$CC]) 109000bb88ba4Smrg ], 109010bb88ba4Smrg [C++], [ 109020bb88ba4Smrg define([PREFIX], [CXX]) 109030bb88ba4Smrg define([CACHE_PREFIX], [cxx]) 109040bb88ba4Smrg define([COMPILER], [$CXX]) 109050bb88ba4Smrg ] 109060bb88ba4Smrg) 109070bb88ba4Smrg 109080bb88ba4Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 109090bb88ba4Smrg 109100bb88ba4Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 109110bb88ba4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 109120bb88ba4Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 109130bb88ba4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 109140bb88ba4Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 109150bb88ba4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 109160bb88ba4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 109170bb88ba4Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 109180bb88ba4Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 109190bb88ba4Smrgfi 109200bb88ba4Smrg 109210bb88ba4Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 109220bb88ba4Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 109230bb88ba4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 109240bb88ba4Smrg fi 109250bb88ba4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 109260bb88ba4Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 109270bb88ba4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 109280bb88ba4Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 109290bb88ba4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 109300bb88ba4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 109310bb88ba4Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 109320bb88ba4Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 109330bb88ba4Smrgfi 109340bb88ba4Smrg 109350bb88ba4Smrgfound="no" 109360bb88ba4Smrgm4_foreach([flag], m4_cdr($@), [ 109370bb88ba4Smrg if test $found = "no" ; then 10938493f84f4Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 109390bb88ba4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 109400bb88ba4Smrg fi 109410bb88ba4Smrg 10942493f84f4Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 109430bb88ba4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 109440bb88ba4Smrg fi 109450bb88ba4Smrg 109460bb88ba4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 109470bb88ba4Smrg 109480bb88ba4Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10949493f84f4Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 109500bb88ba4Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 109510bb88ba4Smrg AC_CACHE_VAL($cacheid, 109520bb88ba4Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 109530bb88ba4Smrg [eval $cacheid=yes], 109540bb88ba4Smrg [eval $cacheid=no])]) 109550bb88ba4Smrg 109560bb88ba4Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 109570bb88ba4Smrg 109580bb88ba4Smrg eval supported=\$$cacheid 109590bb88ba4Smrg AC_MSG_RESULT([$supported]) 109600bb88ba4Smrg if test "$supported" = "yes" ; then 109610bb88ba4Smrg $1="$$1 ]flag[" 109620bb88ba4Smrg found="yes" 109630bb88ba4Smrg fi 109640bb88ba4Smrg fi 109650bb88ba4Smrg]) 109660bb88ba4Smrg]) # XORG_TESTSET_CFLAG 109670bb88ba4Smrg 109680bb88ba4Smrg# XORG_COMPILER_FLAGS 109690bb88ba4Smrg# --------------- 109700bb88ba4Smrg# Minimum version: 1.16.0 109710bb88ba4Smrg# 109720bb88ba4Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 109730bb88ba4Smrg# arguments supported by the selected compiler which do NOT alter the generated 109740bb88ba4Smrg# code. These arguments will cause the compiler to print various warnings 109750bb88ba4Smrg# during compilation AND turn a conservative set of warnings into errors. 109760bb88ba4Smrg# 109770bb88ba4Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 109780bb88ba4Smrg# future versions of util-macros as options are added to new compilers. 109790bb88ba4Smrg# 109800bb88ba4SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 109810bb88ba4SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 109820bb88ba4Smrg 109830bb88ba4SmrgAC_ARG_ENABLE(selective-werror, 109840bb88ba4Smrg AS_HELP_STRING([--disable-selective-werror], 109850bb88ba4Smrg [Turn off selective compiler errors. (default: enabled)]), 109860bb88ba4Smrg [SELECTIVE_WERROR=$enableval], 109870bb88ba4Smrg [SELECTIVE_WERROR=yes]) 109880bb88ba4Smrg 109890bb88ba4SmrgAC_LANG_CASE( 109900bb88ba4Smrg [C], [ 109910bb88ba4Smrg define([PREFIX], [C]) 109920bb88ba4Smrg ], 109930bb88ba4Smrg [C++], [ 109940bb88ba4Smrg define([PREFIX], [CXX]) 109950bb88ba4Smrg ] 109960bb88ba4Smrg) 109970bb88ba4Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 109980bb88ba4Smrgif test "x$SUNCC" = "xyes"; then 109990bb88ba4Smrg [BASE_]PREFIX[FLAGS]="-v" 110000bb88ba4Smrgelse 110010bb88ba4Smrg [BASE_]PREFIX[FLAGS]="" 110020bb88ba4Smrgfi 110030bb88ba4Smrg 110040bb88ba4Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 110050bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 110060bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 110070bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 110080bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 110090bb88ba4Smrg 110100bb88ba4SmrgAC_LANG_CASE( 110110bb88ba4Smrg [C], [ 110120bb88ba4Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 110130bb88ba4Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 110140bb88ba4Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 110150bb88ba4Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11016493f84f4Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 110170bb88ba4Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 110180bb88ba4Smrg ] 110190bb88ba4Smrg) 110200bb88ba4Smrg 110210bb88ba4Smrg# This chunk adds additional warnings that could catch undesired effects. 110220bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 110230bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 110240bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 110250bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 110260bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 110270bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11028493f84f4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 110290bb88ba4Smrg 110300bb88ba4Smrg# These are currently disabled because they are noisy. They will be enabled 110310bb88ba4Smrg# in the future once the codebase is sufficiently modernized to silence 110320bb88ba4Smrg# them. For now, I don't want them to drown out the other warnings. 110330bb88ba4Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 110340bb88ba4Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11035493f84f4Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 110360bb88ba4Smrg 110370bb88ba4Smrg# Turn some warnings into errors, so we don't accidently get successful builds 110380bb88ba4Smrg# when there are problems that should be fixed. 110390bb88ba4Smrg 110400bb88ba4Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 110410bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 110420bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 110430bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 110440bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 110450bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 110460bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 110470bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 110480bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 110490bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 110500bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 110510bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 110520bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 110530bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 110540bb88ba4Smrgelse 110550bb88ba4SmrgAC_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]) 110560bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 110570bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 110580bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 110590bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 110600bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 110610bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 110620bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 110630bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 110640bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 110650bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 110660bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 110670bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 110680bb88ba4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 110690bb88ba4Smrgfi 110700bb88ba4Smrg 110710bb88ba4SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 110720bb88ba4Smrg]) # XORG_COMPILER_FLAGS 110730bb88ba4Smrg 11074eda3803bSmrg# XORG_CWARNFLAGS 11075eda3803bSmrg# --------------- 11076eda3803bSmrg# Minimum version: 1.2.0 110770bb88ba4Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11078eda3803bSmrg# 11079eda3803bSmrg# Defines CWARNFLAGS to enable C compiler warnings. 11080eda3803bSmrg# 110810bb88ba4Smrg# This function is deprecated because it defines -fno-strict-aliasing 110820bb88ba4Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 110830bb88ba4Smrg# is needed, then it should be added explicitly in the module when 110840bb88ba4Smrg# it is updated to use BASE_CFLAGS. 110850bb88ba4Smrg# 11086eda3803bSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 110870bb88ba4SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 110880bb88ba4SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 110890bb88ba4SmrgAC_LANG_CASE( 110900bb88ba4Smrg [C], [ 110910bb88ba4Smrg CWARNFLAGS="$BASE_CFLAGS" 110920bb88ba4Smrg if test "x$GCC" = xyes ; then 110930bb88ba4Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 110940bb88ba4Smrg fi 110950bb88ba4Smrg AC_SUBST(CWARNFLAGS) 110960bb88ba4Smrg ] 110970bb88ba4Smrg) 11098eda3803bSmrg]) # XORG_CWARNFLAGS 11099a31a186aSmrg 11100a31a186aSmrg# XORG_STRICT_OPTION 11101a31a186aSmrg# ----------------------- 11102a31a186aSmrg# Minimum version: 1.3.0 11103a31a186aSmrg# 111040bb88ba4Smrg# Add configure option to enable strict compilation flags, such as treating 111050bb88ba4Smrg# warnings as fatal errors. 111060bb88ba4Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 111070bb88ba4Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 111080bb88ba4Smrg# 111090bb88ba4Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 111100bb88ba4Smrg# when strict compilation is unconditionally desired. 11111a31a186aSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11112a31a186aSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 111130bb88ba4SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11114a31a186aSmrg 11115a31a186aSmrgAC_ARG_ENABLE(strict-compilation, 11116a31a186aSmrg AS_HELP_STRING([--enable-strict-compilation], 11117a31a186aSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11118a31a186aSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 111190bb88ba4Smrg 111200bb88ba4SmrgAC_LANG_CASE( 111210bb88ba4Smrg [C], [ 111220bb88ba4Smrg define([PREFIX], [C]) 111230bb88ba4Smrg ], 111240bb88ba4Smrg [C++], [ 111250bb88ba4Smrg define([PREFIX], [CXX]) 111260bb88ba4Smrg ] 111270bb88ba4Smrg) 111280bb88ba4Smrg 111290bb88ba4Smrg[STRICT_]PREFIX[FLAGS]="" 111300bb88ba4SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 111310bb88ba4SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 111320bb88ba4Smrg 111330bb88ba4Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 111340bb88ba4Smrg# activate it with -Werror, so we add it here explicitly. 111350bb88ba4SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 111360bb88ba4Smrg 11137a31a186aSmrgif test "x$STRICT_COMPILE" = "xyes"; then 111380bb88ba4Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 111390bb88ba4Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11140a31a186aSmrgfi 111410bb88ba4SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 111420bb88ba4SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 111430bb88ba4SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11144a31a186aSmrg]) # XORG_STRICT_OPTION 11145a31a186aSmrg 11146a31a186aSmrg# XORG_DEFAULT_OPTIONS 11147a31a186aSmrg# -------------------- 11148a31a186aSmrg# Minimum version: 1.3.0 11149a31a186aSmrg# 11150a31a186aSmrg# Defines default options for X.Org modules. 11151a31a186aSmrg# 11152a31a186aSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11153d7be9c72SmrgAC_REQUIRE([AC_PROG_INSTALL]) 111540bb88ba4SmrgXORG_COMPILER_FLAGS 11155a31a186aSmrgXORG_CWARNFLAGS 11156a31a186aSmrgXORG_STRICT_OPTION 11157a31a186aSmrgXORG_RELEASE_VERSION 11158a31a186aSmrgXORG_CHANGELOG 11159a31a186aSmrgXORG_INSTALL 11160a31a186aSmrgXORG_MANPAGE_SECTIONS 11161d7be9c72Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11162d7be9c72Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11163a31a186aSmrg]) # XORG_DEFAULT_OPTIONS 11164a31a186aSmrg 11165a31a186aSmrg# XORG_INSTALL() 11166a31a186aSmrg# ---------------- 11167a31a186aSmrg# Minimum version: 1.4.0 11168a31a186aSmrg# 11169a31a186aSmrg# Defines the variable INSTALL_CMD as the command to copy 11170d7be9c72Smrg# INSTALL from $prefix/share/util-macros. 11171a31a186aSmrg# 11172a31a186aSmrgAC_DEFUN([XORG_INSTALL], [ 11173a31a186aSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11174d7be9c72Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11175d7be9c72SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11176a31a186aSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11177a31a186aSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11178d7be9c72Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11179a31a186aSmrgAC_SUBST([INSTALL_CMD]) 11180a31a186aSmrg]) # XORG_INSTALL 11181fe5e51b7Smrgdnl Copyright 2005 Red Hat, Inc 11182fe5e51b7Smrgdnl 11183fe5e51b7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11184fe5e51b7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11185fe5e51b7Smrgdnl the above copyright notice appear in all copies and that both that 11186fe5e51b7Smrgdnl copyright notice and this permission notice appear in supporting 11187fe5e51b7Smrgdnl documentation. 11188fe5e51b7Smrgdnl 11189fe5e51b7Smrgdnl The above copyright notice and this permission notice shall be included 11190fe5e51b7Smrgdnl in all copies or substantial portions of the Software. 11191fe5e51b7Smrgdnl 11192fe5e51b7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11193fe5e51b7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11194fe5e51b7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11195fe5e51b7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11196fe5e51b7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11197fe5e51b7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11198fe5e51b7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11199fe5e51b7Smrgdnl 11200fe5e51b7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11201fe5e51b7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11202fe5e51b7Smrgdnl other dealings in this Software without prior written authorization 11203fe5e51b7Smrgdnl from the copyright holders. 11204fe5e51b7Smrgdnl 11205fe5e51b7Smrg 11206fe5e51b7Smrg# XORG_RELEASE_VERSION 11207fe5e51b7Smrg# -------------------- 11208d7be9c72Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11209493f84f4Smrg 11210fe5e51b7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11211fe5e51b7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11212fe5e51b7Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11213fe5e51b7Smrg [Major version of this package]) 11214eda3803bSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11215fe5e51b7Smrg if test "x$PVM" = "x"; then 11216fe5e51b7Smrg PVM="0" 11217fe5e51b7Smrg fi 11218fe5e51b7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11219fe5e51b7Smrg [$PVM], 11220fe5e51b7Smrg [Minor version of this package]) 11221eda3803bSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11222fe5e51b7Smrg if test "x$PVP" = "x"; then 11223fe5e51b7Smrg PVP="0" 11224fe5e51b7Smrg fi 11225fe5e51b7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11226fe5e51b7Smrg [$PVP], 11227fe5e51b7Smrg [Patch version of this package]) 11228fe5e51b7Smrg]) 11229fe5e51b7Smrg 11230eda3803bSmrg# XORG_CHANGELOG() 11231eda3803bSmrg# ---------------- 11232eda3803bSmrg# Minimum version: 1.2.0 11233eda3803bSmrg# 11234eda3803bSmrg# Defines the variable CHANGELOG_CMD as the command to generate 11235eda3803bSmrg# ChangeLog from git. 11236eda3803bSmrg# 11237eda3803bSmrg# 11238eda3803bSmrgAC_DEFUN([XORG_CHANGELOG], [ 11239a31a186aSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11240a31a186aSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11241a31a186aSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11242eda3803bSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11243eda3803bSmrgAC_SUBST([CHANGELOG_CMD]) 11244eda3803bSmrg]) # XORG_CHANGELOG 11245eda3803bSmrg 11246a31a186aSmrgdnl Copyright 2005 Red Hat, Inc 11247a31a186aSmrgdnl 11248a31a186aSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11249a31a186aSmrgdnl documentation for any purpose is hereby granted without fee, provided that 11250a31a186aSmrgdnl the above copyright notice appear in all copies and that both that 11251a31a186aSmrgdnl copyright notice and this permission notice appear in supporting 11252a31a186aSmrgdnl documentation. 11253a31a186aSmrgdnl 11254a31a186aSmrgdnl The above copyright notice and this permission notice shall be included 11255a31a186aSmrgdnl in all copies or substantial portions of the Software. 11256a31a186aSmrgdnl 11257a31a186aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11258a31a186aSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11259a31a186aSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11260a31a186aSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11261a31a186aSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11262a31a186aSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11263a31a186aSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 11264a31a186aSmrgdnl 11265a31a186aSmrgdnl Except as contained in this notice, the name of the copyright holders shall 11266a31a186aSmrgdnl not be used in advertising or otherwise to promote the sale, use or 11267a31a186aSmrgdnl other dealings in this Software without prior written authorization 11268a31a186aSmrgdnl from the copyright holders. 11269a31a186aSmrgdnl 11270a31a186aSmrg 11271493f84f4Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11272a31a186aSmrg# -------------------------- 11273493f84f4Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 11274493f84f4Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 11275a31a186aSmrg 11276a31a186aSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11277d7be9c72Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11278a31a186aSmrg SAVE_CFLAGS="$CFLAGS" 11279d7be9c72Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11280a31a186aSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11281a31a186aSmrg#include "xorg-server.h" 11282a31a186aSmrg#if !defined $1 11283a31a186aSmrg#error $1 not defined 11284a31a186aSmrg#endif 11285a31a186aSmrg ]])], 11286a31a186aSmrg [_EXT_CHECK=yes], 11287a31a186aSmrg [_EXT_CHECK=no]) 11288a31a186aSmrg CFLAGS="$SAVE_CFLAGS" 11289a31a186aSmrg AC_MSG_CHECKING([if $1 is defined]) 11290a31a186aSmrg AC_MSG_RESULT([$_EXT_CHECK]) 11291a31a186aSmrg if test "$_EXT_CHECK" != no; then 11292a31a186aSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11293a31a186aSmrg fi 11294a31a186aSmrg]) 11295a31a186aSmrg 11296ee82cb62Smrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 11297fe5e51b7Smrg# 11298fe5e51b7Smrg# This file is free software; the Free Software Foundation 11299fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 11300fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 11301fe5e51b7Smrg 11302fe5e51b7Smrg# AM_AUTOMAKE_VERSION(VERSION) 11303fe5e51b7Smrg# ---------------------------- 11304fe5e51b7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 11305fe5e51b7Smrg# generated from the m4 files accompanying Automake X.Y. 11306fe5e51b7Smrg# (This private macro should not be called outside this file.) 11307fe5e51b7SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 11308ee82cb62Smrg[am__api_version='1.15' 11309fe5e51b7Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11310fe5e51b7Smrgdnl require some minimum version. Point them to the right macro. 11311ee82cb62Smrgm4_if([$1], [1.15], [], 11312fe5e51b7Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11313fe5e51b7Smrg]) 11314fe5e51b7Smrg 11315fe5e51b7Smrg# _AM_AUTOCONF_VERSION(VERSION) 11316fe5e51b7Smrg# ----------------------------- 11317fe5e51b7Smrg# aclocal traces this macro to find the Autoconf version. 11318fe5e51b7Smrg# This is a private macro too. Using m4_define simplifies 11319fe5e51b7Smrg# the logic in aclocal, which can simply ignore this definition. 11320fe5e51b7Smrgm4_define([_AM_AUTOCONF_VERSION], []) 11321fe5e51b7Smrg 11322fe5e51b7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 11323fe5e51b7Smrg# ------------------------------- 11324fe5e51b7Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11325eda3803bSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11326fe5e51b7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11327ee82cb62Smrg[AM_AUTOMAKE_VERSION([1.15])dnl 11328eda3803bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 11329eda3803bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11330eda3803bSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11331fe5e51b7Smrg 11332fe5e51b7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11333fe5e51b7Smrg 11334ee82cb62Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11335fe5e51b7Smrg# 11336fe5e51b7Smrg# This file is free software; the Free Software Foundation 11337fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 11338fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 11339fe5e51b7Smrg 11340fe5e51b7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11341acd6767fSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11342acd6767fSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11343fe5e51b7Smrg# 11344fe5e51b7Smrg# Of course, Automake must honor this variable whenever it calls a 11345fe5e51b7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 11346fe5e51b7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 11347fe5e51b7Smrg# depending on how configure is run. This is pretty annoying, since 11348fe5e51b7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11349fe5e51b7Smrg# source directory, any form will work fine, but in subdirectories a 11350fe5e51b7Smrg# relative path needs to be adjusted first. 11351fe5e51b7Smrg# 11352fe5e51b7Smrg# $ac_aux_dir/missing 11353fe5e51b7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 11354fe5e51b7Smrg# $top_srcdir/$ac_aux_dir/missing 11355fe5e51b7Smrg# fails if $ac_aux_dir is absolute, 11356fe5e51b7Smrg# fails when called from a subdirectory in a VPATH build with 11357fe5e51b7Smrg# a relative $ac_aux_dir 11358fe5e51b7Smrg# 11359fe5e51b7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11360fe5e51b7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 11361acd6767fSmrg# harmless because $srcdir is '.', but things will broke when you 11362fe5e51b7Smrg# start a VPATH build or use an absolute $srcdir. 11363fe5e51b7Smrg# 11364fe5e51b7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11365fe5e51b7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11366fe5e51b7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11367fe5e51b7Smrg# and then we would define $MISSING as 11368fe5e51b7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 11369fe5e51b7Smrg# This will work as long as MISSING is not called from configure, because 11370fe5e51b7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 11371fe5e51b7Smrg# However there are other variables, like CC, which are often used in 11372fe5e51b7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 11373fe5e51b7Smrg# 11374fe5e51b7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 11375fe5e51b7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 11376fe5e51b7Smrg# configured tree to be moved without reconfiguration. 11377fe5e51b7Smrg 11378fe5e51b7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 11379ee82cb62Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11380ee82cb62Smrg# Expand $ac_aux_dir to an absolute path. 11381ee82cb62Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 11382fe5e51b7Smrg]) 11383fe5e51b7Smrg 11384fe5e51b7Smrg# AM_CONDITIONAL -*- Autoconf -*- 11385fe5e51b7Smrg 11386ee82cb62Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11387fe5e51b7Smrg# 11388fe5e51b7Smrg# This file is free software; the Free Software Foundation 11389fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 11390fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 11391fe5e51b7Smrg 11392fe5e51b7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11393fe5e51b7Smrg# ------------------------------------- 11394fe5e51b7Smrg# Define a conditional. 11395fe5e51b7SmrgAC_DEFUN([AM_CONDITIONAL], 11396acd6767fSmrg[AC_PREREQ([2.52])dnl 11397acd6767fSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11398acd6767fSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11399fe5e51b7SmrgAC_SUBST([$1_TRUE])dnl 11400fe5e51b7SmrgAC_SUBST([$1_FALSE])dnl 11401fe5e51b7Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11402fe5e51b7Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11403643b027fSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 11404fe5e51b7Smrgif $2; then 11405fe5e51b7Smrg $1_TRUE= 11406fe5e51b7Smrg $1_FALSE='#' 11407fe5e51b7Smrgelse 11408fe5e51b7Smrg $1_TRUE='#' 11409fe5e51b7Smrg $1_FALSE= 11410fe5e51b7Smrgfi 11411fe5e51b7SmrgAC_CONFIG_COMMANDS_PRE( 11412fe5e51b7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11413fe5e51b7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 11414fe5e51b7SmrgUsually this means the macro was only invoked conditionally.]]) 11415fe5e51b7Smrgfi])]) 11416fe5e51b7Smrg 11417ee82cb62Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11418fe5e51b7Smrg# 11419fe5e51b7Smrg# This file is free software; the Free Software Foundation 11420fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 11421fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 11422fe5e51b7Smrg 11423fe5e51b7Smrg 11424acd6767fSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11425fe5e51b7Smrg# written in clear, in which case automake, when reading aclocal.m4, 11426fe5e51b7Smrg# will think it sees a *use*, and therefore will trigger all it's 11427fe5e51b7Smrg# C support machinery. Also note that it means that autoscan, seeing 11428fe5e51b7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11429fe5e51b7Smrg 11430fe5e51b7Smrg 11431fe5e51b7Smrg# _AM_DEPENDENCIES(NAME) 11432fe5e51b7Smrg# ---------------------- 11433fe5e51b7Smrg# See how the compiler implements dependency checking. 11434acd6767fSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11435fe5e51b7Smrg# We try a few techniques and use that to set a single cache variable. 11436fe5e51b7Smrg# 11437fe5e51b7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11438fe5e51b7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11439fe5e51b7Smrg# dependency, and given that the user is not expected to run this macro, 11440fe5e51b7Smrg# just rely on AC_PROG_CC. 11441fe5e51b7SmrgAC_DEFUN([_AM_DEPENDENCIES], 11442fe5e51b7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 11443fe5e51b7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11444fe5e51b7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 11445fe5e51b7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 11446fe5e51b7Smrg 11447acd6767fSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11448acd6767fSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11449acd6767fSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11450acd6767fSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11451acd6767fSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11452acd6767fSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11453acd6767fSmrg [depcc="$$1" am_compiler_list=]) 11454fe5e51b7Smrg 11455fe5e51b7SmrgAC_CACHE_CHECK([dependency style of $depcc], 11456fe5e51b7Smrg [am_cv_$1_dependencies_compiler_type], 11457fe5e51b7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11458fe5e51b7Smrg # We make a subdir and do the tests there. Otherwise we can end up 11459fe5e51b7Smrg # making bogus files that we don't know about and never remove. For 11460fe5e51b7Smrg # instance it was reported that on HP-UX the gcc test will end up 11461acd6767fSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 11462acd6767fSmrg # in D". 114630bb88ba4Smrg rm -rf conftest.dir 11464fe5e51b7Smrg mkdir conftest.dir 11465fe5e51b7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 11466fe5e51b7Smrg # using a relative directory. 11467fe5e51b7Smrg cp "$am_depcomp" conftest.dir 11468fe5e51b7Smrg cd conftest.dir 11469fe5e51b7Smrg # We will build objects and dependencies in a subdirectory because 11470fe5e51b7Smrg # it helps to detect inapplicable dependency modes. For instance 11471fe5e51b7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 11472fe5e51b7Smrg # side effect of compilation, but ICC will put the dependencies in 11473fe5e51b7Smrg # the current directory while Tru64 will put them in the object 11474fe5e51b7Smrg # directory. 11475fe5e51b7Smrg mkdir sub 11476fe5e51b7Smrg 11477fe5e51b7Smrg am_cv_$1_dependencies_compiler_type=none 11478fe5e51b7Smrg if test "$am_compiler_list" = ""; then 11479fe5e51b7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11480fe5e51b7Smrg fi 11481643b027fSmrg am__universal=false 11482643b027fSmrg m4_case([$1], [CC], 11483643b027fSmrg [case " $depcc " in #( 11484643b027fSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11485643b027fSmrg esac], 11486643b027fSmrg [CXX], 11487643b027fSmrg [case " $depcc " in #( 11488643b027fSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11489643b027fSmrg esac]) 11490643b027fSmrg 11491fe5e51b7Smrg for depmode in $am_compiler_list; do 11492fe5e51b7Smrg # Setup a source with many dependencies, because some compilers 11493fe5e51b7Smrg # like to wrap large dependency lists on column 80 (with \), and 11494fe5e51b7Smrg # we should not choose a depcomp mode which is confused by this. 11495fe5e51b7Smrg # 11496fe5e51b7Smrg # We need to recreate these files for each test, as the compiler may 11497fe5e51b7Smrg # overwrite some of them when testing with obscure command lines. 11498fe5e51b7Smrg # This happens at least with the AIX C compiler. 11499fe5e51b7Smrg : > sub/conftest.c 11500fe5e51b7Smrg for i in 1 2 3 4 5 6; do 11501fe5e51b7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 11502acd6767fSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11503acd6767fSmrg # Solaris 10 /bin/sh. 11504acd6767fSmrg echo '/* dummy */' > sub/conftst$i.h 11505fe5e51b7Smrg done 11506fe5e51b7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11507fe5e51b7Smrg 11508acd6767fSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 11509643b027fSmrg # mode. It turns out that the SunPro C++ compiler does not properly 11510acd6767fSmrg # handle '-M -o', and we need to detect this. Also, some Intel 11511acd6767fSmrg # versions had trouble with output in subdirs. 11512643b027fSmrg am__obj=sub/conftest.${OBJEXT-o} 11513643b027fSmrg am__minus_obj="-o $am__obj" 11514fe5e51b7Smrg case $depmode in 11515643b027fSmrg gcc) 11516643b027fSmrg # This depmode causes a compiler race in universal mode. 11517643b027fSmrg test "$am__universal" = false || continue 11518643b027fSmrg ;; 11519fe5e51b7Smrg nosideeffect) 11520acd6767fSmrg # After this tag, mechanisms are not by side-effect, so they'll 11521acd6767fSmrg # only be used when explicitly requested. 11522fe5e51b7Smrg if test "x$enable_dependency_tracking" = xyes; then 11523fe5e51b7Smrg continue 11524fe5e51b7Smrg else 11525fe5e51b7Smrg break 11526fe5e51b7Smrg fi 11527fe5e51b7Smrg ;; 115280bb88ba4Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11529acd6767fSmrg # This compiler won't grok '-c -o', but also, the minuso test has 11530643b027fSmrg # not run yet. These depmodes are late enough in the game, and 11531643b027fSmrg # so weak that their functioning should not be impacted. 11532643b027fSmrg am__obj=conftest.${OBJEXT-o} 11533643b027fSmrg am__minus_obj= 11534643b027fSmrg ;; 11535fe5e51b7Smrg none) break ;; 11536fe5e51b7Smrg esac 11537fe5e51b7Smrg if depmode=$depmode \ 11538643b027fSmrg source=sub/conftest.c object=$am__obj \ 11539fe5e51b7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11540643b027fSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11541fe5e51b7Smrg >/dev/null 2>conftest.err && 11542fe5e51b7Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11543fe5e51b7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11544643b027fSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11545fe5e51b7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11546fe5e51b7Smrg # icc doesn't choke on unknown options, it will just issue warnings 11547fe5e51b7Smrg # or remarks (even with -Werror). So we grep stderr for any message 11548fe5e51b7Smrg # that says an option was ignored or not supported. 11549fe5e51b7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 11550fe5e51b7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 11551fe5e51b7Smrg # The diagnosis changed in icc 8.0: 11552fe5e51b7Smrg # icc: Command line remark: option '-MP' not supported 11553fe5e51b7Smrg if (grep 'ignoring option' conftest.err || 11554fe5e51b7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11555fe5e51b7Smrg am_cv_$1_dependencies_compiler_type=$depmode 11556fe5e51b7Smrg break 11557fe5e51b7Smrg fi 11558fe5e51b7Smrg fi 11559fe5e51b7Smrg done 11560fe5e51b7Smrg 11561fe5e51b7Smrg cd .. 11562fe5e51b7Smrg rm -rf conftest.dir 11563fe5e51b7Smrgelse 11564fe5e51b7Smrg am_cv_$1_dependencies_compiler_type=none 11565fe5e51b7Smrgfi 11566fe5e51b7Smrg]) 11567fe5e51b7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11568fe5e51b7SmrgAM_CONDITIONAL([am__fastdep$1], [ 11569fe5e51b7Smrg test "x$enable_dependency_tracking" != xno \ 11570fe5e51b7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11571fe5e51b7Smrg]) 11572fe5e51b7Smrg 11573fe5e51b7Smrg 11574fe5e51b7Smrg# AM_SET_DEPDIR 11575fe5e51b7Smrg# ------------- 11576fe5e51b7Smrg# Choose a directory name for dependency files. 11577acd6767fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11578fe5e51b7SmrgAC_DEFUN([AM_SET_DEPDIR], 11579fe5e51b7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11580fe5e51b7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11581fe5e51b7Smrg]) 11582fe5e51b7Smrg 11583fe5e51b7Smrg 11584fe5e51b7Smrg# AM_DEP_TRACK 11585fe5e51b7Smrg# ------------ 11586fe5e51b7SmrgAC_DEFUN([AM_DEP_TRACK], 11587acd6767fSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 11588acd6767fSmrgAS_HELP_STRING( 11589acd6767fSmrg [--enable-dependency-tracking], 11590acd6767fSmrg [do not reject slow dependency extractors]) 11591acd6767fSmrgAS_HELP_STRING( 11592acd6767fSmrg [--disable-dependency-tracking], 11593acd6767fSmrg [speeds up one-time build])]) 11594fe5e51b7Smrgif test "x$enable_dependency_tracking" != xno; then 11595fe5e51b7Smrg am_depcomp="$ac_aux_dir/depcomp" 11596fe5e51b7Smrg AMDEPBACKSLASH='\' 115970bb88ba4Smrg am__nodep='_no' 11598fe5e51b7Smrgfi 11599fe5e51b7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11600fe5e51b7SmrgAC_SUBST([AMDEPBACKSLASH])dnl 11601fe5e51b7Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 116020bb88ba4SmrgAC_SUBST([am__nodep])dnl 116030bb88ba4Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 11604fe5e51b7Smrg]) 11605fe5e51b7Smrg 11606fe5e51b7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 11607fe5e51b7Smrg 11608ee82cb62Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11609fe5e51b7Smrg# 11610fe5e51b7Smrg# This file is free software; the Free Software Foundation 11611fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 11612fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 11613fe5e51b7Smrg 11614fe5e51b7Smrg 11615fe5e51b7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11616fe5e51b7Smrg# ------------------------------ 11617fe5e51b7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11618643b027fSmrg[{ 11619493f84f4Smrg # Older Autoconf quotes --file arguments for eval, but not when files 11620643b027fSmrg # are listed without --file. Let's play safe and only enable the eval 11621643b027fSmrg # if we detect the quoting. 11622643b027fSmrg case $CONFIG_FILES in 11623643b027fSmrg *\'*) eval set x "$CONFIG_FILES" ;; 11624643b027fSmrg *) set x $CONFIG_FILES ;; 11625643b027fSmrg esac 11626643b027fSmrg shift 11627643b027fSmrg for mf 11628643b027fSmrg do 11629643b027fSmrg # Strip MF so we end up with the name of the file. 11630643b027fSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11631643b027fSmrg # Check whether this is an Automake generated Makefile or not. 11632acd6767fSmrg # We used to match only the files named 'Makefile.in', but 11633643b027fSmrg # some people rename them; so instead we look at the file content. 11634643b027fSmrg # Grep'ing the first line is not enough: some people post-process 11635643b027fSmrg # each Makefile.in and add a new line on top of each file to say so. 11636643b027fSmrg # Grep'ing the whole file is not good either: AIX grep has a line 11637643b027fSmrg # limit of 2048, but all sed's we know have understand at least 4000. 11638643b027fSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11639643b027fSmrg dirpart=`AS_DIRNAME("$mf")` 11640643b027fSmrg else 11641643b027fSmrg continue 11642643b027fSmrg fi 11643643b027fSmrg # Extract the definition of DEPDIR, am__include, and am__quote 11644acd6767fSmrg # from the Makefile without running 'make'. 11645643b027fSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11646643b027fSmrg test -z "$DEPDIR" && continue 11647643b027fSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11648493f84f4Smrg test -z "$am__include" && continue 11649643b027fSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11650643b027fSmrg # Find all dependency output files, they are included files with 11651643b027fSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11652643b027fSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 11653643b027fSmrg # expansion. 11654643b027fSmrg for file in `sed -n " 11655643b027fSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11656acd6767fSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11657643b027fSmrg # Make sure the directory exists. 11658643b027fSmrg test -f "$dirpart/$file" && continue 11659643b027fSmrg fdir=`AS_DIRNAME(["$file"])` 11660643b027fSmrg AS_MKDIR_P([$dirpart/$fdir]) 11661643b027fSmrg # echo "creating $dirpart/$file" 11662643b027fSmrg echo '# dummy' > "$dirpart/$file" 11663643b027fSmrg done 11664fe5e51b7Smrg done 11665643b027fSmrg} 11666fe5e51b7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11667fe5e51b7Smrg 11668fe5e51b7Smrg 11669fe5e51b7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11670fe5e51b7Smrg# ----------------------------- 11671fe5e51b7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 11672fe5e51b7Smrg# 11673fe5e51b7Smrg# This code is only required when automatic dependency tracking 11674acd6767fSmrg# is enabled. FIXME. This creates each '.P' file that we will 11675fe5e51b7Smrg# need in order to bootstrap the dependency handling code. 11676fe5e51b7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11677fe5e51b7Smrg[AC_CONFIG_COMMANDS([depfiles], 11678fe5e51b7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11679fe5e51b7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11680fe5e51b7Smrg]) 11681fe5e51b7Smrg 11682fe5e51b7Smrg# Do all the work for Automake. -*- Autoconf -*- 11683fe5e51b7Smrg 11684ee82cb62Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11685fe5e51b7Smrg# 11686fe5e51b7Smrg# This file is free software; the Free Software Foundation 11687fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 11688fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 11689fe5e51b7Smrg 11690fe5e51b7Smrg# This macro actually does too much. Some checks are only needed if 11691fe5e51b7Smrg# your package does certain things. But this isn't really a big deal. 11692fe5e51b7Smrg 11693493f84f4Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 11694493f84f4Smrgm4_define([AC_PROG_CC], 11695493f84f4Smrgm4_defn([AC_PROG_CC]) 11696493f84f4Smrg[_AM_PROG_CC_C_O 11697493f84f4Smrg]) 11698493f84f4Smrg 11699fe5e51b7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11700fe5e51b7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 11701fe5e51b7Smrg# ----------------------------------------------- 11702fe5e51b7Smrg# The call with PACKAGE and VERSION arguments is the old style 11703fe5e51b7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11704fe5e51b7Smrg# and VERSION should now be passed to AC_INIT and removed from 11705fe5e51b7Smrg# the call to AM_INIT_AUTOMAKE. 11706fe5e51b7Smrg# We support both call styles for the transition. After 11707fe5e51b7Smrg# the next Automake release, Autoconf can make the AC_INIT 11708fe5e51b7Smrg# arguments mandatory, and then we can depend on a new Autoconf 11709fe5e51b7Smrg# release and drop the old call support. 11710fe5e51b7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11711493f84f4Smrg[AC_PREREQ([2.65])dnl 11712fe5e51b7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11713fe5e51b7Smrgdnl the ones we care about. 11714fe5e51b7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11715fe5e51b7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11716fe5e51b7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11717fe5e51b7Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11718fe5e51b7Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11719fe5e51b7Smrg # is not polluted with repeated "-I." 11720fe5e51b7Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11721fe5e51b7Smrg # test to see if srcdir already configured 11722fe5e51b7Smrg if test -f $srcdir/config.status; then 11723fe5e51b7Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11724fe5e51b7Smrg fi 11725fe5e51b7Smrgfi 11726fe5e51b7Smrg 11727fe5e51b7Smrg# test whether we have cygpath 11728fe5e51b7Smrgif test -z "$CYGPATH_W"; then 11729fe5e51b7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 11730fe5e51b7Smrg CYGPATH_W='cygpath -w' 11731fe5e51b7Smrg else 11732fe5e51b7Smrg CYGPATH_W=echo 11733fe5e51b7Smrg fi 11734fe5e51b7Smrgfi 11735fe5e51b7SmrgAC_SUBST([CYGPATH_W]) 11736fe5e51b7Smrg 11737fe5e51b7Smrg# Define the identity of the package. 11738fe5e51b7Smrgdnl Distinguish between old-style and new-style calls. 11739fe5e51b7Smrgm4_ifval([$2], 11740acd6767fSmrg[AC_DIAGNOSE([obsolete], 11741493f84f4Smrg [$0: two- and three-arguments forms are deprecated.]) 11742acd6767fSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11743fe5e51b7Smrg AC_SUBST([PACKAGE], [$1])dnl 11744fe5e51b7Smrg AC_SUBST([VERSION], [$2])], 11745fe5e51b7Smrg[_AM_SET_OPTIONS([$1])dnl 11746fe5e51b7Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11747acd6767fSmrgm4_if( 11748acd6767fSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11749acd6767fSmrg [ok:ok],, 11750fe5e51b7Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11751fe5e51b7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11752fe5e51b7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11753fe5e51b7Smrg 11754fe5e51b7Smrg_AM_IF_OPTION([no-define],, 11755acd6767fSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11756acd6767fSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11757fe5e51b7Smrg 11758fe5e51b7Smrg# Some tools Automake needs. 11759fe5e51b7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11760fe5e51b7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11761acd6767fSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11762acd6767fSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11763acd6767fSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11764acd6767fSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11765acd6767fSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11766643b027fSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11767643b027fSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11768acd6767fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11769acd6767fSmrg# For better backward compatibility. To be removed once Automake 1.9.x 11770acd6767fSmrg# dies out for good. For more background, see: 11771acd6767fSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11772acd6767fSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11773acd6767fSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11774ee82cb62Smrg# We need awk for the "check" target (and possibly the TAP driver). The 11775ee82cb62Smrg# system "awk" is bad on some platforms. 11776fe5e51b7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 11777fe5e51b7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11778fe5e51b7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11779fe5e51b7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11780643b027fSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11781643b027fSmrg [_AM_PROG_TAR([v7])])]) 11782fe5e51b7Smrg_AM_IF_OPTION([no-dependencies],, 11783fe5e51b7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11784acd6767fSmrg [_AM_DEPENDENCIES([CC])], 11785acd6767fSmrg [m4_define([AC_PROG_CC], 11786acd6767fSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11787fe5e51b7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11788acd6767fSmrg [_AM_DEPENDENCIES([CXX])], 11789acd6767fSmrg [m4_define([AC_PROG_CXX], 11790acd6767fSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11791fe5e51b7SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11792acd6767fSmrg [_AM_DEPENDENCIES([OBJC])], 11793acd6767fSmrg [m4_define([AC_PROG_OBJC], 11794acd6767fSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11795493f84f4SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11796acd6767fSmrg [_AM_DEPENDENCIES([OBJCXX])], 11797acd6767fSmrg [m4_define([AC_PROG_OBJCXX], 11798493f84f4Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11799fe5e51b7Smrg]) 11800493f84f4SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 11801493f84f4Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 11802493f84f4Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11803493f84f4Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11804643b027fSmrgAC_CONFIG_COMMANDS_PRE(dnl 11805643b027fSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11806643b027fSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11807493f84f4Smrg 11808493f84f4Smrg# POSIX will say in a future version that running "rm -f" with no argument 11809493f84f4Smrg# is OK; and we want to be able to make that assumption in our Makefile 11810493f84f4Smrg# recipes. So use an aggressive probe to check that the usage we want is 11811493f84f4Smrg# actually supported "in the wild" to an acceptable degree. 11812493f84f4Smrg# See automake bug#10828. 11813493f84f4Smrg# To make any issue more visible, cause the running configure to be aborted 11814493f84f4Smrg# by default if the 'rm' program in use doesn't match our expectations; the 11815493f84f4Smrg# user can still override this though. 11816493f84f4Smrgif rm -f && rm -fr && rm -rf; then : OK; else 11817493f84f4Smrg cat >&2 <<'END' 11818493f84f4SmrgOops! 11819493f84f4Smrg 11820493f84f4SmrgYour 'rm' program seems unable to run without file operands specified 11821493f84f4Smrgon the command line, even when the '-f' option is present. This is contrary 11822493f84f4Smrgto the behaviour of most rm programs out there, and not conforming with 11823493f84f4Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11824493f84f4Smrg 11825493f84f4SmrgPlease tell bug-automake@gnu.org about your system, including the value 11826493f84f4Smrgof your $PATH and any error possibly output before this message. This 11827493f84f4Smrgcan help us improve future automake versions. 11828493f84f4Smrg 11829493f84f4SmrgEND 11830493f84f4Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 11831493f84f4Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 11832493f84f4Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 11833493f84f4Smrg echo >&2 11834493f84f4Smrg else 11835493f84f4Smrg cat >&2 <<'END' 11836493f84f4SmrgAborting the configuration process, to ensure you take notice of the issue. 11837493f84f4Smrg 11838493f84f4SmrgYou can download and install GNU coreutils to get an 'rm' implementation 11839493f84f4Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 11840493f84f4Smrg 11841493f84f4SmrgIf you want to complete the configuration process using your problematic 11842493f84f4Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 11843493f84f4Smrgto "yes", and re-run configure. 11844493f84f4Smrg 11845493f84f4SmrgEND 11846493f84f4Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 11847493f84f4Smrg fi 11848ee82cb62Smrgfi 11849ee82cb62Smrgdnl The trailing newline in this macro's definition is deliberate, for 11850ee82cb62Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 11851ee82cb62Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 11852ee82cb62Smrg]) 11853fe5e51b7Smrg 11854acd6767fSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11855643b027fSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11856643b027fSmrgdnl mangled by Autoconf and run in a shell conditional statement. 11857643b027fSmrgm4_define([_AC_COMPILER_EXEEXT], 11858643b027fSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11859643b027fSmrg 11860fe5e51b7Smrg# When config.status generates a header, we must update the stamp-h file. 11861fe5e51b7Smrg# This file resides in the same directory as the config header 11862fe5e51b7Smrg# that is generated. The stamp files are numbered to have different names. 11863fe5e51b7Smrg 11864fe5e51b7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11865fe5e51b7Smrg# loop where config.status creates the headers, so we can generate 11866fe5e51b7Smrg# our stamp files there. 11867fe5e51b7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11868fe5e51b7Smrg[# Compute $1's index in $config_headers. 11869eda3803bSmrg_am_arg=$1 11870fe5e51b7Smrg_am_stamp_count=1 11871fe5e51b7Smrgfor _am_header in $config_headers :; do 11872fe5e51b7Smrg case $_am_header in 11873eda3803bSmrg $_am_arg | $_am_arg:* ) 11874fe5e51b7Smrg break ;; 11875fe5e51b7Smrg * ) 11876fe5e51b7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11877fe5e51b7Smrg esac 11878fe5e51b7Smrgdone 11879eda3803bSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11880fe5e51b7Smrg 11881ee82cb62Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11882fe5e51b7Smrg# 11883fe5e51b7Smrg# This file is free software; the Free Software Foundation 11884fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 11885fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 11886fe5e51b7Smrg 11887fe5e51b7Smrg# AM_PROG_INSTALL_SH 11888fe5e51b7Smrg# ------------------ 11889fe5e51b7Smrg# Define $install_sh. 11890fe5e51b7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 11891fe5e51b7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11892ee82cb62Smrgif test x"${install_sh+set}" != xset; then 11893643b027fSmrg case $am_aux_dir in 11894643b027fSmrg *\ * | *\ *) 11895643b027fSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11896643b027fSmrg *) 11897643b027fSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11898643b027fSmrg esac 11899643b027fSmrgfi 11900acd6767fSmrgAC_SUBST([install_sh])]) 11901fe5e51b7Smrg 11902ee82cb62Smrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 11903fe5e51b7Smrg# 11904fe5e51b7Smrg# This file is free software; the Free Software Foundation 11905fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 11906fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 11907fe5e51b7Smrg 11908fe5e51b7Smrg# Check whether the underlying file-system supports filenames 11909fe5e51b7Smrg# with a leading dot. For instance MS-DOS doesn't. 11910fe5e51b7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 11911fe5e51b7Smrg[rm -rf .tst 2>/dev/null 11912fe5e51b7Smrgmkdir .tst 2>/dev/null 11913fe5e51b7Smrgif test -d .tst; then 11914fe5e51b7Smrg am__leading_dot=. 11915fe5e51b7Smrgelse 11916fe5e51b7Smrg am__leading_dot=_ 11917fe5e51b7Smrgfi 11918fe5e51b7Smrgrmdir .tst 2>/dev/null 11919fe5e51b7SmrgAC_SUBST([am__leading_dot])]) 11920fe5e51b7Smrg 11921fe5e51b7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11922fe5e51b7Smrg 11923ee82cb62Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11924fe5e51b7Smrg# 11925fe5e51b7Smrg# This file is free software; the Free Software Foundation 11926fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 11927fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 11928fe5e51b7Smrg 11929fe5e51b7Smrg# AM_MAKE_INCLUDE() 11930fe5e51b7Smrg# ----------------- 11931fe5e51b7Smrg# Check to see how make treats includes. 11932fe5e51b7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 11933fe5e51b7Smrg[am_make=${MAKE-make} 11934fe5e51b7Smrgcat > confinc << 'END' 11935fe5e51b7Smrgam__doit: 11936643b027fSmrg @echo this is the am__doit target 11937fe5e51b7Smrg.PHONY: am__doit 11938fe5e51b7SmrgEND 11939fe5e51b7Smrg# If we don't find an include directive, just comment out the code. 11940fe5e51b7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11941fe5e51b7Smrgam__include="#" 11942fe5e51b7Smrgam__quote= 11943fe5e51b7Smrg_am_result=none 11944fe5e51b7Smrg# First try GNU make style include. 11945fe5e51b7Smrgecho "include confinc" > confmf 11946acd6767fSmrg# Ignore all kinds of additional output from 'make'. 11947643b027fSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11948643b027fSmrg*the\ am__doit\ target*) 11949643b027fSmrg am__include=include 11950643b027fSmrg am__quote= 11951643b027fSmrg _am_result=GNU 11952643b027fSmrg ;; 11953643b027fSmrgesac 11954fe5e51b7Smrg# Now try BSD make style include. 11955fe5e51b7Smrgif test "$am__include" = "#"; then 11956fe5e51b7Smrg echo '.include "confinc"' > confmf 11957643b027fSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 11958643b027fSmrg *the\ am__doit\ target*) 11959643b027fSmrg am__include=.include 11960643b027fSmrg am__quote="\"" 11961643b027fSmrg _am_result=BSD 11962643b027fSmrg ;; 11963643b027fSmrg esac 11964fe5e51b7Smrgfi 11965fe5e51b7SmrgAC_SUBST([am__include]) 11966fe5e51b7SmrgAC_SUBST([am__quote]) 11967fe5e51b7SmrgAC_MSG_RESULT([$_am_result]) 11968fe5e51b7Smrgrm -f confinc confmf 11969fe5e51b7Smrg]) 11970fe5e51b7Smrg 11971fe5e51b7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11972fe5e51b7Smrg 11973ee82cb62Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11974fe5e51b7Smrg# 11975fe5e51b7Smrg# This file is free software; the Free Software Foundation 11976fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 11977fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 11978fe5e51b7Smrg 11979fe5e51b7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 11980fe5e51b7Smrg# ------------------------------ 11981fe5e51b7SmrgAC_DEFUN([AM_MISSING_PROG], 11982fe5e51b7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11983fe5e51b7Smrg$1=${$1-"${am_missing_run}$2"} 11984fe5e51b7SmrgAC_SUBST($1)]) 11985fe5e51b7Smrg 11986fe5e51b7Smrg# AM_MISSING_HAS_RUN 11987fe5e51b7Smrg# ------------------ 11988493f84f4Smrg# Define MISSING if not defined so far and test if it is modern enough. 11989493f84f4Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 11990fe5e51b7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 11991fe5e51b7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11992fe5e51b7SmrgAC_REQUIRE_AUX_FILE([missing])dnl 11993643b027fSmrgif test x"${MISSING+set}" != xset; then 11994643b027fSmrg case $am_aux_dir in 11995643b027fSmrg *\ * | *\ *) 11996643b027fSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11997643b027fSmrg *) 11998643b027fSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11999643b027fSmrg esac 12000643b027fSmrgfi 12001fe5e51b7Smrg# Use eval to expand $SHELL 12002493f84f4Smrgif eval "$MISSING --is-lightweight"; then 12003493f84f4Smrg am_missing_run="$MISSING " 12004fe5e51b7Smrgelse 12005fe5e51b7Smrg am_missing_run= 12006acd6767fSmrg AC_MSG_WARN(['missing' script is too old or missing]) 12007fe5e51b7Smrgfi 12008fe5e51b7Smrg]) 12009fe5e51b7Smrg 12010fe5e51b7Smrg# Helper functions for option handling. -*- Autoconf -*- 12011fe5e51b7Smrg 12012ee82cb62Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12013fe5e51b7Smrg# 12014fe5e51b7Smrg# This file is free software; the Free Software Foundation 12015fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 12016fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 12017fe5e51b7Smrg 12018fe5e51b7Smrg# _AM_MANGLE_OPTION(NAME) 12019fe5e51b7Smrg# ----------------------- 12020fe5e51b7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 12021fe5e51b7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 12022fe5e51b7Smrg 12023fe5e51b7Smrg# _AM_SET_OPTION(NAME) 120240bb88ba4Smrg# -------------------- 12025fe5e51b7Smrg# Set option NAME. Presently that only means defining a flag for this option. 12026fe5e51b7SmrgAC_DEFUN([_AM_SET_OPTION], 12027acd6767fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 12028fe5e51b7Smrg 12029fe5e51b7Smrg# _AM_SET_OPTIONS(OPTIONS) 120300bb88ba4Smrg# ------------------------ 12031fe5e51b7Smrg# OPTIONS is a space-separated list of Automake options. 12032fe5e51b7SmrgAC_DEFUN([_AM_SET_OPTIONS], 12033eda3803bSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 12034fe5e51b7Smrg 12035fe5e51b7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 12036fe5e51b7Smrg# ------------------------------------------- 12037fe5e51b7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12038fe5e51b7SmrgAC_DEFUN([_AM_IF_OPTION], 12039fe5e51b7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 12040fe5e51b7Smrg 12041ee82cb62Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 12042493f84f4Smrg# 12043493f84f4Smrg# This file is free software; the Free Software Foundation 12044493f84f4Smrg# gives unlimited permission to copy and/or distribute it, 12045493f84f4Smrg# with or without modifications, as long as this notice is preserved. 12046fe5e51b7Smrg 12047493f84f4Smrg# _AM_PROG_CC_C_O 12048493f84f4Smrg# --------------- 12049493f84f4Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 12050493f84f4Smrg# to automatically call this. 12051493f84f4SmrgAC_DEFUN([_AM_PROG_CC_C_O], 12052493f84f4Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12053493f84f4SmrgAC_REQUIRE_AUX_FILE([compile])dnl 12054493f84f4SmrgAC_LANG_PUSH([C])dnl 12055493f84f4SmrgAC_CACHE_CHECK( 12056493f84f4Smrg [whether $CC understands -c and -o together], 12057493f84f4Smrg [am_cv_prog_cc_c_o], 12058493f84f4Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 12059493f84f4Smrg # Make sure it works both with $CC and with simple cc. 12060493f84f4Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 12061493f84f4Smrg # compilers refuse to overwrite an existing .o file with -o, 12062493f84f4Smrg # though they will create one. 12063493f84f4Smrg am_cv_prog_cc_c_o=yes 12064493f84f4Smrg for am_i in 1 2; do 12065493f84f4Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 12066493f84f4Smrg && test -f conftest2.$ac_objext; then 12067493f84f4Smrg : OK 12068493f84f4Smrg else 12069493f84f4Smrg am_cv_prog_cc_c_o=no 12070493f84f4Smrg break 12071493f84f4Smrg fi 12072493f84f4Smrg done 12073493f84f4Smrg rm -f core conftest* 12074493f84f4Smrg unset am_i]) 12075493f84f4Smrgif test "$am_cv_prog_cc_c_o" != yes; then 12076493f84f4Smrg # Losing compiler, so override with the script. 12077493f84f4Smrg # FIXME: It is wrong to rewrite CC. 12078493f84f4Smrg # But if we don't then we get into trouble of one sort or another. 12079493f84f4Smrg # A longer-term fix would be to have automake use am__CC in this case, 12080493f84f4Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 12081493f84f4Smrg CC="$am_aux_dir/compile $CC" 12082493f84f4Smrgfi 12083493f84f4SmrgAC_LANG_POP([C])]) 12084493f84f4Smrg 12085493f84f4Smrg# For backward compatibility. 12086493f84f4SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 12087493f84f4Smrg 12088ee82cb62Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12089fe5e51b7Smrg# 12090fe5e51b7Smrg# This file is free software; the Free Software Foundation 12091fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 12092fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 12093fe5e51b7Smrg 12094493f84f4Smrg# AM_RUN_LOG(COMMAND) 12095493f84f4Smrg# ------------------- 12096493f84f4Smrg# Run COMMAND, save the exit status in ac_status, and log it. 12097493f84f4Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 12098493f84f4SmrgAC_DEFUN([AM_RUN_LOG], 12099493f84f4Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 12100493f84f4Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 12101493f84f4Smrg ac_status=$? 12102493f84f4Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 12103493f84f4Smrg (exit $ac_status); }]) 12104493f84f4Smrg 12105493f84f4Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 12106493f84f4Smrg 12107ee82cb62Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 12108493f84f4Smrg# 12109493f84f4Smrg# This file is free software; the Free Software Foundation 12110493f84f4Smrg# gives unlimited permission to copy and/or distribute it, 12111493f84f4Smrg# with or without modifications, as long as this notice is preserved. 12112fe5e51b7Smrg 12113fe5e51b7Smrg# AM_SANITY_CHECK 12114fe5e51b7Smrg# --------------- 12115fe5e51b7SmrgAC_DEFUN([AM_SANITY_CHECK], 12116fe5e51b7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 12117643b027fSmrg# Reject unsafe characters in $srcdir or the absolute working directory 12118643b027fSmrg# name. Accept space and tab only in the latter. 12119643b027fSmrgam_lf=' 12120643b027fSmrg' 12121643b027fSmrgcase `pwd` in 12122643b027fSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 12123643b027fSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 12124643b027fSmrgesac 12125643b027fSmrgcase $srcdir in 12126643b027fSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12127acd6767fSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12128643b027fSmrgesac 12129643b027fSmrg 12130acd6767fSmrg# Do 'set' in a subshell so we don't clobber the current shell's 12131fe5e51b7Smrg# arguments. Must try -L first in case configure is actually a 12132fe5e51b7Smrg# symlink; some systems play weird games with the mod time of symlinks 12133fe5e51b7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 12134fe5e51b7Smrg# directory). 12135fe5e51b7Smrgif ( 12136acd6767fSmrg am_has_slept=no 12137acd6767fSmrg for am_try in 1 2; do 12138acd6767fSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 12139acd6767fSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12140acd6767fSmrg if test "$[*]" = "X"; then 12141acd6767fSmrg # -L didn't work. 12142acd6767fSmrg set X `ls -t "$srcdir/configure" conftest.file` 12143acd6767fSmrg fi 12144acd6767fSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 12145acd6767fSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 12146acd6767fSmrg 12147acd6767fSmrg # If neither matched, then we have a broken ls. This can happen 12148acd6767fSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 12149acd6767fSmrg # broken ls alias from the environment. This has actually 12150acd6767fSmrg # happened. Such a system could not be considered "sane". 12151acd6767fSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12152acd6767fSmrg alias in your environment]) 12153acd6767fSmrg fi 12154acd6767fSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 12155acd6767fSmrg break 12156acd6767fSmrg fi 12157acd6767fSmrg # Just in case. 12158acd6767fSmrg sleep 1 12159acd6767fSmrg am_has_slept=yes 12160acd6767fSmrg done 12161fe5e51b7Smrg test "$[2]" = conftest.file 12162fe5e51b7Smrg ) 12163fe5e51b7Smrgthen 12164fe5e51b7Smrg # Ok. 12165fe5e51b7Smrg : 12166fe5e51b7Smrgelse 12167fe5e51b7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 12168fe5e51b7SmrgCheck your system clock]) 12169fe5e51b7Smrgfi 12170acd6767fSmrgAC_MSG_RESULT([yes]) 12171acd6767fSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 12172acd6767fSmrg# generated files are strictly newer. 12173acd6767fSmrgam_sleep_pid= 12174acd6767fSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 12175acd6767fSmrg ( sleep 1 ) & 12176acd6767fSmrg am_sleep_pid=$! 12177acd6767fSmrgfi 12178acd6767fSmrgAC_CONFIG_COMMANDS_PRE( 12179acd6767fSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 12180acd6767fSmrg if test -n "$am_sleep_pid"; then 12181acd6767fSmrg # Hide warnings about reused PIDs. 12182acd6767fSmrg wait $am_sleep_pid 2>/dev/null 12183acd6767fSmrg fi 12184acd6767fSmrg AC_MSG_RESULT([done])]) 12185acd6767fSmrgrm -f conftest.file 12186acd6767fSmrg]) 12187fe5e51b7Smrg 12188ee82cb62Smrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 12189a31a186aSmrg# 12190a31a186aSmrg# This file is free software; the Free Software Foundation 12191a31a186aSmrg# gives unlimited permission to copy and/or distribute it, 12192a31a186aSmrg# with or without modifications, as long as this notice is preserved. 12193a31a186aSmrg 12194a31a186aSmrg# AM_SILENT_RULES([DEFAULT]) 12195a31a186aSmrg# -------------------------- 12196a31a186aSmrg# Enable less verbose build rules; with the default set to DEFAULT 12197acd6767fSmrg# ("yes" being less verbose, "no" or empty being verbose). 12198a31a186aSmrgAC_DEFUN([AM_SILENT_RULES], 12199acd6767fSmrg[AC_ARG_ENABLE([silent-rules], [dnl 12200acd6767fSmrgAS_HELP_STRING( 12201acd6767fSmrg [--enable-silent-rules], 12202acd6767fSmrg [less verbose build output (undo: "make V=1")]) 12203acd6767fSmrgAS_HELP_STRING( 12204acd6767fSmrg [--disable-silent-rules], 12205acd6767fSmrg [verbose build output (undo: "make V=0")])dnl 12206acd6767fSmrg]) 12207acd6767fSmrgcase $enable_silent_rules in @%:@ ((( 12208acd6767fSmrg yes) AM_DEFAULT_VERBOSITY=0;; 12209acd6767fSmrg no) AM_DEFAULT_VERBOSITY=1;; 12210acd6767fSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12211a31a186aSmrgesac 122120bb88ba4Smrgdnl 12213acd6767fSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 122140bb88ba4Smrgdnl do not support nested variable expansions. 122150bb88ba4Smrgdnl See automake bug#9928 and bug#10237. 122160bb88ba4Smrgam_make=${MAKE-make} 122170bb88ba4SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 122180bb88ba4Smrg [am_cv_make_support_nested_variables], 122190bb88ba4Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 122200bb88ba4SmrgBAR0=false 122210bb88ba4SmrgBAR1=true 122220bb88ba4SmrgV=1 122230bb88ba4Smrgam__doit: 122240bb88ba4Smrg @$(TRUE) 122250bb88ba4Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 122260bb88ba4Smrg am_cv_make_support_nested_variables=yes 122270bb88ba4Smrgelse 122280bb88ba4Smrg am_cv_make_support_nested_variables=no 122290bb88ba4Smrgfi]) 122300bb88ba4Smrgif test $am_cv_make_support_nested_variables = yes; then 12231acd6767fSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 122320bb88ba4Smrg AM_V='$(V)' 122330bb88ba4Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 122340bb88ba4Smrgelse 122350bb88ba4Smrg AM_V=$AM_DEFAULT_VERBOSITY 122360bb88ba4Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 122370bb88ba4Smrgfi 122380bb88ba4SmrgAC_SUBST([AM_V])dnl 122390bb88ba4SmrgAM_SUBST_NOTMAKE([AM_V])dnl 122400bb88ba4SmrgAC_SUBST([AM_DEFAULT_V])dnl 122410bb88ba4SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12242a31a186aSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12243a31a186aSmrgAM_BACKSLASH='\' 12244a31a186aSmrgAC_SUBST([AM_BACKSLASH])dnl 12245a31a186aSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12246a31a186aSmrg]) 12247a31a186aSmrg 12248ee82cb62Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12249fe5e51b7Smrg# 12250fe5e51b7Smrg# This file is free software; the Free Software Foundation 12251fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 12252fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 12253fe5e51b7Smrg 12254fe5e51b7Smrg# AM_PROG_INSTALL_STRIP 12255fe5e51b7Smrg# --------------------- 12256acd6767fSmrg# One issue with vendor 'install' (even GNU) is that you can't 12257fe5e51b7Smrg# specify the program used to strip binaries. This is especially 12258fe5e51b7Smrg# annoying in cross-compiling environments, where the build's strip 12259fe5e51b7Smrg# is unlikely to handle the host's binaries. 12260fe5e51b7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 12261acd6767fSmrg# always use install-sh in "make install-strip", and initialize 12262fe5e51b7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 12263fe5e51b7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 12264fe5e51b7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12265acd6767fSmrg# Installed binaries are usually stripped using 'strip' when the user 12266acd6767fSmrg# run "make install-strip". However 'strip' might not be the right 12267fe5e51b7Smrg# tool to use in cross-compilation environments, therefore Automake 12268acd6767fSmrg# will honor the 'STRIP' environment variable to overrule this program. 12269acd6767fSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12270fe5e51b7Smrgif test "$cross_compiling" != no; then 12271fe5e51b7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 12272fe5e51b7Smrgfi 12273fe5e51b7SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12274fe5e51b7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 12275fe5e51b7Smrg 12276ee82cb62Smrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 12277fe5e51b7Smrg# 12278fe5e51b7Smrg# This file is free software; the Free Software Foundation 12279fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 12280fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 12281fe5e51b7Smrg 12282fe5e51b7Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 12283fe5e51b7Smrg# --------------------------- 12284eda3803bSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12285fe5e51b7Smrg# This macro is traced by Automake. 12286fe5e51b7SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 12287fe5e51b7Smrg 12288643b027fSmrg# AM_SUBST_NOTMAKE(VARIABLE) 122890bb88ba4Smrg# -------------------------- 12290643b027fSmrg# Public sister of _AM_SUBST_NOTMAKE. 12291643b027fSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12292643b027fSmrg 12293fe5e51b7Smrg# Check how to create a tarball. -*- Autoconf -*- 12294fe5e51b7Smrg 12295ee82cb62Smrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 12296fe5e51b7Smrg# 12297fe5e51b7Smrg# This file is free software; the Free Software Foundation 12298fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 12299fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 12300fe5e51b7Smrg 12301fe5e51b7Smrg# _AM_PROG_TAR(FORMAT) 12302fe5e51b7Smrg# -------------------- 12303fe5e51b7Smrg# Check how to create a tarball in format FORMAT. 12304acd6767fSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 12305fe5e51b7Smrg# 12306fe5e51b7Smrg# Substitute a variable $(am__tar) that is a command 12307fe5e51b7Smrg# writing to stdout a FORMAT-tarball containing the directory 12308fe5e51b7Smrg# $tardir. 12309fe5e51b7Smrg# tardir=directory && $(am__tar) > result.tar 12310fe5e51b7Smrg# 12311fe5e51b7Smrg# Substitute a variable $(am__untar) that extract such 12312fe5e51b7Smrg# a tarball read from stdin. 12313fe5e51b7Smrg# $(am__untar) < result.tar 12314493f84f4Smrg# 12315fe5e51b7SmrgAC_DEFUN([_AM_PROG_TAR], 123160bb88ba4Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 123170bb88ba4Smrg# in the wild :-( We should find a proper way to deprecate it ... 123180bb88ba4SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 12319493f84f4Smrg 12320493f84f4Smrg# We'll loop over all known methods to create a tar archive until one works. 12321fe5e51b7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12322fe5e51b7Smrg 12323493f84f4Smrgm4_if([$1], [v7], 12324493f84f4Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12325493f84f4Smrg 12326493f84f4Smrg [m4_case([$1], 12327493f84f4Smrg [ustar], 12328493f84f4Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12329493f84f4Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 12330493f84f4Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12331493f84f4Smrg # and bug#13588). 12332493f84f4Smrg am_max_uid=2097151 # 2^21 - 1 12333493f84f4Smrg am_max_gid=$am_max_uid 12334493f84f4Smrg # The $UID and $GID variables are not portable, so we need to resort 12335493f84f4Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12336493f84f4Smrg # below are definitely unexpected, so allow the users to see them 12337493f84f4Smrg # (that is, avoid stderr redirection). 12338493f84f4Smrg am_uid=`id -u || echo unknown` 12339493f84f4Smrg am_gid=`id -g || echo unknown` 12340493f84f4Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12341493f84f4Smrg if test $am_uid -le $am_max_uid; then 12342493f84f4Smrg AC_MSG_RESULT([yes]) 12343493f84f4Smrg else 12344493f84f4Smrg AC_MSG_RESULT([no]) 12345493f84f4Smrg _am_tools=none 12346493f84f4Smrg fi 12347493f84f4Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12348493f84f4Smrg if test $am_gid -le $am_max_gid; then 12349493f84f4Smrg AC_MSG_RESULT([yes]) 12350493f84f4Smrg else 12351493f84f4Smrg AC_MSG_RESULT([no]) 12352493f84f4Smrg _am_tools=none 12353493f84f4Smrg fi], 12354fe5e51b7Smrg 12355493f84f4Smrg [pax], 12356493f84f4Smrg [], 12357493f84f4Smrg 12358493f84f4Smrg [m4_fatal([Unknown tar format])]) 12359493f84f4Smrg 12360493f84f4Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 12361493f84f4Smrg 12362493f84f4Smrg # Go ahead even if we have the value already cached. We do so because we 12363493f84f4Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 12364493f84f4Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12365493f84f4Smrg 12366493f84f4Smrg for _am_tool in $_am_tools; do 12367493f84f4Smrg case $_am_tool in 12368493f84f4Smrg gnutar) 12369493f84f4Smrg for _am_tar in tar gnutar gtar; do 12370493f84f4Smrg AM_RUN_LOG([$_am_tar --version]) && break 12371493f84f4Smrg done 12372493f84f4Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12373493f84f4Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12374493f84f4Smrg am__untar="$_am_tar -xf -" 12375493f84f4Smrg ;; 12376493f84f4Smrg plaintar) 12377493f84f4Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 12378493f84f4Smrg # ustar tarball either. 12379493f84f4Smrg (tar --version) >/dev/null 2>&1 && continue 12380493f84f4Smrg am__tar='tar chf - "$$tardir"' 12381493f84f4Smrg am__tar_='tar chf - "$tardir"' 12382493f84f4Smrg am__untar='tar xf -' 12383493f84f4Smrg ;; 12384493f84f4Smrg pax) 12385493f84f4Smrg am__tar='pax -L -x $1 -w "$$tardir"' 12386493f84f4Smrg am__tar_='pax -L -x $1 -w "$tardir"' 12387493f84f4Smrg am__untar='pax -r' 12388493f84f4Smrg ;; 12389493f84f4Smrg cpio) 12390493f84f4Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12391493f84f4Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12392493f84f4Smrg am__untar='cpio -i -H $1 -d' 12393493f84f4Smrg ;; 12394493f84f4Smrg none) 12395493f84f4Smrg am__tar=false 12396493f84f4Smrg am__tar_=false 12397493f84f4Smrg am__untar=false 12398493f84f4Smrg ;; 12399493f84f4Smrg esac 12400493f84f4Smrg 12401493f84f4Smrg # If the value was cached, stop now. We just wanted to have am__tar 12402493f84f4Smrg # and am__untar set. 12403493f84f4Smrg test -n "${am_cv_prog_tar_$1}" && break 12404493f84f4Smrg 12405493f84f4Smrg # tar/untar a dummy directory, and stop if the command works. 12406493f84f4Smrg rm -rf conftest.dir 12407493f84f4Smrg mkdir conftest.dir 12408493f84f4Smrg echo GrepMe > conftest.dir/file 12409493f84f4Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12410493f84f4Smrg rm -rf conftest.dir 12411493f84f4Smrg if test -s conftest.tar; then 12412493f84f4Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 12413493f84f4Smrg AM_RUN_LOG([cat conftest.dir/file]) 12414493f84f4Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12415493f84f4Smrg fi 12416493f84f4Smrg done 12417fe5e51b7Smrg rm -rf conftest.dir 12418fe5e51b7Smrg 12419493f84f4Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12420493f84f4Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12421493f84f4Smrg 12422fe5e51b7SmrgAC_SUBST([am__tar]) 12423fe5e51b7SmrgAC_SUBST([am__untar]) 12424fe5e51b7Smrg]) # _AM_PROG_TAR 12425fe5e51b7Smrg 12426